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. Dismiss Notice

ADB push obb files command to mimic Unity Build Process

Discussion in 'Android' started by brb_mitch, Oct 7, 2015.

  1. brb_mitch

    brb_mitch

    Joined:
    Oct 7, 2015
    Posts:
    3
    I'm attempting to push an OBB onto a device and install the APK through a batch command. The idea is for designers and artists here to be able plug their android devices into a machine and press one button to upload a new build on to their machine.

    I have created a batch script that installs the APK onto the device but can't get the OBB file to push correctly. Currently, I am pushing the obb file with:

    Code (CSharp):
    1. adb push main.1.com.company.project.obb Android\\obb\\main.1.com.company.project
    However that's returning "failed to copy" because Android\\obb\\main.1.com.company.project is a "Read-only file system"

    I understand that I could potentially root the device, but that would defeat the purpose of this tool

    I have also tried the directory
    Code (CSharp):
    1. mnt\\shell\\emulated\\obb\\main.1.com.company.project
    But had the same results...

    Any and all help would be greatly appreciated!
     
    edunok06_unity likes this.
  2. edunok06_unity

    edunok06_unity

    Joined:
    Feb 27, 2020
    Posts:
    12
    Did you solve it?
     
  3. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,637
    Unity build process on such failure copies the fail to accessible storage, sets permissions on that file so anyone can read it and then uses "run-as" command execute cp under apps user to copy the file to desired destination (and to set correct permissions to file).