[Q] How to mount chosen partition as EXTERNAL sdcard - Samsung Galaxy SL i9003

Hey,
didnt find answer in similar threads (spent already 1 day at this)
how to mount partition of my choice as an external sdcard? Currently my phone sees external SD card as unavailable because it had corrupted internal memory and i swapped it and whole system starts from true external sdcard.
i tried adding last line in fstab but no luck
fstab:
Code:
/dev/block/stl11 /cache auto rw
/dev/block/mmcblk0p2 /data rfs rw
/dev/block/stl10 /datadata auto rw
/dev/block/mmcblk0p3 /emmc fat32 rw
/dev/block/stl9 /system auto rw
/dev/block/mmcblk0p1 /sdcard auto rw
/dev/block/mmcblk0p4 /sdcard1 auto rw
vold.fstab
Code:
# sdcard mount for the P1
# internal sdcard
{
ums_path = /sys/devices/platform/usb_mass_storage/lun1/file
asec = disable
mbr_policy = overwrite
}
dev_mount sdcard /mnt/sdcard 1 /devices/platform/mmci-omap-hs.0/mmc_host/mmc1
# externel sdcard
#{
# ums_path = /sys/devices/platform/usb_mass_storage/lun1/file
# asec = enable
# mbr_policy = overwrite
#}
#dev_mount sdcard1 /mnt/sdcard/external_sd auto /devices/platform/mmci-omap-hs.0/mmc_host/mmc0
i commented here because it made no difference what i mount as external sd card, couldnt make it work.
Yes i have root and know adb enough to edit these files.
Please help.

Related

[Q] How to make the External SD card works [CM7.2]

Hi, i just install a CM7.2 in my Skyrocket and everything goes fine but the storage. it mounts the internal storage to /mnt/emmc. but i want it to mount to the /mnt/sdcard so that the camera and other software will works even without insert an external SD card.
i have follow a guide to switch the mounting line in the /system/etc/vold.fastab file.
here is the original lines:
Code:
# internal sdcard
dev_mount emmc /mnt/emmc 28 /devices/platform/msm_sdcc.1/mmc_host/mmc0/mmc0
# external sdcard
dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.3/mmc_host/mmc2/mmc2
# otg sdcard
# usb_mount sdcard2 /mnt/sdcard/usbStorage auto /devices/platform/msm_hsusb_host.0#end line
And the following is my modified lines, just simply switch the two lines:
Code:
# internal sdcard
dev_mount emmc /mnt/emmc auto /devices/platform/msm_sdcc.3/mmc_host/mmc2/mmc2
# external sdcard
dev_mount sdcard /mnt/sdcard 28 /devices/platform/msm_sdcc.1/mmc_host/mmc0/mmc0
# otg sdcard
# usb_mount sdcard2 /mnt/sdcard/usbStorage auto /devices/platform/msm_hsusb_host.0#end line
After i did that, the internal storage mount to /mnt/sdcard correctly, and the usb storage driver works as well. after i insert a external sd card, it mount to /mnt/emmc correctly; but when i unmount it, there is a notification in task bar saying "SD card removed, please insert a new one" which can not be clear;
Anyone familiar with the code command and help me? Thanks a million

[MOD] Onda V973 Swap internal sd with external sd card

Hi there!
I managed to swap the internal sd-card (with 11 GB free space) with my external sd-card (in my case a class 10 32GB card, formatted with FAT32) at my Onda V973 V1-Tablet (with Firmware 3.0, Android 4.2.2). These are the steps to do this (you have to have a functional adb):
# kill old adb-processes
Code:
adb kill-server
# look if tablet is viewable per adb
Code:
adb devices
# copy vold.fstab to local harddisk
Code:
adb pull /system/etc/vold.fstab
# now you have to edit the vold.fstab with a text-editor as follow:
Code:
#Original:
dev_mount sdcard /mnt/sdcard auto /devices/virtual/block/nandj
dev_mount extsd /mnt/extsd auto /devices/platform/sunxi-mmc.1/mmc_host /devices/platform/sunxi-mmc.0/mmc_host
Code:
#cards swapped:
dev_mount sdcard /mnt/sdcard auto /devices/platform/sunxi-mmc.1/mmc_host /devices/platform/sunxi-mmc.0/mmc_host
dev_mount extsd /mnt/extsd auto /devices/virtual/block/nandj
# mount system-partition read/write
Code:
adb shell mount -o remount,rw /system
# write changed vold.fstab to system-partition
Code:
adb push vold.fstab /system/etc/
# reboot tablet to apply changes
Code:
adb reboot
After these steps the internal sd is fully swapped with the external and in my case I can use full 32GByte as "internal sd".

