yashsingh1/xdaforums huggingface dataset:
[Milestone 2 Android Development] r2beta0:
Yeps, bootmenu still works. That made me believe that init can go at least till mounting /data (bootmenu hijack). Something very strange happens afterwards, not even stock boot works. My update.zip is just the CG39 from ch leak, nothing special really. Just added root and bootmenu. I have a lot of experience with 2nd-init, hijacks and so. I'm 100% everything is right, but still system doesn't boot. That's why I'm thinking it has something to do with formatting/massively changing /system.
[Milestone 2 Android Development] stargo:
If you boot via 2nd-init the blue led should not light up a second time. So this is an indication that the old or the new init process terminated (probably with a segmentation fault) and the kernel then rebooted the system because init must never die.

Can you please send me your /init binary and the output when manually running /system/bootmenu/script/2nd-init.sh from the adb shell in bootmenu? In my case the latter one loooks like:

$ adb shell
~ # /system/bootmenu/script/2nd-init.sh
umount: can't umount /dev/pts: Device or resource busy
/init PC is on: 0x00008EDC.
image_base: 0x00008000.
image_size: 0x00016000.
execve located on: 0x000081A0.
Address for the injection: 0x000081B0.
Setting /init PC to: 0x000081B0.
Detaching...

I then get a broken boot animation and the system tries to come up, but bootmenu is still running so the display is sort of broken.

If you get a different execve_address than 0x000081A0 something is going wrong...
[Milestone 2 Android Development] dangpzanco:
Try the dd if=CG39.smg of=system way of flashing, then root, bootmenu and flash fixed sbf.

Sent from my Milestone 2 XDA App
[Milestone 2 Android Development] r2beta0:
Sorry guys, seems like I was completely wrong about format protection (thanks god!) :)

The source of the problem was wrong permissions/ownerships of some files in /system/bin and /system/usr/bin folders. As I used Dsixa Kitchen to convert CG39.smg into initial update.zip I assumed that permissions and symlinks were correct, but in fact it wasn't. I carefully examined each permission for files in these 2 folders with the ones on Mostly Blurless ROM and found some mismatches. Correcting these made the system finally bootable. :) Thx for the help.

For those curious about comparing process:

1. I first copies entire Mosltly Blurless into /data (cp -a /system /data/blurless/)

2. Applied my update.zip

3. booted and started adbd

4. created script in /data/myls.sh

#!/system/bin/sh
AA=`find .`
for a in $AA; do
ls -lad $a|awk '{ print $9 " " $1 " " $3 " " $4}'
done

5. cd /system && /data/myls.sh|sort > /data/s1.txt

6. cd /data/blurless/system && /data/myls.sh|sort > /data/s2.txt

7. diff s1.txt s2.txt
[Milestone 2 Android Development] r2beta0:
I know, but I want to create an all-in-one update.zip for official GB rooted. I will also include flashing of boot.img, recovery.img, logo.img and devtree.img. :)
[Milestone 2 Android Development] sahilarora911:
Though I don't understand any of that, I feel you have made good progress.

Nice going!!!!
[Milestone 2 Android Development] will5:
Great guys, no more mysterious protections for god´s sake! :D
[Milestone 2 Android Development] dangpzanco:
@r2beta0 Ok, so would you post the permission updater-script we have to use, or just when you release the update.zip?

Because, maybe we can use it on froyo roms...

BTW, nice job!

Sent from my Milestone 2 XDA App
[Milestone 2 Android Development] r2beta0:
I will, but for now I did everything manually :)

I'm going to write the updater script and release the update.zip afterwards. It'll be just GB Leaked ROM + root + Bootmenu (same version as MIUI). I will also delete junk but not blur. I'm thinking of including the minimum gapps service so you could download the rest from market.
[Milestone 2 Android Development] Neuralsystem:
Im using the cooked Cm7 rom and it´s amazing! Fast and lot of free memory available. Thank you guys!

I´m needing some help:

