[Q] Updating Boot For SD based ICS - Nook Color General

I am using "generic-sdcard-v1.3-ICS-large-Rev3" from leapinlar/verygreen and a knightly from @CM_Encore (TeamWin)
http://forum.xda-developers.com/showthread.php?t=1000957
Pulling the micro SD out of the nook, into the SD Adapter and into the PC isn't complicated, but I would rather handle this via a PC batch and adb.
By default partition 1 of the SDCard is not mounted on boot. (so far as I can tell)
My Linux days are a bit behind me, but I found /etc/vold.fstab pointing to dev_mount sdcard /mnt/sdcard 4 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1.
So I assume I want to mount somthing like:
dev_mount boot /mnt/boot 1 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
Then I can ADB PUSH updated and ADB reboot recovery.
I don't see a path to dev_mount to reproduce this approach.
I am also not sure if I need to create a /mnt/boot path first.

jmiller76 said:
I am using "generic-sdcard-v1.3-ICS-large-Rev3" from leapinlar/verygreen and a knightly from @CM_Encore (TeamWin)
http://forum.xda-developers.com/showthread.php?t=1000957
Pulling the micro SD out of the nook, into the SD Adapter and into the PC isn't complicated, but I would rather handle this via a PC batch and adb.
By default partition 1 of the SDCard is not mounted on boot. (so far as I can tell)
My Linux days are a bit behind me, but I found /etc/vold.fstab pointing to dev_mount sdcard /mnt/sdcard 4 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1.
So I assume I want to mount somthing like:
dev_mount boot /mnt/boot 1 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
Then I can ADB PUSH updated and ADB reboot recovery.
I don't see a path to dev_mount to reproduce this approach.
I am also not sure if I need to create a /mnt/boot path first.
Click to expand...
Click to collapse
Just create a directory on /sdcard called boot...
adb shell mkdir /sdcard/boot
adb shell mount /dev/block/mmcblk1p1 /sdcard/boot
adb push XXXXX /sdcard/boot

There are two easy ways to accomplish what you need if you don't want to mess with adb. But Dizzy's instructions work if you are comfortable with adb.
One is to us a third party program named NookColorUMS and it will mount the boot partition on the PC using your USB cable.
The second way is to install a script file that I created to make the boot partition mount directly on the Nook.
You can learn about both by reading my tips thread linked in my signature.

Is this right to set the mount folder on the sdcard (fat32)?
I can make the folder, but attempting:
255|[email protected]:/ # mount /dev/block/mmcblk1p1 /sdcard/boot
mount /dev/block/mmcblk1p1 /sdcard/boot
Usage: mount [-r] [-w] [-o options] [-t type] device directory​The direct "Usage" text isn't explaining the syntax problem.
Believe it or not the whole /dev/block/ wasn't there when I used Linux in school. everything was just under /dev/ an ls -al took a while. Impossible to find things.
NookColorUMS-CM9.apk seems to do the trick if I switch out of MTP to Mass Storage.
Is there a way to make this work for MTP?
Id also still like to understand why the mount commands aren't working.
Thanks,
Josh

jmiller76 said:
Is this right to set the mount folder on the sdcard (fat32)?
I can make the folder, but attempting:
255|[email protected]:/ # mount /dev/block/mmcblk1p1 /sdcard/boot
mount /dev/block/mmcblk1p1 /sdcard/boot
Usage: mount [-r] [-w] [-o options] [-t type] device directory​The direct "Usage" text isn't explaining the syntax problem.
Believe it or not the whole /dev/block/ wasn't there when I used Linux in school. everything was just under /dev/ an ls -al took a while. Impossible to find things.
NookColorUMS-CM9.apk seems to do the trick if I switch out of MTP to Mass Storage.
Is there a way to make this work for MTP?
Id also still like to understand why the mount commands aren't working.
Thanks,
Josh
Click to expand...
Click to collapse
No the app only works for UMS (mass storage).
The mount command was not working for you because in CM9, you must use the -t option. For boot it is vfat. So the command would be:
mount -t vfat /dev/block/mmcblk1p1 /sdcard/boot

