How does Unity deploy obb files to /Android/obb/ in 4.2.2?

Hi all,

I’ve been setting up a system of automated builds for our game, but I’ve hit an issue with Android 4.2.2.

For prior versions of Android, things are simple. Produce a build of the game using Unity, stick it somewhere accessible with a script which uses adb.exe to install the apk and push the obb to the correct location (/mnt/sdcard/Android/obb/).

However, with 4.2.2 this directory is now locked down, but I see Unity itself can still push the obb file here.

My quesiton is, what is it doing to achieve this, and can it be replicated via command line? Is Unity doing something funky to get the obb in this location, or is it all via adb?

Obviously we can still deploy builds to devices via Unity directly, but it’s handy to be able to deploy from any machine with the android sdk, so I’m interested to know what Unity is doing to get the obb in the locked down android/obb directory.

Thanks!

Think I’ve answered my own question. In 4.2.2 plus it seems the /mnt/sdcard/Android/obb path is legacy, and looks like it’s actually a symlink. So the adb push looks like it works, but doesn’t.

Pushing to /mnt/shell/emulated/obb/ seemed to do the trick, though I have to create the directory structure using ‘adb shell mkdir /mnt/shell/emulated/obb/com.mycompany.myproduct/’