无名商城论坛

搜索
查看: 324|回复: 0

[其他技术] 【HC】常用adb命令

[复制链接]

1万

主题

1万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
32464
发表于 2022-5-8 18:37:13 | 显示全部楼层 |阅读模式

1、获取设备列表和状态设备列表E:\android\studio\workspace\JNILearn>adb devicesList of devices attachedLE67A06310127215 device 设备状态E:\android\studio\workspace\JNILearn>adb get-statedevice 设备状态有3种device:设备正常连接offline:连接出现异常,设备无响应unknown:没有连接设备 2、重启adb服务一般在连接出现异常,使用 adb devices 未正常列出设备, 设备状态异常时使用 adb kill-server,结束 adb 服务。然后运行adb start-server 进行重启服务  3、打印android系统日志adb logcat , 打印 Android 的系统日志,这个可以单独拿出来讲 4、安装卸载apkadb installadb uninstall 5、adb 文件提权首先是 使用 adb 给 android 中的 data 提权权限D:\android\studio\workspace\WifiCollection>adb shellshell@a5ltectc:/ $ suroot@a5ltectc:/ # chmod 777 /dataroot@a5ltectc:/ # chmod 777 /data/dataroot@a5ltectc:/ # #递归修改文件权限 chmod -R 755 文件名|目录名 6、adb文件下载adb pull下载android 中的系统文件。这个一个 UI 的框架E:\android\studio\workspace\JNILearn>adb pull /system/framework/framework-res.apk/system/framework/framework-res.apk: 1 file pulled. 4.5 MB/s (55160175 bytes in 11.795s) 7、adb文件上传adb pushE:\android\studio\workspace\JNILearn>adb push C:\Users\Administrator\Desktop\hello sdcard/C:\Users\Administrator\Desktop\hello: 1 file pushed. 0.8 MB/s (8608 bytes in 0.011s)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表