[Q] Galaxy Relay 4G T699: Swapping Internal Mem / Ext SD (CM11) - Android Q&A, Help & Troubleshooting

Hi all, greetings, this is the first time for me posting a thread in this session.
And sorry for my bad English, I am not native English speaker.
Here is the situation and would wish to seek help:-
Phone: Samsung Galaxy S Relay 4G (aka T699)
Rom: CM11 Official ApexTmo.
Scenario: Wishing to swap Internal Memory & Ext SD Card.
Problem: I used to solve this in ICS, by editing vold.fstab on my late SGH-I927.
This no longer worked on Jellybean (Stock Rom) on this phone,
I therefore managed to use Init.d script as follow:
Code:
sleep 2
mount -o remount,rw /
mkdir -p /data/internal_sd
mount -o bind /mnt/sdcard /data/internal_sd
mount -t vfat -o umask=0000 /dev/block/vold/179:33 /mnt/sdcard
mount -o bind /data/internal_sd /mnt/extSdCard
However when I upgraded to CM11, this script no longer works.
a. There has been work outs for other phones using a script called SwapCM11 in XDA,
however the mount point is different and I face difficulties in sorting out all mount points,
esp in CM11, besides ordinary /storage/sdcard, there is also a mount point for internal called /storage/emulated/0 or /storage/emulated/legacy
b. besides Init.d, I also tried an "Root External 2 Internal" but too not working on CM11.
Kindly please help., and best wishes

Related

Native ext4 external sdcard mounting?

Hi,
I decided to my hole external card as ext4 format, without journal.
I see that the phone mounts it through fuse, and not directly like internal ext4 partitions.
Does anybody know why? And eventually how to mount it more cleanly...
Tks.
I think it depends on your kernel and modules available...
Sent from my GT-I9300 using Tapatalk 4
/proc/filesystems shows that ext4 is supported. As in fstab sdcard mount mode is set to auto, it should choose fuse only if necessary.
And by definition ext4 is present in all jelly bean kernels as it's default internal file system format.
Self answer...
http://source.android.com/devices/tech/storage/
It seems that android uses fuse for external (= secondary) storage regardless the filesystem. If I understood correctly.
I tried to change auto to ext4 in fstab but no effect, during boot it was restored to auto.
Edit: manually unmount /storage/sdcard1 and /mnt/fuse/sdcard1 then mounting vold block with ext4 argument works flawlessly.
Should write a little script in init.d to do that...
Better, to avoid manipulation as I flash nearly every day, script manager with:
#!/system/bin/sh
su
umount /storage/sdcard1
umount /mnt/fuse/sdcard1
mount -rw -t ext4 -o noatime,nosuid,nodev /dev/block/vold/179:17 /storage/sdcard1
I do all my remounts via script manager so it survives rom upgrades but sometimes also, init.d happens to soon and mounting doesn't work well. I remount my sd card with a 90 second delay using script manager
Before you ask, im not mounting it to change file system. Im changing permissions
One thing I'll point out though. Although will survive upgrade of rom usually, but if you change to different rom, vold may change from 179:17... 179 always same. Not :17 though
Sent from my GT-I9300 using Tapatalk 4
---------- Post added at 07:04 PM ---------- Previous post was at 06:58 PM ----------
Re the vold changing issue, I get around it like this....
#!/system/bin/sh
VOLD="$(mount | grep -E -o -m 1 ".{0,0}179:.{0,2}")"
su
umount /storage/sdcard1
umount /mnt/fuse/sdcard1
mount -rw -t ext4 -o noatime,nosuid,nodev /dev/block/vold/$VOLD /storage/sdcard1
Sent from my GT-I9300 using Tapatalk 4
Guys, how do you get around the problem that although ext4 external sdcard mounts fine and is usable through file managers, some programs just won't see it at all because it is no longer recognised as an external filesystem?
Have a try with programs like DiskUsage, Sygic GPS, Beyondpod Podcast manager and many more - they become unusable if the cars is not fat32 due to this reason, and it is true for either if it is mounter through fuse, or directly as ext4.

[Q] Error in init.d script

Hi,
My today goal is to swap internal memory with SD card on HTC Desire 310, and I almost accomplished that, because at this moment I need to send command trough adb to get this working:
So ADB and
Code:
su
busybox mount -t vfat -o umask=0000 /dev/block/vold/179:97 /mnt/sdcard
so now I need to create init.d script to swap internal memory with SD card at boot, I've tried something like that:
Code:
#!/system/bin/sh
mount -t vfat -o umask=0000 /dev/block/vold/179:97
script location /system/etc/init.d/04swapsd, and this script does nothing even I tried to add 'busybox' before 'mount' - zero changes.
SManager app gives me 'Device or resource busy' error
Can anyone help me with my problem?
Thanks!
meciu99 said:
Hi,
My today goal is to swap internal memory with SD card on HTC Desire 310, and I almost accomplished that, because at this moment I need to send command trough adb to get this working:
So ADB and
Code:
su
busybox mount -t vfat -o umask=0000 /dev/block/vold/179:97 /mnt/sdcard
so now I need to create init.d script to swap internal memory with SD card at boot, I've tried something like that:
Code:
#!/system/bin/sh
mount -t vfat -o umask=0000 /dev/block/vold/179:97
script location /system/etc/init.d/04swapsd, and this script does nothing even I tried to add 'busybox' before 'mount' - zero changes.
SManager app gives me 'Device or resource busy' error
Can anyone help me with my problem?
Thanks!
Click to expand...
Click to collapse
Try this: https://www.youtube.com/watch?v=nWN0tOSPFv4
It should work fine!
in this tutorial I can expand RAM memory, but this is I dont want to do.
I have about 800MB left in internal storage - and I cant install big games like Asphalt 8, and because of that I want to create script to automatically swap internal with external memory.
I've tried already apps like Internal 2 External SD, Link2SD, DirectoryBind, FolderMount.

