search cancel

APK Wrapping Issue


Article ID: 185663


Updated On:


CA Application Experience Analytics SaaS (AXA)


Running into errors wrapping two Android apps. 

|--------------------------------------- CA Mobile App Analytics --------------------------------------------------|

Current Ulimit 10496

Setting file open to 65535

After setting ulimit 65535


Validating Inputs :


checking for /Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/bin/jarsigner ...

checking for emm/conf/ ...

checking for /Users/1539722/Code/hma/myMobileApp/platforms/android/app/build/outputs/apk/release/app-release.apk ...

checking for /Users/1539722/Code/hma/myMobileApp/modifiedplugins/axa-cordova-plugin/cordova_camdo.plist ...

checking validity of /Users/1539722/Code/hma/myMobileApp/modifiedplugins/axa-cordova-plugin/cordova_camdo.plist ...


checking for ca-maa-android-sdk-wrapper-18.2.4.jar ...


Provided Configuration :


EMM HOME : /Users/1539722/Code/hma/myMobileApp/scripts/android/CAMobileAppAnalytics-wrapper/emm

JAVA_HOME : /Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home

Apk File : /Users/1539722/Code/hma/myMobileApp/platforms/android/app/build/outputs/apk/release/app-release.apk

Plist File : /Users/1539722/Code/hma/myMobileApp/modifiedplugins/axa-cordova-plugin/cordova_camdo.plist

Jarsigner Configuration : emm/conf/

Wrapper Jar : ca-maa-android-sdk-wrapper-18.2.4.jar


Wrapping Process:


/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home/bin/java -jar ca-maa-android-sdk-wrapper-18.2.4.jar -apk /Users/1539722/Code/hma/myMobileApp/platforms/android/app/build/outputs/apk/release/app-release.apk -plist /Users/1539722/Code/hma/myMobileApp/modifiedplugins/axa-cordova-plugin/cordova_camdo.plist -rules AUTO_DETECT -signconfig emm/conf/ -disablejsinterception false -buildtype release release -forcemultidex false -ignoreids null -wrapconfig emm/conf/


Step 1 of 4: Extracting Target APK: app-release.apk

Step 2 of 4: Instrumenting


Step 3 of 4: Packaging instrumented APK.



ERROR:Resources Packaging Failed



Retrying Wrapping with nores Option.


Step 1 of 4: Extracting Target APK: app-release.apk

Step 2 of 4: Instrumenting

...........resources not extracted. Won't modify AndroidManifest.xml


Step 3 of 4: Packaging instrumented APK.

Step 4 of 4: Signing APK with certificate.

jar signed.



The signer's certificate is self-signed.

Wrapped APK file is located at:/Users/1539722/Code/hma/myMobileApp/platforms/android/app/build/outputs/apk/release/wrapped_app-release.apk

Wrapping Success : Smart Containerization completed successfully. Please sign with your enterprise certificate and deploy!


Total time : 101 secs


Setting file open back to 10496

After restoring ulimit 10496

|----------------------------------------- © 2016-present CA Technologies. All rights reserved. ----------------------------------------------------|


Release : SAAS



In this situation, "ERROR:Resources Packaging Failed” is not an issue. It could not instrument the ‘xml’ files, so we just have to ignore the resources which the wrapping process will do automatically ( Retrying Wrapping with nores Option)

While wrapping the APK, we wrap the source code and resource files( xml files), the tool which we are using to wrap the SDK would face some issues while wrapping the resources, for that we just need to ignore the resources. Use the ‘-r’ flag while wrapping the APK which ignores the resources. Please find the command below.

./ -a <apk path> -p <plist path> -r

As part of wrapping process, we decompile the APK file using apktool, which decompiles the source and resources(resources.arsc) files. Sometimes the apktool has challenges decompiling the resources.arsc properly for some apks.  In those cases,  the error message will be shown.

CA_MAA_SDK will not instrument with resource files, it just instruments the Java files and packages the apk file.  So ignoring resources will not have any effect on data collection.