[GUIDE] Milestone XT720 - Apps2SD and Froyo JIT

ok i reflashed the phone and sd card, and got everything to install correctly, so the error loading apps2sd corrected itself, i found a post here that directed to do to that and it works, thanks.

but now once it rebooted, nothing looks different, and i cant find the app2sd application. am i missing something? it seems everything else worked, i have overclock and all the installs from the adb access prompt worked. do i need to somehow tell the phone to use the new 2.2 JIT?

I encountered this problem(screenshot).
What does that mean?
I have rooted and partitioned my sd card using gparted live.

EDIT: I'm able to install JIT but not apps2sd, anyone has any idea why is that so?

That error of "Error loading ext2.ko, exiting script ..." means the ext2.ko modules was not able to load into the kernel. This normally means the microSD card is not partitioned correctly.


  • Make sure that the first partition is fat32 and flagged as boot (and primary)
  • Make sure that the second partition is ext3 (and primary)
Edit: I just uploaded a bug-fixed copy of the xt720-optimizer.rar. The only changes made were to force the overwrite of ext2.ko if it already exists and remove the line which gives "bad mode" on theme install. These were just minor annoyances.


i am a complete noob to the android world, and i apologize if this is overtly ignorant on my part but ive done everything as in the guide to get 2.2 on the milestone and i am still having problem. ive had to factory reset the phone twice now and it still wont go through. i have partitioned the sd card with GPL fat32 14xxx mb and ext3 1xxx mb, both primary with fat32 as boot, the only other thing is a 4mb unallocated portion in the begining of it all which i always thought normal. i have gained adb access just fine. when i enter the sh install.sh into the command prompt it brings up the 1-9 menu. 1 installs fine, 2 apps2sd never works and gets the exact error mentioned above with the "Error loading ext2.ko, exiting script ...", so i skip to 3-8 just fine. then i run 9 the cleanup and reboot. it reboots and milestone overclock is there, but thats it. no apps2sd which is understandable because it errored, but the new themes and 2.2 arent loading either. is it all hinged on apps2sd and if so, how can i get that to work? i appreciate any help, thanks.
 
Hey guys I'm from India.Can I flash XT720 OPTIMIZER USA Cincinati Bell STR_U2_04.1E.1 on my milestone xt720.My milestone has got ASIA-Pacific ROM.Also what is stock speed of USA Cincinati Bell USA ROM??Is it 720 MHz???Mine is 550 MHz for ASIA-PACIFIC ROM.
Hi, Did you try flashing USA rom? Was anything broken if you did on India machine? Everything fine with radio?
 
I have been looking at install.sh to find out what could have been the difference that causes different failures if not used with one of the tested ROM above. The first thing I noticed is (European U2_01.1E.0) install.sh tries to remount mtdblock6 on /system as read-write:

Code:
 mount -t yaffs2 -o rw,remount /dev/block/mtdblock6 /system
But in my phone (India ROM, STR_U2_01.1E.0) I see the partition is a little different, /system is mounted off /dev/block/mtbblock7

Code:
$ /system/bin/busybox df -h
/system/bin/busybox df -h
Filesystem                Size      Used Available Use% Mounted on
tmpfs                   112.4M         0    112.4M   0% /dev
tmpfs                     4.0M         0      4.0M   0% /sqlite_stmt_journals
/dev/block/mtdblock7    199.6M    172.2M     27.4M  86% /system
/dev/block/mtdblock9    173.1M    155.5M     17.6M  90% /data
/dev/block/mtdblock8    106.0M     17.6M     88.4M  17% /cache
/dev/block/mtdblock6      8.8M      8.5M    300.0K  97% /cdrom
tmpfs                     2.0M     28.0K      2.0M   1% /tmp
tmpfs                     2.0M         0      2.0M   0% /skttmp
/dev/block/mtdblock0      1.5M      1.2M    268.0K  83% /pds
The copying stuff would have failed otherwise.

Trying to investigate why most people's phone gets stuck at reboot after app2sd install. But generally they get thru if they flash one of the stock ROM first (and use corresponding script). So most likely it is not a SD card partitioning problem. We expect the first partition to be FAT32 which will show up as /dev/block/mmcblk0p1, and second to be ext2 which will be /dev/block/mmcblk0p2 (the same assumption is done in install.sh). Afterwards it just moves /data/app to /system/sd (where it was mounted) and make a symlink. Even so far so good. During boot the script is modified to mount /system/sd. So not much ROM dependent functionality we are doing here. So this also looks nice, my only concern is, it is done assuming original boot script will be done by then. I don't know if there is a chance that original mot_boot_mode tries to access /data/app and crashes due to unavailability of the same.
 
Last edited:
Sorry for back to back posts.

I only cherry-picked JIT stuffs from the optimizer. To do so, here is the change I made to install.sh for my India ROM, I also made the backup more robust in case we want to go back:

Code:
--- install.sh  2010-10-15 13:48:04.000000000 +0530
+++ \Temp\install.sh    2011-01-04 16:09:36.000000000 +0530
@@ -31,7 +31,7 @@
        echo $message
        echo ""
        #remount the system partition as read/write
