juned juned - 1 year ago 65
Android Question

Can i modify the previously created .so file using android NDK?

Currently I just started to using NDK and now I have some question in my mind.

Is there anyway to modify previously created .so file using NDK? can we modify that .so file?I just want to change some specification and want to rebuild.

Any help and suggestion will be appreciated.
Thanks in advance


000064e0 <Pow2>:
64e0: e260201e rsb r2, r0, #30 ; 0x1e
64e4: e1a02802 lsl r2, r2, #16
64e8: e3a00001 mov r0, #1 ; 0x1
64ec: e1a02842 asr r2, r2, #16
64f0: e2423001 sub r3, r2, #1 ; 0x1
64f4: e1a00310 lsl r0, r0, r3
64f8: e59f3054 ldr r3, [pc, #84] ; 6554 <Pow2+0x74>
64fc: e59fc054 ldr ip, [pc, #84] ; 6558 <Pow2+0x78>
6500: e1a01301 lsl r1, r1, #6
6504: e08f3003 add r3, pc, r3
6508: e92d0030 push {r4, r5}
650c: e793c00c ldr ip, [r3, ip]
6510: e201481f and r4, r1, #2031616 ; 0x1f0000
6514: e1a04844 asr r4, r4, #16
6518: e08c5084 add r5, ip, r4, lsl #1
651c: e1a04084 lsl r4, r4, #1
6520: e19cc0b4 ldrh ip, [ip, r4]
6524: e1d540b2 ldrh r4, [r5, #2]
6528: e3e05902 mvn r5, #32768 ; 0x8000
652c: e00510c1 and r1, r5, r1, asr #1
6530: e080080c add r0, r0, ip, lsl #16
6534: e064c00c rsb ip, r4, ip
6538: e161018c smulbb r1, ip, r1
653c: e0400081 sub r0, r0, r1, lsl #1
6540: e1a00250 asr r0, r0, r2
6544: e1a00800 lsl r0, r0, #16
6548: e1a00840 asr r0, r0, #16
654c: e8bd0030 pop {r4, r5}
6550: e12fff1e bx lr
6554: 0000abcc .word 0x0000abcc
6558: 00000078 .word 0x00000078

Answer Source

You cannot change the .so file directly. You can, however, change the source code (in C or C++) and recompile it using the NDK. If you do not have access to the source, however, your chances are rather slim.

You may be able to de-compile/disassemble the .so, but it will prove extremely difficult if not impossible to recompile it back into .so

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download