简体   繁体   English

我可以使用android NDK修改以前创建的.so文件吗?

[英]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. 目前,我刚刚开始使用NDK,现在我心中有些疑问。

Is there anyway to modify previously created .so file using NDK? 无论如何,有使用NDK修改以前创建的.so文件吗? can we modify that .so file?I just want to change some specification and want to rebuild. 我们可以修改那个.so文件吗?我只想更改一些规格并想要重建。

Any help and suggestion will be appreciated. 任何帮助和建议,将不胜感激。
Thanks in advance 提前致谢

Edit 编辑

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

You cannot change the .so file directly. 您不能直接更改.so文件。 You can, however, change the source code (in C or C++) and recompile it using the NDK. 但是,您可以更改源代码(使用C或C ++)并使用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 您可能可以对.so进行反编译/反汇编,但是,即使不是不可能,将其重新编译成.so也将非常困难。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM