4
【笔记】Android通过ADB调试应用
source link: https://loli.fj.cn/2023/02/27/Android%E9%80%9A%E8%BF%87ADB%E8%B0%83%E8%AF%95%E5%BA%94%E7%94%A8/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
【笔记】Android通过ADB调试应用
2023-02-27
Android通过ADB调试应用
- adb工具
开启允许Debug模式启动
通过修改安装包允许Debug模式启动
MT管理器
->选择APK->查看
AndroidManifest.xml
->反编译
在
<application>
标签内添加属性android:debuggable="true"
右上角点击保存->返回->提示是否重新打包,选择
确定
通过Magick命令直接允许Debug模式启动
- 需要安装Magick环境
adb shell
su
magisk resetprop ro.debuggable 1
stop;start;
通过Debug模式启动
-n
:启动一个Activity-D
:以Debug模式启动
com.example
:包名.MainActivity
:启动类的类名,去除了包名的全局限定名
adb shell am start -D -n com.example/.MainActivity
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK