JonForShort / android-tools

Android tools built for Android devices.
Apache License 2.0
155 stars 26 forks source link

Aapt shared library #22

Closed timscriptov closed 1 year ago

timscriptov commented 3 years ago

Hello!

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

timscriptov commented 3 years ago

New version Aide used libaapt.so and libaidl.so

JonForShort commented 3 years ago

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

timscriptov commented 3 years ago

@JonForShort please wait, I try libaapt.so v9

timscriptov commented 3 years ago

Error: aapt: aapt exited with code 132

Screenshot_20210509_103132_com aide ui

JonForShort commented 3 years ago

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

timscriptov commented 3 years ago

@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

rupeshkumar22 commented 3 years ago

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