DexPatcher / dexpatcher-tool

Android Dalvik bytecode patcher.
https://dexpatcher.github.io/
GNU General Public License v3.0
423 stars 82 forks source link

Crash after patching telephony-common #36

Open dep4 opened 3 years ago

dep4 commented 3 years ago

Hi, thanks for the great tool! Patching services.jar works well, patching telephony-common.jar even in pass-through mode results in a crash. Tried version 1.8.0 as well

Steps to reproduce

java -jar dexpatcher.jar --output classes.dex telephony-common.dex --debug --verbose
DexPatcher version 1.7.0 by Lanchon (https://dexpatcher.github.io/)
info: read 'telephony-common.dex'
debug: read 'telephony-common.dex': 1318 types
debug: read 'telephony-common.dex': dex version '039'
info: write 'classes.dex'
debug: write 'classes.dex': dex version '039'
debug: write 'classes.dex': 1318 types
0 error(s), 0 warning(s)
Lanchon commented 3 years ago

interesting...

try unzipping classes.dex and then rezipping.

if that works ok, try a baksmaki/smali roundtrip.

if that works, try another smali roundtrip using the smali version that corresponds to the dexlib2 version used by your chosen dexpatcher-tool version (see its build.gradle file).

thanks,!

Lanchon commented 3 years ago

i caught your https://github.com/JesusFreke/smali/issues/811