【Android 逆向】手动构造dex文件
public class Hello {
public static void main(String[] args) {
System.out.println("hello android");
}
}
javac Hello.java
# 生成Hello.class文件
X:\Android\sdk\build-tools\26.0.2\dx.bat --dex --output=Hello.dex Hello.class
# 生成Hello.dex文件
链接上夜神模拟器,默认端口62001
adb connect 127.0.0.1:62001
adb root
adb push Hello.dex /sdcard
Hello.dex: 1 file pushed. 0.0 MB/s (736 bytes in 0.212s)
adb shell
dalvikvm -cp /sdcard/
hello android