ADB push obb files command to mimic Unity Build Process

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:

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

mnt\\shell\\emulated\\obb\\main.1.com.company.project

But had the same results…

Any and all help would be greatly appreciated!

1 Like

Did you solve it?

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).