so安卓逆向之_IDA动态调试_so
一、ida调试so文件流程
1.准备工具:
a).SDK自带工具DDMS
b).通过命令把IDA根目录dbgsrv目录下的android_server上传到手机的/data/local/tmp文件夹下并重新命名(不多解释)
#上传android_server文件到手机的目录下
adb push "android_server文件路径" /data/local/tmp/

c).准备好IDA软件

2.动态调试APP:
a).启动软件,让软件挂起来#使用adb命令启动软件 挂起软件
adb shell am start -D -n 包名/入口界面名称
#先看看我的apk的AndroidManifest.xml文件,可以看出我的包名加入口是
#com.example.mypc.myxphook/.MainActivity 所以执行的命令是
adb shell am start -D -n com.example.mypc.myxphook/.MainActivity
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.mypc.myxphook">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<meta-data
android:name="xposedmodule"
android:value="true" />
<meta-data
android:name="xposeddescription"
android:value="Hook log test" />
<meta-data
android:name="xposedminversion"
android:value="54" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>


c).启动之前上传的IDA的服务端程序如果想换端口 加-p参数如:-p12345 注意没有空格
d).转发端口,将手机上的23946转发到本地上
e).使用IDA开始附加




f).勾选完成后按一下F9
我们需要放行程序的运行,在IDA那边已经自动断点了,所以要让红色的七星瓢虫变成绿色就好了,剩下的就交给IDA了,继续执行命令#jdb -connect com.sun.jdi.SocketAttach:hostname=127.0.0.1,port=端口号
#在红色框内/8700的前面就是需要的端口号这里是8607 完整命令
jdb -connect com.sun.jdi.SocketAttach:hostname=127.0.0.1,port=8607


在浏览的同时希望给予作者打赏,来支持作者的服务器维护费用.一分也是爱~