[KERNEL] Sero 7 Pro Kernel Modifications - Swap Internal/External Storage

Looking for some help with the modification of the kernel from the Sero 7 Pro
Below is the kernel stock values to show location of sdcard and external sd card
Code:
on init
mkdir /mnt/shell/emulated 0700 shell shell
mkdir /storage/emulated 0555 root root
mkdir /storage/sdcard1 0555 root root
export SECONDARY_STORAGE /storage/sdcard1
export EXTERNAL_STORAGE /storage/emulated/legacy
export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
export EMULATED_STORAGE_TARGET /storage/emulated
# Support legacy paths
symlink /storage/emulated/legacy /sdcard
symlink /storage/emulated/legacy /mnt/sdcard
symlink /storage/emulated/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy
symlink /storage/sdcard1 /sdcard2
symlink /storage/sdcard1 /mnt/sdcard2
I would like to swap storage locations. Anyone want to assist? Post your edits I will compile, flash and post results.
xboxexpert said:
Looking for some help with the modification of the kernel from the Sero 7 Pro
Below is the kernel stock values to show location of sdcard and external sd card
Code:
on init
mkdir /mnt/shell/emulated 0700 shell shell
mkdir /storage/emulated 0555 root root
mkdir /storage/sdcard1 0555 root root
export SECONDARY_STORAGE /storage/sdcard1
export EXTERNAL_STORAGE /storage/emulated/legacy
export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
export EMULATED_STORAGE_TARGET /storage/emulated
# Support legacy paths
symlink /storage/emulated/legacy /sdcard
symlink /storage/emulated/legacy /mnt/sdcard
symlink /storage/emulated/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy
symlink /storage/sdcard1 /sdcard2
symlink /storage/sdcard1 /mnt/sdcard2
I would like to swap storage locations. Anyone want to assist? Post your edits I will compile, flash and post results.
Click to expand...
Click to collapse
Could you please try this?
symlink /storage/emulated/legacy /sdcard2
symlink /storage/emulated/legacy /mnt/sdcard2
symlink /storage/emulated/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy
symlink /storage/sdcard1 /sdcard
symlink /storage/sdcard1 /mnt/sdcard
angellsl said:
Could you please try this?
symlink /storage/emulated/legacy /sdcard2
symlink /storage/emulated/legacy /mnt/sdcard2
symlink /storage/emulated/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy
symlink /storage/sdcard1 /sdcard
symlink /storage/sdcard1 /mnt/sdcard
Click to expand...
Click to collapse
I did that and then flashed yet it had no effect on the storage of the device. Still the same.
xboxexpert said:
I did that and then flashed yet it had no effect on the storage of the device. Still the same.
Click to expand...
Click to collapse
Thanks!
It seems that Sero 7 Pro uses emulation in init.m470.rc to mount the internal storage at /mnt/shell/emulated (line 341)
And it uses /etc/vold.fstab to mount the external storage (SD card) at /storage/sdcard1
Here is a link for Android storage management http://source.android.com/tech/storage/
I think it's feasible to remove the emulation at init.m470.rc and put both internal/external mounting in /etc/vold.fstab (to make the internal storage mounted at /sdcard2 while SD card mounted at internal (/sdcard) ), but we have to make sure the symlinks are updated accordingly.
Or, we can also keep the emulation at line 341, but mount it at /storage/sdcard1.
I don't know how to build the rootfs yet. So I didn't try...
Hope it helps
angellsl said:
Thanks!
It seems that Sero 7 Pro uses emulation in init.m470.rc to mount the internal storage at /mnt/shell/emulated (line 341)
And it uses /etc/vold.fstab to mount the external storage (SD card) at /storage/sdcard1
Here is a link for Android storage management http://source.android.com/tech/storage/
I think it's feasible to remove the emulation at init.m470.rc and put both internal/external mounting in /etc/vold.fstab (to make the internal storage mounted at /sdcard2 while SD card mounted at internal (/sdcard) ), but we have to make sure the symlinks are updated accordingly.
Or, we can also keep the emulation at line 341, but mount it at /storage/sdcard1.
I don't know how to build the rootfs yet. So I didn't try...
Hope it helps
Click to expand...
Click to collapse
You could edit the file accordingly and if you want to send it over I'll recompile and flash.
xboxexpert said:
You could edit the file accordingly and if you want to send it over I'll recompile and flash.
Click to expand...
Click to collapse
I was able to enable init.d first, and then I can swap the cards using the same trick I did for my note 2. But the storage in settings cannot see the change. The emulated internal storage on sero 7 has a slight different file hierarchy, probably because of the android version difference (4.1.2 vs 4.2.1)? I felt I'm almost there, just not sure what labels/mounts the storage in settings reads (/sdcard? others?)
Keep up the great work guys I'm following eagerly to see what you all come up with. We may have a Dev soon Unjustified Developer is talking about purchasing this tab!
Not that you're not doing a great job Xbox making the headlines everyday! Great work appreciate everything you're doing! Can't wait till father's day when my wife allows me to play with it Lol
Sent from my SCH-R530U using Tapatalk 4 Beta
angellsl said:
I was able to enable init.d first, and then I can swap the cards using the same trick I did for my note 2. But the storage in settings cannot see the change. The emulated internal storage on sero 7 has a slight different file hierarchy, probably because of the android version difference (4.1.2 vs 4.2.1)? I felt I'm almost there, just not sure what labels/mounts the storage in settings reads (/sdcard? others?)
Click to expand...
Click to collapse
Storage and settings is controlled by the vold.fstab in /system/etc I think.
trvbone said:
Can't wait till father's day when my wife allows me to play with it Lol
Click to expand...
Click to collapse
I laughed...I have the same issues only my toys are Corvettes
I give up for now. Fall back to folder mount,it works great, installed over 10GB of games.
Sent from my M470BSA using Tapatalk 2
No further progress on this issue?

