send apps to sd card - avoid low storage advise warning - Huawei Ascend G6

Hi!
This is a light version from the tutorial described below.
It create a full root WITH option to send your apps to sd card automatically!
How?
Because it create a funtional init.d folder in system/etc where you can put your own scripts to start on boot, giving you full control from your ROM/phone and if you have a ext4 partition in sd card ( 3 GB that's enough ), it will send your apps to sd card releasing storage.
LTE device have a default 2GB /data storage for apps and user definitions, phone call, etc. 3G device is worse!!!
So for a LTE device, 3GB from sd partition + 2GB from data partition = 5GB!
To show you why don´t need more, i have at this momente 61 app in /data/app ( in sd ext4 partition ) that fill 750MB - > 61 apps!!!
If you have a LTE device and your /data partiton is resized you can push a litle the size from external partition to 4GB ( that's enough ), im still trying to find a good size for external partition.
Why don´t need a bigger size?
Because there are file that still inside data partition, in /data/data and dalvik-cache, that still filling up data partition... you can´t take them all ...
3G devices need to be rooted with SuperSu zip first ( i don´t know way ) ... im a LTE user.
UPDATE-Kinguser-3.4.0-Modded_V2.zip
https://mega.nz/#!HoZniaSC
Key:
!tmmKUs-lnmAJo0Y4rcvxgZjYgsath0iTDBUYa7-T3YE
And this video shows how ROM works with a external ext4 partition in sd card what means that all apps go to sd card and let internal storage free:
https://youtu.be/7st6838_aAg
Use it only if you need it. Is your option.
I hope this helps you.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<<<<<<<The END of low storage>>>>>
I test it in L11 with B370 kit kat factory ROM. From 0.
!!!!Attencion!!!! 3G device users, read pinned post, you need to install SuperSU.zip first than this KingUser.zip to root OR WILL FAIL!!!!
In the step when you will install kinguser.zip change for this one, see the default tutorial here: https://www.facebook.com/groups/huawei.g6.development/permalink/578005512358705/
You need a primary external ext4 partition in sd card with the size you think you need for apps.
To create a primary ext4 partition in sd card with the size you want, you can use mini partition tool (for windows OS ).
http://www.partitionwizard.com/free-partition-manager.html
Need bootloader Unlocked:
https://www.facebook.com/groups/huawei.g6.development/permalink/504332286392695/
Need a custom recovery, i use TWRP for my L11, U models use more CWM, you can find it in G6SKnife.
Must have Windows OS to use G6SKnife:
https://www.facebook.com/groups/huawei.g6.development/permalink/577809609044962/
Than i modded this Kinguser flash zip that:
-Roots
-create a working init.d folder where you can store your scripts that will be executed on boot
-it will install busybox apk ( it need it to install some system tools )
- Rashr to change recoverys with the phone ( only need to have the images in sd card )
- It will automatically send all apps to your external ext4 partiton in sd card IF you have one!!!!
How to do it!!!!??????
READ IT CARFULL:
If you already have apps in phone do backup, use the phone default app for that.
Copy this zip to sd card:
UPDATE-Kinguser-3.4.0-Modded.zip
https://mega.nz/#!rhRknYDJ
Key:
!tnT9KAYOOcuSNm9eq7AcW_PHc2p-C4wjvssNI4IHAMU
Turn off and go to recovery ( TWRP or CWM ) by pressing at same time vol + and power.
Do a factory reset.
Go to install and search the UPDATE-Kinguser-3.4.0-Modded.zip and install it. The phone will reboot.
( A) After settings go to KingUser and open it to check if is ok than go back, open busybox, give root permissions, it will take some time seraching for old files than install it!!!!
( you will need this tools )
Reboot, and is done.
If you start from flash is the same process.
Now your apps go all to sd card.
This video show a flash of B370 and the root with this KingUser.zip:
https://youtu.be/CcFdbS20RrY

persona78 said:
#!/system/bin/sh
# apk to sd card
mount -t ext4 -o rw /dev/block/vold/179:66 /data/app
mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/app
chown system system /data/app
# apk lib to sd card
mount -t ext4 -o rw /dev/block/vold/179:66 /data/app-lib
mount -t ext4 -o rw /dev/block/mmcblk1p2 /data/app-lib
chown system system /data/app-lib
chmod 773 /data/dalvik-cache
Click to expand...
Click to collapse
How is it possible to make the same source folder diferent and multiple target folder mount script?!! I think ther must be an error on this...
The first mount lines are pointing to /data/app and in the other lines pointing again to /data/app-lib?

its possible!
pestevao said:
How is it possible to make the same source folder diferent and multiple target folder mount script?!! I think ther must be an error on this...
The first mount lines are pointing to /data/app and in the other lines pointing again to /data/app-lib?
Click to expand...
Click to collapse
It's possible because works like a symlink. Imagine a room with several doors.
The mmcblk1p2 is the room, the /data/app , /data/app-lib are the doors.
Is working perfectly in my device. No lags.
http://postimg.org/image/8lc3of5pd/
http://postimg.org/image/jjnd6luap/

See this video, it have this script
pestevao said:
How is it possible to make the same source folder diferent and multiple target folder mount script?!! I think ther must be an error on this...
The first mount lines are pointing to /data/app and in the other lines pointing again to /data/app-lib?
Click to expand...
Click to collapse
This video shows how my ROM version works with a external ext4 partition in sd card what means that all apps go to sd card and let internal storage free:
https://youtu.be/7st6838_aAg

Hi!
I create a easy way, go here:
http://forum.xda-developers.com/ascend-g6/general/root-upadtekinguser-zip-modded-extras-t3349679

I've instaled the B370 and use Link2SD that have already bought. And it works perfectly and smooth!
With the original ROM / Android it displays a warning that mount must be done after a quick reboot but now everything is working on a normal reboot.
Used KingRoot 3.4.o modified to include /etc/init.d folder creation to Link2SD be able to write mount scripts and with the Huawei B370 cleans everything from Vodafone P that came hacked and pre-installed
Now is better than ever!

pestevao said:
I've instaled the B370 and use Link2SD that have already bought. And it works perfectly and smooth!
With the original ROM / Android it displays a warning that mount must be done after a quick reboot but now everything is working on a normal reboot.
Used KingRoot 3.4.o modified to include /etc/init.d folder creation to Link2SD be able to write mount scripts and with the Huawei B370 cleans everything from Vodafone P that came hacked and pre-installed
Now is better than ever!
Click to expand...
Click to collapse
With this option you don't need link2sd
http://forum.xda-developers.com/ascend-g6/general/root-upadtekinguser-zip-modded-extras-t3349679

Yeah you are maybe right. But when I make it with Link2SD I doesn't find yout tutorial (and even doesn't exists on xda forum) so right now is everything working there no reason to move away from Link2SD

This is how have my phone using a 64 GB SDCARD
pestevao said:
Yeah you are maybe right. But when I make it with Link2SD I doesn't find yout tutorial (and even doesn't exists on xda forum) so right now is everything working there no reason to move away from Link2SD
Click to expand...
Click to collapse
Hi!
I buy a 64 GB sd card, create 3 ext4 partitions and mounted like this:
So, now I have 24GB ext4 for data, 10GB ext4 storage and 27GB fat32 for external storage... For mt G6-L11. I had before resized data storage to 4GB.
By default is 2/3 , I can't remember.

