JesusFreke / smali

smali/baksmali
6.29k stars 1.07k forks source link

[feature] Instruction-Bytes per output #801

Open OdinVex opened 3 years ago

OdinVex commented 3 years ago

An option to allow returning the bytes for instructions used per output would be nice.

Example:

00 nop
12 21 const/4 v1, #int2
0F 00 return v0
JesusFreke commented 3 years ago

see: baksmali help dump ;)

OdinVex commented 3 years ago

My post was quickly made to align any references regarding trying to add a 'bytes-column' to the JADX project.

jpstotz commented 3 years ago

OdinVex forgot to mention that baksmali is used as a library and on library level there seems no way to generate the smali code in smaller parts that on class level for adding some sort of mapping between smali code and the offset in the dex file.

OdinVex commented 3 years ago

offset in the dex file

I'm not really that interested in offsets but rather the actual raw bytes involved in the actual decompiled instruction.

jpstotz commented 3 years ago

@OdinVex File byte data + offset to instruction in that file = raw bytes of the instruction

OdinVex commented 3 years ago

@OdinVex File byte data + offset to instruction in that file = raw bytes of the instruction

That's obvious. I was just hoping for an easier "bytes: opcode" output for use in JADX. I hate having to switch between multiple pieces of software to break drivers apart to port Linux.