1

I've successfully mounted my router device's sdcard on '/mnt/routersd' as follows :

#!/system/bin/sh
su -c 'busybox mount -o remount,rw /'
su -c 'mkdir -p /mnt/routersd'
su -c 'busybox mount -o remount,ro /'

su -c 'busybox mount -t cifs //192.168.0.x/sdcard /mnt/routersd -v -o user=admin,pass=xxxxxx'

The issue is that the mounted folder is lost on every reboot; so, I need to manually execute my script after every reboot. What should I do to have this mounted directory, permanently?

  • I've found some articles using UUID and etc/fstab applicable for Linux editions different than Android; but I don't know how to apply it for Android. – DavidDe Jan 13 '16 at 20:33
  • 1
    Simply run a script every boot. Put it in /system/etc/init.d and you're done. – GiantTree Jan 13 '16 at 21:55
  • I'm using CM10.2.1 for ASUS Transformer Pad TF700T ; /system/etc/init.d exists but seems that doesn't support auto-startup. No script is executed from there. – DavidDe Jan 13 '16 at 22:47
  • You could use helpers such as Tasker (run a script at boot_complete) or Script Manager for that. – Izzy Jan 13 '16 at 22:57
  • I've heard about them. Preferably, I would like not to install new apps for that purpose. Is it possible !? – DavidDe Jan 13 '16 at 23:13

Your Answer

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

Browse other questions tagged or ask your own question.