Specifying the type makes sense, wish mount had told me that, or that a type was needed.
Do you know what the behavior would be to mount the SD via mass storage with that mount point?
I scanned your(Leapinlar) user tips again and saw that at some point this behavior was working out of the box with /data/sdboot linked to /sdboot. It said it would be discussed again, but I am not sure the current draft does that.[it is mentioned below, but not explained]
In MTP mode the /sdcard/boot is not visible. Is there a way to register this partition as visible via MTP?
Are there any gotchas I should keep an eye out for?
Or any issues adding this to /data/local/userinit.d?
Thanks.

jmiller76 said:
Specifying the type makes sense, wish mount had told me that, or that a type was needed.
Do you know what the behavior would be to mount the SD via mass storage with that mount point?
I scanned your(Leapinlar) user tips again and saw that at some point this behavior was working out of the box with /data/sdboot linked to /sdboot. It said it would be discussed again, but I am not sure the current draft does that.[it is mentioned below, but not explained]
In MTP mode the /sdcard/boot is not visible. Is there a way to register this partition as visible via MTP?
Are there any gotchas I should keep an eye out for?
Or any issues adding this to /data/local/userinit.d?
Thanks.
Click to expand...
Click to collapse
The sdboot folder only shows inside CM. The reason I set up that folder was so GooManager could use it, not to make it available to the PC. And it works well with no issues adding that script.
Mtp only shows sdcard and emmc folders and I don't know of a way to change that. It probably does not show the sdcard/boot because it is mounted there rather than an actual part of the sdcard.
Yes, I do know how to mount the boot partition with a userint script so that it mounts using UMS, but I now use the NookColorUMS app since it is easier.

Related

[9001]Mounting external SD Card as ext3