I can´t get GPS working... I´ve applied the patch but no gps fix. Tried to install gps status, sunny day in open space, 10 minutes waiting, no sucess.

Can´t find voice call record, dunno, is this available in this rom?

Thank you! :)
[Milestone 2 Android Development] Endless7:
As I remenber, call recording is only available in GB/CH 2.2. And GPS works here though

slow (wait for 5MIN to find satallite)
[Milestone 2 Android Development] r2beta0:
Yeps, I'm having this issue with MIUI too. GPS is much worse than it were on stock ROM. It takes forever to get a FIX. I tried changing some configurations with no success. There is a gps.conf somewhere into /system and it is set to Standalone mode. I changed that to Network based/network assisted. I also changed gps europe sites to America sites but it doesn't seem to help.
[Milestone 2 Android Development] will5:
Weird, Im using miui, and got GPS fix in a minute or less (with 3G data off)
[Milestone 2 Android Development] r2beta0:
Where do you live?

(maybe my gps info sites are completely wrong and network assisted is not helping)
[Milestone 2 Android Development] will5:
Now Im in latam near you :D

Id seen some gps fixes while using milo 1, so fixes may be necessary.

But in my case works better than on froyo.
[Milestone 2 Android Development] skaburn:
somebody help me! when i go to flash whit rsd lite the file firmware.sbf the program fail and write failed flashing process. (0x7100); phone connected

edit: i tried to change directory of the file and the new error code is (0X700F)

i really need help...
[Milestone 2 Android Development] r2beta0:
http://androidforums.com/droid-all-...-failed-flashing-process-0x7100-rsd-lite.html
[Milestone 2 Android Development] skaburn:
thank you, but i'm scared to have made a disaster.

I tried to reflash 2.2 uk sbf and it worked, but now it won't to turn on!

EDIT: it seems a bootloop

how can i do?

edit 2:ok i'm wiping data and cache, maybe it work

edit 3: solved...

sorry for the noise... and thank you i will try again
[Milestone 2 Android Development] philhgw:
is it possible to download the new nandroid of Wajk (1.8.19) from here http://xdaforums.com/showthread.php?t=1161110 and "flash" it over the old one (1.8.12).