Hi!
Main post is Update!

persona78 said:
Hi!
Main post is Update!
Click to expand...
Click to collapse
Great job congratulations!

Related

[MOD] Move to sd-ext | Simple app, private-app and Dalvik cache to SD solution

This is a simple and effective (moves most space hogging folders from internal memory to sd-ext) APP2SD solution.
It moves the following things from /data partition to ext partition on SD card:
/data/app => /sd-ext/app
/data/app-private => /sd-ext/app-private
/data/dalvik-cache => /sd-ext/dalvik-cache
and creates symlinks to new locations in place of original folders.
Solution consists of 2 via recovery flashable ZIPs:
sd-ext_patch-signed-vXX.zip - this updates/creates CyanogenMod 7/9 script that mounts SD card ext partition to /sd-ext so /sd-ext can be any ext version (by default it can be only ext3) and installs e2fsck. This must be re-flashed after each ROM update (unless you know that ROM will mount your /sd-ext out of the box).
to_sd-ext_patch-signed-vXX.zip - actually moves folders to ext partition on SD card. This can be flashed only after first boot into ROM after wiping /data. It should be re-flashed only in conjunction with wiping /data and /sd-ext.
This mod requires ext2/ext3/ext4 partition on SD card.
Always make full Nandroid backup before flashing this mod or updating ROM with mod installed!
Disclaimer: I am not responsible for anything that may happen as a result of using this mod.
Installation/usage:
To install mod on a working ROM:
Flash sd-ext_patch-signed-vXX.zip via Recovery.
Flash to_sd-ext_patch-signed-vXX.zip via Recovery.
After updating ROM:
Re-flash sd-ext_patch-signed-vXX.zip without booting into updated ROM.
After wiping /data from Recovery:
Delete moved folders from /sd-ext (in most cases you will want to do this by wiping /sd-ext from Recovery).
Boot into your ROM.
Re-flash to_sd-ext_patch-signed-vXX.zip via Recovery.
This mod is tested with CyanogenMod 7 (7.1 by mik_os and 7.2 official builds) and CyanogenMod 9 by hephappy and Amon RA recovery 3.0.6.
If you are using Clockworkmod Recovery see this post.
+1
Is this mod developed by you?
DJoptimus-One said:
Is this mod developed by you?
Click to expand...
Click to collapse
Yes
DavisNT said:
Yes
Click to expand...
Click to collapse
Nice work, I'm surely gonna try
Keep up.
Good work here!! Really nice to see some REAL development here
Will try it and report soon.........
Sent from heaven, wandering with Steve Jobs
Any feedback yet? Would love to give it a try :thumbup:
Sent from my LG-P500 using XDA
FitAmp said:
Any feedback yet? Would love to give it a try :thumbup:
Sent from my LG-P500 using XDA
Click to expand...
Click to collapse
Don't ask for that, try it yourself!!
nice work will try
Does this work on gb?2.3.3?
How to move app's ? Does this automatically moves it?
Sent from my LG-P500 using XDA
Just flashed on cm9 weekly... so for so good
Sent from my LG-P500 using XDA
Good work. Nice example of KISS approach - three symlinks + few lines of other code
dynamite33 said:
Does this work on gb?2.3.3?
How to move app's ? Does this automatically moves it?
Click to expand...
Click to collapse
You can make full Nandroid backup (Nand backup in recovery) and try whether it works on your ROM.
This requires the following things:
ext partition on SD card (you must have partitioned your SD card)
ROM that supports init.d scripts
kernel that supports ext filesystem version that is on SD card
You can test all this by (making full Nandroid backup and) flashing sd-ext_patch-signed-vXX.zip, booting in Android and issuing the following commands in Terminal Emulator:
Code:
su
mount
mount | grep sd-ext
If you see line like this somewhere in the output:
Code:
/dev/block/mmcblk0p2 on /sd-ext type ext4 (rw,noatime,nodiratime,barrier=1,data=ordered)
then /sd-ext is mounted and you can proceed to flashing to_sd-ext_patch-signed-vXX.zip.
Apps are moved when flashing to_sd-ext_patch-signed-vXX.zip.
DavisNT said:
You can make full Nandroid backup (Nand backup in recovery) and try whether it works on your ROM.
This requires the following things:
ext partition on SD card (you must have partitioned your SD card)
ROM that supports init.d scripts
kernel that supports ext filesystem version that is on SD card
You can test all this by (making full Nandroid backup and) flashing sd-ext_patch-signed-vXX.zip, booting in Android and issuing the following commands in Terminal Emulator:
Code:
su
mount
mount | grep sd-ext
If you see line like this somewhere in the output:
Code:
/dev/block/mmcblk0p2 on /sd-ext type ext4 (rw,noatime,nodiratime,barrier=1,data=ordered)
then /sd-ext is mounted and you can proceed to flashing to_sd-ext_patch-signed-vXX.zip.
Apps are moved when flashing to_sd-ext_patch-signed-vXX.zip.
Click to expand...
Click to collapse
Ok thanx a lot! Will try it.
Sent from my LG-P500 using XDA
hi DavisNT
i use Link2sd now, and want to try ur script, can i remove link2sd and use ur script without problem and without losing my apps ?
GonDr said:
i use Link2sd now, and want to try ur script, can i remove link2sd and use ur script without problem and without losing my apps ?
Click to expand...
Click to collapse
Try it, but remember to take full Nandroid backup before trying.
You can do this:
do full Nandroid backup from recovery
With Link2SD move all applications back to internal memory
delete mount scripts created by Link2SD (probably there is a kind of uninstall option in Link2SD)
install my mod
If you don't have enough space in internal memory, then it is possible to use Titanium Backup to backup and restore apps (however I am not sure whether Titanium Backup can backup data of applications linked with Link2SD - probably can, but I am not sure).
DavisNT said:
Try it, but remember to take full Nandroid backup before trying.
You can do this:
do full Nandroid backup from recovery
With Link2SD move all applications back to internal memory
delete mount scripts created by Link2SD (probably there is a kind of uninstall option in Link2SD)
install my mod
If you don't have enough space in internal memory, then it is possible to use Titanium Backup to backup and restore apps (however I am not sure whether Titanium Backup can backup data of applications linked with Link2SD - probably can, but I am not sure).
Click to expand...
Click to collapse
I don't think that titanium can restore anything to sdext, it just saves anything, including linked stuff and if trying to restore everything together it will fail, if the total of backed apps is larger than internal storage...
However, if link2sd is installed, the later will start linking data/apps 'on the fly' as Tib restores them. That's why it is essential to install link2sd or similar before going to batch-restore everything.
I guess this script should handle it in a similar way? I'm going to try anyway.
My idea was backing up most of apps with Titanium Backup while using Link2SD, then removing them (and moving left apps back to internal memory, uninstalling Link2SD mount scripts) and restoring after installing my script (Move to sd-ext).
Move to sd-ext links all applications (and dalvik cache, but not application data and library files extracted to data folders) at once - Titanium Backup will restore directly to SD card
can you explain me what's the difference between this mod and d2sd ungaze?
thanks
mutia said:
can you explain me what's the difference between this mod and d2sd ungaze?
thanks
Click to expand...
Click to collapse
If I correctly got what D2SD ungaze does, then it moves applications, applications data and libraries (/data/app, /data/app-private and /data/data) to SD card ext partition and leaves Dalvik cache (/data/dalvik-cache) on internal memory (/data partition).
While my mod moves and links applications and Dalvik cache (see first post in this thread for details), leaving all other folders (some system configuration and application data and libraries) in internal memory (/data partition).
Also technical implementation is very different from my mod. D2SD ungaze copies everything and links back certain things. It looks like D2SD ungaze also doesn't free space on /data partition.
DavisNT said:
You can make full Nandroid backup (Nand backup in recovery) and try whether it works on your ROM.
This requires the following things:
ext partition on SD card (you must have partitioned your SD card)
ROM that supports init.d scripts
kernel that supports ext filesystem version that is on SD card
You can test all this by (making full Nandroid backup and) flashing sd-ext_patch-signed-vXX.zip, booting in Android and issuing the following commands in Terminal Emulator:
Code:
su
mount
mount | grep sd-ext
If you see line like this somewhere in the output:
Code:
/dev/block/mmcblk0p2 on /sd-ext type ext4 (rw,noatime,nodiratime,barrier=1,data=ordered)
then /sd-ext is mounted and you can proceed to flashing to_sd-ext_patch-signed-vXX.zip.
Apps are moved when flashing to_sd-ext_patch-signed-vXX.zip.
Click to expand...
Click to collapse
i flashed the first zip file, then made this test through Terminal Emulator and got a line similar to the one you mentioned (my sd-ext is type 3, and the info in brackets was a bit different).
then i flashed second zip file.
the free RAM space increased (which necessarily means that things were moved to the sd-card, right?)
i then installed an app - and saw RAM decreasing accordingly, plus - the sd-ext folder is empty
how can i know if it works ?!?

