• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

ADT Packaging APK With Native .so Libs

Guest
Oct 31, 2011 Oct 31, 2011

Copy link to clipboard

Copied

Greetings,

I have 2 native libararies (.so) which I need to include in an apk.  It appears that they MUST exist in the following 2 directories:

myAPK

/lib

/armeabi

/armeabi-v7a

My team has spent probably 72 hours ellapsed trying to figure out how to do this and we have yet to find a solution.  Thus far we have tried:

  1. Extracting an .apk archive, manually inserting the above /lib directory as needed, re-zipping the .apk, and then re-signing the apk
    • This approach was haulted by the fact that no matter what we did in terms of signing, when trying to run the APK on a device, logcat informed us that there were no certificates present.  This is almost certainly untrue, but it suggests that we simply do not understand the complexities of re-signing a previously signed APK after we have manually altered it.
  2. Including the /lib directory when calling the ADT packager
    • This call successfully included the /lib directory, but the /lib directory was located within the APK's /assets directory like all of the other AIR files.  This seems to prevent the Android loader from locating the native libraries.

A permanent solution to this problem would be great, but at this point I will even thank someone for a completely hacked solution because this impediment has crippled our entire project's foreword progress.

Thanks.

Matt

TOPICS
Performance issues

Views

2.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Nov 02, 2011 Nov 02, 2011

Copy link to clipboard

Copied

Hi,

Does the section "Including additional Android shared libraries in the ANE package" in this doc help? http://help.adobe.com/en_US/air/extensions/WSf268776665d7970d-2482335412ffea65006-8000.html#WSf26877...

Here is the sample package script snippet for your reference:

echo "****** ANE *******"

unzip -o ./source/$NESWC/bin/$NESWCNAME.swc -d ./Source_ANE/Android-ARM

$AIRSDK/adt -package \

    -storetype PKCS12 \

          -keystore ./$CERT \

          -storepass $CERTPASS \

          -target ane ./Source_APK/$EXTID.ane \

          ./source/$NESWC/src/extension.xml \

          -swc ./source/$NESWC/bin/$NESWCNAME.swc \

          -platform Android-ARM \

          -C ./Source_ANE/Android-ARM/ \

          .

echo "****** APK *******"

cp ./source/$NEAPP/bin-debug/$NEAPPNAME.swf ./Source_APK

cp ./source/$NEAPP/bin-debug/$NEAPPNAME-app.xml ./Source_APK

cd ./Source_APK

$AIRSDK/adt -package \

    -XnoAneValidate \

          -target apk \

          -storetype PKCS12 \

          -keystore ../$CERT \

          -storepass $CERTPASS \

          ../$NEAPK.apk \

          ./$NEAPPNAME-app.xml \

          ./$NEAPPNAME.swf \

          -extdir .

Thanks,

Jian

Adobe Flash Runtime team

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 14, 2012 Sep 14, 2012

Copy link to clipboard

Copied

LATEST

Using System.loadLibrary() from within my jar native extension I have succussfully loaded some .so libraries. But logcat continues to report it cannot resolve any of the static methods from any of the libraries? Not sure what I'm doing wrong? Feels like the jar has no permission, access or knowledge of the loaded libraries.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines