Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

My app wont start up when installed from google play but starts fine when built directly onto phone

Discussion in 'Android' started by hchan4155sf, May 31, 2019.

  1. hchan4155sf

    hchan4155sf

    Joined:
    Feb 24, 2018
    Posts:
    6
    When I build my app directly onto my phone, the app starts up fine on my phone. However, when I install my app (alpha version) from google play and try to run it on my phone, it crashes right away. I think I have figured out what could be the cause of the problem though.

    I noticed that with the version that is built directly onto my phone, the package folder (com.HCApps.ToiletNotes in internal storage > android > data)is not created on my phone until I start the app for the first time. Whereas the version of my app that I install from google play has that package folder created on my phone even before I launch my app for the first time. So basically it seems like I cant launch the version of my app installed from google play because it for some reason creates the com.HCApps.ToiletNotes package folder on my android device even before I launch the app for the first time. To further support this theory, when I go to android settings and clear the app data for the app (this removes the com.HCApps.ToiletNotes that came with the google play install) , the app would actually start up and everything is working fine.

    So if this is the reason why my app is not starting up, my question is how can I build my app so that the package folder com.HCApps.ToiletNotes is not created until I launch my app for the first time on my android device. By the way, if this helps, I have been working with unity In App Purchases when I started encountering these problems.
     
  2. hchan4155sf

    hchan4155sf

    Joined:
    Feb 24, 2018
    Posts:
    6
    Here is the logcat:

    05-31 01:47:30.529: D/HeadsetStateMachine(4176): Disconnected process message: 10, size: 0
    05-31 01:47:30.530: D/HeadsetStateMachine(4176): Enter processIntentBatteryChanged()
    05-31 01:47:30.530: D/HeadsetStateMachine(4176): Exit processIntentBatteryChanged()
    05-31 01:47:30.530: D/HeadsetStateMachine(4176): Exit Disconnected processMessage()
    05-31 01:47:30.532: D/QtiCarrierConfigHelper(4426): WARNING, no carrier configs on phone Id: 0
    05-31 01:47:30.872: D/ConnectivityService(3430): updateNetworkScore for NetworkAgentInfo [WIFI () - 100] to 56
    05-31 01:47:30.872: D/ConnectivityService(3430): rematching NetworkAgentInfo [WIFI () - 100]
    05-31 01:47:30.873: D/ConnectivityService(3430): network has: [ Transports: WIFI Capabilities: NOT_METERED&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&VALIDATED&FOREGROUND LinkUpBandwidth>=1048576Kbps LinkDnBandwidth>=1048576Kbps SignalStrength: -65]
    05-31 01:47:32.139: W/memtrack@1.0-se(543): type=1400 audit(0.0:9898): avc: denied { read } for name="mem" dev="debugfs" ino=1073612 scontext=u:r:hal_memtrack_default:s0 tcontext=u:eek:bject_r:qti_debugfs:s0 tclass=file permissive=0
    05-31 01:47:32.169: W/memtrack@1.0-se(543): type=1400 audit(0.0:9900): avc: denied { read } for name="mem" dev="debugfs" ino=412208 scontext=u:r:hal_memtrack_default:s0 tcontext=u:eek:bject_r:qti_debugfs:s0 tclass=file permissive=0
    05-31 01:47:33.412: D/FoldersTransitionController(23321): onInterceptTouchEvent# not in folders mode
    05-31 01:47:33.441: D/Launcher(23321): onClick
    05-31 01:47:33.441: D/Launcher(23321): onClickAppShortcut
    05-31 01:47:33.443: I/ActivityManager(3430): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.HCApps.ToiletNotes/com.unity3d.player.UnityPlayerActivity bnds=[240,95][440,406] (has extras)} from uid 10077 pid 23321
    05-31 01:47:33.444: E/ANDR-PERF-MPCTL(557): hint lookup failed
    05-31 01:47:33.445: E/ANDR-PERF-JNI(3430): com_qualcomm_qtiperformance_native_perf_io_prefetch_start
    05-31 01:47:33.447: E/ANDR-PERF-JNI(3430): gIOPHAl initialized
    05-31 01:47:33.447: E/ANDR-PERF-JNI(3430): gIOPHAl calling iopstart
    05-31 01:47:33.447: E/ANDR-IOP(556): IOP HAL: Received pkg_name = com.HCApps.ToiletNotes pid = -1
    05-31 01:47:33.447: E/ANDR-IOP(556): is_in_recent_list is TRUE
    05-31 01:47:33.447: E/ANDR-IOP(556): io prefetch is deactivate
    05-31 01:47:33.451: I/LightBarTransitionsController(4224): setIconsDark dark:false animate:true currentDark:false mTransitionPending:true mTransitionDeferring:false mPendingDarkIntensity:0.0
    05-31 01:47:33.451: I/LightBarTransitionsController(4224): animateIconTint:0.0 mDarkIntensity:0.0
    05-31 01:47:33.453: D/Launcher.PERF(23321): startActivity(Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.HCApps.ToiletNotes/com.unity3d.player.UnityPlayerActivity bnds=[240,95][440,406] (has extras) }) takes 12 ms
    05-31 01:47:33.453: D/Stats(23321): Intent.getPackage() is null. therefore try to get package name from componentName.getPackageName(): com.HCApps.ToiletNotes
    05-31 01:47:33.453: D/Stats(23321): Intent.getPackage() is null. therefore try to get package name from componentName.getPackageName(): com.HCApps.ToiletNotes
    05-31 01:47:33.454: D/Stats(23321): SaveStats doInBackground...
    05-31 01:47:33.454: D/Launcher(23321): onPause
    05-31 01:47:33.459: D/RestartProcessManager(3430): Update Total Launch Times :com.HCApps.ToiletNotes
    05-31 01:47:33.459: E/ANDR-PERF-MPCTL(557): hint lookup failed
    05-31 01:47:33.459: D/RestartProcessManager(3430): updateSelf : com.HCApps.ToiletNotes, size : 26
    05-31 01:47:33.459: D/RestartProcessManager(3430): Increase Total Launch Time : com.HCApps.ToiletNotes, times : 10, index : 25
    05-31 01:47:33.459: D/RestartProcessManager(3430): Last Running Package : com.HCApps.ToiletNotes , start time 1559292453459
    05-31 01:47:33.460: D/EmbryoManager(3430): Embryo claimed. com.HCApps.ToiletNotes, pid=11942
    05-31 01:47:33.460: E/ANDR-PERF-MPCTL(557): hint lookup failed
    05-31 01:47:33.512: D/RecyclerViewWrapper(23321): onWindowVisibilityChanged:8
    05-31 01:47:33.521: W/DynamiteModule(11942): Local module descriptor class for com.google.android.gms.measurement.dynamite not found.
    05-31 01:47:33.530: W/zygote64(11942): Skipping duplicate class check due to unrecognized classloader
    05-31 01:47:33.532: I/DynamiteModule(11942): Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:20160
    05-31 01:47:33.532: I/DynamiteModule(11942): Selected remote version of com.google.android.gms.ads.dynamite, version >= 20160
    05-31 01:47:33.533: V/DynamiteModule(11942): Dynamite loader version >= 2, using loadModule2NoCrashUtils
    05-31 01:47:33.534: I/DynamiteModule(11942): Considering local module com.google.android.gms.measurement.dynamite:0 and remote module com.google.android.gms.measurement.dynamite:7
    05-31 01:47:33.534: I/DynamiteModule(11942): Selected remote version of com.google.android.gms.measurement.dynamite, version >= 7
    05-31 01:47:33.535: V/DynamiteModule(11942): Dynamite loader version >= 2, using loadModule2NoCrashUtils
    05-31 01:47:33.543: W/ChimeraDebugLogger(11942): Singleton logger instance not set.
    05-31 01:47:33.546: W/zygote64(11942): Skipping duplicate class check due to unrecognized classloader
    05-31 01:47:33.552: W/ChimeraDebugLogger(11942): Singleton logger instance not set.
    05-31 01:47:33.554: W/zygote64(11942): Skipping duplicate class check due to unrecognized classloader
    05-31 01:47:33.555: W/DynamiteModule(11942): Local module descriptor class for com.google.android.gms.measurement.dynamite not found.
    05-31 01:47:33.597: D/SurfaceFlinger(609): duplicate layer name: changing com.HCApps.ToiletNotes/com.unity3d.player.UnityPlayerActivity to com.HCApps.ToiletNotes/com.unity3d.player.UnityPlayerActivity#1
    05-31 01:47:33.604: I/vndksupport(11942): sphal namespace is not configured for this process. Loading /vendor/lib64/hw/gralloc.msm8996.so from the current namespace instead.
    05-31 01:47:33.606: I/Unity(11942): SystemInfo CPU = ARM64 FP ASIMD AES, Cores = 4, Memory = 5739mb
    05-31 01:47:33.606: I/Unity(11942): SystemInfo ARM big.LITTLE configuration: 2 big (mask: 0xc), 2 little (mask: 0x3)
    05-31 01:47:33.607: I/Unity(11942): ApplicationInfo com.HCApps.ToiletNotes version 1.27 build fda575c8-1696-4f1a-b982-5d47bef96c9d
    05-31 01:47:33.607: I/Unity(11942): Built from '2019.1/staging' branch, Version '2019.1.3f1 (dc414eb9ed43)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a', Stripping 'Enabled'
    05-31 01:47:33.608: I/Ads(11942): App measurement is starting up, version: 16250
    05-31 01:47:33.608: I/Ads(11942): To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
    05-31 01:47:33.608: I/Ads(11942): [ 05-31 01:47:33.618 11942:11942 D/ ]
    05-31 01:47:33.608: I/Ads(11942): Successfully load libgui-plugin.so, this=0x74b986a1a8
    05-31 01:47:33.628: I/ActivityManager(3430): Displayed com.HCApps.ToiletNotes/com.unity3d.player.UnityPlayerActivity: +161ms
    05-31 01:47:33.636: D/DebugKeepScreenOn(3430): Acquiring screen wakelock due to Window{4aa9086 u0 com.HCApps.ToiletNotes/com.unity3d.player.UnityPlayerActivity}
    05-31 01:47:33.642: E/CRASH(11942): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0000007499c7eff0
    05-31 01:47:33.642: E/CRASH(11942): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    05-31 01:47:33.642: E/CRASH(11942): Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
    05-31 01:47:33.642: E/CRASH(11942): Build fingerprint: 'OnePlus/OnePlus3/OnePlus3T:8.0.0/OPR1.170623.032/46:user/release-keys'
    05-31 01:47:33.642: E/CRASH(11942): Revision: '0'
    05-31 01:47:33.642: E/CRASH(11942): pid: 11942, tid: 11975, name: UnityMain >>> com.HCApps.ToiletNotes <<<
    05-31 01:47:33.642: E/CRASH(11942): x0 0000007499c7f00d x1 00000074970efa10 x2 0000007495fe9020 x3 0000000000000000
    05-31 01:47:33.642: E/CRASH(11942): x4 0000007495fe9200 x5 0000000000000004 x6 00000074bd5c3000 x7 000000000046c602
    05-31 01:47:33.642: E/CRASH(11942): x8 00000074975a3a08 x9 6db6db6db6db6db7 x10 0000007499c7f00c x11 0000000000000e35
    05-31 01:47:33.642: E/CRASH(11942): x12 00000000000005e2 x13 0000000000000200 x14 000000000000000d x15 aaaaaaaaaaaaaaab
    05-31 01:47:33.642: E/CRASH(11942): x16 00000074bbcf3588 x17 00000074bbc47bb0 x18 0000000000000001 x19 0000007499c7f058
    05-31 01:47:33.643: E/CRASH(11942): x20 00000074975a2000 x21 0000007499c7f00d x22 0000000000000077 x23 0000000000000038
    05-31 01:47:33.643: E/CRASH(11942): x24 00000000000000ee x25 00000074964ca7f6 x26 000000749712b7c0 x27 00000074964ca7a8
    05-31 01:47:33.643: E/CRASH(11942): x28 00000074975b1000 x29 0000007499c7f040 x30 00000074969d0970
    05-31 01:47:33.643: E/CRASH(11942): sp 0000007499c7f000 pc 00000074969e9860 pstate 0000000020000000
    05-31 01:47:33.643: E/CRASH(11942): backtrace:
    05-31 01:47:33.662: D/EmbryoManager(3430): prepare com.HCApps.ToiletNotes user 0
    05-31 01:47:33.662: I/ActivityManager(3430): Process com.HCApps.ToiletNotes (pid 11942) has died: fore TOP
    05-31 01:47:33.663: D/ActivityManager(3430): Process com.HCApps.ToiletNotes has 0 services
    05-31 01:47:33.663: I/WindowManager(3430): WIN DEATH: Window{4aa9086 u0 com.HCApps.ToiletNotes/com.unity3d.player.UnityPlayerActivity}
    05-31 01:47:33.664: W/ActivityManager(3430): Force removing ActivityRecord{a8f54fe u0 com.HCApps.ToiletNotes/com.unity3d.player.UnityPlayerActivity t463}: app died, no saved state
    05-31 01:47:33.664: E/SurfaceFlinger(609): Failed to find layer (SurfaceView - com.HCApps.ToiletNotes/com.unity3d.player.UnityPlayerActivity#0) in layer parent (no-parent).
    05-31 01:47:33.664: E/SurfaceFlinger(609): Failed to find layer (Background for - SurfaceView - com.HCApps.ToiletNotes/com.unity3d.player.UnityPlayerActivity#0) in layer parent (no-parent).
    05-31 01:47:33.666: E/JavaBinder(10590): *** Uncaught remote exception! (Exceptions are not yet supported across processes.)
    05-31 01:47:33.666: E/JavaBinder(10590): java.lang.RuntimeException: android.os.DeadObjectException
    05-31 01:47:33.666: E/JavaBinder(10590): at android.os.Parcel.writeException(Parcel.java:1821)
    05-31 01:47:33.666: E/JavaBinder(10590): at android.os.Binder.execTransact(Binder.java:705)
    05-31 01:47:33.666: E/JavaBinder(10590): Caused by: android.os.DeadObjectException
    05-31 01:47:33.666: E/JavaBinder(10590): at android.os.BinderProxy.transactNative(Native Method)
    05-31 01:47:33.666: E/JavaBinder(10590): at android.os.BinderProxy.transact(Binder.java:787)
    05-31 01:47:33.666: E/JavaBinder(10590): at cwd.b:)com.google.android.gms@17455019@17.4.55 (040400-248795830):2)
    05-31 01:47:33.666: E/JavaBinder(10590): at ryp.a:)com.google.android.gms@17455019@17.4.55 (040400-248795830):3)
    05-31 01:47:33.666: E/JavaBinder(10590): at rxm.a:)com.google.android.gms@17455019@17.4.55 (040400-248795830):30)
    05-31 01:47:33.666: E/JavaBinder(10590): at rxm.a:)com.google.android.gms@17455019@17.4.55 (040400-248795830):5)
    05-31 01:47:33.666: E/JavaBinder(10590): at ahev.a:)com.google.android.gms@17455019@17.4.55 (040400-248795830):6)
    05-31 01:47:33.666: E/JavaBinder(10590): at rvt.a:)com.google.android.gms@17455019@17.4.55 (040400-248795830):45)
    05-31 01:47:33.666: E/JavaBinder(10590): at ryr.onTransact:)com.google.android.gms@17455019@17.4.55 (040400-248795830):36)
    05-31 01:47:33.666: E/JavaBinder(10590): at android.os.Binder.transact(Binder.java:622)
    05-31 01:47:33.666: E/JavaBinder(10590): at edn.onTransact:)com.google.android.gms@17455019@17.4.55 (040400-248795830):3)
    05-31 01:47:33.666: E/JavaBinder(10590): at android.os.Binder.transact(Binder.java:622)
    05-31 01:47:33.666: E/JavaBinder(10590): at aaiz.onTransact:)com.google.android.gms@17455019@17.4.55 (040400-248795830):25)
    05-31 01:47:33.666: E/JavaBinder(10590): at android.os.Binder.execTransact(Binder.java:692)
     
    Last edited: May 31, 2019
  3. hchan4155sf

    hchan4155sf

    Joined:
    Feb 24, 2018
    Posts:
    6
    I found out my what problem was. The "when reinstalling an app, restore backed up settings and data" option was turned on in my phone settings so the com.HCApps.ToiletNotes folder from a previous install which was backed up on google is automatically created on my phone during app installation from google play. I think my app isnt designed to handle app data from a previous install so it crashes at the start.
     
  4. Thanitsak

    Thanitsak

    Joined:
    Jan 4, 2016
    Posts:
    116
    Oh I also have this problem! Would you mind explaining a bit more how to fix this problem?
     
  5. hchan4155sf

    hchan4155sf

    Joined:
    Feb 24, 2018
    Posts:
    6
    Yeah my temporary solution was to just disable the auto restore backup feature on my phone. I just went to settings > backup and restore, and turned off "Automatic Restore". But what you need to do is have your app disable the auto restore feature instead. You do it by editing the android manifest file of your unity project. This link explains it good:
    https://answers.unity.com/questions/1341215/saved-android-app-files-get-automatically-recovere.html
     
    Last edited: Jun 1, 2019
  6. Thanitsak

    Thanitsak

    Joined:
    Jan 4, 2016
    Posts:
    116
    Wow thank you very much for the information! Also I need to add
    (tools:replace="android:allowBackup") in the manifest too to make the error goes away.
     
    Last edited: Jun 20, 2019