Hey,
I like to mount my external SD Card as ext3 to support large files. The SD Card is formatted with ext3 but now Android shows only an empty folder.
So i tried to remount the SD:
Code:
mount -o rw,remount -t ext3 /dev/block/vold/197:33 /mnt/sdcard/externald_sd
But it doesnt use something... Does anybody has an idea? Some Example or sthing else?
Greetz
FaxXer said:
Hey,
I like to mount my external SD Card as ext3 to support large files. The SD Card is formatted with ext3 but now Android shows only an empty folder.
So i tried to remount the SD:
Code:
mount -o rw,remount -t ext3 /dev/block/vold/197:33 /mnt/sdcard/externald_sd
But it doesnt use something... Does anybody has an idea? Some Example or sthing else?
Greetz
Click to expand...
Click to collapse
u need a kernel that supports ext3. u can ask one of the guys compiling at the moment if they have time to add an ext3 module for u.
May be a stupid question:
would ext4 work instead? I thought the system partition would use this FS.
filesystem is already ext4
wintel_mac said:
May be a stupid question:
would ext4 work instead? I thought the system partition would use this FS.
Click to expand...
Click to collapse
well the system uses ext4 so it should work, but i'm not sure what u're trying to achieve. i use a 16 gb class 10 formatted fat32
Blumdum said:
filesystem is already ext4
Click to expand...
Click to collapse
He's talking about formatting external sd-card
When I get him right, he has a file that exceeds the 4GB FAT32 limit.
So he looks for an alternative to FAT32, which might be some kind of ext*-FS.
wintel your right!
In the Android-Hilfe Forum someone said the system expect first an vfat partition and then the ext. I think thats wrong cause its not working but somehow it has to go.
Hmm should I write these mount command I postet in the init.rc? Or something else. Would be very nice if you post your ideas!
Thanks
init.rc+ ext3 module/object included in kernel
Hmm okay thats good but how do I use them? So I can read and write to my external sd card with an ext3 or ext2 partition.
Thanks
Come on guys where are the great developers?!
Ok I did a test with busybox inbuilt mount, but I tried only with an image.
Not with a real SD card! This worked for me:
On a linux box:
# dd if=/dev/zero of=/tmp/image bs=1M count=1k
# mkfs.ext4 /tmp/image
Copy file to your phone. Then:
On the phone with terminal:
# mkdir /sdcard/mmnt
# busybox mount -o loop /sdcard/image /sdcard/mmnt
To unmount:
# busybox umount -l /sdcard/mmnt
Anybody tried that?
If I understand u right u puting an image file (ext3/4) on the sd and mount that as a virtual disk. Wouldn't the image file be bound to the same restrictoins as other content on a fat32 file system? Like the 4 gig limit!
YOU WILL LOSE ALL DATA ON YOUR SDCARD IF YOUR FDISK
BACKUP WHATEVER IS ON THERE FIRST!!!
YOU'VE BEEN WARNED
using a photon 4g but....
what i did was get an external sdcard reader writer...
(used ubuntu) and let it mount
fdisk device and DELETE ALL PARTITIONS
write
fdisk again
create a linux primary type 83
type mount and grab the /dev/sdcX value (it was /dev/sdc1 for me)
umount that
then
mkfs.ext3 /dev/sdcX ... ( heres the thing though with cyanogen mod 7 kernel 2.6.32.9 SMP PREEMPT)
had to reboot twice for it to be seen in file manager...
its buggy but it does work for the most part
Reviving an old thread, but I just found that I can format a MicroSD under NTFS and it will work with Paragon's NTFS module. At the very least, my phone will mount the drive. I partitioned and formatted it with ext4 on my Linux machine and it didn't recognize it, but I did have it use the GUID partition table. Hoping to be able to load up some videos to take with me.
ext4 sdcard mount works
FaxXer said:
Hey,
I like to mount my external SD Card as ext3 to support large files. The SD Card is formatted with ext3 but now Android shows only an empty folder.
So i tried to remount the SD:
Code:
mount -o rw,remount -t ext3 /dev/block/vold/197:33 /mnt/sdcard/externald_sd
But it doesnt use something... Does anybody has an idea? Some Example or sthing else?
Greetz
Click to expand...
Click to collapse
The problem is with the shell interpreting the special character ":"
To make it work, first create a symlink to the device node:
Code:
ln -s /dev/block/vold/197\:17 /dev/sd2
Then mount it:
Code:
busybox mount /dev/sd2 /mnt/tmp
Code:
sh-4.1# ls -l /dev/sd2
lrwxrwxrwx root root 2013-11-16 14:45 sd2 -> /dev/block/vold/179:17
sh-4.1# mount|grep sd2
/dev/sd2 /mnt/tmp ext4 rw,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
success mounting ext formatted SD Card on Android
An improvement in technique to mount ext formatted SDcard:
1) be root and open terminal
2) insert the card
3) see the block device and partition names from dmesg
4) mount device to location of choice (create the directory if needed)
Below is an example of an SD card with one ext4 partition on it
Code:
bash-4.1# dmesg | tail | grep mmc
<6>[20230.719541] mmc1: new high speed SDHC card at address 0007
<6>[20230.722803] mmcblk1: mmc1:0007 SD32G 29.3 GiB (ro)
<6>[20230.728352] mmcblk1: p1
bash-4.1# busybox mount /dev/block/mmcblk1p1 /data/mnt/sdcard2
tribh said:
An improvement in technique to mount ext formatted SDcard:
1) be root and open terminal
2) insert the card
3) see the block device and partition names from dmesg
4) mount device to location of choice (create the directory if needed)
Below is an example of an SD card with one ext4 partition on it
Code:
bash-4.1# dmesg | tail | grep mmc
<6>[20230.719541] mmc1: new high speed SDHC card at address 0007
<6>[20230.722803] mmcblk1: mmc1:0007 SD32G 29.3 GiB (ro)
<6>[20230.728352] mmcblk1: p1
bash-4.1# busybox mount /dev/block/mmcblk1p1 /data/mnt/sdcard2
Click to expand...
Click to collapse
Would this work just the same way with i9000?
After this, no more access to the extSD by the Windows PC but only with Ubuntu, right?
tetakpatak said:
Would this work just the same way with i9000?
After this, no more access to the extSD by the Windows PC but only with Ubuntu, right?
Click to expand...
Click to collapse
Since it's generic Linux kernel and busybox functionality it should work on any 'droid. The SDcard device name might be different than in the above example - you will see the correct device and partition names after you insert SDcard and run `dmesg | tail` on the tablet or phone.
(of course your device must be rooted and have busybox...)
Typically Windows is engineered not to recognise anything that does not come from Microsoft, so you will not be able to mount the Linux partition via Windows.

Linking from /mnt/sdcard to /mnt/sdcard-ext - automatization