Swap SD on CM 11 ?

How to apply the sd swap on the new cm11 of dhiru?
even i have too that doubt, how to use swap sd in Cm 11. i tried swap sd of JB4.2.2 , but it didnt work.
redflash52 said:
How to apply the sd swap on the new cm11 of dhiru?
Click to expand...
Click to collapse
file partioning MTD has changed in CM 11 4.4.. lets wait for our great developers to find out a proper way for swapping memory.
Use script manager to execute this script at boot..
For GalaxySL = i9003
#!/system/bin/sh
umount /mnt/media_rw/sdcard0
umount /mnt/media_rw/sdcard1
mount -t vfat -o uid=1023,gid=1023 /dev/block/vold/179:49 /mnt/media_rw/sdcard0
mount -t vfat -o uid=1023,gid=1023 /dev/block/vold/179:1 /mnt/media_rw/sdcard1
Can't be installed inside "init.d" folder.. Suggest to use /data..
Replace the id = 179:49 and 179.1 according to your device internal and external id.You can check them by executing the command:
mount | grep sdcard0
and
mount | grep sdcard1
to swap change the id.. change the sdcard0 id to sdcard1..
I am currently trying this http://forum.xda-developers.com/showpost.php?p=48876834&postcount=472
so far so good but havent tested it much, i think games run slower..

[Q] can anyone help me using link2sd on my lg e610 using script?

hi i got an lg e610v
i've installed a custom firmware : 20d+root+cmw
wiped
installed cyanogenmod 11 and last Gapps
i've partitioned the SD card with partition magic tool
1 : Fat - 400 mb 2 : ext2 - 1600 mb
i got problem using link2sd because it tells me that it's not supported because i got a primary ext memory that's emulated from my internal memory.
i read on internet that i can exchange the emulated memory using a script like :
mount -o remount,rw /
mount -t vfat -o umask=0000 /dev/block/vold/179:61 /mnt/sdcard
mount -o bind /data/media /mnt/sdcard/external_sd
chmod 777 /mnt/sdcard/external_sd
but i think this is only for certain phones , what could i do to use both the primary and sd memory on this phone ?
thanks for the answers !

Categories

Resources