[DEV]Link2SD working on X10i

Search This thread

anantshri

Senior Member
Feb 22, 2011
687
320
Bangalore
anantshri.info
=================== GOOD NEWS ================

Thanks to GORO and Z we have a solution

Hi,

because link2sd rearranges install-recovery.sh

I made a patch for patch for using link2sd :p

for CM7-Z-MOD-002

for SE 2.3.3 sample

Z's work contributes to all.

Thanks for Z !!

Cheers,
tkymgr


Step by step guide
http://xdaforums.com/showpost.php?p=16853029&postcount=39

thanks to waigsr


for those looking to see the technical aspects of it.

SE sample zip contains a vold replacement from cm7 which actually do the magic of making sure that first partition gets mounted.

Note : as Link2SD messes with install-recovery.sh its adviced that after flashing this zip port any specific tweak you have in install-recovery.sh over to install-recovery2.sh in the same folder.

and then run link2SD

Hope this helps.



-============== Keeping old study for later reference and memories only ==============


I have been messing around with Link2SD and its config here is a short writeup for those who want to help.

The basic problem

Link2SD looks for a partition no of /sdcard +1 partition
Android has a habbit of mounting the last partition as /sdcard

so link2sd is going to fail in all senses.

however if anything is mounting at /data/sdext2 Link2sd condsider it as a second partition

so we still have hope of using it however there are several limitations of it.

multiple ways in which link2sd could be used.

1) create 2 partitions on sdcard
a) ext2 partition as mmcblk0p1
b) vfat partition as mmcblk0p2

entry in install-recovery.sh
mount -t ext2 /dev/block/mmcblk0p1 /data/sdext2


Cons : xrecovery can't mount sdcard as its mmcblk0p1 that xrecovery mounts


2) create 2 vfat partitions
a) mmcblk0p1 mounting itself at /data/sdext2
b) mmcblk0p2 mounting itself as /sdcard

cons recovery related files will go in /data/sdext2


3) three partition layout
a) mmcblk0p1 -> reserverd for recovery related stuff
b) mmcblk0p2 -> link2sd
c) mmcblk0p3 -> SDCARD

or find an alternative to use mmcblk0p1 as /sdcard

or use a loop file as /data/sdext2

Do suggest what you all think and how should we proceed.
 
Last edited:

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,710
Pune
and u sure this doesnt break recovery?


ok now that i read the post carefully i understand that it WILL BREAK recovery
 

anantshri

Senior Member
Feb 22, 2011
687
320
Bangalore
anantshri.info
keep only one FAT32 partition...

modify the recovery ramdisk to mount that partition to /sdcard

that could be done

however there is one more issue which i found just now

SDCARD can't be mounted to PC till both partitions are umounted and that won't be done automatically so we need alternative for sdcard umounting also

something like a gscript code for umounting /data/sdext2 before attempting sdcard mount to pc
 

anantshri

Senior Member
Feb 22, 2011
687
320
Bangalore
anantshri.info
the new vold introduced in froyo causes this issue


the default vold.fstab listing is

dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.1/mmc_host/mmc0 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.4/mmc_host/mmc0 /devices/platform/msm_sdcc.4/mmc_host/mmc1



some stuff online suggests that i can specify a partition number manually.

however
Code:
dev_mount sdcard /mnt/sdcard [B]1[/B] /devices/platform/msm_sdcc.1/mmc_host/mmc0 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.4/mmc_host/mmc0 /devices/platform/msm_sdcc.4/mmc_host/mmc1


when i am trying this it barks out and not even mounts sdcard.
 

Guantanamo

Senior Member
May 13, 2009
169
39
Tétouan
With the sdcard parted in 3 partitions, I tried to make the third partition recognized by my pc, and I tried an application named multimount sd or something like that and it worked for me. You can found it in the market. With it, the pc can recognize the third partition not the first. Maybe that will help in your project.

Sent from my X10i
 

aZuZu

Inactive Recognized Developer
Jan 19, 2011
638
941
43
Zagreb
fat32 is first partition
ext2 is second partition

vold.fstab
dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.1/mmc_host/mmc0 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.4/mmc_host/mmc1
this will mount fat32 partition

dev_mount ext2 /mnt/sdcard 1 or 2 /devices/platform/msm_sdcc.1/mmc_host/mmc0 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.4/mmc_host/mmc1
should mount ext2 for link2sd
 
Last edited:

Adolf1994