-       mount -t yaffs2 -o rw,remount /dev/block/mtdblock6 /system
+       mount -t yaffs2 -o rw,remount /dev/block/mtdblock7 /system

        echo "Which option would you like to install? (1-9)"
        read x
@@ -177,8 +177,16 @@

                        cp /system/build.prop /data/jit/dalbk/
                        cp /system/bin/dalvikvm /data/jit/dalbk/
-                       cp /system/lib/libdvm.so /data/jit/dalbk/
-                       cp /system/lib/libnativehelper.so /data/jit/dalbk/
+                       cp /system/bin/dexopt /data/jit/dalbk/
+                       cp /system/bin/logcat /data/jit/dalbk/
+
+                       cp  /system/lib/libcutils.so /data/jit/dalbk/
+                       cp  /system/lib/libdvm.so /data/jit/dalbk/
+                       cp  /system/lib/libm.so /data/jit/dalbk/
+                       cp  /system/lib/libz.so /data/jit/dalbk/
+                       cp  /system/lib/libdl.so /data/jit/dalbk/
+                       cp  /system/lib/liblog.so /data/jit/dalbk/
+                       cp  /system/lib/libnativehelper.so /data/jit/dalbk/

                        cp -f /sdcard/apps2sd/jit/bin/dalvikvm /system/bin/
                        cp -f /sdcard/apps2sd/jit/bin/dexopt /system/bin/

Also for build.prop, I found the diff between build.prop and build.prop.original and applied the diff on mine :-D
 
DOWNLOAD XT720 OPTIMIZER SCRIPTS BELOW
Central Europe STR_U2_01.1E.0
Italy STR_U2_02.1E.0
Russia STR_U2_03.20.1
USA Cincinati Bell STR_U2_04.1E.1

Y to download any of the apove link.I have downloaded it but it has no .sbf file in it.plz help me i m a new bee & i dont understand it plz help mee!!!!!!
Atleast tell me how to start working with the first step. i m waiting for reply..........
 
There are 2 parts, (1) there are sbf files, and there are (2) corresponding optimizer scripts. The scripts are tested with compatible sbfs. So for best results, choose a pair. First get an sbf, flash the same (RSD), then get optimizer script for the same sbf and use it (run install.sh). If like me you have a ROM that is not either of the 4 sbf, likely that running the optimizer script will mess your phone. Well you can edit the script (as I have shown in previous page) but if you're a n00b then don't try it.

Better try a tested pair of sbf + script.
 
Hey guys I'm from India.Can I flash XT720 OPTIMIZER USA Cincinati Bell STR_U2_04.1E.1 on my milestone xt720.My milestone has got ASIA-Pacific ROM.Also what is stock speed of USA Cincinati Bell USA ROM??Is it 720 MHz???Mine is 550 MHz for ASIA-PACIFIC ROM.
Hi, Did you try flashing USA rom? Was anything broken if you did on India machine? Everything fine with radio?

Hey friend USA ROM is working perfectly, evrything is working Radio, internet connection, wifi. No problem with that.

My problem is I want to create linux swap, how much Mb should I allocate for it?? Is 64MB of space enough or more is needed, please help.
I use Paragon Hard Disk Manager. Also how do you format memory card with FAT32 using 64KB cluster :wacko:
 
Last edited:
My problem is I want to create linux swap, how much Mb should I allocate for it?? Is 64MB of space enough or more is needed, please help.
Linux swap is probably a waste because the kernel won't ever use it.
 
Now i have downloaded firmware of cincinati bells & corresponding script.now wht to do with the script???? my phone is not accepting the file format of install.sh file tht is there in the script.wht to do next??
 
Hey is it safe to format SD card using ROM MANAGER??
My card reader is not working properly.... :(

EDIT : Done with MiniTool Partition Wizard Home Edition. Easiest way to format memory card, no card reader is needed, simply connect your device through USB and select Memory Card Access.
 
Last edited:
One more problem now RSD Lite is not detecting my device. What should I do??

Windows says,
Hardware was not installed because the wizard cannot find the necessary software.

EDIT : Successfully flashed. I forgot to install USB drivers maybe because of that RSD LITE didn't detect my device!
 
Last edited:
Everything properly done but failed for app2sd.

It shows something like this :

Installing app2sd, please wait...

unable to open `/system/lib/modules/ext2.ko'insmod: can't open '/system/lib/modu
les/ext2.ko'
Error loading ext2.ko, exiting script ...

I partitioned my sd card to 1GB ext2 partition. Should I re-partition it to 1GB ext3??
 
I reflashed to USA sbf but milestoneoverclock still shows default setting 550Mhz@56Vsel.
Is this problem with application or USA rom is on 550Mhz. I heard it is on 720Mhz.. o_O

EDIT
Stuck at M logo (Motorola logo) after doing everything successfully. It's been 1 hour since phone is on M logo.
Where did I go wrong. Everything was successful.
 
Last edited:
Back
Top