Android mount: Read-only file system
新版的x86-android-4.4虚拟机只有在开机的短时间内具有mount的读写权限,所以应该在开机之后的瞬间完成写入操作,使用以下的命令:
adb root && adb shell mount -o rw,remount /system && adb push libdvm_x86.so /system/lib/libdvm.so
操作结果:
image.png
DumpDex脚本
idc
static main(void)
{
auto fp,dex_addr,end_addr;
//路径中两个 //代表/,根目录可能没有读写权限
fp = fopen("G:\\dexs\\dump.dex","wb");
end_addr = r0 +r1;
for (dex_addr = r0;dex_addr<end_addr;dex_addr ++)
fputc(Byte(dex_addr),fp);
}
python
import idaapi
start_address = 0x51B1C008
data_length = 0x0074BF60
data = idaapi.dbg_read_memory(start_address, data_length)
fp = open('G:\\dexs\\dump.dex', 'wb')
fp.write(data)
fp.close()
安卓日志打印堆栈
Log.getStackTraceString(new Exception());
Log.d(TAG,"Activity",new Exception());
动态调试
adb forward tcp:23946 tcp:23946
adb shell am start -D -n com.xxx.xxx/com.xxx.SplashActivity
jdb -connect com.sun.jdi.SocketAttach:hostname=127.0.0.1,port=8700