Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Binary doesn't get pushed to Android Device when 'Split Application Binary' is on

Discussion in 'Android' started by Herold55, May 28, 2015.

  1. Herold55

    Herold55

    Joined:
    Apr 2, 2014
    Posts:
    5
    Build and Run for Android works fine if 'Split Application Binary' is off, but when it's on, it gives me this error below. I've already tried different SDKs - Android 5.1.1 (API 22) and 5.0.1 (API 21), but that didn't solve the problem either.

    CommandInvokationFailure: Unable to push local file to device. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.
    /Users/xxx/AndroidDevelopment/platform-tools/adb -s 04157df47b183c32 push "/Users/xxx/yyy/Temp/StagingArea/main.obb" "/mnt/shell/emulated/obb/com.companyA.gameA/main.1.com.companyA.gameA.obb"

    stderr[
    failed to copy '/Users/xxx/yyy/Temp/StagingArea/main.obb' to '/mnt/shell/emulated/obb/com.companyA.gameA/main.1.com.companyA.gameA.obb': Is a directory
    ]
    stdout[

    ]
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.ADB.RunInternal (System.String[] command, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.ADB.Run (System.String[] command, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.AndroidDevice.Exec (System.String[] command, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.AndroidDevice.Push (System.String src, System.String dst, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit)
    UnityEditor.Android.PostProcessAndroidPlayer.UploadAndStartPlayer (System.String manifestName, System.String stagingArea, UnityEditor.Android.AndroidDevice device, System.String packageName, Boolean devPlayer, Boolean retryUpload)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcessInternal (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options)
    UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options)
    UnityEditor.HostView:OnGUI()






    UPDATE:
    I was able to work around it by copy-paste the command that he logged:
    /Users/xxx/AndroidDevelopment/platform-tools/adb -s 04157df47b183c32 push "/Users/xxx/yyy/Temp/StagingArea/main.obb" "/mnt/shell/emulated/obb/com.companyA.gameA/main.1.com.companyA.gameA.obb"

    into a shell. I do find it very strange that that works and I'm a little worried that that workaround will cause other problems - but for now I can finally continue to work on that again.
     
    Last edited: May 29, 2015
  2. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,740
    I'm having exactly the same problem. and the workaround on the update works but it seems to be a multithreading issue
     
  3. Hudelf

    Hudelf

    Joined:
    Jun 16, 2015
    Posts:
    4
    Also having this issue, fairly sure the cause for me is Unity trying to call adb.exe from "C:/Program Files/Android/sdk\platform-tools\adb.exe" (Note the invalid forward slashes). I've been unable to find a way to fix this so far aside from manually running the push command each time.
     
  4. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    You could always build without split and test, then final build do split and just check permissions and hope for the best when on the store.
     
  5. ev3d

    ev3d

    Joined:
    Apr 19, 2013
    Posts:
    327
  6. ev3d

    ev3d

    Joined:
    Apr 19, 2013
    Posts:
    327
    anyone find a permanent fix for this?
     
  7. nxtboyIII

    nxtboyIII

    Joined:
    Jun 4, 2015
    Posts:
    262
    Same issue here ;(
     
  8. nxtboyIII

    nxtboyIII

    Joined:
    Jun 4, 2015
    Posts:
    262
    are you using a Mac? I am
     
  9. nxtboyIII

    nxtboyIII

    Joined:
    Jun 4, 2015
    Posts:
    262
    I am on Mac (El Capitan) trying to get the game onto my Android (Samsung Galaxy s6) and it's not working :( Same error as he has
     
    MrEsquire likes this.
  10. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,165
    Please add as much info as possible to the bug report. Your configuration and SDK version could be crucial for reproducing the bug.
     
  11. Denis-5thWall

    Denis-5thWall

    Joined:
    Oct 5, 2016
    Posts:
    1
    We have the same problem. Unity version is 5.4.1f1, SDK version 23.03. We use Perforce, Vuforia and EasyMovieTextures.

    Here's the log:

    CommandInvokationFailure: Unable to push local file to device. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details.
    C:\Android\sdk1\platform-tools\adb.exe -s "0715f7329ed73136" push "D:\Perforce\xxx\Unity\AR\yyy\Temp\StagingArea\main.obb" "/sdcard/Android/obb/com.projectName.ar/main.1.com.xxx.ar.obb"

    stderr[

    ]
    stdout[
    [ 0%] /sdcard/Android/obb/com.projectName.ar/main.1.com.projectName.ar.obb
    [ 0%] /sdcard/Android/obb/com.projectName.ar/main.1.com.projectName.ar.obb
    [ 0%] /sdcard/Android/obb/com.projectName.ar/main.1.com.projectName.ar.obb
    [ 0%] /sdcard/Android/obb/com.projectName.ar/main.1.com.projectName.ar.obb
    [ 0%] /sdcard/Android/obb/com.projectName.ar/main.1.com.projectName.ar.obb
    [ 0%] /sdcard/Android/obb/com.projectName.ar/main.1.com.projectName.ar.obb
    [ 0%] /sdcard/Android/obb/com.projectName.ar/main.1.com.projectName.ar.obb
    [ 0%] /sdcard/Android/obb/com.projectName.ar/main.1.com.projectName.ar.obb
    [ 0%] /sdcard/Android/obb/com.projectName.ar/main.1.com.projectName.ar.obb
    [ 0%] /sdcard/Android/obb/com.projectName.ar/main.1.com.projectName.ar.obb
    [ 0%] /sdcard/Android/obb/com.projectName.ar/main.1.com.projectName.ar.obb
    [ 0%] /sdcard/Android/obb/com.projectName.ar/main.1.com.projectName.ar.obb
    [ 0%] /sdcard/Android/obb/com.projectName.ar/main.1.com.projectName.ar.obb
    [ 0%] /sdcard/Android/obb/com.projectName.ar/main.1.com.projectName.ar.obb
    [ 0%] /sdcard/Android/obb/com.projectName.ar/main.1.com.projectName.ar.obb
    adb: error: failed to copy 'D:\Perforce\xxx\Unity\AR\yyy\Temp\StagingArea\main.obb' to '/sdcard/Android/obb/com.projectName.ar/main.1.com.projectName.ar.obb': Permission denied
    ]
    UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.ADB.RunInternal (System.String[] command, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.ADB.Run (System.String[] command, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.AndroidDevice.Exec (System.String[] command, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
    UnityEditor.Android.AndroidDevice.Push (System.String src, System.String dst, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit)
    UnityEditor.Android.PostProcessor.Tasks.PublishPackage.UploadAndStartPlayer (UnityEditor.Android.PostProcessor.PostProcessorContext context, Boolean retryUpload)
    UnityEditor.HostView:OnGUI()

    If anyone has found a solution, that would be much apreciated. I've tried every solution found by googling the error and currently banging my head over this.
     
  12. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,165
    That's pretty clear.
    Which device are you using?
     
  13. renanse

    renanse

    Joined:
    Apr 12, 2013
    Posts:
    21
    fwiw, I've had the same issue trying to install the obb file from command line. I've found I had to push it to the root of the sdcard and then manually move it into the correct place using adb shell. :/ The devices I am using to test are both Marshmallow if that helps.
     
    image28 likes this.
  14. image28

    image28

    Joined:
    Jul 17, 2013
    Posts:
    457
    Thanks this helped me out.
     
  15. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    1,165
    @renanse @image28 device models, android version and build fingerprint would be very helpful in trying to chase this bug.
     
    image28 likes this.
  16. image28

    image28

    Joined:
    Jul 17, 2013
    Posts:
    457
    I ended up switch off binary splitting, while also getting build size bellow 100mb. However getting "Application not installed error"... think it's an issue with the manifiest and 5.5... will be looking into over the next 5 hours.

    Testing on
    Model: SM-G900F
    Android Version: 6.0.1
    No sure how to lookup a build fingerprint
     
  17. image28

    image28

    Joined:
    Jul 17, 2013
    Posts:
    457
    Started a new thread for my issue https://forum.unity3d.com/threads/android-build-with-5-5-0f3-application-not-installed.444939/