any experiences with that method?
[Milestone 2 Android Development] r2beta0:
Doing that will undo all fixes we have applied for Milestone2.
[Milestone 2 Android Development] sahilarora911:
Yes, it works (though I don't remember if I did it over 1.8.12) . I'm using 1.8.19. But as r2beta0 said, u'll have to apply all fixes manually. Plus u'll have to use fixed sbf etc.

Basically you'll have to follow all steps in original post.
[Milestone 2 Android Development] will5:
I guess today a new version of miui will be out, will be good to know how to fix it like the one on miui thread.
[Milestone 2 Android Development] Endless7:
I download the RC1. But the latest should be OK also.
[Milestone 2 Android Development] will5:
nightly builds frequently comes with unexpected bugs.

Once we have half rom working, we should try to fix on only one version.

Also nightly is on 2.3.5 code?

Usually cm7 comes without gapps, dont know if defy case its the same, but in that case, remember to flash gapps 2.3.4 or 2.3.5.
[Milestone 2 Android Development] Endless7:
Damn. USB mass storage not working with DEFY bootmenu!
[Milestone 2 Android Development] Endless7:
find a card reader.
[Milestone 2 Android Development] will5:
thats weird, are you sure is not a host (computer) problem?

My computer went crazy with all the m722 / a953 changes.
[Milestone 2 Android Development] szmartin:
can use droid2 rom? or get some driver from it?
[Milestone 2 Android Development] will5:
I guess. Not the one related to baseband, but the ones related to leds/lights/usb/BT/ maybe yes. But droid2global is a better option.

If defy MIUI flash the system the same way defy cm7 do and it´s based on 2.2.2, maybe we can boot MIUI too. But thats for another thread
[Milestone 2 Android Development] momus87:
These are startling news !

So, for some reason, this ch fixed sbf wipes the weird protection everybody has been facing on /system/bin.

If only we knew why...
[Milestone 2 Android Development] jambo89liam:
How do i get CWM3.0+, I only have the droid 2 bootstrap recovery?
[Milestone 2 Android Development] Endless7:
screenshots delivered
[Milestone 2 Android Development] will5:
Thanks. Are on chinese for some reason?

Now we need to replace some files inside cm7 zip with m2 files and we'll have a pretty much usable ROM :D

Defy has internal and external storage? That could be causing sd problems. There are some patches to use internal storage like sd. This patchs could be causing problems.
[Milestone 2 Android Development] Endless7:
http://xdaforums.com/showthread.php?t=1196590
[Milestone 2 Android Development] jambo89liam:
Cheers just noticed that after i tried to flash with droid 2 bootsrap recovery. (which didnt work)
[Milestone 2 Android Development] dangpzanco:
Hey, nice work! That was exactly what I was gonna do. I can tell you some fixes to apply to the update.zip:

-Delete /system/etc/motorola/bp_nvm_default/pds_init and overwrite the files with your own files.

-Modify build.prop to show umts_milestone2 and A953 instead of umts_jordan (compare with the leak's build.prop).

-Put Milestone 2's files inside /system/lib/hw/ and /system/usr/keychar/

-Modify the init.rc inside /system/bootmenu/2nd-init/ to have the prep_keypad.sh (or somethiing like that) commands pointed to the files inside /usr/keychar/ (you'll need to dig a little bit inside the batch files).

Well, when I get some time I will do all of that, but you can try these.

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] Endless7:
wait for your patch :D
[Milestone 2 Android Development] dangpzanco:
Heh, maybe tonight (here is 3:27AM) I 'll add that and nano/bash/ssh.

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] will5:
With that fixes It will be easier to test :)

Files should be taken from 2.2.2uk/chinese m2? 2.3.4 leak?

Here are the d2g nightly builds in case anyone want to take a look http://revnumbers.info/d2g.html
[Milestone 2 Android Development] Endless7:
For media decoding issue, dont use the 4.5.3-77 files to fix. 77 GB have problem in play rmvb file. 63 is OK. please noticed this.
[Milestone 2 Android Development] Endless7:
I change devices to milestone2 and reboot. then stuck on 2nd M
[Milestone 2 Android Development] dangpzanco:
Thanks, but I think RMVB is only hardware avaiable on ME722.

Anyway I'll add that too.

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] will5:
Did you try cleaning cache?

It cant get stuck changing one line :(
[Milestone 2 Android Development] dangpzanco:
What exactly did you change? Because you have to change (almost) all from that list for it to work.

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] Endless7:
No, it can be enable on A953 also.
[Milestone 2 Android Development] Endless7:
ro.product.device=umts_milestone2

ro.product.board=umts_milestone2

and I copy all files under HW to the right location. reboot and stuck.
[Milestone 2 Android Development] will5:
Maybe other files are looking for jordan string inside build.prop?
[Milestone 2 Android Development] Endless7:
This CM7 is base on defy. so I think is best not to change these in build.prop but the files we need to replace.
[Milestone 2 Android Development] will5:
I think so, anyway is not that important at this moment.

Later we could create a m2 vendor ID for cm7.
[Milestone 2 Android Development] dangpzanco:
# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=4.5.3-77
ro.build.display.id=4.5.3-77
ro.build.version.incremental=110728
ro.build.version.sdk=10
ro.build.version.codename=REL
ro.build.version.release=2.3.4
ro.build.date=Thu Jul 28 10:28:09 CST 2011
ro.build.date.utc=1311820089
ro.build.type=user
ro.build.user=a17140
ro.build.host=zch68lnxdroid59
ro.build.tags=release-keys
ro.product.model=ME722
ro.product.brand=MOTO
ro.product.name=milestone2_china
ro.product.device=umts_milestone2
ro.product.board=umts_milestone2
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=motorola
ro.product.locale.language=zh
ro.product.locale.region=CN
# ro.build.product is obsolete; use ro.product.device
ro.build.product=milestone2_china
# Do not try to parse ro.build.description or .fingerprint
ro.build.description=umts_milestone2_china-user 2.3.4 4.5.3-77 110728 release-keys
ro.build.fingerprint=MOTO/milestone2_china/umts_milestone2:2.3.4/4.5.3-77/110728:user/release-keys
ro.default_usb_mode=0