Found the solution, it's in the fifth post
Hey, first of all I'm Linux and Android newbie, so sorry if my question reveals it a bit
As my Internal Storage a.k.a. /mnt/sdcard is getting full and I hate to be reminded of it by notification I can't get rid of, I decided to put some effort into moving the largest files to the SD card. I have a 64GB SD an there still are several free gigs So after some googling I found out a way to link it. It works like this:
Code:
mount -o bind /origdir /newdir
where both /origdir and /newdir must exist, in my case as an example:
Code:
mount -o bind /mnt/sdcard-ext/sd/DictionariesNGHS /mnt/sdcard/DictionariesNGHS
where /mnt/sdcard-ext/sd/DictionariesNGHS is the data containing folder and /mnt/sdcard/sd/DictionariesNGHS is an empty folder for linking. It works like a charm, tried with several applications including some off-line navigations. The downside is that such links are forgotten after a reboot.
I didn't find out how to automatize that. I tried putting the line from second code to the end of /system/etc/init.goldfish.sh (I run Eclipse ICS 1.2) and it didn't get linked after a reboot (but works OK after mounting manually in terminal) - I suspect it runs before sdcard-ext is mounted. Any thoughts on how to make it run after reboot? Or maybe of an app that does this for me?
EDIT:
Put my links into /data/data/init.sh
Tried several not working apps:
ScriptMe by gilsken says Script run mount: No such file or directory
Script Manager - SManager by devworm says
Code:
exec sh '/data/data/init.sh'
[email protected]_maserati:/ # exec sh '/data/data/init.sh'
mount: No such file or directory
while interestingly when I write it by myself in its built-in console it works...
App that works: Tasker by Crafty Apps
I can have scripts run on boot and it works, but I can add only one line at time (or at least it's the only option I found) which is still kinda inconvenient plus it runs all the time consuming system resources. I'd like some less robust solution, preferably executed after boot and exiting after mounts proceed. Any ideas?
EDIT 2:
My "workaround" in Tasker: Profiles -> New -> Event -> System -> Device Boot -> OK -> New Task -> OK -> + -> Script -> Run Shell -> Command: /data/data/init.sh -> OK
Surprisingly enough it doesn't even need root permission...
In init.sh I have several lines with different mounts, it all works well. I'm still looking for less robust solution than Tasker is, or maybe a way to kill it after the init.sh is processed?
hey
can you please post the content of youre
Code:
/data/data/init.sh
---------- Post added at 04:35 PM ---------- Previous post was at 03:50 PM ----------
youre problem is, at the runtime form the mount command, the mount is not in youre path.
can you add to you script the command
Code:
env
and post the output?
I tried it with a file containing only this line:
Code:
mount -o bind /mnt/sdcard-ext/sd/DictionariesNGHS /mnt/sdcard/DictionariesNGHS
OK, after running it by SManager it looks like giving errors, but the folder gets mounted.
Also it seems apps get access to /mnt/sdcard faster after reboot then to /data/data (I wonder why...?) so I moved the script there.
Here you have the output with env at the end of init.sh, run by SManager as root (mounted OK):
Code:
exec sh '/mnt/sdcard/init.sh'
[email protected]_maserati:/ # exec sh '/mnt/sdcard/init.sh'
mount: No such file or directory
_=/system/xbin/env
ANDROID_BOOTLOGO=1
ANDROID_PROPERTY_WORKSPACE=8,69632
LOOP_MOUNTPOINT=/mnt/obb
SM_API=15
RANDOM=26725
ANDROID_ASSETS=/system/app
USER=root
EXTERNAL_STORAGE=/mnt/sdcard
ANDROID_DATA=/data
PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
SM_LAUNCHER=MANUAL
TERM=vt100
PS1=$(precmd)[email protected]$HOSTNAME:${PWD:-?} #
SM_VERSION=2.5.3.1
SM_GUIFD=3
LD_LIBRARY_PATH=/vendor/lib:/system/lib
SECONDARY_STORAGE=/mnt/sdcard-ext
SM_ALIAS=init.sh
ASEC_MOUNTPOINT=/mnt/asec
SM_HOME=/mnt/sdcard
HOSTNAME=cdma_maserati
HOME=/
SM_VERSIONCODE=77
BOOTCLASSPATH=/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework-ext.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/filterfw.jar:/system/framework/com.motorola.android.frameworks.jar:/system/framework/com.motorola.android.widget.jar:/system/framework/com.motorola.frameworks.core.addon.jar:/system/framework/kafdex.jar:/system/framework/com.motorola.orange.simauth.jar
ANDROID_ROOT=/system
SHELL=/system/bin/sh
MKSH=/system/bin/sh
ANDROID_SOCKET_zygote=9
So it works after all with the SManager as I intended, I just don't understand why it gives that error when everything actually is OK...
Any ideas on how to make it run automatically after every mount of sdcard-ext instead of on reboot? Because when I connect it to the computer as Mass Storage, the directory mounts disappear and I have to run the script manually...
LuH said:
I tried it with a file containing only this line:
Code:
mount -o bind /mnt/sdcard-ext/sd/DictionariesNGHS /mnt/sdcard/DictionariesNGHS
...
Any ideas on how to make it run automatically after every mount of sdcard-ext instead of on reboot? Because when I connect it to the computer as Mass Storage, the directory mounts disappear and I have to run the script manually...
Click to expand...
Click to collapse
for the first, replace the mount with this:
Code:
/system/bin/mount -o bind /mnt/sdcard-ext/sd/DictionariesNGHS /mnt/sdcard/DictionariesNGHS
Found out that the "mount: No such file or directory" error was due to typo in folder path
So to wrap it up:
You need to be rooted first.
Create your init.sh script file, works fine when put to /mnt/sdcard/
Example file (also attached so you have a sample in UNIX formatting - don't open with Notepad under Windows, better edit it in your phone):
Code:
# mount -o bind /sourcedir /fakedir - both sourcedir and fakedir MUST exist!
mount -o bind /mnt/sdcard-ext/sd/DictionariesNGHS /mnt/sdcard/DictionariesNGHS
mount -o bind /mnt/sdcard-ext/sd/Android/obb /mnt/sdcard/Android/obb
Note: you should use a UNIX formatting of the file, not Windows (I'm not sure if it's necessary though).
As hinted in the beginning note, sourcedir and fakedir must exist and after successful mount the fakedir folder will appear to have the contents of the sourcedir folder. Any fakedir's contents are ignored ("disappear") after mount and reappear only after it gets unmounted.
It gets automatically unmounted after unmounting of either fakedir's or sourcedir's media (typically when connecting phone to a computer as mass storage) and I haven't found any workaround for running the script after remounting of media... Any suggestions?
Install SManager (free version here).
In SManager navigate to your script file, tap it and select Script/Executable and tap Su and Boot icons (see attached screenshot).
Done, your folders get mounted on reboot

(Help)Adding an USBHDD to Rasbian filesystem

Hello Guys i have an Samba Server installed on my Raspberry pi and i wonder if you can mount an USBHDD on it i can Mount an USB pen drive whit no problem att all butt when i Try to mount the HDD it says that it Don't find ntfs-3 as a File System "sudo mount -t ntfs-3g -o uid=pi,gid=pi /dev/sda1 /media/usbhdd/" is the code to Mount and i have made a Dir only for that HDD to please Help what shall i write insteed for ntfs-3g
sioxz said:
Hello Guys i have an Samba Server installed on my Raspberry pi and i wonder if you can mount an USBHDD on it i can Mount an USB pen drive whit no problem att all butt when i Try to mount the HDD it says that it Don't find ntfs-3 as a File System "sudo mount -t ntfs-3g -o uid=pi,gid=pi /dev/sda1 /media/usbhdd/" is the code to Mount and i have made a Dir only for that HDD to please Help what shall i write insteed for ntfs-3g
Click to expand...
Click to collapse
Samba and other linux aspects related to linux servers can sometimes handle the NTFS file system in a weird way, I would suggest taking a look at these two guides for a couple of potential ways to fix your problem:
http://forums.whirlpool.net.au/archive/971582
http://ubuntuforums.org/showpost.php?p=9562968&postcount=3
Make sure you have the package for ntfs installed. I think it should be something like
Code:
sudo apt-get install ntfs-3g
Then try mounting it again using the command "mount" command. If you want it to mount automatically you will have to add it to /etc/fstab
Why are you using ntfs to being with? You should really use ext if possible, stick with Linux file systems and save yourself a headache if you aren't using this HDD with a computer that does support Linux file systems (i.e. Windows).
m2xtreme said:
Make sure you have the package for ntfs installed. I think it should be something like
Code:
sudo apt-get install ntfs-3g
Then try mounting it again using the command "mount" command. If you want it to mount automatically you will have to add it to /etc/fstab
Why are you using ntfs to being with? You should really use ext if possible, stick with Linux file systems and save yourself a headache if you aren't using this HDD with a computer that does support Linux file systems (i.e. Windows).
Click to expand...
Click to collapse
First of all Thanks both of you and the Reason i Use ntfs is becouse i have a 1TB Usb HDD full whit Data and i dont wanna Delete all that and make it into another Filesystem and i have another Problem you know the linux USB henarki whit sda1/sda2 Etc When i plug in my ntfs drive and my keybord only it says that i have Sda1/sda2/sda3 Bootet but when i drive the same tail command whit a Fat32 Usb stick i only get sda1 any tips on this ? whill try you thing First Thanks a lot :laugh: (edit: i also updated my USBmount i have no idea if this makes any diffrence but i got Dir in /media/ usb/usb1/usb2 Etc... to usb7)
I just ran a similar command to "sudo mount -t ntfs-3g -o uid=pi,gid=pi /dev/sda1 /media/usbhdd/" on my linux desktop without issue. Can you provide the error message you are getting when running this command? Also are you able to run this command without issue?
Code:
sudo mount -t ntfs-3g /dev/sda1 /media/usbhdd/
Perhaps you should verify that /dev/sda1 is in fact the correct hard drive by running:
Code:
sudo fdisk -l | grep NTFS
m2xtreme said:
I just ran a similar command to "sudo mount -t ntfs-3g -o uid=pi,gid=pi /dev/sda1 /media/usbhdd/" on my linux desktop without issue. Can you provide the error message you are getting when running this command? Also are you able to run this command without issue?
Code:
sudo mount -t ntfs-3g /dev/sda1 /media/usbhdd/
Perhaps you should verify that /dev/sda1 is in fact the correct hard drive by running:
Code:
sudo fdisk -l | grep NTFS
Click to expand...
Click to collapse
The ting is that i run a Tail command to se which sda number that Usb Hdd has and i says that is Has 3 sda number (sda1,sda2,sda3) and this makes me Really confused because when i run the same Tail command whit an flash usb stick (fat32) it only says one number (sda1)
gonna try running Arch linux insteed as soon as my new SD card Arrives :good: btw i have mounted an fat32 usb memory stick
and i have downloaded ntfs-3g package and utdated usbmount package
i have fixed it now my Raspberry pi are running Samba Whit my 1TB NTFS Drive
You need to Run Rasbian newest version
now how to
First
Code:
sudo apt-get install usbmount
to get the newest usb mount package
Code:
sudo apt-get install ntfs-3g
to get the ntfs-3g package to mount the disk
to mount
Code:
sudo mount -t ntfs-3g -o uid=pi,gid=pi /dev/path /media/path1/
were path is you fill in were the Disk is often sda1 but can also be sda2.sda3 my Drive was on sda3 becuse of some wierd ****
path1 do you fill in were you wanna mount your drive because of the usbmount package you now got usb,usb1,usb2 up to usb7
so choose any of them than if all works out you have mounted you NTFS drive
to test if it is munted or not
Write
Code:
cd /media/path1
and then type
Code:
dir
and you shoud se some maps if you got any on you Drive before
sorry for my English (i am from sweden and my spelling is genneraly bad in every language)
Happy to hear you figured it out. It is a bit surprising that it is mounting to sda3. In my experience Linux will give each hard drive it's own sdX number (i.e. sda, sdb, sdc, etc) and each partition on a hard drive will have a number associated with it (i.e. sda1, sda2, sda3, etc). Oh well
m2xtreme said:
Happy to hear you figured it out. It is a bit surprising that it is mounting to sda3. In my experience Linux will give each hard drive it's own sdX number (i.e. sda, sdb, sdc, etc) and each partition on a hard drive will have a number associated with it (i.e. sda1, sda2, sda3, etc). Oh well
Click to expand...
Click to collapse
Yea i was Kind of Confused to about that but now have i made guide how to fix this problem if anybody other than me experience this :laugh:
Also was First Time in Linux
Thanks to My Friends,Teachers And the people of XDA did i fix This Problem
If you've got various sdaX, that means one of two things:
1 - You've got multiple partitions; or
2 - Your partition table is broken.
If your partition table is broken but you can access your data, leave it as it is, and wait for a chance when you can back up that data to another disk to re-write MBR (or GPT, whatever floats your disk).

[Q] [HELP] Swap sdcard with sdcard-ext

I've edited vold.fstab so that sdcard and sdcard-ext are swapped. But this doesn't work on my XT894. Nothing happens in my case.
Then I found this topic.
In short, you run a script containing:
Code:
busybox mount -o remount,rw /
busybox mount -t vfat -o umask=0000 /dev/block/vold/179:97 /mnt/sdcard
busybox mount -t exfat -o umask=0000 /dev/block/vold/179:97 /mnt/sdcard
if busybox mount | busybox grep vold/179:97; then
busybox mount -o bind /data/media /mnt/extSdCard
fi
After running this script the result is that both sdcard and scard-ext are in fact pointing to my external 32GB card. So in a way I'm happy. Now I can install games and all navigational maps without any hassle. But, I would like my internal 8GB of storage back. To do so I take it "something" has to be mounted to /mnt/sdcard-ext.
My Linux/Unix is of n00b quality so here I am asking for help :cyclops:
I've tried adding these two lines:
busybox mount -t vfat -o umask=0000 /dev/block/vold/179:1 /mnt/sdcard-ext
busybox mount -t exfat -o umask=0000 /dev/block/vold/179:1 /mnt/sdcard-ext
Hoping 179:1 pounted to the internal sdcard and /mnt/sdcard-ext would mount it at exactly that. But it didn't work.
Can anyone explain to me what these commands do? Why vfat and exfat? Is this done so that you always mount the correct filesystem? And what about the vold/179:xx? Does anyone know which one points to the internal sdcard on an XT894 running ICS?
Trust me, I've Googled all I can. I have tried several options, multiple scripts, but my lack of Linux/Unix knowledge is killing me.
Edit:
When I connect as USB Mass storage I get my internal 8GB back. It is accessible on the laptop. When I switch back to MTP it shows a different directory (maybe due to vold/179:1 !?). After I re-run the script sdcard is back to my external 32GB. For now this will do.
I will update later. Sygic is downloading 2GB of data. After that I will switch back and forth between USB M / MTP with and without running the script.
Edit 2
After I connect as MTP, Internal Storage seems to be pointing to an unknown space. There is an .android directory which I am unable to find on the phone.
When I switch to USBMS (from MTP) it seems to switch back to the original setup, sdcard 8GB and sdcard-ext 32GB.
When I disconnect the USB cable everything is back to normal. But, all I need to do is re-run the script and sdcard points back to my external SD.

mount second sd card as a directory so car detects music over USB

Hi,
I use my telephone with a second sd card in the car through usb.
Appearently the car only finds and indexes the first sd card.
Is there a way to mount the sceond card as a directory on the first card?
Kind Regards
Guy F
I found a file vold.fstab in my /etc/system but there's no info regarding the second sd card?
Can I safely edit and how?
# Vold 2.0 Generic fstab
## - San Mehat ([email protected])
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
#FIXME: Swap again?
# internal sdcard
dev_mount emmc /storage/sdcard1 auto /devices/platform/s3c-sdhci.2/mmc_host/mmc2
# external sdcard
dev_mount sdcard /storage/sdcard0 1 /devices/platform/s3c-sdhci.0/mmc_host/mmc0
I have looked here
http://forum.xda-developers.com/showthread.php?t=1922272
http://forum.xda-developers.com/showthread.php?t=1724287
http://forum.xda-developers.com/showthread.php?t=1785245
but I can't seem to get it to work
Anybody?
Forssound said:
I have looked here
http://forum.xda-developers.com/showthread.php?t=1922272
http://forum.xda-developers.com/showthread.php?t=1724287
http://forum.xda-developers.com/showthread.php?t=1785245
but I can't seem to get it to work
Anybody?
Click to expand...
Click to collapse
It seems I found a solution here http://forum.xda-developers.com/showthread.php?t=1511619
In brief
install a app like SSHDroid
on your desktop connect with putty to your phone so hook up your phone with the usb cable
login is or was "root" and password is "admin"
ls /dev/block/vold will give you some figures 179.0 179.2 179.2 179.8 179.9
ls /dev/block/platform will give some folders s3c-sdchi.0 s3c-sdchi.2 s5pc110-onenand
One can chose between several ways how the folders appear on a windows explorer folder
like a USB stick or a mediaplayer
setprop persist.sys.usb.config mtp,adb results in the little walkman icon on your explorer
setprop persist.sys.usb.config mass_storage,adb results in the appearing of a usb stick
mount is also a commando when given alone which will show you everything that is mounted
In the putty window i did a feel free to experiment
setprop persist.sys.usb.config mass_storage,adb
echo /dev/block/vold/179:9 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file"
This would result in the appearing of a USB stick with name sdcard on your file explorer in windows.
To make this flash persistent
Look if your rom has support for userinit.d or bootcompletehook.sh somewhere in /data
cm 10.1 has support for userinit.d
in /system/etc/init.d I found 2 files 00banner and 90userinit
vi /system/etc/init.d/90userinit is this
#!/system/bin/sh
# call userinit.sh and/or userinit.d/* scripts if present in /data/local
if [ -e /data/local/userinit.sh ];
then
log -p i -t userinit "Executing /data/local/userinit.sh";
logwrapper /system/bin/sh /data/local/userinit.sh;
setprop cm.userinit.active 1;
fi;
if [ -d /data/local/userinit.d ];
then
logwrapper busybox run-parts /data/local/userinit.d;
setprop cm.userinit.active 1;
fi;
now the folder wasn't there so
mkdir /data/local/userinit.d
in this folder make a file.The name isn't important
cd /data/local/userinit.d
vi mountsdcard
setprop persist.sys.usb.config mass_storage,adb
echo /dev/block/vold/179:9 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file
make sure you give rights to this file and the folder one can do that with es file explorer or probable
chmod 751 mountsdcard
I think that's it
This will mount your second sdcard (if you have one ) on your windows like a usb stick. It will do this even if your phone isn't completely started up.
You will not have to do a "mount usb" on your phone. If you do this anyway your first card is also mounted.
This is a neat trick to make your CAR find your music on your phone. If your car has a usb port and the functionality to play music from usb sticks.
Kind Regards
Guy
I tried doing the same by bind-mounting the external_sd on a folder on the internal_sd:
Code:
mount -o bind /storage/sdcard1 /storage/sdcard0/external_sd/
In the terminal it worked like a charm, but i couldn't get it to work at boot. Have you any other ideas?
Wouldn't it be easier to just mount the ext SD to a folder on the internal SD? This seems like 100 times the work really needed.
I can't recall atm how mounting of SD cards works, but if I had this problem I'd probably just put the songs in a .img file and mount that with
mount -o loop -t auto /storage/sdcard1/music.img /storage/sdcard2/music/
Sent from my GT-I9000 using xda premium
Yeah thats kinda what i thought of. But my init script is not getting executed or at least there is no effect of it.
I assume you've tested it with terminal output, what doesn't work about it? :/
Sent from my GT-I9000 using xda premium
I don't know what you mean, to be honest. I know that init.d should write the logs somewhere but couldn't find out where they are written to.
Edit: when i try to execute the command above it works, but it doesn't work with init.d
wget21 said:
I tried doing the same by bind-mounting the external_sd on a folder on the internal_sd:
Code:
mount -o bind /storage/sdcard1 /storage/sdcard0/external_sd/
In the terminal it worked like a charm, but i couldn't get it to work at boot. Have you any other ideas?
Click to expand...
Click to collapse
Read my large post..... It works on reboot and flash... I have tested it in my car and on my PC..
wget21 said:
I don't know what you mean, to be honest. I know that init.d should write the logs somewhere but couldn't find out where they are written to.
Edit: when i try to execute the command above it works, but it doesn't work with init.d
Click to expand...
Click to collapse
Well, for what it's worth you can use CM File Manager to add a shortcut on your home screen if you're on a ROM with Trebuchet Launcher, do that with the executable file and you can at least launch it easily when needed...
With pretty much any other launcher custom shortcuts are supported as is, Trebuchet for some reason lacks it.
(I loathe init.d)
Sent from my GT-I9000 using xda premium
I have now made a script in rom toolbox which does the job, but i'm not very happy with this. I'd prefer doing this simple bind-mount with init.d
@Forssound: Your solution seems to me a bit complicated, just for this simple task.

Categories

Resources