Huawei Ascend G330 U8825-1 resize internal partitions to gain space for apps

the g330 comes with a reasonable storage. But there is not enough space for apps on /data. The internal sd-card got a lot of space. resizing /data (part. 18) may be critical and requires another recovery image. So my idea is to log in the phone, start fdisk /dev/block/mmcblk0, delete internal sd-card partition (19), then create a e.g. 1 GB partition with ext4, which I will mount on /data/app, and give the rest to a new partition 20 for internal sd-card.
I think this approach is more fail-save and can be done quite fast. I have to change just init.rc to add one mount and vold.fstab. Has somebody tried this?
yes, i know, the dalvik-cache and /data/data will still load the /data partition, and app2sd would save the same space from /data. But app2sd needs one mount for each app (at least in GB), so booting takes very long time and I have to wait until I can launch an app.
I read sometimes, the kernel get the offsets of the partitions of flash as parameters when booted - so some offsets would be wrong when I change the partion table. This would cause to fail mount /data/app - what about this?
rregn said:
the g330 comes with a reasonable storage. But there is not enough space for apps on /data. The internal sd-card got a lot of space. resizing /data (part. 18) may be critical and requires another recovery image. So my idea is to log in the phone, start fdisk /dev/block/mmcblk0, delete internal sd-card partition (19), then create a e.g. 1 GB partition with ext4, which I will mount on /data/app, and give the rest to a new partition 20 for internal sd-card.
I think this approach is more fail-save and can be done quite fast. I have to change just init.rc to add one mount and vold.fstab. Has somebody tried this?
yes, i know, the dalvik-cache and /data/data will still load the /data partition, and app2sd would save the same space from /data. But app2sd needs one mount for each app (at least in GB), so booting takes very long time and I have to wait until I can launch an app.
I read sometimes, the kernel get the offsets of the partitions of flash as parameters when booted - so some offsets would be wrong when I change the partion table. This would cause to fail mount /data/app - what about this?
Click to expand...
Click to collapse
I tried this and it works
its for g300 but it works on g330
http://www.htcmania.com/showthread.php?t=428466
sorry, its in spanish haha use the google tranlator
xals1997 said:
I tried this and it works
its for g300 but it works on g330
http://www.htcmania.com/showthread.php?t=428466
sorry, its in spanish haha use the google tranlator
Click to expand...
Click to collapse
Did i get the idea? You use link2SD (from Bülent Akpinar) , but instead of using a 2nd partition of the external SD-card with ext2, you use the internal SD-card for link2SD?
But i heard that link2SD need a ext2/3 partition? Also, in my version of link2SD there is:
mount -t ext2 -o rw /dev/block/vold/179:2 ...
btw. how is /system/etc/install-recovery.sh triggered

