Hello everyone!
Today with the help of the developer of Link2sd, Mr. Bulent Akpinar I managed to install Link2SD using a ext3 partition on my Milestone XT720 (USA).
I AM NOT RESPONSIBLE FOR ANY DAMAGE TO YOUR PHONE
A)
You have to be rooted, use Universal Androot:
http://forum.xda-developers.com/attachment.php?attachmentid=378559&d=1281616832
B)
Then partition sdcard using Minitool Partition Home Edition:
*All partitions created have to be Primary partitions*
I) Create FAT32 partition
II) Ext3 (to avoid problems make not bigger than 512 mb)
III) Linux Swap (not necessary)
*After creating those partitions "Flag" or "Label" FAT32 partition as *Boot*.
C)
I used Root Explorer
D)
Download ext3.zip.
E)
1)Extract ext3.zip file and copy files to /system/lib/modules/ using Root Explorer -make sure when using Root Explorer you have enabled Mount R/W button.
F)
Edit install-recovery.sh at /system/etc exactly like below:
#!/system/bin/sh
#added by link2sd
sleep 2
insmod /system/lib/modules/jbd.ko
insmod /system/lib/modules/ext3.ko
mount -t ext3 -o rw /dev/block//vold/179:2 /data/sdext2
mount -t ext3 -o rw /dev/block/mmcblk0p2 /data/sdext2
****Again, use Root Explorer, it has a Text Editor****
Sorry for stressing so much the use of Root Explorer but other apps do not let you edit install-recovery.sh
I have provided my edited install-recovery.sh from stock rom. If you have other rom then try to edit yours first as install-recovery.sh may be different.
After all this changes, REBOOT your phone, and install Link2SD.
Enjoy!
Related
link2sd mounted partitions are not detected by titanium backup by defualt....so If we link the second partion to use with Titanium backup we can move app data to second partition ...
so u can follow these steps to link second partition... so assuming u av alredy mounted the second partiton for Link2sd..
1.Create a folder named 'app' in your second partition..[u can browse data/sdext2 and create the folder thr]
2.Now add thz script to ur init.d folder
Code:
mount -wo remount rootfs /
ln -s /data/sdext2 /sd-ext
mount -ro remount rootfs /
(u can add these lines to file named link2sd in init.d folder...mine was ext2 partition and mount point was data/ext2...ur mount point may be different if u av different filesystem... make respective changes in the script)
now reboot ur phone and launch titanium backup ..u can c the second partition is mounted and u can move app data to SD card by long pressing on any app name in titanium backup..
suael said:
link2sd mounted partitions are not detected by titanium backup by defualt....so If we link the second partion to use with Titanium backup we can move app data to second partition ...
so u can follow these steps to link second partition... so assuming u av alredy mounted the second partiton for Link2sd..
1.Create a folder named 'app' in your second partition..[u can browse data/sdext2 and create the folder thr]
2.Now add thz script to ur init.d folder
Code:
mount -wo remount rootfs /
ln -s /data/sdext2 /sd-ext
mount -ro remount rootfs /
(u can add these lines to file named link2sd in init.d folder...mine was ext2 partition and mount point was data/ext2...ur mount point may be different if u av different filesystem... make respective changes in the script)
now reboot ur phone and launch titanium backup ..u can c the second partition is mounted and u can move app data to SD card by long pressing on any app name in titanium backup..
Click to expand...
Click to collapse
Thanks a lot for this.
But there is a problem.
Every time I reboot my mobile, all the apps who's app data is saved are removed. And titanium backup doesn't detect my second partition.
Then I have to execute the link2sd file in init.d folder (I use root explorer). Please tell me what to do. I want both of them (link2sd and titanium backup) to automatically detect my 2nd partition after reboot.
Regards,
Fahad Hasin
Titanium Backup i do not see my ext 2 split card.
FAT32
ext2
If you use Link2SD see ext2.
Titanium Backup can not be displayed.
Does anyone have a solution?
Try removing and re-inserting your SD Card. Or maybe wiping cache and Dalvik Cache in Recovery. It may help.
OK.
I need to know what script I have it mounted in sdext2
Titanium but it requires to ,,sd,, and then must use this command:
ln -s /data/sdext2 /data/sd
What do I need to connect the SD card data/sd
Only insert script in init.d ?
And what ?
Code:
We created:
#!/system/bin/sh
#mount sd for a2sd
mount -t ext2 -o rw /dev/block/vold/179:2 /data/sd
mount -t ext2 -o rw /dev/block/mmcblk0p2 /data/sd
I tried to install Link2SD in Micromax A58 as the internal storage is very low and need to install some more apps. Already rooted and installed Link2SD to use the ext4 2nd partition of my 8 GB SD card. After trying with all possible ways, couldn't get it worked. All the time it was showing error--
"Mount Script can not be created. Mount: No such file or directory"
Previously even the 2nd partition was not shown as mounted in the storage info of Link2SD but after modifying the install-recovery.sh in /etc path, the storage info now atleast showing the 2nd partition as mounted. My install-recovery.sh looks like below--
#!/system/bin/sh
/system/xbin/daemonsu --auto-daemon &
/system/etc/install-recovery-2.sh
mount -t ext4 -o rw /dev/block/mmcblk0p2 /data/sdext2
mount -t ext4 -o rw /dev/block/vold/179:2 /data/sdext2
Now, the problems are as below--
1) Installed multiple applications but none of them are actually linked to SDcard. The Link2SD shows them as 'On SD Card' and just after installing 9-10 small applications, the internal memory is now full. If I go to 'Create Link', it is giving error '/data/sdext2 mount not found'.
2) When try to recreate mount script and choosing 'ext4' as parameter, it still throws error
"Mount Script can not be created. Mount: No such file or directory"
It seems that even though the storage info shows the 2nd partition as mounted, but system couldn't identify it somehow. So, Link2Sd is not working at all.
Please help and advice further. Thanks a lot.
What I want to do is partition my sdcard into 2 parts, 1 fat32 and the second as ext3. Mount both partitions at startup so i get /sdcard (fat) and /sdcardext3 (ext). Then create 2 folders /sdcardext3/apps and /sdcardext3/apps-private then delete the /data/apps and /data/apps-private folders and replace them with links to the folders on the sdcard 2nd partition I just created. Is this possible? I guess I'll be having to muss around with fstab but I'm not too well versed on that. Anyone got any tips on how I can achieve this. I know there are apps like foldermount and link2sd but they only work on a per app basis, i want a full "do it and forget it" solution that doesn't rely on an app.
Cheers
EDIT:
I'm seeing these 3 lines in /init.rc
Code:
mount rfs /dev/stl11 /data nosuid nodev usedm check=no
chown system system /data
chmod 0771 /data
Is it possible to create and format an rtf partition on the sdcard, then extract, change and repack the ramdisk image with the following changes?
Code:
mount rfs /dev/block/vold/179:2 /data nosuid nodev usedm check=no
chown system system /data
chmod 0771 /data
To move the data folder completely off the phone internal memory. My phone only has 512MB and my external SD is 64GB so I won't cry at the wasted half a gig.
So far I've managed to:
extract the boot.img from the stock firmware I'm using. Using a linux box with abootimg installed (apt-get abootimg)
I split it up into the kernel (zImage) and the ramdisk (initrd.img) .
Unpacked and cpio-ed initrd.img to files.
Edited init.rc and found two instances of
Code:
mount rfs /dev/stl11 /data nosuid nodev usedm check=no
in the file
Replaced /dev/stl11 with /dev/block/mmcblk0p2 and replaced rfs with ext3.
Combined the kernel and ramdisk back together with gzip, cpio and abootimg (newboot.img) and dumped it onto the phone using adb along with the flash_image command (which wasn't on the phone as standard).
Had to copy flash_image (in fact I had to cat flash_image >/data/flash_image because there's no cp command as standard either) to /data as it needed executable privs, chmod 777 /data/flash_image to allow it to execute,
Then execute /data/flash_image boot /sdcard/newboot.img
Reboot phone
Phone;s stuck on the Samsung splash screen, pah. Was worth a try anyway.
Hi, I'd like to ask a general question about device boot. I'd like to mount /system, /data, and /cache partitions in selected locations based on detection of sdcard in the device.
How could I add an if ... then ... else statement to init.rc before that /system, /data, and /cache partitions are mounted? Any ideas?
Solved
I've found a way to perform this task. It's possible to place if ... then ... else statement into a shell script and put the shell script into ramdisk root directory of boot.img. Then, just run the script by busybox ash command from init.rc (with busybox located into ramdisk root directory).
cristian_c said:
I've found a way to perform this task. It's possible to place if ... then ... else statement into a shell script and put the shell script into ramdisk root directory of boot.img. Then, just run the script by busybox ash command from init.rc (with busybox located into ramdisk root directory).
Click to expand...
Click to collapse
Hey... I managed to mount /dev/block/mmcblk1p2 as my /data partition by editing my boot.img ramdisk(the 3. fstab files and the .rc files... i replaced [email protected] with dev/block/mmcblk1p2 wherever i saw them)
So i was trying to use an if statement in some of the .rc files to check if /dev/block/mmcblk1p2 was mounted on /data and if not then mount /dev/block/mmcblk0p9 (my usrdata partition) on /data... Soon i realised that this isn't exactly bash...
Please explain how you managed to get a .sh to run from your .rc files( or do you only need it in the init.rc, and remove all the /data mounting lines from them and do it all from the script???)
I don't always have access to a pc so if my sdcard somehow dies i want my phone to boot using the internal /data partition otherwise i will bootloop until i flash the original boot.img
nullbyte001 said:
Hey... I managed to mount /dev/block/mmcblk1p2 as my /data partition by editing my boot.img ramdisk(the 3. fstab files and the .rc files... i replaced [email protected] with dev/block/mmcblk1p2 wherever i saw them)
So i was trying to use an if statement in some of the .rc files to check if /dev/block/mmcblk1p2 was mounted on /data and if not then mount /dev/block/mmcblk0p9 (my usrdata partition) on /data... Soon i realised that this isn't exactly bash...
Please explain how you managed to get a .sh to run from your .rc files( or do you only need it in the init.rc, and remove all the /data mounting lines from them and do it all from the script???)
I don't always have access to a pc so if my sdcard somehow dies i want my phone to boot using the internal /data partition otherwise i will bootloop until i flash the original boot.img
Click to expand...
Click to collapse
I've found on fs_property:ro.mount.fs=EXT4 in init.rc. In that section, I've added the following iine:
Code:
exec /busybox ash /mount_partitions.sh
[of course, I've placed busybox arm compiled binary (the version provided by busybox android app should work) and a mount_partitions.sh script (created by myself) into boot image ramdisk (I mean / main directory, the same where init.rc is located) ]
You could also need to give permissions to busybox and to .sh script. You could also need to remount / in read-write mode, in case of issues with the above command.