Release build slow to start on ChromeOS device without ADB

I have been testing a release build on a chromebook and I have noticed that if the device is not connected to an adb server the app will take a long time to launch (10+ seconds), showing a screen with the icon and “starting ”. When the device is connected by ADB, there is no long pause like this. Seeing as the problem only arises when it is not connected, I have found Logcat unhelpful in finding a solution.

I should note that I have tried many oprimization methods, which have had no impact on this loading screen, which is occuring before the splash screen.

What could be causing this and is there a way to reduce this start time without having the device connected via ADB all the time?

In case it offers any insight, here is a Logcat I get when I build and run on the device.

As per this post - The future of Chromebook and ChromeOS runtime support, Unity no longer provides support from ChromeOS, and ChromeOS is essentially unsupported target.

In future Unity 6.x version, the ABI target x86_64 will be also deprecated.

Thank you for your reply.

So if I revert to an earlier version of unity, it may help?

I doubt it will help, but it wouldn’t hurt to try.

tools:ignore=“HardcodedDebugMode”
android:debuggable=“false”

Sure enough, I have the same issue with earlier versions.

I have been profiling the build apk with Android Studio and noticed that in the merged manifest of all the build it declares: android:debuggable=“true”’.

I have tried making custom manifests and adding the following code:

android:debuggable="false" 
tools:ignore="HardcodedDebugMode"

but regardless of where I write this, every build I profile keeps showing debuggable as true. I have tried exporting my project to android studio but when I look at that projects merged manifest no such declaration is present. This makes me think that the building process makes the apk debuggable.

Is there anyway to prevent this from happening? Maybe more importantly, is this even relevant to my issue?

Two things:

  • Be sure you’ve exported with Development checkbox off from Unity
  • In Android Studio, there are two variants - debug/release, you need to select release variant to omit debuggable.

I have been making sure it is a relases build. I managed to change the build variant to release and made a build without debuggable. This build still had the same slow launch.

I have noticed that this slow start is only true the first time the app is launched on the device without an adb connected. If I close and relaunch the app it goes to the splash screen very quickly.

Is there anything else that could be the cause of this slow start?