Try this on the build.prop.

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] dangpzanco:
We have to change more files inside /system/lib

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] Endless7:
do you face the USB problem ? Its painful everytime I want to copy something to SD, I have to take out my SD and use cardreader.

Edit: replace files in /keychars fail, keyboard still buggy.
[Milestone 2 Android Development] Endless7:
I think we may need to use files on CH 2.10.0. Because when I use the GB /HW to replace, it stuck on 2nd M.

CH2.10.0 download

http://u.115.com/file/dl0fy8os

http://dl.dbank.com/c0e6i0bobv

find "下载" button then press.
[Milestone 2 Android Development] dangpzanco:
that's why you have to change every thing together... to enable the keyboard you need to enable it with 2nd-init...
[Milestone 2 Android Development] dangpzanco:
If I'm already on GB, do I need to flash froyo before starting?
[Milestone 2 Android Development] jambo89liam:
I'm curious about this also, I tried from froyo, installed cm7 from cwm and flashed sbf but got black screen after M logo.
[Milestone 2 Android Development] Endless7:
Just make sure you can enter CWM3.0+, so you can flash the CM7. The flash fixedsbf.
[Milestone 2 Android Development] Endless7:
do you use the CWM 3.0+ to flash CM7 ? Droid2bootstrap is not compatible with CM7.
[Milestone 2 Android Development] dangpzanco:
Okay :D

*The following errors occurred with your submission:

The message you have entered is too short. Please lengthen your message to at least 10 characters.*
[Milestone 2 Android Development] jambo89liam:
Yes i followed this

http://xdaforums.com/showthread.php?t=1196590 to get new bootloader

In that bootloader menu I selected choose Custom Recovery to boot to cwm 3.0...

and flashed from there
[Milestone 2 Android Development] Endless7:
you sure you flash the fixedsbf I upload in this thread?
[Milestone 2 Android Development] Endless7:
Nice, gravity sensor fixed!
[Milestone 2 Android Development] jambo89liam:
Yes, i am about to try again with gingerbread installed.

For some reason i have lost gsm in any rom i flash :s

I have retried, but now it loops at red M logo. Flashing of the sbf only took around 10 seconds before rebooting the phone is this normal?
[Milestone 2 Android Development] dangpzanco:
To fix sdcard problems (using dsixda's kitchen):

Copying sdcard mount info (system/etc/vold.fstab) ...

`MY_DEVICE_WORKING/system/etc/vold.fstab' -> `MY_KERNEL/system/etc/vold.fstab'
[Milestone 2 Android Development] Endless7:
USB problem have been solved by change connection mode:D

unsolved issues are updated in #1
[Milestone 2 Android Development] will5:
If anyone could upload the .zip with some fixes, I´ll report :)
[Milestone 2 Android Development] dangpzanco:
I've made an update.zip with some UNTESTED fixes, that MAY NOT WORK.

So if anyone is willing to test it, make a backup and flash this Rom:

[Link removed] It didn't work...

I used dsixda's Kitchen to build it and modified many things, so something may be broken. I can't flash it now, I need my phone tomorrow...
[Milestone 2 Android Development] Endless7:
bootloop at 2nd M.

