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

Wrapping an APK with google play services plugin enabled crashes on startup. #4

Closed Diederikjh closed 3 years ago

Diederikjh commented 7 years ago

Hi. I'm having trouble wrapping our application with the intune APK wrapper. It seems to wrap successfully, but when I run it on an enrolled device, it crashes on startup with a strange stacktrace:

java.lang.SecurityException
        at android.os.Parcel.readException(Parcel.java:1621)
        at android.os.Parcel.readException(Parcel.java:1574)
        at com.google.android.gms.common.internal.zzu$zza$zza.zza(Unknown Source)
        at com.google.android.gms.common.internal.zzd.zza(Unknown Source)
        at com.google.android.gms.common.internal.zzd$zzi.zzh(Unknown Source)
        at com.google.android.gms.common.internal.zzd$zzk.zztp(Unknown Source)
        at com.google.android.gms.common.internal.zzd$zza.zzc(Unknown Source)
        at com.google.android.gms.common.internal.zzd$zza.zzw(Unknown Source)
        at com.google.android.gms.common.internal.zzd$zze.zztr(Unknown Source)
        at com.google.android.gms.common.internal.zzd$zzd.handleMessage(Unknown Source)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:148)
        at android.app.ActivityThread.main(ActivityThread.java:7399)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

I tried to reproduce this problem with a simple example, and succeeded. All I had to add to a hello world example to crash the application on start up is adding the Google play services plugin in the application gradle file. See this repo for code that crashes on startup.

Our application is non trivial, and ties into quite a few Google play service APIs, so to simply take them all out isn't an option.

The APK was wrapped using the latest version of the AWT tool (v. 1.0.1659.2). The application targets Android SDK level 24. Android build tools version 25.0.2 was used for the build.

Diederikjh commented 7 years ago

Using build tools 24.0.3 yields same result.

Diederikjh commented 7 years ago

Support's (msintuneappsdk@microsoft.com) response was :

We believe your issue will be solved when we release our latest company portal. We expect that to be released the week of 6/5.

thomasvsundert commented 5 years ago

@Diederikjh we are experiencing the same issue using the latest version of the wrapper. Did you ever get this fixed?

Diederikjh commented 5 years ago

There was an intune release out after we logged this, but as our client stopped using intune after we encountered this problem, we didn't have the chance to test it.

msintuneappsdk commented 5 years ago

@thomasvsundert Are you still experiencing this issue?