Closed carlitosLMO closed 8 years ago
Not currently, but I can easily add one.
What do you think about having an option --hideattrs=... that you can blacklist attributes. Then you can do something like --hideattrs=LineNumberTable,LocalVariableTable,LocalVariableTypeTable
Alternatively, what do you think about an option called -codeonly that ignores all attributes besides Code, ConstantValue, and BootstrapMethodsTable?
an option called -codeonly will be great! It would be easier to edit the file and then re-compile with "assemble.py"
If you're going to reassemble, you'll want to include the other attributes though. At least StackMapTable, and the inner class and annotation stuff.
Would it be possible to remove only these parts: .stack stack_1 ... .stack full ... .end stack L1: ... .linenumbertable ... .end linenumbertable .localvariabletable ... .end localvariabletable
and then re-compile?
Yes, but if you remove the stackmap from a 51.0+ classfile, it won't run any more.
Did you ever make up your mind about the desired behavior?
Closing due to lack of response.
you could just strip the debug info from the class at a later time with another tool no?
Yes, java asm for example has a simple class reader flag for it
How to prevents disassemble.py from writing out debug info like:
Apktool has "--no-debug-info" option. There is any similar option for disassemble.py? tks