You may mess the bootmenu and 2ndinit for cm7...now I cant enter custom recovery.
[Milestone 2 Android Development] dangpzanco:
Hm... strange, I only (not only that changed) added /system/bootmenu/2nd-init/init_prep_keypad.sh and added it to exec on init_mapphone_umts.rc. So, my guess is we need to build from source with M2 customizations. See ya, thanks for testing.

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] Endless7:
nandroid backup uploaded.
[Milestone 2 Android Development] momus87:
We should consider starting to work on our own Cm7 port.

Another option would be to try with Milestone1 Cm7 nandroid.

Both devices are very close too...

For the "from source" option, how do we create a build id for the lunch command?
[Milestone 2 Android Development] dangpzanco:
Just create a /vendor/motorola/milestone2 and /device/motorola/milestone2 with the source inside and execute . buildenv-setup.sh (or something like that)

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] dangpzanco:
Try using the RC1v2 as a base to the port, nightlies have crazy bugs sometimes.

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] Atomos33:
I was wondering the patch Walter uses in his build can work here right? After all both rom are Gingerbread Based. And if i'm not mistaken Blur is unlike Sense an indepth interface?

I've tried to flash it but CWM 3.0+ won't flash it it says it isn't supported anymore. So i tried to Bootstrap Recovery but it doesn't work.
[Milestone 2 Android Development] Endless7:
Miui uploaded.
[Milestone 2 Android Development] inheme:
Is it stable? Is the camera working properly?
[Milestone 2 Android Development] jambo89liam:
Have u tried custom recovery in bootmenu_v0.8.6.update_forA953.zip

http://xdaforums.com/showthread.php?t=1196590
[Milestone 2 Android Development] Endless7:
camera is OK
[Milestone 2 Android Development] AragornPE:
Waiting for final version... I'm glad I didn't sell my M2, now we can use some nice ROMs
[Milestone 2 Android Development] n3ptun3:
Well... considering that Google just bought Motorola's mobile division, I'm glad I didn't sell mine either lol
[Milestone 2 Android Development] will5:
cm7 nandroid backup is missing lot of files or it's just me?

There is no boot.img, cache.img, data.img....
[Milestone 2 Android Development] cypressious:
Does the nandroid backup fix the issues with camera and gyro sensor?
[Milestone 2 Android Development] Endless7:
Yes, both fix.
[Milestone 2 Android Development] jambo89liam:
Do we have to flash cm7 before restoring, or can we skip this by only restoring?
[Milestone 2 Android Development] psperm:
Regarding Miui 1.8.12 DEFY port

hey Endless7

can you answer my queries?

1)According to what you'd posted, i have to use BootMenu_v0.8.6.update_forA953 in order to boot into cwm 3.xx right?

2)After that flash the miui nandroid then firmware.zip file attached?

3)Am i able to flash directly from MS2GingerBeta5, instead of froyo stock 2.2.2?
[Milestone 2 Android Development] Endless7:
restore backup and then flash fixed sbf
[Milestone 2 Android Development] jambo89liam:
Does it matter what rom or firmware you are on at the moment, before flashing.
[Milestone 2 Android Development] Endless7:
2.flash the miui nandroid

3.extract firmware.zip to get fixed sbf, then use RSD to flash to your phone

4.reboot
[Milestone 2 Android Development] cypressious:
Do I have to flash fixed sbf when I'm restoring the backup over existing CM? And will my apps be gone?

The other thing is, how are we going to fix the backlight thing?
[Milestone 2 Android Development] Endless7:
not matter.
[Milestone 2 Android Development] dangpzanco:
Fix for backlight is getting M2's /lib/hw, renaming acording to jordan and overwrite CM7 files. NOT TESTED.

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] dangpzanco:
Keyboard issues is related to /usr/keylayout and keypad

Media is kernel related or /lib/dsp related

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] Endless7:
I replace gralloc.default.so and gralloc.omap3.so with files from 77 leak. And I stuck on 2nd M.

Next time try the CH 2.10.0
[Milestone 2 Android Development] dangpzanco:
No, just replace files with jordan in the name. But keep the jordan name.

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] Endless7:
Back light still not work.

