AddSecurityExceptionAndroid
AddSecurityExceptionAndroid copied to clipboard
Resigned APK shows successfully, but the build isn't generated at all
Not able to generate the build. this shows error
W: /tmp/test/AndroidManifest.xml:66: error: No resource identifier found for attribute 'allowNativeHeapPointerTagging' in package 'android'
W:
W: /tmp/test/AndroidManifest.xml:375: error: Error: No resource type specified (at 'resource' with value '@2114060288').
W:
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/var/folders/86/zqx0vvz95jd8x6whd0j8d7y50vyzm3/T/brut_util_Jar_2084800958329043937.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-version, 30, --version-code, 80110423, --version-name, 4.2207.0, --no-version-vectors, -F, /var/folders/86/zqx0vvz95jd8x6whd0j8d7y50vyzm3/T/APKTOOL282281327963132326.tmp, -e, /var/folders/86/zqx0vvz95jd8x6whd0j8d7y50vyzm3/T/APKTOOL5889534043134153033.tmp, -0, arsc, -I, /Users/300063668/Library/apktool/framework/1.apk, -S, /tmp/test/res, -M, /tmp/test/AndroidManifest.xml]
jarsigner: unable to open jar file: ./test_temp.apk
./addSecurityExceptions.sh: line 52: zipalign: command not found
Resigned APK successfully test_new.apk
Even though this shows test_new.apk is generated but its isn't available. Attaching the image for your reference

Hi, Try updating apktool.jar on your env. it looks like the Manifest contains attribute that apktool doesn't recognize thus failing to build the temp apk
I've encountered the same problem when running from my Mac. It was fixed by manually downloading zipalign.
Remember to give executable permission to zipalign file and change the zipalign reference in addSecurityExceptions.sh file to below.
./zipalign -p 4 $tempFileName $newFileName
You can download zipalign for Mac/Win/Linux from here: https://androidsdkmanager.azurewebsites.net/Buildtools
@amard33p I updated the script let me know if that works
@amard33p I updated the script let me know if that works
Thanks. It works now