Android常用shell指令收集

一、base cmd

1、挂载文件系统:mount -o remount /dev/block/mtdblock0 /system
2、拷贝文件:cp /storage/emulated/legacy/a.apk /system/app/a.apk
3、启动指定APP:adb shell am start -n com.test.shellsample/com.test.shellsample.MainActivity
4、修改文件夹及子目录权限:chmod -R 777 data


二、studio

1、装箱打包生成APK:gradlew assemble


三、Android Wear

1、手表通过手机与电脑连接:
adb forward tcp:2222 localabstract:/adb-hub
adb connect localhost:2222

adb -s localhost:2222 shell

2、修改手表输入法设置:
adb -s localhost:2222 shell ime enable cn.hangood.hangoodkeyboard/.HangoodIME
adb -s localhost:2222 shell ime set cn.hangood.hangoodkeyboard/.HangoodIME

你可能感兴趣的:(Android底层,知识梳理,shell,移动开发)