[Q] Mounting point of internal SD card in 4.3 JB as Secondary ROM

Hello
I am managing to mount internal sd card in my secondary JB 4.3 (SNAPDRAGON Stock) ROM using the mount command
using root explorer, the content of sd card is present at /data/media/ but the ROM does'nt mount it properly
Using this ROM as primary, the issue is absent
My Kernel is GoogyMax 2.3.2 and primary ROM is archidroid
I used these commands on terminal emulator after "su", but no success
Code:
mount -o bind /data/media/0 /mnt/shell/emulated/0
mount -o bind /data/media/0 /storage/legacy/emulated/0
mount -o bind /data/media/0 /storage/sdcard
mount -o bind /data/media/0 /storage/sdcard0
Any idea how to make the sdcard show and work properly ?
No developer to help ?
Please

How to create a mount point or symlink in /storage that survives reboots?

I'm on jelly bean 4.1.2 (NeatRom 6.4) which uses /storage/extSdCard. I'd like to either create another mount point for the external sd card in /storage/sdcard1 or a symlink /storage/sdcard1 that points to /storage/extSdCard and I want that to survive after reboot. Currently it does not. I've read around but am still stuck.
The symlink trick works, but is erased after reboot. I created it as:
Code:
su
mount -o rw/remount /
ln -s /storage/extSdCard /storage/sdcard1
I tried to add a mount point by editing /etc/vold.fstab but the mount point is not created after reboot. The line I added in /etc/vold.fstab is the 2nd line here:
Code:
dev_mount sdcard1 /storage/extSdCard auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1
dev_mount sdcard1 /storage/sdcard1 auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1
Any clues?
Well, after some more digging around, this are some options -- but note that these also depend on which rom you're using. On NeatRom 6.4 (jelly bean 4.1.2 based on Samsung XXMS4):
There is a file /system/bin/customboot.sh where you can add commands.
Inspecting /etc/init.d/97neatrom I notice it executes "postbootinit" so you should be able to edit or create /system/bin/postbootinit and place commands in there as well.
You can also add a file in /etc/init.d, say /etc/init.d/99sdcard1 that executes commands.
NOTE 1: the root dir / is mounted as readonly at boot so if you want to add a symlink or mount point in /storage then you need to mount it as read-write first.
NOTE 2: the external sdcard dev block volume is not immediately available after boot, I had to add a 2 second delay. This is not a problem for symlink.
Symlink solution (easier, no delay waiting for block device), place the following in /etc/init.d/99sdcard1
Code:
#!/system/bin/sh
ln -s /storage/extSdCard /storage/sdcard1
ln -s /storage/extSdCard /mnt/sdcard1
ln -s /storage/sdcard0 /mnt/sdcard0
I also added standard symlinks in /mnt.
Mount solution, place the following in /etc/init.d/99sdcard1 (run "mount" first in a terminal to find out which block device in /dev/block/vold is mounted in /storage/extSdCard):
Code:
#!/system/bin/sh
sleep 2
mount -o rw,remount /
mkdir /storage/sdcard1
# /dev/block/vold/179:9 is the one mounted in /storage/extSdCard
mount -t vfat -o umask=000 /dev/block/vold/179:9 /storage/sdcard1
ln -s /storage/extSdCard /mnt/sdcard1
ln -s /storage/sdcard0 /mnt/sdcard0
The reason I needed this is that I used Cyanogenmod 11 (KitKat 4.4) for a long while and got fed up with it being very slow on my SGS2 so I came back to Jelly Bean, but I had many apps that were using /storage/sdcard1

How to mount a folder with -o bind so that the reguilar users can access?

Hi
I am having an issue with mounting some folders.
I am trying to mount some folders from sdcard1 to sdcard. Now the mount works but regular access via /storage/emulated/0 etc is not possible. However root can access any combination of these local mounted storages.
I am using combinations like below
mount -o bind /storage/sdcard1/somefolder /mnt/shell/emulated/0/MOUNT
mount -o bind /storage/sdcard1/somefolder /storage/sdcard0/MOUNT
mount -o bind /storage/sdcard1/somefolder /data/media/0/
None of these mounts is able to make "somefolder" accessible to the user. Please bear in mind that the user can access all the sdcard1 and sdcard0 folders just fine. so I do not know what else to try to get this working.
I am on And 5.1.1 Cyanogenmod12 Samnsung Tab Pro
thanks

Categories

Resources