Tasker automation for external sd card?

1,082 views
Skip to first unread message

Oğuz Serkan Öztürk

unread,
Nov 1, 2013, 5:48:39 AM11/1/13
to tas...@googlegroups.com
Hi all,i am looking a solution for my need. I keep all my private files on my external sd card and for to keep my files in safe i alwasy leave my external card unmounted from the android settingd panel.
But when i reboot my telephone its just mounted again and i don't want to unmount it again.I want keep my card always unmounted. Second thing is i keep also my music files in my ex.card,if tasker mount my card by headphone connection trigger and unmount the card by the headphone connection lost trigger it would be perfect. Do you have any idea and advice for it? Wishing you good day guys:)

Pent

unread,
Nov 2, 2013, 2:36:48 AM11/2/13
to tas...@googlegroups.com
Sorry, no, Tasker can't mount/unmount storage cards.

There could be a plugin that will do it, maybe it will need root.

Pent

Oğuz Serkan Öztürk

unread,
Nov 2, 2013, 4:50:17 AM11/2/13
to tas...@googlegroups.com
My phone is rooted,thank you for the answer,have a good weekend.

Bob Hansen

unread,
Nov 2, 2013, 9:13:17 AM11/2/13
to tas...@googlegroups.com
I haven't actually done this, but from what I have read you can do this with the following.

You need root access on your device to do this.

Use a run shell action and check use root.
Command to mount:         mount /storage/sdcard1   (the path is device dependent)
Command to unmount:   umount /storage/sdcard1  

You could try this in a terminal emulator first to actually see whether it is working. You would need to enable superuser by entering: su <enter>
You can also see the currently mounted devices with just a: mount <enter>. That should help you see the correct path you will need.

Joseph Richman

unread,
Nov 2, 2013, 4:29:14 PM11/2/13
to tas...@googlegroups.com
actually I think the command is closer to 

mount -o rw /dev/block/mmc1p1 /path/to/sdcard

to make it read/write  you'd also need to check through the /dev/block to find the right information of where your sdcard is located.


On Friday, November 1, 2013 2:48:39 AM UTC-7, Oğuz Serkan Öztürk wrote:

Oğuz Serkan Öztürk

unread,
Nov 4, 2013, 3:52:10 AM11/4/13
to tas...@googlegroups.com
Thank you Bob and Joseph for the answers.
I installed Busybox and Terminal Emulator to my phone. I tried the commands but i couldn't succeed.
Here is my promts on terminal;


u0_a241@android:/ $ su
root@android:/ # ls
acct
cache
config
d
data
data_1
data_2
data_3
default.prop
dev
efs
etc
file_contexts
fstab.universal5410
init
init.goldfish.rc
init.rc
init.trace.rc
init.universal5410.rc
init.universal5410.usb.rc
init.usb.rc
init.wifi.rc
lib
lpm.rc
mnt
mnt_1
persdata
preload
proc
property_contexts
root
sbin
sdcard
seapp_contexts
sepolicy
storage
sys
system
ueventd.goldfish.rc
ueventd.rc
ueventd.universal5410.rc
vendor
root@android:/ # cd mnt
root@android:/mnt # ls
UsbDriveA
UsbDriveB
UsbDriveC
UsbDriveD
UsbDriveE
UsbDriveF
asec
extSdCard
obb
sdcard
secure
shell
root@android:/mnt # cd extSdCard
root@android:/mnt/extSdCard # ls
root@android:/mnt/extSdCard #
root@android:/mnt/extSdCard # cd ..
root@android:/mnt # mount -o rw mnt/extSdCard
Usage: mount [-r] [-w] [-o options] [-t type] device directory
1|root@android:/mnt # unmount
sh: unmount: not found
127|root@android:/mnt #

Even there is not unmount command:(

Any more advice to me guys?

Joseph Richman

unread,
Nov 4, 2013, 4:35:00 AM11/4/13
to tas...@googlegroups.com
Your command should look like this 

"mount -o rw -t vfat /dev/block/somethinghere /extSdCard"
or 
"mount -o rw -t vfat /dev/block/somethinghere /mnt/extSDCard"

You can't mount the directory without specifying the device you're trying to mount to that directory.

On Friday, November 1, 2013 2:48:39 AM UTC-7, Oğuz Serkan Öztürk wrote:
Reply all
Reply to author
Forward
0 new messages