android找不到 ll (ls -l)等命令或映射其它命令的解决方法

 

只需要把相应的 ll 定义加到 mkshrc中即可.mkshrc路径:external/mksh/mkshrc,然后保存退出 ,在根目录source ./build/envsetup.sh,lunch xxxx    进入到external/mksh后mm编译该模块,编译完后在out\target\product\xxx\system\etc\下面就有新的mkshrc了,替换掉设备/system/etc/目录下原有的mkshrc,重启生效;

# Copyright (c) 2010, 2012, 2013, 2014
#	Thorsten Glaser 
# This file is provided under the same terms as mksh.
#-
# Minimal /system/etc/mkshrc for Android
#
# Support: https://launchpad.net/mksh

: ${HOSTNAME:=$(getprop ro.product.device)}
: ${HOSTNAME:=android}
: ${TMPDIR:=/data/local/tmp}
export HOSTNAME TMPDIR

if (( USER_ID )); then PS1='$'; else PS1='#'; fi
PS4='[$EPOCHREALTIME] '; PS1='${|
	local e=$?

	(( e )) && REPLY+="$e|"

	return $e
}$HOSTNAME:${PWD:-?} '"$PS1 "

#add shell command by amjeg
alias l='ls'
alias la='l -a'
alias ll='l -l'
alias lo='l -a -l'
alias vi='busybox vi'
alias ps='ps -A'
#add-end

 

你可能感兴趣的:(Android开发,mkshrc,ll,ls,-l,android命令)