A simple Radare2 script to decompile Android APKs using Androguard
Clone repo
pip install --user -r requirements.txt
r2 session>#!pipe python r2DAD.py -h
usage: r2DAD.py [-h] [-p PROJECT_NAME] [-c CLASS_NAME] [-m METHOD_NAME]
r2DAD Decompiler
optional arguments:
-h, --help show this help message and exit
-p PROJECT_NAME Save session with Radare2 Project (Project must already exist!)
-c CLASS_NAME Decompile specific class
-m METHOD_NAME Decompile specific method (must be used with -c)
[0x0017d5ec]> #!pipe python <path/to/r2DAD.py>
Current class: Lcom/dardesh/SplashActivity
Current Method: n
Loading session file, please wait...
private void n()
{
if (android.os.Build$VERSION.SDK_INT < 23) {
if (this.b("com.metrial.setting")) {
this.o();
} else {
this.l();
}
} else {
android.util.Log.e("Err", "requestPermissions");
if (this.checkSelfPermission("android.permission.WRITE_EXTERNAL_STORAGE") == 0) {
if (this.checkSelfPermission("android.permission.READ_EXTERNAL_STORAGE") == 0) {
} else {
String[] v0_6 = new String[1];
v0_6[0] = "android.permission.READ_EXTERNAL_STORAGE";
this.requestPermissions(v0_6, 200);
}
} else {
String[] v0_7 = new String[1];
v0_7[0] = "android.permission.WRITE_EXTERNAL_STORAGE";
this.requestPermissions(v0_7, 100);
}
}
return;
}
[0x0017d5ec]>