Senior Member
Jun 2, 2010
411
65
Fertőrákos
the vold from 2.1 works well as you can see and if you'd have googled it, then you'd know there is a revised version of vold in 2.2+
 

shaunbu

Senior Member
Apr 2, 2009
88
8
Wigan
How about instead bind mounting a folder on /system as /data/sdext2 did this for ages on 2.1 to get more space for apps without probs. Obviously /system has to be mounted rw which isn't a prob for me and at least on stock there's loads of free space there which is a shame to waste.

Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
mount -o bind /system/app2 /data/sdext2

Think the folders need to be created first.
 
Last edited:

anantshri

Senior Member
Feb 22, 2011
687
320
Bangalore
anantshri.info
fat32 is first partition
ext2 is second partition

vold.fstab
dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.1/mmc_host/mmc0 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.4/mmc_host/mmc1
this will mount fat32 partition

dev_mount ext2 /mnt/sdcard 1 or 2 /devices/platform/msm_sdcc.1/mmc_host/mmc0 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.4/mmc_host/mmc1
should mount ext2 for link2sd

I also assumed something like this however android seems to be needing a last partition as vfat and that vfat is mounted as sdcard or nothing is mounted.


How about instead bind mounting a folder on /system as /data/sdext2 did this for ages on 2.1 to get more space for apps without probs. Obviously /system has to be mounted rw which isn't a prob for me and at least on stock there's loads of free space there which is a shame to waste.

Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
mount -o bind /system/app2 /data/sdext2
Think the folders need to be created first.

for you i recommand checking http://xdaforums.com/showthread.php?t=1206149 and also system being rw all the time is not at all a good idea.


Hi,

because link2sd rearranges install-recovery.sh

I made a patch for patch for using link2sd :p

for CM7-Z-MOD-002

for SE 2.3.3 sample

Z's work contributes to all.

Thanks for Z !!

Cheers,
tkymgr

Thanks buddy will check it as soon as possible ...rightnow my sdcard is not mounting nomatter what setting i do thinking of flashing CM7 and will see how it goes from there.

Note : just checked the zip i think SE stock needed a relacement at vold. will just flash the vold and see if it works.
 
  • Like
Reactions: Lockon Stratos

Lockon Stratos

Senior Member
Jan 30, 2011
637
168
Hi,

because link2sd rearranges install-recovery.sh

I made a patch for patch for using link2sd :p

for CM7-Z-MOD-002

for SE 2.3.3 sample

Z's work contributes to all.

Thanks for Z !!

Cheers,
tkymgr


Thanks buddy. I can confirm the SE 2.3.3 sample zip worked. I flashed the zip, turned off my x10, partitioned the sd on my pc using fat32 & ext32, powered on and DID NOT get previous error of sd not recognized on startup. It mounted fat32 partition and link2sd recognized ext2 partition right away. Selected ext type, rebooted again and I've moved apps that I wanted to the sd card. Rebooted a couple more times and apps are still linked and running fine. Time will tell if any apps will have issues or any tweaks on this rom will be affected. Using WBs v3.9 custom GB and I'll report again later.

Again thank you to everyone's efforts and for not giving up on this old feature.


Edit: Forgot to mention I can still enter xrecovery manually and using the xperia reboot app.
 
Last edited:
  • Like
Reactions: anantshri

creage

Senior Member
Jan 9, 2009
186
33
Please, note, that everything you had previously added to install-recovery.sh, is now renamed into install-recovery.sh.ori. So, if you want it back, working, you need to rename/copy to install-recovery2.sh
 
  • Like
