microsoftconnect / intune-app-wrapping-tool-android

Use the Intune App Wrapping Tool for Android to enable Android apps to be managed by Microsoft Intune
29 stars 11 forks source link

Unable to wrap APK #13

Closed TripwireNL closed 3 years ago

TripwireNL commented 6 years ago

Hi guys i'm unable to wrap my APK. My App is build with the following settings: minSDKVersion: 26 compileSDKVersion: 27 multiDexEnabled: true compileOptions: targetCompatibility 1.8 & sourceCompatibility 1.8 dexOptions: preDexLibraries = true It's an unsigned APK we're trying to wrap here.

We are also using the new Font resources in Android (which are introduced in Android 8.0).

The error the wrapping tool throws is:

C:\Users\q\AppData\Local\Temp\IntuneAppWrappingTool-2665583373513620427\sourceApk\res\values\fonts.xml:3: error: Resource entry vag_rounded_bold is already defined. res\font\vag_rounded_bold.ttf:0: Originally defined here.

Failed to package app. com.microsoft.intune.mam.apppackager.utils.AppPackagerException: Failed to load app resource table. com.microsoft.intune.mam.apppackager.utils.ResourceUtils.loadResourceTable(ResourceUtils.java:176) com.microsoft.intune.mam.apppackager.utils.ResourceUtils.mergeResources(ResourceUtils.java:118) com.microsoft.intune.mam.apppackager.v2.V2WrapperAgent.wrapResources(V2WrapperAgent.java:98) com.microsoft.intune.mam.apppackager.AbstractWrapperAgent.wrap(AbstractWrapperAgent.java:68) com.microsoft.intune.mam.apppackager.AppPackager.packageApp(AppPackager.java:135) com.microsoft.intune.mam.apppackager.PackagerMain.mainInternal(PackagerMain.java:200) com.microsoft.intune.mam.apppackager.PackagerMain.main(PackagerMain.java:56) brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\q\AppData\Local\Temp\brut_util_Jar_3677208968170463370.tmp, p, --forced-package-id, 127, --rename-manifest-package, com.microsoft.intune.mam, --no-version-vectors, -F, C:\Users\q\AppData\Local\Temp\APKTOOL5862327379244697013.tmp, -0, arsc, -I, C:\Users\q\AppData\Local\Temp\IntuneAppWrappingTool-2665583373513620427\framework\1.apk, -S, C:\Users\q\AppData\Local\Temp\IntuneAppWrappingTool-2665583373513620427\sourceApk\res, -M, C:\Users\q\AppData\Local\Temp\IntuneAppWrappingTool-2665583373513620427\sourceApk\AndroidManifest.xml]

TripwireNL commented 6 years ago

Ah we found that it's a bug in the APKTool the wrapper uses. The wrapper users APKTool v2.3.0 which has this issue. APKTools v2.3.1 should fix it. Is there any insight on when you guys can release a new version with the new APKTools version?

EDIT: We replaced the APKTool in the lib folder with the latest one and now we can get further in the build. Now we get an error:

AppPackagerException: Failed to update this app's supported SDK versions