Skip to content

Commit b5cd98f

Browse files
committed
Removed JNA dependency, fixed some crash, can choose columns, better copying
1 parent a357c1e commit b5cd98f

24 files changed

+681
-449
lines changed

README.md

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
# Version 1.4.2 [release](https://github.com/KYHSGeekCode/Android-Disassembler/releases)!
2-
### Sorry, saved raw disasms are now incompatible with this version!
1+
# Android-Disassembler - Analyze your malicious app on your phone
32

4-
# Android-Disassembler
53
Disassemble **ANY** files including android shared libraries (aka .so files) (NDK, JNI), windows PE files(EXE, DLLs, SYSs, etc..), linux executables, object files, ANY files you want like pictures, audios, etc(for fun) entirely on Android. Capstone-based disassembler application on android.
64

5+
# Version 1.4.3 [release](https://github.com/KYHSGeekCode/Android-Disassembler/releases)!
6+
### Sorry, saved raw disasms are now incompatible with this version!
7+
78
# Features
89
- Shows details of elf files.
910
- Shows symbol table(functions or objects' ,... names) of elf files.
@@ -21,15 +22,16 @@ Disassemble **ANY** files including android shared libraries (aka .so files) (ND
2122
- Colorize ARM arch instructions better.
2223
- Added **Follow Jump** menu for jump instructions.(*With BackStack*)
2324
- Can override auto parse setup
24-
25-
# What's new
2625
- You can copy an instruction to the clipboard.
2726
- It now parses *IAT, EAT* of PE headers.
27+
28+
# What's new
29+
2830
- Fixed bugs.
31+
- You can now choose the columns to view.
2932

30-
# New [theme](https://github.com/KYHSGeekCode/Android-Disassembler/tree/master/themes)!
31-
- KYHSGeekCode theme!
32-
![image](images/Screenshot_20181221-215203.png)![image](images/Screenshot_20181221-215647.png)![image](images/Screenshot_20181222-173614.png)
33+
# [Themes Download](https://github.com/KYHSGeekCode/Android-Disassembler/tree/master/themes)
34+
Good themes usually help you recognize some important instructions easily.
3335

3436
# Usuage
3537
1. Choose a file to analyze.
@@ -48,10 +50,11 @@ Disassemble **ANY** files including android shared libraries (aka .so files) (ND
4850
![image](images/Screenshot_20190101-133256.png)
4951
1. Go to disassembly tab.
5052
![image](images/Screenshot_20181217-112755.png)
53+
![image](images/Screenshot_20181221-215203.png)![image](images/Screenshot_20181221-215647.png)![image](images/Screenshot_20181222-173614.png)
5154
1. To export the disassembly, press `Export` button and choose the option.
5255
![image](images/Screenshot_20181022-193127.png)
5356

54-
# Export mode
57+
# Export mode (Currently may not work well)
5558
- Raw
5659
Uses java's intrinsic serialization, and super fast.
5760
- Classic
@@ -84,6 +87,7 @@ Here are some common issues and some solutons for them.
8487
You can download the theme.zip here.
8588
1. Unzip it to `/storage/emulated/0/themes/` or `/sdcard/themes`.
8689
1. Done. You can now use this in settings menu(in app)
90+
1. To rename/remove themes, just rename/remove the files.
8791

8892

8993
### Feature requests are welcomed!
@@ -106,12 +110,19 @@ You can download the theme.zip here.
106110
- More sophisticated colorizing.
107111
- Generate more useful comments
108112
- Provide assembly tutorials.
109-
- Fix crashes/symbols bug.
113+
- Fix symbols bug.
110114
- Add pseudo-virtual machine to debug.
111115
- Allow users to analyze active processes.
112116
- Allow root file chooser.
113117
- Add arrow beside the disassembly.
114118
- Row selection
119+
- Better support for thumb assemblies
120+
- Support .NET assemblies
121+
- Add compatibility for OllyDbg's `.udd/.bak` files
122+
123+
# Help wanted!
124+
- X86 jumping address calculation creates negative values.
125+
- Don't the symbols' names look odd?
115126

116127
# Thanks
117128
https://reverseengineering.stackexchange.com/a/20124/23870

app/libs/RootTools.jar

82.2 KB
Binary file not shown.

app/src/main/java/capstone/Arm.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
package capstone;
55

6-
import com.sun.jna.Structure;
7-
import com.sun.jna.Union;
6+
//import com.sun.jna.Structure;
7+
//import com.sun.jna.Union;
88

99
import java.util.List;
1010
import java.util.Arrays;
@@ -13,48 +13,48 @@
1313

1414
public class Arm {
1515

16-
public static class MemType extends Structure {
16+
public static class MemType/* extends Structure*/ {
1717
public int base;
1818
public int index;
1919
public int scale;
2020
public int disp;
21-
21+
/*
2222
@Override
2323
public List getFieldOrder() {
2424
return Arrays.asList("base", "index", "scale", "disp");
25-
}
25+
}*/
2626
}
2727

28-
public static class OpValue extends Union {
28+
public static class OpValue/* extends Union*/ {
2929
public int reg;
3030
public int imm;
3131
public double fp;
3232
public MemType mem;
3333
public int setend;
34-
34+
/*
3535
@Override
3636
public List getFieldOrder() {
3737
return Arrays.asList("reg", "imm", "fp", "mem", "setend");
38-
}
38+
}*/
3939
}
4040

41-
public static class OpShift extends Structure {
41+
public static class OpShift/* extends Structure*/ {
4242
public int type;
4343
public int value;
44-
44+
/*
4545
@Override
4646
public List getFieldOrder() {
4747
return Arrays.asList("type","value");
48-
}
48+
}*/
4949
}
5050

51-
public static class Operand extends Structure {
51+
public static class Operand/* extends Structure*/ {
5252
public int vector_index;
5353
public OpShift shift;
5454
public int type;
5555
public OpValue value;
5656
public boolean subtracted;
57-
57+
/*
5858
public void read() {
5959
readField("vector_index");
6060
readField("type");
@@ -76,7 +76,7 @@ public void read() {
7676
@Override
7777
public List getFieldOrder() {
7878
return Arrays.asList("vector_index", "shift", "type", "value", "subtracted");
79-
}
79+
}*/
8080
}
8181

8282
public static class UnionOpInfo extends Capstone.UnionOpInfo {
@@ -96,7 +96,7 @@ public static class UnionOpInfo extends Capstone.UnionOpInfo {
9696
public UnionOpInfo() {
9797
op = new Operand[36];
9898
}
99-
99+
/*
100100
public void read() {
101101
readField("usermode");
102102
readField("vector_size");
@@ -117,7 +117,7 @@ public void read() {
117117
public List getFieldOrder() {
118118
return Arrays.asList("usermode", "vector_size", "vector_data",
119119
"cps_mode", "cps_flag", "cc", "update_flags", "writeback", "mem_barrier", "op_count", "op");
120-
}
120+
}*/
121121
}
122122

123123
public static class OpInfo extends Capstone.OpInfo {

app/src/main/java/capstone/Arm64.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
package capstone;
55

6-
import com.sun.jna.Structure;
7-
import com.sun.jna.Union;
6+
//import com.sun.jna.Structure;
7+
//import com.sun.jna.Union;
88

99
import java.util.List;
1010
import java.util.Arrays;
@@ -13,18 +13,18 @@
1313

1414
public class Arm64 {
1515

16-
public static class MemType extends Structure {
16+
public static class MemType /*extends Structure*/ {
1717
public int base;
1818
public int index;
1919
public int disp;
20-
20+
/*
2121
@Override
2222
public List getFieldOrder() {
2323
return Arrays.asList("base", "index", "disp");
24-
}
24+
}*/
2525
}
2626

27-
public static class OpValue extends Union {
27+
public static class OpValue/* extends Union*/ {
2828
public int reg;
2929
public long imm;
3030
public double fp;
@@ -33,32 +33,32 @@ public static class OpValue extends Union {
3333
public int sys;
3434
public int prefetch;
3535
public int barrier;
36-
36+
/*
3737
@Override
3838
public List getFieldOrder() {
3939
return Arrays.asList("reg", "imm", "fp", "mem", "pstate", "sys", "prefetch", "barrier");
40-
}
40+
}*/
4141
}
4242

43-
public static class OpShift extends Structure {
43+
public static class OpShift/* extends Structure*/ {
4444
public int type;
4545
public int value;
46-
46+
/*
4747
@Override
4848
public List getFieldOrder() {
4949
return Arrays.asList("type","value");
50-
}
50+
}*/
5151
}
5252

53-
public static class Operand extends Structure {
53+
public static class Operand /*extends Structure*/ {
5454
public int vector_index;
5555
public int vas;
5656
public int vess;
5757
public OpShift shift;
5858
public int ext;
5959
public int type;
60-
public OpValue value;
61-
60+
// public OpValue value;
61+
/*
6262
public void read() {
6363
readField("type");
6464
if (type == ARM64_OP_MEM)
@@ -80,7 +80,7 @@ public void read() {
8080
@Override
8181
public List getFieldOrder() {
8282
return Arrays.asList("vector_index", "vas", "vess", "shift", "ext", "type", "value");
83-
}
83+
}*/
8484
}
8585

8686
public static class UnionOpInfo extends Capstone.UnionOpInfo {
@@ -94,7 +94,7 @@ public static class UnionOpInfo extends Capstone.UnionOpInfo {
9494
public UnionOpInfo() {
9595
op = new Operand[8];
9696
}
97-
97+
/*
9898
public void read() {
9999
readField("cc");
100100
readField("_update_flags");
@@ -108,7 +108,7 @@ public void read() {
108108
@Override
109109
public List getFieldOrder() {
110110
return Arrays.asList("cc", "_update_flags", "_writeback", "op_count", "op");
111-
}
111+
}*/
112112
}
113113

114114
public static class OpInfo extends Capstone.OpInfo {

0 commit comments

Comments
 (0)