[APP] Link2SD perfect for XT720

Search This thread

ronnbon

Senior Member
Aug 15, 2010
412
102
Hamburg
I cannot mount the ext2 partition- not with apps2card and not with Link2Sd...:( Of course I place the ext2.ko file at the right place and run the script but nothing changed..
I don't know what to try anymore and I just have around 30mb left of internal space! :mad:
The xtOptimizer did work for me with bugs but the internal space was decreasing anyway... I am really frustrated now with deleting one app to install another!
 

kousik

Senior Member
Nov 28, 2010
235
44
Bangalore
I cannot mount the ext2 partition- not with apps2card and not with Link2Sd...:( Of course I place the ext2.ko file at the right place and run the script but nothing changed..
I don't know what to try anymore and I just have around 30mb left of internal space! :mad:

Well for me too none of the given script or app worked to my satisfaction so I decided to take the matter on own hand. If you please let me know what exactly you have done, maybe I can point the bugs to you. The basic steps you have to follow are: (1) copy ext2.ko in /system/lib/modules (2) modify /system/bin/mot_boot_mode, copy the original to mot_boot_mode.bin, call it from a script of the same name, and later insmod ext2.ko (remember to set $PATH), and mount the partition (3) move desired apks from /data/app/ to /where/you/mounted/ext2 and replace them by symlink (4) reboot.

Need more help? Let me know. Don't be frustrated ... it is a solved/understood problem.
 

hardKNOXbz

Member
Jan 20, 2011
48
2
Belize City
Well for me too none of the given script or app worked to my satisfaction so I decided to take the matter on own hand. If you please let me know what exactly you have done, maybe I can point the bugs to you. The basic steps you have to follow are: (1) copy ext2.ko in /system/lib/modules (2) modify /system/bin/mot_boot_mode, copy the original to mot_boot_mode.bin, call it from a script of the same name, and later insmod ext2.ko (remember to set $PATH), and mount the partition (3) move desired apks from /data/app/ to /where/you/mounted/ext2 and replace them by symlink (4) reboot.

Need more help? Let me know. Don't be frustrated ... it is a solved/understood problem.

what does your mot_boot_mode script look like?
 

kousik

Senior Member
Nov 28, 2010
235
44
Bangalore
what does your mot_boot_mode script look like?
the original mot_boot_mode file was copied to mot_boot_mode.bin and replaced by the following script
Code:
#!/system/bin/sh
export PATH=/system/bin:$PATH
# Do not modify the following line
/system/bin/mot_boot_mode.bin 
# Append here any commands that you wish to run during the phone boot
insmod /system/lib/modules/jbd.ko
insmod /system/lib/modules/ext3.ko
mount -t ext3 /dev/block/mmcblk0p2 /data/sdext2
I have ext3 partition so I need 2 kernel modules; for ext2 you just need ext2.ko previously copied into /system/lib/modules.

Another funny thing I realized that applications moved by Link2SD still works if you mount the ext2/ext3 partition as "read-only". All it needs the apk to be there. Writable stuffs are still in /data (internal memory). So if you mount read-only chances of sd card corruption isn't there. Only problem you have to remount if you want to move more application from internal to SD.
 
Last edited:

Zachary57

Senior Member
Feb 2, 2011
581
134
I have a problem with ext2 partition too on XT720 (European) :

1)I put ext2.ko in /system/lib/modules/ with Root Explorer
2)I make an ext2 partition with MiniTool Partition Wizard Home Edition
3)I downloaded android-sdk_r09-windows
4)I launched cmd and adb shell
5)I type this command : /system/bin/su and then insmod /system/lib/modules/ext2.ko
(I did this step 2 times)
6)I agree super user request on the phone
7)I installed the apk

But, when I launch the app, it say cannot mount ext2 partition.
Can someone help me ?

I want to add, when I tape lsmod after typing "insmod /system/lib/modules/ext2.ko" I see ext2 but when I tape just lsmod after rebooting the phone, I didn' see.
 
Last edited:

Riley600

Senior Member
Dec 29, 2010
199
40
Vancouver
I have a problem with ext2 partition too on XT720 (European) :

