Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[DEV]Link2SD working on X10i

OP anantshri

14th August 2011, 12:21 PM   |  #1  
OP Senior Member
Flag Bangalore
Thanks Meter: 318
 
682 posts
Join Date:Joined: Feb 2011
Donate to Me
More
=================== GOOD NEWS ================

Thanks to GORO and Z we have a solution

Quote:
Originally Posted by tkymgr

Hi,

because link2sd rearranges install-recovery.sh

I made a patch for patch for using link2sd

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://forum.xda-developers.com/show...9&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 by anantshri; 21st August 2011 at 01:28 PM.
The Following 10 Users Say Thank You to anantshri For This Useful Post: [ View ]
14th August 2011, 12:54 PM   |  #2  
OP Senior Member
Flag Bangalore
Thanks Meter: 318
 
682 posts
Join Date:Joined: Feb 2011
Donate to Me
More
-=======reserved==========
14th August 2011, 12:58 PM   |  #3  
DooMLoRD's Avatar
Recognized Developer
Flag Noida
Thanks Meter: 39,012
 
13,124 posts
Join Date:Joined: Jul 2010
and u sure this doesnt break recovery?


ok now that i read the post carefully i understand that it WILL BREAK recovery
14th August 2011, 01:07 PM   |  #4  
OP Senior Member
Flag Bangalore
Thanks Meter: 318
 
682 posts
Join Date:Joined: Feb 2011
Donate to Me
More
Quote:
Originally Posted by DooMLoRD

and u sure this doesnt break recovery?


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

cons highlighted to avoid confusion.

any idea how we can get this piece to work.
14th August 2011, 02:01 PM   |  #5  
Senior Member
Flag India
Thanks Meter: 41
 
300 posts
Join Date:Joined: Feb 2011
More
BTW why do we need it when we have app2sd ?
How's it better ?
14th August 2011, 02:04 PM   |  #6  
DooMLoRD's Avatar
Recognized Developer
Flag Noida
Thanks Meter: 39,012
 
13,124 posts
Join Date:Joined: Jul 2010
Quote:
Originally Posted by anantshri

cons highlighted to avoid confusion.

any idea how we can get this piece to work.

keep only one FAT32 partition...

modify the recovery ramdisk to mount that partition to /sdcard
14th August 2011, 02:09 PM   |  #7  
OP Senior Member
Flag Bangalore
Thanks Meter: 318
 
682 posts
Join Date:Joined: Feb 2011
Donate to Me
More
Quote:
Originally Posted by DooMLoRD

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
14th August 2011, 03:32 PM   |  #8  
Adolf1994's Avatar
Senior Member
Flag Fertőrákos
Thanks Meter: 66
 
384 posts
Join Date:Joined: Jun 2010
More
the new vold introduced in froyo causes this issue
14th August 2011, 03:53 PM   |  #9  
OP Senior Member
Flag Bangalore
Thanks Meter: 318
 
682 posts
Join Date:Joined: Feb 2011
Donate to Me
More
Quote:
Originally Posted by Adolf1994

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 1 /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.
14th August 2011, 05:29 PM   |  #10  
Guantanamo's Avatar
Senior Member
Flag Tétouan
Thanks Meter: 31
 
141 posts
Join Date:Joined: May 2009
More
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

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes