Skip to main content
removed fluff
Source Link
Andrew T.
  • 16.5k
  • 10
  • 76
  • 127

(If you're finding how to move obb to external sdcard and mount it back to internal Finally, here's the right place!) Finally I found the solution ofto this question by myself! The app can't access the obb by itself, it requires media_rw to access it. Found by lsof:

sdcard 340 media_rw 15 ??? ??? ??? ???
/data/media/obb/com.game/com.game.obb
sdcard 340 media_rw 17 ??? ??? ??? ???
/data/media/obb/com.game/com.game.obb
com.game 26335 u0_a266 36 ??? ??? ??? ???
/storage/emulated/0/Android/obb/com.game/com.game.obb
com.game 26335 u0_a266 37 ??? ??? ??? ???
/storage/emulated/0/Android/obb/com.game/com.game.obb 

So I have to mount the external sdcard folder to two places and each has to have its right owner:

owner    folder
u0_a266  /storage/emulated/legacy/Android/obb/com.game
media_rw /data/media/obb/com.game

But if I mount /storage/sdcard1/Android/obb/com.game to those two places, it will become:

owner    folder
u0_a266  /storage/emulated/legacy/Android/obb/com.game
u0_a266  /data/media/obb/com.game

Then I found if I do:

mount -o bind /storage/sdcard1/Android/obb/com.game /storage/emulated/legacy/Android/obb/com.game
mount -o bind /mnt/media_rw/sdcard1/Android/obb/com.game /data/media/obb/com.game

I found this works fine, because the mount command's source and destination is their original owner. The app can run very well!

(If you're finding how to move obb to external sdcard and mount it back to internal, here's the right place!) Finally I found the solution of this question by myself! The app can't access the obb by itself, it requires media_rw to access it. Found by lsof:

sdcard 340 media_rw 15 ??? ??? ??? ???
/data/media/obb/com.game/com.game.obb
sdcard 340 media_rw 17 ??? ??? ??? ???
/data/media/obb/com.game/com.game.obb
com.game 26335 u0_a266 36 ??? ??? ??? ???
/storage/emulated/0/Android/obb/com.game/com.game.obb
com.game 26335 u0_a266 37 ??? ??? ??? ???
/storage/emulated/0/Android/obb/com.game/com.game.obb 

So I have to mount the external sdcard folder to two places and each has to have its right owner:

owner    folder
u0_a266  /storage/emulated/legacy/Android/obb/com.game
media_rw /data/media/obb/com.game

But if I mount /storage/sdcard1/Android/obb/com.game to those two places, it will become:

owner    folder
u0_a266  /storage/emulated/legacy/Android/obb/com.game
u0_a266  /data/media/obb/com.game

Then I found if I do:

mount -o bind /storage/sdcard1/Android/obb/com.game /storage/emulated/legacy/Android/obb/com.game
mount -o bind /mnt/media_rw/sdcard1/Android/obb/com.game /data/media/obb/com.game

I found this works fine, because the mount command's source and destination is their original owner. The app can run very well!

Finally, I found the solution to this question by myself! The app can't access the obb by itself, it requires media_rw to access it. Found by lsof:

sdcard 340 media_rw 15 ??? ??? ??? ???
/data/media/obb/com.game/com.game.obb
sdcard 340 media_rw 17 ??? ??? ??? ???
/data/media/obb/com.game/com.game.obb
com.game 26335 u0_a266 36 ??? ??? ??? ???
/storage/emulated/0/Android/obb/com.game/com.game.obb
com.game 26335 u0_a266 37 ??? ??? ??? ???
/storage/emulated/0/Android/obb/com.game/com.game.obb 

So I have to mount the external sdcard folder to two places and each has to have its right owner:

owner    folder
u0_a266  /storage/emulated/legacy/Android/obb/com.game
media_rw /data/media/obb/com.game

But if I mount /storage/sdcard1/Android/obb/com.game to those two places, it will become:

owner    folder
u0_a266  /storage/emulated/legacy/Android/obb/com.game
u0_a266  /data/media/obb/com.game

Then I found if I do:

mount -o bind /storage/sdcard1/Android/obb/com.game /storage/emulated/legacy/Android/obb/com.game
mount -o bind /mnt/media_rw/sdcard1/Android/obb/com.game /data/media/obb/com.game

I found this works fine, because the mount command's source and destination is their original owner. The app can run very well!

Source Link
Kirk
  • 121
  • 9

(If you're finding how to move obb to external sdcard and mount it back to internal, here's the right place!) Finally I found the solution of this question by myself! The app can't access the obb by itself, it requires media_rw to access it. Found by lsof:

sdcard 340 media_rw 15 ??? ??? ??? ???
/data/media/obb/com.game/com.game.obb
sdcard 340 media_rw 17 ??? ??? ??? ???
/data/media/obb/com.game/com.game.obb
com.game 26335 u0_a266 36 ??? ??? ??? ???
/storage/emulated/0/Android/obb/com.game/com.game.obb
com.game 26335 u0_a266 37 ??? ??? ??? ???
/storage/emulated/0/Android/obb/com.game/com.game.obb 

So I have to mount the external sdcard folder to two places and each has to have its right owner:

owner    folder
u0_a266  /storage/emulated/legacy/Android/obb/com.game
media_rw /data/media/obb/com.game

But if I mount /storage/sdcard1/Android/obb/com.game to those two places, it will become:

owner    folder
u0_a266  /storage/emulated/legacy/Android/obb/com.game
u0_a266  /data/media/obb/com.game

Then I found if I do:

mount -o bind /storage/sdcard1/Android/obb/com.game /storage/emulated/legacy/Android/obb/com.game
mount -o bind /mnt/media_rw/sdcard1/Android/obb/com.game /data/media/obb/com.game

I found this works fine, because the mount command's source and destination is their original owner. The app can run very well!