adb 读写模式 挂载文件系统

删除需要把system挂载为读写,用到了这篇文章的这个命令:

1

shell@android:/ #  mount -o rw,remount yassf2 /system/

完整文章转自:http://www.qylk.blog.163.com/blog/static/1346873562013092154430/

如下读写方式挂载/system/app/目录:

>adb shell

shell@android:/ $  su

su

shell@android:/ #  mount -o rw,remount yassf2 /system/ 

shell@android:/ #  chmod 777 /system/app/
通常push到手机内存里的文件还需要设置读r写w执行x属性:

chmod 644 xxxxxx

常用adb命令:

adb 默认不支持中文字符,需要重新源码编译,见另一日志:

http://www.qylk.blog.163.com/blog/static/134687356201307177822/

卸载:uninstall [-k] [package] k表示保留配置文件

安装:install -r [package]

上传:adb  push  text.txt   /sdcard/txt.txt

下载:adb  pull   /data/app/com.qylk.express-2.apk

显示执行中的进程及CPU使用情况 top  

显示内存使用情况 free

更改一个或多个文件或目录的属主和属组chown 

启动Activity: am start -n 包名/类名 如am start -n cn.qylk/.Logo

相机   am start -n com.android.camera/com.android.camera.Camera

浏览器 am start -n com.android.browser/com.android.browser.BrowserActivity

定位   am start -a android.intent.action.VIEW geo:0,0?q=beijing

启动网页 am start -a android.intent.action.VIEW -d http://www.aizheke.com

打电话 am start -a android.intent.action.CALL -d tel:88888888

启动Service am startservice -n cn.qylk/.service.LocalService

查看LOG信息 logcat -s [标签名]【记录到文件:-f [filename]】

查看设备 adb devices

进入shell adb -s emulator-5554 shell

设备序列号 adb get-serialno

快捷方式 ln -s <target> <name>

重启 reboot [-n] [-p] [rebootcommand] 

-n: 在重开机前不做将记忆体资料写回硬盘的动作。

adb reboot 重新启动

adb reboot recovery 重新启动到recovery

adb reboot bootloader 重新启动到bootloader 

挂载system adb remount

加载文件系统 mount -a [-r] [-t type] [-o options] [-rw] device dir。 

-t type:显示被加载文件系统的类型。 

-n:一般而言,mount挂上后会在/etc/mtab中写入一笔资料,在系统中没有可写入文件系统的情况下,可以用这个选项取消这个动作。  

如:mount -o remount,rw /dev/block/mtdblock3 /system

常用文件命令: rm、cp、mkdir、mv、chmod、grep(文本搜索)、find、

杀进程: kill

比较文件 diff(显示详细不同点)、cmp(显示结论)

检查文件系统的磁盘占用 df

显示文件内容 cat [name]

猜你喜欢

转载自blog.csdn.net/thanklife/article/details/84585583
adb
今日推荐