1)I put ext2.ko in /system/lib/modules/ with Root Explorer
2)I make an ext2 partition with MiniTool Partition Wizard Home Edition
3)I downloaded android-sdk_r09-windows
4)I launched cmd and adb shell
5)I type this command : /system/bin/su and then insmod /system/lib/modules/ext2.ko
(I did this step 2 times)
6)I agree super user request on the phone
7)I installed the apk

But, when I launch the app, it say cannot mount ext2 partition.
Can someone help me ?

I want to add, when I tape lsmod after typing "insmod /system/lib/modules/ext2.ko" I see ext2 but when I tape just lsmod after rebooting the phone, I didn' see.

If you navigate to /system/etc and edit install-recovery.sh to include the following two lines (in this order), it should work:
Code:
insmod /system/lib/modules/ext2.ko
mount -t ext2 /dev/block//vold/179:2 /data/sdext2
 

Zachary57

Senior Member
Feb 2, 2011
581
134
Thank you, I will try that but do you edit install-recovery.sh with adb or have you got an other way to do that ?
And, where I have to insert this lines, at the end of files or in another place ?
 
Last edited:

Riley600

Senior Member
Dec 29, 2010
199
40
Vancouver
Thank you, I will try that but do you edit install-recovery.sh with adb or have you got an other way to do that ?
And, where I have to insert this lines, at the end of files or in another place ?
You should be able to do it with Root Explorer. Long press the file and select the Edit function. Make sure you tap the Mount R/W button at the top first. There shouldn't be too many lines in there, so you can add those to the end.
 

Zachary57

Senior Member
Feb 2, 2011
581
134
You should be able to do it with Root Explorer. Long press the file and select the Edit function. Make sure you tap the Mount R/W button at the top first. There shouldn't be too many lines in there, so you can add those to the end.

Here is my install-recovery.sh file :

Look at this adress if image isn't visible: File erased, it was not necessary to resolve problems.

Can you tell me where to place the lines because I haven't any command on the file and I don't know if I can put this at the end after word "fi" ?

Thank you
 
Last edited:

Zachary57

Senior Member
Feb 2, 2011
581
134
I finally found another way, I installed Terminal emulator, then I type :
-su
-insmod /system/lib/modules/ext2.ko

Then I launched link2sd and he created the autostart automatically.

Thank you to all who helped me, it's now working, I will post a thread tomorrow to explain step by step what to do to root and install link2sd.
 

hardKNOXbz

Member
Jan 20, 2011
48
2
Belize City
the original mot_boot_mode file was copied to mot_boot_mode.bin and replaced by the following script
Code:
#!/system/bin/sh
# Do not modify the following line
/system/bin/mot_boot_mode.bin 
# Append here any commands that you wish to run during the phone boot
insmod /system/lib/modules/jbd.ko
insmod /system/lib/modules/ext3.ko
mount -t ext3 /dev/block/mmcblk0p2 /data/sdext2
I have ext3 partition so I need 2 kernel modules; for ext2 you just need ext2.ko previously copied into /system/lib/modules.

Another funny thing I realized that applications moved by Link2SD still works if you mount the ext2/ext3 partition as "read-only". All it needs the apk to be there. Writable stuffs are still in /data (internal memory). So if you mount read-only chances of sd card corruption isn't there. Only problem you have to remount if you want to move more application from internal to SD.

Kousik, just for my information, what is this like for:
Code:
export PATH=/system/bin:$PATH

i used ur mot_boot_mode (modified it for ext2 partition) but it did not boot past the white Moto logo
 

kousik

Senior Member
Nov 28, 2010
235
44
Bangalore
Kousik, just for my information, what is this like for:
Code:
export PATH=/system/bin:$PATH
i used ur mot_boot_mode (modified it for ext2 partition) but it did not boot past the white Moto logo

When mod_boot_mode is run, the PATH variable is not set (PATH is the list of locations where the shell searches for the commands/binaries). This command prepends /system/bin to existing PATH (which was probably nil). Without setting the PATH, "insmod" wouldn't work. After this line, the shell will search for a binary/script named "insmod" in /system/bin (and will find it). If you do not want to use PATH, instead of just insmod/mount commands, explicitly type "/system/bin/insmod", "/system/bin/mount".

Here are the ways you can go wrong: (1) ext2.ko is not present in /system/lib/modules (2) the PATH is not correct so insmod or mount is not found (3) SD card has a different partition table so that /dev/block/mmcblk0p2 is not really the ext2 partition.

