android-tools icon indicating copy to clipboard operation
android-tools copied to clipboard

Aapt shared library

Open timscriptov opened this issue 4 years ago • 7 comments

Hello!

Do you have plans to build a library into a .so file?

timscriptov avatar May 08 '21 13:05 timscriptov

New version Aide used libaapt.so and libaidl.so

timscriptov avatar May 08 '21 13:05 timscriptov

Hi @TimScriptov , yes I can build these into shared libraries for you. Is this for Android 9 or Android 11?

JonForShort avatar May 09 '21 01:05 JonForShort

@JonForShort please wait, I try libaapt.so v9

timscriptov avatar May 09 '21 05:05 timscriptov

Error: aapt: aapt exited with code 132

Screenshot_20210509_103132_com aide ui

timscriptov avatar May 09 '21 05:05 timscriptov

Can you share the error that you got? Is exit code 132 that came from aapt or was this something else?

JonForShort avatar May 09 '21 19:05 JonForShort

@JonForShort Error in aapt. For normal operation of libaapt.so on an android device, you need to comment out the code in the ≈ Main.cpp and others, all calls are Sustem.exit(0-3).

There will be time to independently assemble aapt based on android 10 More info: https://github.com/t-arn/java-ide-droid/blob/master/jni/aapt/README.TXT

timscriptov avatar May 10 '21 07:05 timscriptov

I tried running libaapt2.so (arm64-v8a) using System.load(/data/data/packageName/files/x86/lib/libaapt2.so) on x86 API 30 AVD Emulator. I get the following Error in logs:

java.lang.UnsatisfiedLinkError: dlopen failed: library "libprotobuf-cpp-lite.so" not found: needed by /data/data/packageName/files/x86/lib/libaapt2.so in namespace classloader-namespace
        at java.lang.Runtime.load0(Runtime.java:939)
        at java.lang.System.load(System.java:1628)

Maybe this is related to it. Any idea on how can I run it inside an app? @JonForShort @TimScriptov

Thanks

UPDATE: Resolved Here

rupeshkumar22 avatar Jul 18 '21 21:07 rupeshkumar22