Edit: someone in GFAN has fixed the keyboard mapping issue. So the biggest problem left for CM7/MIUI is media decoding.
[Milestone 2 Android Development] dangpzanco:
Hm... sorry for your reflashes =P

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] Endless7:
Just make a nandroid restore :D BTW, any method to fix decoding?
[Milestone 2 Android Development] r2beta0:
Endless7, just take a look into my comment for bootmenu on general forum. Now I am able to restore data on nandroid backups with CWR 3.
[Milestone 2 Android Development] dangpzanco:
I think only of building from source, but if you find any mp3/lame related files on the /lib/dsp/ or /lib you can try to exchange them.

Another thing I forgot: Add a script to dump logcat to /sdcard/logcat.txt on boot (google it or, maybe r2beta0's 2nd-init has it) in /etc/init.d/00logcat

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] r2beta0:
2nd-init has a logcat script on /log_init.sh. It is called from custom init.rc. It is usefull if you cant get system to boot. If your system is booting that should be easier to put the script into /etc/init.d
[Milestone 2 Android Development] walter79:
Did anyone have problems with LED Flashlight. Defy running with chinese devtree killed LED.
[Milestone 2 Android Development] cypressious:
Just flashed the backup over existing CM7 RC1 and wiped cache before. I thought, it couldn't hurt. Didn't need to flash fixed sbf again. Looks very good. Softkeys backlight works. Rotations also works. Good job guys!

USB bug is very annoying, though. I only can get wifi adb to work. Neither usb debug nor sd mount does work.
[Milestone 2 Android Development] Endless7:
Update fix for keyboard !
[Milestone 2 Android Development] dangpzanco:
No, I have led working here on GB 2.3.4 build 77 leak

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] dangpzanco:
Nice! Is USB Debug and SD Card Mount working?

If not you need /etc/fold.vstab (or similar name).

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] jambo89liam:
If we restore does it need to be through cwm 3.0+?
[Milestone 2 Android Development] Endless7:
Usb debugging works fine. And SD card mounting is a little buggy. We may first to change connection type to None, and then to USB mass storage. Only by doing this, the SD card can be mounted on PC...

However, Im using miui and SD/USB here both work well.
[Milestone 2 Android Development] jambo89liam:
Finally got it booting, after flashing through cwm 4.0 (under Stable recovery) that comes with the defy boot menu
[Milestone 2 Android Development] r2beta0:
Endless7, Does CM7 and MIUI work using boot and devtree from CH GB? Or just with 2.2 CH SBF?
[Milestone 2 Android Development] Endless7:
All kernel I have tested include 2.2.2-UK/DE/argentina/CH and 2.3.4-77 GB. And only 2.2.2-CH works with CM7.
[Milestone 2 Android Development] walter79:
Did you test CH devtree with UK/de ... kernel?
[Milestone 2 Android Development] Endless7:
No.................:o
[Milestone 2 Android Development] r2beta0:
What about MIUI?
[Milestone 2 Android Development] dangpzanco:
Well, let's try then :)

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] Endless7:
MIUI are the same with CM7. I think miui is based on CM7 with some UI adjust and optimization.
[Milestone 2 Android Development] Endless7:
kernel + devtree

1. argentina+ CH = 2nd M

2. UK+CH = 2nd M

3. DE+CH = 2nd M

In all cases, i can enter bootmenu...
[Milestone 2 Android Development] dangpzanco:
Can't we just replace Defy's CM7 update.zip boot.img and devtree.img with CH 2.2.2's? Instead of flashing the fixed-sbf.

Of course we need to add the fixes in the update.zip

@Milestone 2 (Finnaly on Gingerbread!)
[Milestone 2 Android Development] jambo89liam:
android.process.media keeps FCing on me when i open market.

Fixed by freezing - [Playlists] Media Storage - in titanium
[Milestone 2 Android Development] Endless7:
I think its possible.