[Q] Move /data to SD card

I have a Galaxy GIO, which is a fairly old low-end phone. On factory reset, I have about 100MB memory free for apps, and the phone seems to start complaining as soon as I hit the 50MB mark; that's about one or 2 installed applications.
Because I would like to actually be able to, well, use my phone for anything else than calling, I want to move the /data partition to my SD card. I know this'll be slow, but slow still is better than not working at all.
I have done a bit of research, and came around plenty of scripts which claim to mount the second partition of the sd card as /data; none of these scripts work. I have tried 'INT2EXT', 'D2EXT', and I've heard about something called 'A2SD' but I have yet to find a copy of it . To install these scripts I've extracted them, and copied the scripts to '/system/etc/init.d/', after mounting '/system', using ADB.
I for an instant thought maybe my second partition isn't formatted properly, but using adb I am able to successfully mount the ext2 partition as /sd-ext, so I don't see why mounting them as /data should be a problem.
I have also tried to symbollicly link /data to /sd-ext/data and automatically mount my /sd-ext on boot. Obviously this didn't work, because the symbolic link isn't actually saved to disk.
How would I go about moving my data partition to my sd card? I am not affraid of doing some dirty work manually. I am running Cyanogenmod 11.
Binero said:
I have a Galaxy GIO, which is a fairly old low-end phone. On factory reset, I have about 100MB memory free for apps, and the phone seems to start complaining as soon as I hit the 50MB mark; that's about one or 2 installed applications.
Because I would like to actually be able to, well, use my phone for anything else than calling, I want to move the /data partition to my SD card. I know this'll be slow, but slow still is better than not working at all.
I have done a bit of research, and came around plenty of scripts which claim to mount the second partition of the sd card as /data; none of these scripts work. I have tried 'INT2EXT', 'D2EXT', and I've heard about something called 'A2SD' but I have yet to find a copy of it . To install these scripts I've extracted them, and copied the scripts to '/system/etc/init.d/', after mounting '/system', using ADB.
I for an instant thought maybe my second partition isn't formatted properly, but using adb I am able to successfully mount the ext2 partition as /sd-ext, so I don't see why mounting them as /data should be a problem.
I have also tried to symbollicly link /data to /sd-ext/data and automatically mount my /sd-ext on boot. Obviously this didn't work, because the symbolic link isn't actually saved to disk.
How would I go about moving my data partition to my sd card? I am not affraid of doing some dirty work manually. I am running Cyanogenmod 11.
Click to expand...
Click to collapse
I will introduce how to COPY(NOT MOVING) /data partition to /sdcard.
1. You should ROOT First.
2. Use Rootexplorer to Copy /data to /sdcard (WARNING:If your sdcard emulated with /data, Data WON'T copy to SDCARD --You need external Sdcard!)
2-1. if you don't want to use RootExplorer, you can use Android Debugging Bridge(adb)
(Youshould download Android sdks from developer.android.com)
--Command : adb shell su -C cp /data /sdcard/data
3. That's all.
Jason Hyunwoo said:
I will introduce how to COPY(NOT MOVING) /data partition to /sdcard.
1. You should ROOT First.
2. Use Rootexplorer to Copy /data to /sdcard (WARNING:If your sdcard emulated with /data, Data WON'T copy to SDCARD --You need external Sdcard!)
2-1. if you don't want to use RootExplorer, you can use Android Debugging Bridge(adb)
(Youshould download Android sdks from developer.android.com)
--Command : adb shell su -C cp /data /sdcard/data
3. That's all.
Click to expand...
Click to collapse
Thanks, but that's not entirely what I meant. I can manage to move my data to the SD card no problem, but I want my phone to actually use my second partition on my sd card, as the /data partition.
Binero said:
Thanks, but that's not entirely what I meant. I can manage to move my data to the SD card no problem, but I want my phone to actually use my second partition on my sd card, as the /data partition.
Click to expand...
Click to collapse
Oops.. Sorry about that!
First, I am not sure that will work or not, maybe you should try to edit init.*.rc. Which is from boot.mg. I think, maybe mounting sdcard as data is impossible, but you may try editing init.rc(or init.*.rc, * is manufacture). You could unpack your boot img, and you could edit mounting point which is from init.rc!
I hope this thing will help you..
Jason Hyunwoo said:
Oops.. Sorry about that!
First, I am not sure that will work or not, maybe you should try to edit init.*.rc. Which is from boot.mg. I think, maybe mounting sdcard as data is impossible, but you may try editing init.rc(or init.*.rc, * is manufacture). You could unpack your boot img, and you could edit mounting point which is from init.rc!
I hope this thing will help you..
Click to expand...
Click to collapse
I have looked into init.rc, but that only seemed to create the /data mountpoint, but not actually mount to it. I've no idea how to edit the boot image, or what that even is. Is that the filesystem that is built into the kernel?
Binero said:
I have looked into init.rc, but that only seemed to create the /data mountpoint, but not actually mount to it. I've no idea how to edit the boot image, or what that even is. Is that the filesystem that is built into the kernel?
Click to expand...
Click to collapse
Umm.. You should download unpackbootimg or dsixda's Android Kitchen to edit boot.mg. You cannot edit init.rc on Root explore. Use unpack boot.img menu which is from Android Kitchen!
Jason Hyunwoo said:
Umm.. You should download unpackbootimg or dsixda's Android Kitchen to edit boot.mg. You cannot edit init.rc on Root explore. Use unpack boot.img menu which is from Android Kitchen!
Click to expand...
Click to collapse
I'll try that out. Still not sure where to look though. As I said, init.rc does not contain any commands mounting /data.
Binero said:
I'll try that out. Still not sure where to look though. As I said, init.rc does not contain any commands mounting /data.
Click to expand...
Click to collapse
or you could edit look at other *.rc files!
Isn't this what you're looking for?
http://forum.xda-developers.com/galaxy-s2/themes-apps/tool-directorybind-data-to-externalsd-t1410262
sndsnd said:
Isn't this what you're looking for?
http://forum.xda-developers.com/galaxy-s2/themes-apps/tool-directorybind-data-to-externalsd-t1410262
Click to expand...
Click to collapse
I want to mount my sd card to my /data. That simply creates a symbolic link.
Jason Hyunwoo said:
or you could edit look at other *.rc files!
Click to expand...
Click to collapse
There is only 2 rc files, and one of them is specific to my recovery image.

[Q] Cannot mount /sd-ext at boot

Hi,
I have managed to root my E3 Dual D2212, upgraded to KK 4.4.4, installed BusyBox, Universal init.d and everything works fine. Now I am attempting to expand internal storage on external SD card, but so far I could no manage to mount /sd-ext at boot.
I am able to remount / as rw, manually mkdir /sd-ext, mannually mount /dev/block/mmcblk1p2 there, but no way to make it happen on boot. Nandroid Backup Manager says my device is S-ON, but I had to unlock bootloader to root, so this makes no sense.
I have tried all init.d scripts I have found, all apps from PlayStore (I am looking to Mounts2SD, but anything would do!) but none really helped me.
Has anybody managed to use adittional sd-card partitions to expand internal memory? Any hint?
mmerlone said:
Hi,
I have managed to root my E3 Dual D2212, upgraded to KK 4.4.4, installed BusyBox, Universal init.d and everything works fine. Now I am attempting to expand internal storage on external SD card, but so far I could no manage to mount /sd-ext at boot.
I am able to remount / as rw, manually mkdir /sd-ext, mannually mount /dev/block/mmcblk1p2 there, but no way to make it happen on boot. Nandroid Backup Manager says my device is S-ON, but I had to unlock bootloader to root, so this makes no sense.
I have tried all init.d scripts I have found, all apps from PlayStore (I am looking to Mounts2SD, but anything would do!) but none really helped me.
Has anybody managed to use adittional sd-card partitions to expand internal memory? Any hint?
Click to expand...
Click to collapse
I don't know what you want to do. But if you mean making 2 partition on sd and moving apps to sd then. Make sure that your second partition is also primary and ext-4 file system then use an app like link2sd(app2sd) to create link.
vinay said:
I don't know what you want to do. But if you mean making 2 partition on sd and moving apps to sd then. Make sure that your second partition is also primary and ext-4 file system then use an app like link2sd(app2sd) to create link.
Click to expand...
Click to collapse
Main goal: bypass internal storage limitation.
I am an old-school linux guy and would rather mount than link. By mounting it is done one time only and it works for all, while by linking, well, you (or the app) have to manage dozens of links, new links for every new app, very bad. So I'd like to use Mounts2SD instead of any linking app.
I partitioned my 16GB SD card as (all primary):
8GB: fat32
6GB: ext[2,3,4]
2GB: reserved for a future /cache or swap
I assume that with such partition scheme and a /sd-ext folder on device M2SD would do the mount -t ext2 /dev/block/mmcblk1p2 /sd-ext automagically, but no.
So far I was able to mount -o remount,rw / && mkdir /sd-ext and do this mount by hand, but on reboot it erases /sd-ext and nothing happens.
Would it be safe to ditch those apps and simply edit /etc/fstab and manually copy things instead?
OR: how to keep /sd-ext after a reboot? Why does it vanishes? Why? Why?
Thanks for you prompt response, best regards.
mmerlone said:
Main goal: bypass internal storage limitation.
I am an old-school linux guy and would rather mount than link. By mounting it is done one time only and it works for all, while by linking, well, you (or the app) have to manage dozens of links, new links for every new app, very bad. So I'd like to use Mounts2SD instead of any linking app.
I partitioned my 16GB SD card as (all primary):
8GB: fat32
6GB: ext[2,3,4]
2GB: reserved for a future /cache or swap
I assume that with such partition scheme and a /sd-ext folder on device M2SD would do the mount -t ext2 /dev/block/mmcblk1p2 /sd-ext automagically, but no.
So far I was able to mount -o remount,rw / && mkdir /sd-ext and do this mount by hand, but on reboot it erases /sd-ext and nothing happens.
Would it be safe to ditch those apps and simply edit /etc/fstab and manually copy things instead?
OR: how to keep /sd-ext after a reboot? Why does it vanishes? Why? Why?
Thanks for you prompt response, best regards.
Click to expand...
Click to collapse
Make second partition ext-4 not 2-3 cause your device won't support it. And etc/fstab is unless i opened that file it doesn't contain link to internal sd.
Sent From My Sony Xperia E3 D2212 using XDA app.
Sent From My Sony Xperia E3 D2212 using XDA app.
mmerlone said:
Main goal: bypass internal storage limitation.
I am an old-school linux guy and would rather mount than link. By mounting it is done one time only and it works for all, while by linking, well, you (or the app) have to manage dozens of links, new links for every new app, very bad. So I'd like to use Mounts2SD instead of any linking app.
I partitioned my 16GB SD card as (all primary):
8GB: fat32
6GB: ext[2,3,4]
2GB: reserved for a future /cache or swap
I assume that with such partition scheme and a /sd-ext folder on device M2SD would do the mount -t ext2 /dev/block/mmcblk1p2 /sd-ext automagically, but no.
So far I was able to mount -o remount,rw / && mkdir /sd-ext and do this mount by hand, but on reboot it erases /sd-ext and nothing happens.
Would it be safe to ditch those apps and simply edit /etc/fstab and manually copy things instead?
OR: how to keep /sd-ext after a reboot? Why does it vanishes? Why? Why?
Thanks for you prompt response, best regards.
Click to expand...
Click to collapse
The only possible explanation to that lies in the ramdisk. I think you should edit the fstab because I remember seeing mount_all command in ramdisk pointing to the fstab.
In 4.4.4 kitkat you can only do this via ramdisc modifications no any other way. Don't waste time on /system and others.
Sent From My Sony Xperia E3 D2212 using XDA app.
vinay said:
In 4.4.4 kitkat you can only do this via ramdisc modifications no any other way. Don't waste time on /system and others.
Sent From My Sony Xperia E3 D2212 using XDA app.
Click to expand...
Click to collapse
I have no idea about what you are talking about and its implications (altough I know about ramdisk on linux, I dont know what that means and where its data came from on android). Any litterature to enlighten me?
mmerlone said:
I have no idea about what you are talking about and its implications (altough I know about ramdisk on linux, I dont know what that means and where its data came from on android). Any litterature to enlighten me?
Click to expand...
Click to collapse
Ramdisc is packed in boot.img with kernel.
Sent From My Sony Xperia E3 D2212 using XDA app.
vinay said:
Ramdisc is packed in boot.img with kernel.
Sent From My Sony Xperia E3 D2212 using XDA app.
Click to expand...
Click to collapse
Is there how to alter ramdisk on boot.img to create /sd-ext?
BTW, any RTFM about this booting process on Android or are those particularities vendor-dependent?
mmerlone said:
Is there how to alter ramdisk on boot.img to create /sd-ext?
BTW, any RTFM about this booting process on Android or are those particularities vendor-dependent?
Click to expand...
Click to collapse
I spend 10 to 20 min modding ramdisk then i packed it. And booted i found that my externel sd was unmounted. That,s all i got. I can,t do any more.
So i am sure there must be a was to swap sd in ramdisk.
Sent From My Sony Xperia E3 dual using XDA app.
vinay said:
I spend 10 to 20 min modding ramdisk then i packed it. And booted i found that my externel sd was unmounted. That,s all i got. I can,t do any more.
So i am sure there must be a was to swap sd in ramdisk.
Sent From My Sony Xperia E3 dual using XDA app.
Click to expand...
Click to collapse
I have attached files from ramdisk below.
these are files which contain,s information about mounting.
You can use text editor to edit them.
Tell me if you found some thing use full
vinay said:
I have attached files from ramdisk below.
these are files which contain,s information about mounting.
You can use text editor to edit them.
Tell me if you found some thing use full
Click to expand...
Click to collapse
only fstab.qcom and init.qcom.rc for editing
angiras said:
only fstab.qcom and init.qcom.rc for editing
Click to expand...
Click to collapse
These are only files that contain mount point,s.
Sent From My Sony Xperia E3 dual using XDA app.
vinay said:
These are only files that contain mount point,s.
Sent From My Sony Xperia E3 dual using XDA app.
Click to expand...
Click to collapse
Yes, some time ago i editing fstab.qcom and init.qcom.rc and change internal to external memory, but have bug after unpluging from PC :
in tree of device not found SDcard , but after wipe dalvic , it work OK under next connect to PC . it is problem of framework to mount point of SDcard
find my post on 4pda.ru , because i not have privelege to give access to page
angiras said:
Yes, some time ago i editing fstab.qcom and init.qcom.rc and change internal to external memory, but have bug after unpluging from PC :
in tree of device not found SDcard , but after wipe dalvic , it work OK under next connect to PC . it is problem of framework to mount point of SDcard
find my post on 4pda.ru , because i not have privelege to give access to page
Click to expand...
Click to collapse
It is harrd to find in a website which is not even in english.
Can,t tell me what didi you did.
Did you changed sdcard1 to 0 in fstab.qcom.
And in init.qcom.rc changed smlink or export link.
Sent From My Sony Xperia E3 dual using XDA app.

MM internal memory solution

Hi guys,
I'll share some scripts (flashable) that I've made to help with xperia l internal memory shortage.
1. First one is the link2sd-enabler.zip: http://www24.zippyshare.com/v/UduJGjqJ/file.html.
For this to work you'll need a second partition on the external sdcard formated as ext4. So first partition is the vfat one, the second primary partition on the external sd card is the ext4 one. Currently I have a 8Gb ext4 second partition.
Installation procedure: prepare your external sdcard, flash the zip, install link2sd application.
2. Second is the 01link2sdmm: http://www86.zippyshare.com/v/9DSgorlH/file.html.
The link2sd application does not automatically link the oat directory of the application. This directory contains the compiled application in the form of an odex file. For big apps this file is pretty big. So this script will automatically link this directory to the sdcard second partition for the applications that are linked to the sdcard. This works in conjunction with the link2sd-enabler.zip script.
Installation procedure: put this script in the /etc/init.d directory with the proper permissions. This way it will run at boot. If you want to run this directly after you link an app you'll need to use automagic and make a rule to run this script after you exit the link2sd application.
Observations: This script is not needed if you switch the internal partitions because you'll have enough space to keep the odex file internally. It's your choice.
3. Third script is the mm-partition-swapper.zip: http://www10.zippyshare.com/v/eyRO7gLw/file.html.
This one will switch your sdcard and userdata partition on your current mm rom. This was tested on rr573 that I have installed, but it should work in other mm roms as well.
Installation procedure: Make sure you have enough space on the external sd card so the script will be able to save your current data partition files. Save the files that you need from your internal partition to your external sd card. Make a backup of your current rom from twrp in case something wrong happens. Format from TWRP the internal sd card as ext4. Flash the zip. If everything works ok then you'll have a rom with the internal partitions swapped and you'll have 4Gb of user data available (minus your space for the already installed apps).
!!!!!!!!!!!!!!!!!!Very important!!!!!!!!!!!!!!!!!!
Don't try formatting the internal sdcard as ext4 with twrp version 3.0.2! It seems that his twrp version does not support this. I'm using twrp 2.8.7.0 by Barbarosa.
Observations: Twrp does not support backing up/restoring internal sd. If you swap partitions you'll have to backup your ext4 internal sd manually from within twrp connected through adb (with a simple tar command)
4. I think 256 ZRAM for the rr573 rom is too big so this zip will change this to 128MB:
mm-128Mb-zram.zip:http://www103.zippyshare.com/v/XjVAnXEl/file.html.
Please make a backup before flashing the swap zip and report if this worked for you.
Hope this helps,
Thanks.
cojocar.andrei said:
Hi guys,
1. First one is the link2sd-enabler.zip:
For this to work you'll need a second partition on the external sdcard formated as ext4. So first partition is the vfat one, the second primary partition on the external sd card is the ext4 one. Currently I have a 8Gb ext4 second partition.
Installation procedure: prepare your external sdcard, flash the zip, install link2sd application.
Click to expand...
Click to collapse
I've been struggeling for quite some time to get the link2sd app working since I flashed MM.
I've done a clean install, flashed the zip, installed link2sd, but I still get a 'mount script error, Cannot create script, mount: no such file or directory.' Anyone got an idea what I do wrong?
thx!
mikelektro said:
I've been struggeling for quite some time to get the link2sd app working since I flashed MM.
I've done a clean install, flashed the zip, installed link2sd, but I still get a 'mount script error, Cannot create script, mount: no such file or directory.' Anyone got an idea what I do wrong?
thx!
Click to expand...
Click to collapse
Check if you have in the /etc/init.d directory the 00link2sd script. For this script to work you need a rom with a working init.d (otherwise this won't work obviously...). If you have the script there, then check if you see a directory /data/sdext2 (if this directory is missing, but you have the 00link2sd script in the /etc/init.d directory, then this means you don't have init.d support in the rom). If you partition your sdcard correctly then the second ext4 partition of you sdcard should me mounted in the /data/sdext2 directory ... All these you need to check before installing the link2sd app...
Awesome! Thank you. I'll try this
cojocar.andrei said:
Check if you have in the /etc/init.d directory the 00link2sd script. For this script to work you need a rom with a working init.d (otherwise this won't work obviously...). If you have the script there, then check if you see a directory /data/sdext2 (if this directory is missing, but you have the 00link2sd script in the /etc/init.d directory, then this means you don't have init.d support in the rom). If you partition your sdcard correctly then the second ext4 partition of you sdcard should me mounted in the /data/sdext2 directory ... All these you need to check before installing the link2sd app...
Click to expand...
Click to collapse
I have the init.d folder, but it seems the sdext2 folder was only created after I installed the link2sd app.
I tried doing it all over again, but it still doesnt work, same messages...
mikelektro said:
I have the init.d folder, but it seems the sdext2 folder was only created after I installed the link2sd app.
I tried doing it all over again, but it still doesnt work, same messages...
Click to expand...
Click to collapse
Then your rom doesn't have init.d support. You need a kernel/rom (more precisely a ramdisk) with init.d support to use this ... The rr573 supports init.d ... Try it with this one ...
cojocar.andrei said:
Then your rom doesn't have init.d support. You need a kernel/rom (more precisely a ramdisk) with init.d support to use this ... The rr573 supports init.d ... Try it with this one ...
Click to expand...
Click to collapse
Thx! Which do you recommend? I've tried several in the last two or three months. Now I'm running AOSP-OMS.
I ran slim, RR and CM 13 beta before without any problems, just the storage issue.
mikelektro said:
Thx! Which do you recommend? I've tried several in the last two or three months. Now I'm running AOSP-OMS.
I ran slim, RR and CM 13 beta before without any problems, just the storage issue.
Click to expand...
Click to collapse
I've just told you. RR573. For a completely working camera on this one just replace a camera library... Search the rr thread...
Sent from the center of the galaxy
3. Third script is the mm-partition-swapper.zip: http://www10.zippyshare.com/v/eyRO7gLw/file.html.
This one will switch your sdcard and userdata partition on your current mm rom. This was tested on rr573 that I have installed, but it should work in other mm roms as well.
Installation procedure: Make sure you have enough space on the external sd card so the script will be able to save your current data partition files. Save the files that you need from your internal partition to your external sd card. Make a backup of your current rom from twrp in case something wrong happens. Format from TWRP the internal sd card as ext4. Flash the zip. If everything works ok then you'll have a rom with the internal partitions swapped and you'll have 4Gb of user data available (minus your space for the already installed apps).
Click to expand...
Click to collapse
I use rom AOSP OMS . file zip working?
Brick and problem other ?
Thx you building script .
Thx advanced
I am on stryflex MM ROM and TWRP 3.0.2.
I formatted internal storage as ext4, then flashed mm-partition-swapper.zip.
Says that there is no ext4fs partition and I tried reboot recovery and my phone is dead now, can't turn it on...
I don't blame you, I blame myself for trying. But please help. Flashtool doesn't recognize flash mode.
Don't use this method. Not safe.
Option58 said:
I am on stryflex MM ROM and TWRP 3.0.2.
I formatted internal storage as ext4, then flashed mm-partition-swapper.zip.
Says that there is no ext4fs partition and I tried reboot recovery and my phone is dead now, can't turn it on...
I don't blame you, I blame myself for trying. But please help. Flashtool doesn't recognize flash mode.
Don't use this method. Not safe.
Click to expand...
Click to collapse
Sorry to hear this. If the script gave you this error then the script did nothing to your phone. It just aborted the procedure because it did not find the sdcard formated as ext4. It must be the twrp version. I'm using twrp 2.8.7.0 by barbarosa. I think twrp 3.0.2 does not support formatting the internal sdcard as ext4. Most pobably the twrp version 3.0.2 formated something else as ext4 or whatever instead of internal sd... I did not know this. Sorry again...
Try to search the brick threads. If you still have a blue light when in flashmode I think you still have a chance to resurect it...
Sent from the center of the galaxy
I've modified the post to warn people of this twrp version. So, people, use only twrp 2.8.x.x to format the internal sdcard. I'm using 2.8.7.0 twrp version by Barbarosa. I don't know if other twrp versions support ext4 on internal sdcard.
Sent from the center of the galaxy
Thanks for the solutions. So now if I only need to swap internal sd and /data, i just need to flash 3rd script? I'm quite confusing about partitioning and memory stuffs
newguyknowsnothing said:
Thanks for the solutions. So now if I only need to swap internal sd and /data, i just need to flash 3rd script? I'm quite confusing about partitioning and memory stuffs
Click to expand...
Click to collapse
You have to have twrp 2.8.7.0, then format internal sdcard as ext4 (wipe settings) and then flash the zip...
Sent from the center of the galaxy
Yes, formatting internalSD as ext4 is tricky. My recovery was broken. Probably formatted something else. It wasn't your script.
However I have no volume up button on my phone (fell out) - no fastboot. And just volume down button (flash mode) and a somewhat broken USB cable. Phone not recognized by flashtool at all...
cojocar.andrei said:
You have to have twrp 2.8.7.0, then format internal sdcard as ext4 (wipe settings) and then flash the zip...
Sent from the center of the galaxy
Click to expand...
Click to collapse
Ok thanks! One more question, If I somewhat want to undo this, I need to back up the current MM rom before flashing the script? Will the internal sd and /data automtically be swapped back when I restore the back up?
newguyknowsnothing said:
Ok thanks! One more question, If I somewhat want to undo this, I need to back up the current MM rom before flashing the script? Will the internal sd and /data automtically be swapped back when I restore the back up?
Click to expand...
Click to collapse
After swapping the partitions your old backups of the rom will not work anymore (or probably they would just revert the swapping. Anyway if you want to restore a backup that's been done prior to swap it's better to format back by hand the internal sdcard to vfat and data to ext4)
For backing up a rom with swapped partitions you'll have to select the sdcard instead of data partition in the backup options... I did not try it yet...
Sent from the center of the galaxy
Option58 said:
Yes, formatting internalSD as ext4 is tricky. My recovery was broken. Probably formatted something else. It wasn't your script.
However I have no volume up button on my phone (fell out) - no fastboot. And just volume down button (flash mode) and a somewhat broken USB cable. Phone not recognized by flashtool at all...
Click to expand...
Click to collapse
I don't know, sorry. You have to search the brick threads...
Sent from the center of the galaxy
I ran the the link2sd enabler script on my rr573, works like a charm now.
Thank you so much, I needed this!
Didn't swapped the storages yet.
The dream is real!
Congratulations.
Seeking a long time for a script like mm-partition-swapper.zip
Before seeing your post, I had already made the formatting of SD0 (ext4) to try to install Link2SD to work with SD0 without work.
I used the TWRP 3.0.2.
I could easy return the partition to FAT.
I intend to make a clean installation of ROM on my device to then install your mm-partition-swapper.zip script.
As both the "DATA" as SD0 are empty you still think need to format with TWRP 2.8.7?
No way to change this script without the data transfer?
Only formatting partitions and inverted mounts?
If not necessary then ok...but... please clear this my doubts.
Again without getting tired ... very thank you even for your script.

Categories

Resources