Check all of the above and retry, you'll succeed.
 
Last edited:
  • Like
Reactions: hardKNOXbz

hardKNOXbz

Member
Jan 20, 2011
48
2
Belize City
perfect!!
changed my mot_boot_mode to
Code:
#!/system/bin/sh
# Do not modify the following line
/system/bin/mot_boot_mode.bin 
# Append here any commands that you wish to run during the phone boot
/system/bin/insmod /system/lib/modules/ext2.ko
/system/bin/mount -t ext2 /dev/block/mmcblk0p2 /data/sdext2

and it works like a dream. modified folder permissions for sdext2 and changed apk's owner to system and now my apps fun off the sdcard. works like a dream...

i now look at my XT720 in a whole different light... app downloading time... :) thanks Again
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    To get Link2SD working the XT720...

    I've worked with the developer and found the issue. Motorola phones can't mount the ext2 partition and need to install the ext2.ko file (this file is installed when you install app2sd).

    Unfortunately, right now the steps are manual to install this (otherwise the apk would largely increase in size). But once this is done (you need root access, obviously), Link2SD will work. I used Root Explorer to copy ext2.ko to the necessary directory - however, I'm sure it can be done using adb commands. I'm not confident enough with my adb skills to give instructions based on that - so if someone else knows better than I, please feel free to give your own instructions.

    1) Download the ext2.ko file (zip attached)
    2) Extract it to your SD card
    3) Use Root Explorer to navigate where you extracted it to and copy the file
    4) Navigate to /system/lib/modules/ and paste the ext2.ko file there
    5) Open an adb shell with super user (su) permissions and run the following command:
    Code:
    insmod /system/lib/modules/ext2.ko
    6) Reboot - Link2SD should now mount the ext2 partition and function correctly!

    It's a solid program - I've left my Home Launcher (ADW) on the phone's memory which seems to have reduced stuttering and slowdowns from when it was installed on the SD card with app2sd.

    I'll try to answer any other questions about the installation of this program on the XT720 if you have any.

    Thanks to Bulent for working with me to find a solution to the issue with Motorola phones! :D
    1
    original topic here

    http://xdaforums.com/showthread.php?t=919326

    just in case you miss it :D

    this app is great for our phones with limited storage space
    icon14.gif


    way better to use than App2SD App and/or the App2SD script that most of us are using with the XT720

    Thumbs up To get Link2SD working the XT720...

    Thanks to Riley600


    I've worked with the developer and found the issue. Motorola phones can't mount the ext2 partition and need to install the ext2.ko file (this file is installed when you install app2sd).

    Unfortunately, right now the steps are manual to install this (otherwise the apk would largely increase in size). But once this is done (you need root access, obviously), Link2SD will work. I used Root Explorer to copy ext2.ko to the necessary directory - however, I'm sure it can be done using adb commands. I'm not confident enough with my adb skills to give instructions based on that - so if someone else knows better than I, please feel free to give your own instructions.

    1) Download the ext2.ko file (zip attached)
    2) Extract it to your SD card
    3) Use Root Explorer to navigate where you extracted it to and copy the file
    4) Navigate to /system/lib/modules/ and paste the ext2.ko file there
    5) Reboot - Link2SD should now mount the ext2 partition and function correctly!

    Currently, if you link a file to the SD card, it will not show up in the Market until it is unlinked. The developer is looking into a solution for this. Otherwise, it's a solid program - I've left my Home Launcher (ADW) on the phone's memory which seems to have reduced stuttering and slowdowns from when it was installed on the SD card with app2sd.

    I'll try to answer any other questions about the installation of this program on the XT720 if you have any.

    Thanks to Bulent for working with me to find a solution to the issue with Motorola phones! :D

    Attachment on post # 8 http://xdaforums.com/showpost.php?p=10866898&postcount=8
    1
    I've made small change in the application and released 1.0.5. What I did for Motorola users is to add insmod line to install-recovery.sh script if /system/lib/modules/ext2.ko file exists.
    In this way all you have to do manually is to copy ext2.ko file to modules directory and then install link2sd.
    You can install latest version from the app thread.

    Thanks to Riley for his contribution.
    1
    No problem :)
    It sounds like it was successful if you have 80mb free.
    1
    I believe it should work if you place those 2 lines at the end.