FORUMS
Remove All Ads from XDA

[Q] Disassembling, assembling and re-odexing breaks it by removing some classes

1 posts
Thanks Meter: 0
 
By sdroege, Junior Member on 15th September 2014, 08:19 PM
Post Reply Subscribe to Thread Email Thread
Hi,

I was trying to modify framework.jar on my phone. For this I used the latest versions of smali and baksmali (2.0.3), and dexopt-wrapper from http home.scarlet.be /~rh323092 /deodex.html (please reconstruct the link yourself, I can't include it in the post because "spam" protection). In detail what I did is the following:

1) Copied all of /system/frameworks to my machine
2) Ran java -jar baksmali-2.0.3.jar -x framework.odex -o framework -a 17 -d /path/to/system/framework (no errors or anything)
3) Did all the changes (but doing no changes at all has the same effect)
4) Ran java -jar smali-2.0.3.jar -a 17 framework -o classes.dex (no errors or anything)
5) Ran zip framework.jar classes.dex
6) Followed the instructions from the above link (which ran without an error)

The final framework.odex now is about 600kb smaller than the original one. Trying to use it leads to the following error during booting:

E/JNIHelp ( 718): Native registration unable to find class 'android/debug/JNITest', aborting
F/libc ( 718): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 718 (zygote)
D/AEE/AED ( 123): $===AEE===AEE===AEE===$
D/AEE/AED ( 123): p 0 poll events 1 revents 0
D/AEE/AED ( 123): not know revents:0
D/AEE/AED ( 123): p 1 poll events 1 revents 0
D/AEE/AED ( 123): not know revents:0
D/AEE/AED ( 123): p 2 poll events 1 revents 1
D/AEE/AED ( 123): aed_main_fork_worker: generator 0xf3d168, worker 0xbed7ca48, recv_fd 15
D/AEE/AED ( 123): p 3 poll events 1 revents 0
D/AEE/AED ( 123): not know revents:0
D/AEE/AED ( 123): p 4 poll events 1 revents 0
D/AEE/AED ( 123): not know revents:0
I/DEBUG ( 724): handle_request(15)
I/DEBUG ( 724): check process 718 name:zygote
I/DEBUG ( 724): BOOM: pid=718 uid=0 gid=0 tid=718
I/DEBUG ( 724): [OnPurpose Redunant in preset_info] pid: 718, tid: 718, name: zygote >>> zygote <<<
I/DEBUG ( 724): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 724): Build fingerprint: 'FP/ahong89_wet_jb2/ahong89_wet_jb2:4.2.2/JDQ39/1406799590:user/test-keys'
I/DEBUG ( 724): pid: 718, tid: 718, name: zygote >>> zygote <<<
I/DEBUG ( 724): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad
I/DEBUG ( 724): r0 00000000 r1 00000027 r2 deadbfff r3 00000000
I/DEBUG ( 724): r4 00000000 r5 bed39954 r6 402c9780 r7 00000002
I/DEBUG ( 724): r8 402d2bcc r9 400d7fc1 sl 400d7f94 fp 400d7fca
I/DEBUG ( 724): ip 00000001 sp bed39950 lr 40129d60 pc 40123628 cpsr 60000010
I/DEBUG ( 724):
I/DEBUG ( 724): backtrace:
I/DEBUG ( 724): #00 pc 00024628 /system/lib/libc.so
I/DEBUG ( 724): #01 pc 00000961 /system/lib/libnativehelper.so (jniRegisterNativeMethods+72)
I/DEBUG ( 724): #02 pc 0004dd07 /system/lib/libandroid_runtime.so (android::AndroidRuntime::startReg(_JNIEnv*)+34)
I/DEBUG ( 724): #03 pc 0004de0f /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+210)
I/DEBUG ( 724): #04 pc 00000db7 /system/bin/app_process
I/DEBUG ( 724): #05 pc 0001bd98 /system/lib/libc.so (__libc_init+64)
I/DEBUG ( 724): #06 pc 00000ae8 /system/bin/app_process
[...]


What am I missing?
 
 
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes