0

Why can't i see a mounted folder into my file explorer, but i can see it from a terminal?

I'm mounting a folder (/mnt/sdcard/Source) into other folder (/mnt/sdcard/Destination) with the next command (requieres Root permissions):

mount -o bind /mnt/sdcard/Source /mnt/sdcard/Destination

If i check with the ls command, i can see the files, but not on my explorer.

I'm testing it on a Moto G running Android 4.4.2 (Kitkat), but the same command works fine on Android 4.2.2 (Jelly Bean).

  • 1
    Just wondering is your file explorer kit-kat compliant - there was permission changes made to kit-kat regarding SDCard storage. – t0mm13b Mar 2 '14 at 22:41
  • I guess they changed permissions to sdcard, about my file explorer, i'm using ES file explorer and RootBrowser, and none of them show me the files. I also tried chmod -R 777 (Read, Write, execute) in both "Source" and "Destination". But nothing happens. – Ivan Verges Mar 2 '14 at 22:46
  • I was not actually referring to permissions as in un*x permissions, rather referring to the API changes made regarding accessing SDCard storage.. – t0mm13b Mar 2 '14 at 22:47
  • I get it, and yeah, im pretty sure they made something about storage because i can use my stored files on the phone while it's connected to usb on storage mode. – Ivan Verges Mar 2 '14 at 23:06
2

Seems like here's the answer and solution: http://forum.xda-developers.com/showthread.php?t=2718760 .
Quoting biopsin.

Since Android 4.2 and the intro of multiusers there is a problem with bind folders across sdcards, making any attempt on mount bind folders as root would result in visible to root only. Solution is to fool Android with temporary hijack debuggerd to create the mount binds for us. Thanks Chainfire for this workaround!
* Download both files and rename without .txt
* edit debuggerd.mnt to suit your needs (using any other dir then /emulated/legacy/ will result in read only if browsing folders from sdcard0)
* move debuggerd.mnt to /system/bin
* move mount.sh to any place with execute permissions
* execute mount.sh with any preferred method.
cheers!

Content of "debuggerd.mnt.txt" below.

#!/system/bin/sh

# Mount sd hack
mount -o bind /storage/sdcard1/Download /storage/emulated/legacy/Download
mount -o bind /storage/sdcard1/Ebooks /storage/emulated/legacy/eBooks
mount -o bind /storage/sdcard1/Pictures /storage/emulated/legacy/DCIM
mount -o bind /storage/sdcard1/Pictures /storage/emulated/legacy/Pictures

And below content of "mount.sh.txt".

#!/system/bin/sh

# Mount hack
mount -o remount,rw /system
stop debuggerd
mv /system/bin/debuggerd /system/bin/debuggerd.bak
mv /system/bin/debuggerd.mnt /system/bin/debuggerd
start debuggerd
sleep 2
stop debuggerd
mv /system/bin/debuggerd /system/bin/debuggerd.mnt
mv /system/bin/debuggerd.bak /system/bin/debuggerd
start debuggerd
mount -o remount,ro /system
echo "Mount hack enabled"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.