Search Unity

Resolved Can't reinstall an APK

Discussion in 'VR' started by Cy_K, Jul 31, 2021.

Thread Status:
Not open for further replies.
  1. Cy_K

    Cy_K

    Joined:
    Aug 6, 2019
    Posts:
    4
    Newb here. (Unity 2019.4.20f1) Driving me insane - I built an app, installed the APK file using the command line to my Oculus Quest 2, ran fine. Tweaked it, tried to install again, no changes. Found out that the old files had not been overwritten on the Quest, so I tried uninstalling it (using the Quest) and reinstalling it (command line). Nothing shows up despite the command line telling me that installation was a success.

    Tried installing it using SideQuest, nothing. Tried using Unity Developer Hub, nothing. Tried upgrading to Unity 2019.4.23f1, nothing.

    Built a test app following all the instructions here: https://developer.oculus.com/documentation/unity/unity-tutorial/ same thing. First install works, subsequent ones do not.

    Got a friend to send me an APK of something he was working on, same thing. Someone please tell me what's going on here, I am totally lost. Tried looking at my logcat file but I don't even know what I'm looking for.
     
    EthanFischer and AndreiMarian like this.
  2. NevinAF

    NevinAF

    Joined:
    May 12, 2021
    Posts:
    36
    I've had the same problem before which I fixed using SideQuest.
    I fixed this by opening the "Current Installed Apps" window and uninstalling the build from there (should be named something like "com.DefaultCompany.[app name]". As a note, If you are uninstalling from the Quest, it might leave behind user data which makes the quest think you already have the app installed. This can still be a problem if working on different unity projects.
    Once all files are uninstalled, you are good to reinstall using whatever method (I recommend SideQuest drag and drop).

    If the app is not visible from side quest, you may need to manually locate the game files from the headset (file path: Quest -> ./Android/data AND ./Android/obb). Make sure there is no folder in the root for data from the game.

    If this still does not work let me know, good luck!
     
  3. Cy_K

    Cy_K

    Joined:
    Aug 6, 2019
    Posts:
    4
    First of all, thanks for the reply!

    I suspected (after all that mucking around) that it might have come down to an uninstall gone wrong. I did find folders named <com.MyCompany.MyApp> in the data and obb folders. Deleted them. Unfortunately that didn't seem to help. I have the same problem - the install (no matter whether it's through command line or SideQuest) looks like it succeeds, but the app doesn't show up. No folders get added, no trace of the reinstallation.
     
  4. NevinAF

    NevinAF

    Joined:
    May 12, 2021
    Posts:
    36
    Interesting. Will the quest let you install non-unity .apk's?

    Also, If you are able to plug it into your computer and do a "Build and Run", unity will automatically try to install the app for you (you can select build device in the build menu). If this does not work you should get an error in the unity console. What's the error?
     
  5. Cy_K

    Cy_K

    Joined:
    Aug 6, 2019
    Posts:
    4
    I haven't tried non-Unity apks! Maybe I'll give that a try.

    No error: it just finishes and I'm at the home screen in the Quest. As if I hadn't done a thing.
     
  6. Cy_K

    Cy_K

    Joined:
    Aug 6, 2019
    Posts:
    4
    I just factory reset the entire damn thing and now everything installs and reinstalls nicely. Thanks so much for helping! I'll know not to uninstall directly from the headset any more.
     
    jaydnwlsn and NevinAF like this.
  7. mimilaf320

    mimilaf320

    Joined:
    Oct 29, 2021
    Posts:
    7
    i don't think your device need to factory data reset
     
    Last edited: Dec 7, 2021
  8. linda76

    linda76

    Joined:
    Dec 13, 2021
    Posts:
    1
    Some times, there is json issues in apk files, might be you have seen or you have check. anyhow factory data reset is not recommended
     
  9. bioinfbloke

    bioinfbloke

    Joined:
    Jan 31, 2016
    Posts:
    1
    Hi, I have a similar issue as OP.

    Previously I was loading a app I was developing via SideQuest and It installed fine on the Quest 2. I could just install new versions over the old ones with no issues. Then I had to do a new signed build to get it accepted by the Oculus Store. It gave an error

    xxx0.17.apk: : /data/local/tmp/_stream.apk could not be installed [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package signatures do not match pre

    I then used adb uninstall <package name>. This seems to work and it meant I could install xxx0.17.apk, however I can't see any sign of the package in "unknown sources". The same package loads fine on my old Quest 1 after I uninstalled the old version of the package. Lesson learnt: always uninstall first...

    I am thinking I may have to do a factory reset but is anything else I can do?
     
  10. hyposecant

    hyposecant

    Joined:
    Oct 8, 2020
    Posts:
    8
    I found changing the package name allows you to re-install the apk.
     
  11. shah954

    shah954

    Joined:
    Mar 5, 2022
    Posts:
    2
    Its simple clear cache and and check if there is enough space in your device to download new apk file if still not solved, please try factory resetting your phone and it will definitely fix your issue!
     
  12. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    You will want to contact the game developer.
     
  13. LittleCoinCoin

    LittleCoinCoin

    Joined:
    Nov 28, 2018
    Posts:
    11
    Hello,

    I also got the same issue. I've been working on a project for about 8 months on Quest2 with several normal and dev builds that were installed directly from Unity (2020.3.27f1) by clicking "Build & Run" and everything was working fine.

    Then today, I did a first build (dev with profiler) and it worked without any issue. I went back to tweak a few things (URP parameters on SRP & dynamic batching); tried to rebuild (dev with profiler) and it finished without any error messages.
    unfortunately the app didn't launch on the Quest2 at all and I couldn't launch it by clicking on the corresponding file in the "Unknown Source" section for the apps either.

    So I searched the internet and found this thread; I wasn't thrilled by the solution to factory reset the headset. And the other suggestions like using Sidequest to delete any visible cache didn't work either.

    I kept searching for solutions using different keywords and found this other thread from 2015: https://forums.oculusvr.com/t5/VR-J...th-your-APKs-not-installing-Unity/td-p/249867

    The idea is to change the package name used upon build. So, go to the "Player Settings --> Other settings", then check "Override Default Package Name" and change the package name. For my case, I decided to just remove an underscore in the name.

    Finally, I clicked "Build&Run" again in Unity and the app launched as expected in the Quest 2.

    It's more of a work around than a solution but I hope it can help others :)

    Best!
     
  14. baojing5230

    baojing5230

    Joined:
    Feb 13, 2020
    Posts:
    1

    SAVE MY LIFE!!!! WISH YOU ALL THE BEST <3
     
    Jalletunk and LittleCoinCoin like this.
  15. TinyTrebor

    TinyTrebor

    Joined:
    Apr 2, 2022
    Posts:
    1
    Like baojing5230 said thank you so much !
     
  16. wechat_os_Qy01eDJfSV7CWSHuAPwDqgMCA

    wechat_os_Qy01eDJfSV7CWSHuAPwDqgMCA

    Joined:
    Aug 4, 2022
    Posts:
    8
    I had this issue multiple times. The solution that works for me is always changing the company and product name:
    Go to Build Setting -> Player Setting -> Player -> Company (if you can't find it, go to top right and search "company") and change the company name, product name, and version to a different one. Then re-built and everything works fine.
     
Thread Status:
Not open for further replies.