[KERNEL] Sero 7 Pro Kernel Modifications - Swap Internal/External Storage - Android Software/Hacking General [Developers Only]
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?
Related
mount/unmount sdcard with terminal
hi, how do i mount/unmount sdcard with terminal? To unmount ,i tried using umount /mnt/sdcard but i got device busy umount /mnt/sdcard/.android_secure then umount /mnt/sdcard i have unstable results. for mount,i tried to used mount -t vfat /dev/block/vold/179:65 /mnt/sdcard seems everythings ok. i also saw this vold command.tried it but dont really know it works. can use this to mount/umount the sdcard? thanks
eclair88 said: hi, how do i mount/unmount sdcard with terminal? To unmount ,i tried using umount /mnt/sdcard but i got device busy umount /mnt/sdcard/.android_secure then umount /mnt/sdcard i have unstable results. for mount,i tried to used mount -t vfat /dev/block/vold/179:65 /mnt/sdcard seems everythings ok. i also saw this vold command.tried it but dont really know it works. can use this to mount/umount the sdcard? thanks Click to expand... Click to collapse did you get an answer?? Can you share ??
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] How to mount chosen partition as EXTERNAL sdcard
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.
find out FUSE mountpoints
hi guys. i'm developing the gentoo extractor of dSploit and i've found a problem. now that user can choose a custom directory for the gentoo root, we must ensure that we can make symlinks in that folder. from android 4.2 and above, the storage infrastructure uses FUSE. create symlink where the ext FS is mounted on is fine. create symlink where the FUSE is mounted on will fail. Code: [email protected]:/ # ln -s /system /storage/emulated/0/gentoo/test link failed Function not implemented [email protected]:/ # ln -s /system /data/media/0/gentoo/test this happens because /storage/emulated/0 is a fuse bind mount of /data/media/0. i think that the solution is to find what is mounted where and how. how can i get FUSE mounts ? /proc/mount will show /dev/fuse as source block device. i need to have something that say: Code: source destination /data/media/0 /storage/emulated/0 in order to replace "/storage/emulated/0" with "/data/media/0" and got symlink to work thanks in advance for any help and suggestion. -- tux_mind
[Q] Swap SDCARD Kitkat?
I've been trying to swap sdcard on kitkat, but no avail. any Ideas about how to swap or even remove the internal sdcard? been trying to remount with this script but it's black screen with force closes, maybe theres something wrong with it? Code: LOG=/data/swap.log umount /storage/sdcard0 umount /storage/sdcard1 umount /mnt/secure/asec umount /storage/emulated/legacy umount /mnt/shell/emulated umount /mnt/media_rw/sdcard1 mount -t vfat -o umask=0000,uid=1023,gid=1023 /dev/block/vold/179:33 /mnt/shell/emulated 1>>$LOG 2>>$LOG mount -t vfat -o umask=0000,uid=1023,gid=1023 /dev/block/vold/179:33 /storage/emulated/legacy 1>>$LOG 2>>$LOG mount -t vfat -o umask=0000,uid=1023,gid=1023 /dev/block/vold/179:33 /storage/sdcard0 1>>$LOG 2>>$LOG mount -t vfat -o umask=0000,uid=1023,gid=1023 /dev/block/vold/179:33 /mnt/media_rw/sdcard1 1>>$LOG 2>>$LOG mount -t vfat -o umask=0000,uid=1023,gid=1023 /dev/block/vold/179:33 /storage/sdcard1 1>>$LOG 2>>$LOG mount -t vfat -o umask=0000,uid=1023,gid=1023 /dev/block/vold/179:33 /mnt/secure/asec 1>>$LOG 2>>$LOG
I saw some build.prop tweak to swap them(without init.d or any other modification),try to find it in google. P.S.-I found a way to mount sdcard(ye,4gb partition used in 4.2.2 ) partition throw ADB,but i need help to make init.d script... For now its work correct,no problems with Googleplay(installing apps),camera(save pictures without problems)...
hmm siankatabg said: I saw some build.prop tweak to swap them(without init.d or any other modification),try to find it in google. P.S.-I found a way to mount sdcard(ye,4gb partition used in 4.2.2 ) partition throw ADB,but i need help to make init.d script... For now its work correct,no problems with Googleplay(installing apps),camera(save pictures without problems)... Click to expand... Click to collapse I can help you with init.d script just PM me
siankatabg said: I saw some build.prop tweak to swap them(without init.d or any other modification),try to find it in google. P.S.-I found a way to mount sdcard(ye,4gb partition used in 4.2.2 ) partition throw ADB,but i need help to make init.d script... For now its work correct,no problems with Googleplay(installing apps),camera(save pictures without problems)... Click to expand... Click to collapse Make it public pls, system and data filled that emulated storage thing and now i can't store a thing :/
lybxlpsv said: Make it public pls, system and data filled that emulated storage thing and now i can't store a thing :/ Click to expand... Click to collapse Its public Just go here and read or wait for permanent fix. http://forum.xda-developers.com/xperia-l/general/help-solution-sd-card-mount-cm11-t2683432
not to bring up an old tread But would this method work with any phone or tablet with kitkat on it? Because I'm trying to do the same thing