Reactions: anantshri

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    Hi Guys
    Thanks to anantshri for this mod
    I confirm this is working great on my X10 WB V4/4.0.2.
    No issues.

    For those u want to know
    1) download it
    2) Take out yr sd n use card reader to yr cpu
    3) Download Minitool Partition Wizard home edition (free) Google it!
    4) Open MTPW and look for yr sd card
    5) Select yr SD and Choose resize on the side tab in MTPW
    6) Drag slider that show up in the new window to the left to around 500mb or 1gb (safety max ,more than 1 gb can get problems)
    7) Click apply on top left,yes to bla- bla and wait for it to finish
    8) U get a new 500mb-1gb empty partition on yr SD.
    9) Select the empty partition and click format on the side tab in MTPW
    10)Select as Primary and format as EXT 2
    11) Read No 7 above
    12) Once finish exit from MTPW.
    13) Open my computer u see sd card but only the first partition,the new one u made window can't see it,window doesn't recognize Ext 2.
    14) Put yr downloaded Link2SD zip in the root of the SD
    15) Sd put back to phone and boot into xrecovery, flash it and reboot.
    16) Download Link2SD from market and run it.
    17) It will ask on first time to select use what. Select Ext2 and reboot.
    18) Run the Link2Sd again and press menu button-> storage info ,u see yr second 500mb-1gb partition. If u can't see it then u have format it wrong.
    19) choose yr apk to move to to sd , Try not to move those with widget unless it is optimize for app2sd.

    Its better than app2Sd cos those apks u side load from cpu, app2sd don't let u move it. This Link2Sd lets u move it.:)

    Somebody please correct/ add in if some steps are wrong/missing

    Have fun Cheers

    Update work on WB v6
    10
    =================== GOOD NEWS ================

    Thanks to GORO and Z we have a solution

    Hi,

    because link2sd rearranges install-recovery.sh

    I made a patch for patch for using link2sd :p

    for CM7-Z-MOD-002

    for SE 2.3.3 sample

    Z's work contributes to all.

    Thanks for Z !!

    Cheers,
    tkymgr


    Step by step guide
    http://xdaforums.com/showpost.php?p=16853029&postcount=39

    thanks to waigsr


    for those looking to see the technical aspects of it.

    SE sample zip contains a vold replacement from cm7 which actually do the magic of making sure that first partition gets mounted.

    Note : as Link2SD messes with install-recovery.sh its adviced that after flashing this zip port any specific tweak you have in install-recovery.sh over to install-recovery2.sh in the same folder.

    and then run link2SD

    Hope this helps.



    -============== Keeping old study for later reference and memories only ==============


    I have been messing around with Link2SD and its config here is a short writeup for those who want to help.

    The basic problem

    Link2SD looks for a partition no of /sdcard +1 partition
    Android has a habbit of mounting the last partition as /sdcard

    so link2sd is going to fail in all senses.

    however if anything is mounting at /data/sdext2 Link2sd condsider it as a second partition

    so we still have hope of using it however there are several limitations of it.

    multiple ways in which link2sd could be used.

    1) create 2 partitions on sdcard
    a) ext2 partition as mmcblk0p1
    b) vfat partition as mmcblk0p2

    entry in install-recovery.sh
    mount -t ext2 /dev/block/mmcblk0p1 /data/sdext2


    Cons : xrecovery can't mount sdcard as its mmcblk0p1 that xrecovery mounts


    2) create 2 vfat partitions
    a) mmcblk0p1 mounting itself at /data/sdext2
    b) mmcblk0p2 mounting itself as /sdcard

    cons recovery related files will go in /data/sdext2


    3) three partition layout
    a) mmcblk0p1 -> reserverd for recovery related stuff
    b) mmcblk0p2 -> link2sd
    c) mmcblk0p3 -> SDCARD

    or find an alternative to use mmcblk0p1 as /sdcard

    or use a loop file as /data/sdext2

    Do suggest what you all think and how should we proceed.
    7
    patch for using link2sd

    Hi,

    because link2sd rearranges install-recovery.sh

    I made a patch for patch for using link2sd :p

    for CM7-Z-MOD-002

    for SE 2.3.3 sample

    Z's work contributes to all.

    Thanks for Z !!

    Cheers,
    tkymgr
    2
    Sorry for asking a noob question here:
    In what way is link2SD better than app2SD?

    Link2SD needs a second partition which will never be recognised by computer too. So why go to link2SD when from 2.2 onwards, app2SD works?

    Thanks for answering...

    It is better is some ways. For example:

    1) You can move ANY app you want.
    Apps2SD must be supported by the app and widgets and services don't,
    but with Link2SD, you don't have to worry about this, any app you want
    can be moved away from your precious /data partition.
    2) Link2SD doesn't just move only the apk, but also dalvik and libraries, which means much more space is being freed.
    3) You don't have to worry about apps becoming unavailable when you mount your SD to your PC. The second partition always remains unmounted, so the apps are always unaffected by that.

    I hope I cleared this out for you! :)
    2
    Hi,

    because link2sd rearranges install-recovery.sh

    I made a patch for patch for using link2sd :p

    for CM7-Z-MOD-002

    for SE 2.3.3 sample

    Z's work contributes to all.

    Thanks for Z !!

    Cheers,
    tkymgr


    confirmed working

    Post updated with details......