[Q] How-to mount ext. sdcard with one click - Asus Transformer TF700

I'm looking for a one click solution to mount the external sdcard.
I searched the market for a widget without luck.
I don't like to go to the settings/storage all the time.

Try adding a quick link icon to the command: su - c mount ... etc., with all the arguments you need for your card, e.g.
su -c 'mount -o rw /dev/block/vold/179:17 /mnt/mSD'
(just change the volume)

I'm not rooted.

DarsVaeda said:
I'm not rooted.
Click to expand...
Click to collapse
Right.
Change that.

Related

modified: Installing & Run application on sdcard

WARNING: Proceed at your own risk, this may damage your phone and/or make it unstable. This is for advanced users only and should only be attempted by those who understand the risks of the following changes
Original post: http://www.androidin.net/thread-1099-1-1.html
AS usual, this is for those WITH ROOT ONLY
Preparation:
1. Installed JF RC30 V1.2 (only if you are using JF RC30 1.2 , this is not compatible with RC8)
2. Make a NANDROID backup (you may get everything back to normal if the phone screw up)
3. A MICRO-SD card with 2 partitions divided : (1) a fat-32 partition, (2) a ext2, you need a linux/mac to format the sdcard with ext2 partition
* the fat 32 will be mounted as sdcard and the ext2 will be mounted as /sd for application data, make your own decision for the size*
4. insert the sdcard with 2 partition on the phone
5. set the phone to aeroplane mode for safe
Procedure:
1. adb pull /system/etc/mountd.conf /*somewhere you may want to back it up*
2. rm -f /system/etc/mountd.conf
3. using the modified mountd.conf, adb push /*the path of modified mount.conf */mount.conf /system/etc/mountd.conf
4. adb pull /system/init.rc /*somewhere you may want to back it up*
5. rm -f /system/init.rc
6. using the modified init.rc, adb push /*the path of modified init.rc*/init.rc /system/init.rc
7. reboot
8. busybox cp -a /data/app /sd/
9. rm -r /data/app
10. ln -s /sd/app /data/app
11. reboot
Now, the phone will install and run everyone on /sd, still mounting /sdcard as usual. It is possible that to mount or unmount /sdcard by usb without everything screwed up. Beware that your sdcard will be used as part of system, removing the sdcard may freeze the phone. If the phone get freeze because of removing the sdcard, plug the sdcard again and soft reset.
It is also possible that copy the application data to another card. If you want to change the sdcard, switch the phone off, mounting the sdcard to computer directory, copy the /sd partition to another sdcard with ext2 partition
Back to normal:
1. rm -f /system/etc/mountd.conf
2. adb push /*the backup of mountd.conf* /system/etc/mountd.conf
3. rm -f /system/init.rc
4. adb push /*the backup of init.rc* /system/init.rc
5. busybox cp -a /sd/ /data/app
6. rm -r /sd/
Change of mountd.conf:
changing /dev/block/mmcblk0 to /dev/block/mmcblk0p1
change of init.rc:
adding
insmod /system/modules/2.6.25-01843-gfea26b0/kernel/fs/ext2/ext2.ko
mknod /dev/mmcblk0p2 b 179 2 1000
mount ext2 /dev/mmcblk0p2 /sd noatime nodiratime
Any chance of this being simplified into the actual commands necessary for this!?
I'm a semi-noob at *nix stuff... I can format my SD card into 2 partitions, but I'm lost at step 4... What do we need to edit??
Changed step 4...just adb pull the mount.conf for editing..open the file in text editor..find "mmcblk0" and change it "mmcblk0p1" ..save the .conf...del the original one..push the new one to the original directory..
Yay. Now hopefully we can get this in an update.zip to flash
Yeah, I'm putting off doing this until someone makes an update.zip which I definitely know how to apply and get rid of if I screw anything up
REPLACES the internal memory...?
So the internal memory isnt used?
kinda the same trick as the browser cache and market cache, just a bit more complex as its an entire filesystem your moving, which wouldnt let the sys see the internal, mem, please correct me if im reading it wrong, Im not a total noob at linux but no guru dev either...
bhang
The internal memory is still used, just not for /data/app
19.rm -r /data/app
20.ln -s /sd/app /data/app
Click to expand...
Click to collapse
It should probably be /sdcard/app. In any case, this is a fairly complex mod that is not suited for Linux newbies. I would advise against folks considering this mod unless they understand and can test each step before attempting.
I agree and added a warning to the first post
Ummm yea, so what happens when you mount your sdcard for storage? I expect the phone goes crazy?
This tutorial, if you could call it that,(no offense) is really badly written and this process seems too risky for what you gain considering that if we are patient google will come out with this themselves.
Stericson
Stericson said:
Ummm yea, so what happens when you mount your sdcard for storage? I expect the phone goes crazy?
This tutorial, if you could call it that,(no offense) is really badly written and this process seems too risky for what you gain considering that if we are patient google will come out with this themselves.
Stericson
Click to expand...
Click to collapse
The procedure calls for two partitions on the microsd, one FAT32, other EXT. Theoretically it should work with mounting for mass storage. However, I agree that it's a rather sloppy hack.
There is talk about a similar strategy being officially implemented by the Android team. Instead of two partitions, it would be loopback mounted to a file in the FAT32. That would also provide some encryption security. See here. It's just talk though. Won't be a reality for at least a few months.
Well talk is certainly better than nothing...thanks for the info....
Stericson
I post a method withtout compiling the ramdisk.img but that do not force mounting the sd ext2 drive under rootfs but still workable...probably when i back to work I can compile 1 to flash
Am I the only one that thinks there are a few things that are getting 'lost in translation' here?
I'm not getting /sd mounted properly upon reboot...there's no way I'm going to continue attempting this till I see a better (no offense) tutorial or do a little more research on the command lines.
I would really shy away from this if you're an average user or don't know what mountd and init.rc files are used for....this could flat out wreck your phone.
TheDudeOfLife said:
Am I the only one that thinks there are a few things that are getting 'lost in translation' here?
I'm not getting /sd mounted properly upon reboot...there's no way I'm going to continue attempting this till I see a better (no offense) tutorial or do a little more research on the command lines.
I would really shy away from this if you're an average user or don't know what mountd and init.rc files are used for....this could flat out wreck your phone.
Click to expand...
Click to collapse
/sd is /sdcard (mount point for the micro sd card's partition)
I'm getting stuck right here:
8. busybox cp -a /data/app /sd/
9. rm -r /data/app
10. ln -s /sd/app /data/app
11. reboot
It's saying read only system blah blah, even though I have indeed mounted it is rw
pershoot said:
/sd is /sdcard (mount point for the micro sd card's partition)
Click to expand...
Click to collapse
No....no it is not.
/sd is a mount of the ext2 partition used for the 'copy' of /data/app (one of the things i disagreed with is picking /sd as a mount point for the second partition.)
/sdcard is the fat32 mount point...used as usual for mounting files.
IzzeLing said:
I'm getting stuck right here:
8. busybox cp -a /data/app /sd/
9. rm -r /data/app
10. ln -s /sd/app /data/app
11. reboot
It's saying read only system blah blah, even though I have indeed mounted it is rw
Click to expand...
Click to collapse
Type mount in adb shell and see if /sd is even mounted. I wasn't seeing it in my list. I don't think his mount command in the init.rc is correct, but I'm too busy with holiday stuff.
Don't rm -r /data/app if you have not 100% verified the copy works.
This line looks mangled (need flags in the args):
Edit: nevermind, looks like it should work in the init.rc
TheDudeOfLife said:
No....no it is not.
/sd is a mount of the ext2 partition used for the 'copy' of /data/app (one of the things i disagreed with is picking /sd as a mount point for the second partition.)
/sdcard is the fat32 mount point...used as usual for mounting files.
Click to expand...
Click to collapse
ahh yea. i just re-glanced over the instructions.
cool.
TheDudeOfLife said:
Type mount in adb shell and see if /sd is even mounted. I wasn't seeing it in my list. I don't think his mount command in the init.rc is correct, but I'm too busy with holiday stuff.
Don't rm -r /data/app if you have not 100% verified the copy works.
Click to expand...
Click to collapse
Yeah, don't see it. Hm.

system as read/write

need a little help here please...
I want for my /system to be mounted as read/write automaticly upon startup of the phone using this command "mount -o,remount rw /dev/block/mtdblock3 /system"
How can i make this command to be executed as ROOT when my phone starts up.
THanks
vtecpower said:
need a little help here please...
I want for my /system to be mounted as read/write automaticly upon startup of the phone using this command "mount -o,remount rw /dev/block/mtdblock3 /system"
How can i make this command to be executed as ROOT when my phone starts up.
THanks
Click to expand...
Click to collapse
Why do you need this?? Just download droidsans andwhen you need read write just use that.
I need it bc im trying to move my apps to my sd card.....if i have the /system in read only mode then the phone crashed when i try to install a new app but it works fine when my /system is read and write
I doubt you need to mount /system rw. Do ls -l in /system and make sure sd has the same owner/permissions as the other dirs and it should work.
vtecpower said:
I need it bc im trying to move my apps to my sd card.....if i have the /system in read only mode then the phone crashed when i try to install a new app but it works fine when my /system is read and write
Click to expand...
Click to collapse
i have followed the instructions in the post titled apps on sdcard and it works fine without mounting the system RW. look at that post and follow those directions.
See: http://forum.xda-developers.com/showpost.php?p=3386761&postcount=2
Just add the line to The File insted of the Path Part.
The is called after system is mounted so it should work fine

Can't use ringtones that stored on /sdcard/ringtones

Suddenly I couldn't find any of my ringtones that stored on the /sdcard/ringtones directory from Ringtones Settings.
The /sdcard/ringtones is still avaliable on the sdcard and If I tried to play them throw the mp3 player they works fine.
I found out that the sdcard is mounted as Read-Only and not Read/Write as before. Even if I plug it in to the PC I can't change any of the data on the sdcard only read it.
The latest change that I made few days ago was to store all cache files on the sdcard. I am not sure that this is the reason but it could be.
Does anyone here have any idea why it happened?
install Rings Extended from the market. Open your soundsettings with the program. It will prompt to open with rings extended or standard.
Don't know about the read-only stuff, but you could take a look at the ownership and the rights you have as a user/admin... if all fails.. format?
thanks for the advice, I will try it...
does anyone have more ideas regarding the read only issue?
yes could this be your problem too http://forum.xda-developers.com/showthread.php?t=473256
unfortunately its not the same issue, I have root access to the phone and when I run the mount command this is the output I have for /sdcard
/dev/block/mmcblk0p1 on /sdcard type vfat (ro,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8)
I can't use the camera and the ringtones because of that.
I do able to remount the /sdcard as rw but any time I reboot the phone it become ro.
can you please copy for me the output that you have from mount command on /sdcard/ and the permissions you have on that directory from ls -l command?
zrubi said:
unfortunately its not the same issue, I have root access to the phone and when I run the mount command this is the output I have for /sdcard
/dev/block/mmcblk0p1 on /sdcard type vfat (ro,dirsync,nosuid,nodev,noexec,uid=1000,gid=1000,fmask=0711,dmask=0700,codepage=cp437,iocharset=iso8859-1,utf8)
I can't use the camera and the ringtones because of that.
I do able to remount the /sdcard as rw but any time I reboot the phone it become ro.
can you please copy for me the output that you have from mount command on /sdcard/ and the permissions you have on that directory from ls -l command?
Click to expand...
Click to collapse
I suspect the fat partition on your sdcard got corrupted. Try a reformat
you were right thanks
I did chkdisk from windows and it did fix the fs.
now its working just fine...

[How to] mount SD card in recovery.

Please add this thread to the sticky!
If you messed up your ROM, and want to just reflash, but don't have your update on the SD card... or you mess up apps2sd and you need to clear them, this thread is for you. I've needed to do this MANY times, and it's a pain in the ass to remember how to do it every time.
Get into the recovery, and ./adb shell (if you can). Otherwise, hit alt + x to drop into the terminal. Then type this:
Code:
echo /dev/block/mmcblk0 > /sys/devices/platform/usb_mass_storage/lun0/file
Then, if you need to unmount:
Code:
echo "" > /sys/devices/platform/usb_mass_storage/lun0/file
This allows you to drag/drop files right from your PC to the sd card.
.... this is why i have card readers.
on another note, if you can get into adb cant you just
Code:
adb push /sdcard/
Simplest way - if you dont`t have update.zip on card simple click Alt-S. Recovery menu mount sdcard and show error (update.zip not found) but don`t unmount card
dbhatesyou said:
.... this is why i have card readers.
on another note, if you can get into adb cant you just
Code:
adb push /sdcard/
Click to expand...
Click to collapse
Because then you'd have to mount the sdcard to the device, it's easier to just do it this way. Although the post below yours does give a good example of how to easily mount it, I often keep updates on the card.
So by using this and mounting it to the PC, I can easily change files/names/etc.
thanks
dude i registered just to thank you for this piece of advice. thanks gary works perfectly
this works for me and is much simpler:
adb shell
mount /sdcard
exit
once you do that you can:
adb push updateofyourchoice.zip /sdcard/update.zip
edit: you can even shorten it to:
adb shell mount /sdcard
Gary13579 said:
Please add this thread to the sticky!
If you messed up your ROM,
Click to expand...
Click to collapse
Learn to speak with out school yard language.
just bookmared this page hahha
agreed, this bit ought to be in the index...added to the "how to" section
mhm
how to access my ext3 partition so i can format it ?? (i'm using vista x64, adb works fine)
alapapa said:
this works for me and is much simpler:
adb shell
mount /sdcard
exit
once you do that you can:
adb push updateofyourchoice.zip /sdcard/update.zip
edit: you can even shorten it to:
adb shell mount /sdcard
Click to expand...
Click to collapse
Yep, I have to agree, this is what I do too... much easier really
Gary13579 said:
Please add this thread to the sticky!
If you messed up your ROM, and want to just reflash, but don't have your update on the SD card... or you mess up apps2sd and you need to clear them, this thread is for you. I've needed to do this MANY times, and it's a pain in the ass to remember how to do it every time.
Get into the recovery, and ./adb shell (if you can). Otherwise, hit alt + x to drop into the terminal. Then type this:
Code:
echo /dev/block/mmcblk0 > /sys/devices/platform/usb_mass_storage/lun0/file
Click to expand...
Click to collapse
First of all, thanks for this thread!
When I get to this point, I get a Permission Denied message.
(The way I typed it was echo /dev/block/mmcblk0 press enter /sys/devices/platform/usb_mass_storage/lun0/file)
Long story short.
I have Hero ROM (2.4). I had the FAT32/Ext2 partition. I used Paragon Partition Manager to complete delete partition and created a new FAT32/Ext3.
After I did this, it said that my SD card was not "formatted". I hit FORMAT button, but it gave me a force close error. I had no other choice but to turn off G1, when I turn on again (since HERO depends on your SD Card FAT32/Ext2,3 to load correctly, not it won't get pass HERO screen, it loops forever).
I will buy a SD card reader today (The way I have been working is thru another Phone (T-Mobile Wing, I removed SD card from G1 and put it on the Wing, but now it won't even read that, so that's another issue), regardless of this outcome. But I wanted to share my story.
I want to format my SD card thru the recovery console, if it's possible.
By the way, I typed also:
adb shell
It says Not found
Thanks in advanced.
thanks
after typing this in i get
"mount: mounting /dev/block/mmcblk0p1 on /sdcard failed: No such file or directory" no matter if my sdcard is inserted or not.
Ya'know, if you have Cyanogen's recovery image (which is awesome, has JF recovery features and more) you can just use:
ums_enable
ums_disable
Click to expand...
Click to collapse
to mount and unmount, works great.
AdrianK said:
Ya'know, if you have Cyanogen's recovery image (which is awesome, has JF recovery features and more) you can just use:
ums_enable
ums_disable
Click to expand...
Click to collapse
to mount and unmount, works great.
Click to expand...
Click to collapse
Wow, thats easier to remember, thanks!!! Now if he could add this into his menu would be even better!
bassbox said:
mhm
how to access my ext3 partition so i can format it ?? (i'm using vista x64, adb works fine)
Click to expand...
Click to collapse
From Terminal:
# mount -o rw /dev/block/mmcblk0p2 /system/sd
# rm -rf /system/sd/*
# reboot recovery
ive gota say top advice from all of you!! it would have been a paper weight untill i got home but all working now..
YOU SIR
Are a lifesaver.
i thought i'd ruined my phone which means my om woulda killed me. but i didnt thanks to your halp!
bassbox said:
mhm
how to access my ext3 partition so i can format it ?? (i'm using vista x64, adb works fine)
Click to expand...
Click to collapse
not the best at unix and assuming 2nd partition is your ext2/3/4 ...
from console or better yet adb shell
mount /dev/block/mmcblk0p2 /system/sd
cd /system/sd
ls -l (to see the contents)
rm [filenames] (to delete the files)
rmdir (to delete empty directories)
.

(Q) Terminal Emulator code

So I have been using Terminal emulator to load new boot loaders on my phone and I use this code:
Code:
su
mount -o remount,rw /system
cp /file location/bootanimation.zip /system/media
My question for you guys is, what does the second line mean? I mean sure I can memorize the code and use it but I'm trying to figure out how to read it and it doesn't really make sense to me.
Code:
mount -o remount,rw /system
We use the mount command, with the option remount (meaning unmount and then mount again), and the desired access rights ( rw = read and write) on the folder /system.
This mean we have a folder /system which is probably mounted as READ ONLY.
To change access rights you have to unmount first and then mount with the new access rights.
We want to change the access rights of system and we don't want to change its mount point. So we use mount command with the option remount and our desired rights.
Does this clarify it for you?
Dark3n said:
Code:
mount -o remount,rw /system
We use the mount command, with the option remount (meaning unmount and then mount again), and the desired access rights ( rw = read and write) on the folder /system.
This mean we have a folder /system which is probably mounted as READ ONLY.
To change access rights you have to unmount first and then mount with the new access rights.
We want to change the access rights of system and we don't want to change its mount point. So we use mount command with the option remount and our desired rights.
Does this clarify it for you?
Click to expand...
Click to collapse
Yes this helped a lot! so the -o was the "option" part?
yes -(o)ption and then the option you want
Dark3n said:
yes -(o)ption and then the option you want
Click to expand...
Click to collapse
Thank you so much!
hmm, i logged in as su but did not perform the remout code, ive found a tool to calibrate my xperia x10 mini pro accelerometer but when i executed it and did the required operation, it said the configuration was complete and yet the accelerometer was left unchanged, could this mean that because i did not use the mount remount command before using the tool that is why the program did no changes at all?

Categories

Resources