yashsingh1/xdaforums huggingface dataset:
[Defy Android Development] peetr_:
I have not disabled USB debugging and I have M boot loop. Now reflashing to try again.

For everyone - do not forget to turn off usb debugging. Now it´s working and I am going to try it some more.

Edit: Finally the true, fully working recovery. With Tenfar´s recovery, this is the best developed thing for Defy, since Defy´s release

and it´s worth the donation. About only 5 minutes to recover bricked system.

I only hope some day adb will be working too, but this is great enough for now.
[Defy Android Development] m11kkaa:
How can I get root-access after starting adb via the bootmenu?

Currently, it's not working for me:
[Defy Android Development] hirano:
Does this mod mean that Cyanogen is coming to Defy???
[Defy Android Development] psicodelico:
Not yet. We need the 2nd-init working to do that.
[Defy Android Development] racca:
not possible unless someone can crack/get the lock

it's a great improvement but no where near custom kernels

afaik, this is another "bootstrap" executed on boot except it resumes normal boot after 2 seconds or so.

if we can get 2nd-init to work with it, we might finally be close to getting what milestone already have.
[Defy Android Development] adlx.xda:
Curious, just in case anyone has already tried and can give an answer: when installed, is outer persistent after you flash a sbf? Or is it overwritten by the sbf? Does anyone know? (i mean, afaik /pds isn't restored with sbf, mess with it and you get a brick! )
[Defy Android Development] demolition23:
Any news from the Koreans who develop this recovery?

Sent from my MOTO Defy :-)
[Defy Android Development] ksubedi:
Nope, i have just emailed "intohim" and asked him to come online, as he is the only one who can read korean, and the korean page doesnt work here for some reason. I will update as soon as i get a reply

Sorry to say, but nope, this is not hardcoded in to rom or is not replaced in place of original recovery as the bootloader is still locked. And installing a sbf update is like replacing everything on the phone with the contents from sbf. So it wont work if you reflash the sbf, unless it is included in the mod or rom you installed. Some developers have just contacted me and said that they are going to include this on their rom. So future defy roms are going to be more safe :)
[Defy Android Development] ephumuris:
Korean official 2.2 one fixed.
[Defy Android Development] Jygar:
Where you running this before?

I am trying it from 2.1 and its not working so thats bizarre.

I've previously used CWM however I thought resetting everything using the SBF wiped the whole system?

Did you have Defy Recovery already installed when you installed 2nd init last time?
[Defy Android Development] Jygar:
Well, I installed the standard defy recovery system (CWM) and it mounted the SD card fine.

Installed the 2nd init again clean and it still doesn't work for me.
[Defy Android Development] pedrodh:
Well, if I were you guys I would do a Wipe in the stock recovery, then format the SDcard again, and then see if it works. If that still would not solve, I would flash a new SBF file and wipe data and cache again.
[Defy Android Development] Jygar:
Think you need to look closer as we have both taken similar steps.

Done reinstalls from SBFs 5 times already this evening, switching between 2.51 retail and 2.51 t-mobile.

Wiped each time, formatted SD in Defy recovery to see if it is a format issue. Defy recovery detects it fine and back's up.

I've noticed some differences between Defy recovery CWM and 2nd Init CWM.

System is unmountable in 2nd Init, in Defy recovery its unmounted as default. I don't believe its the SD card after trying 3 now.

I don't know if this is right or wrong but the blue light is always on, have no frame of reference as this is my first try of 2nd init.

There is some issue with 0.51
[Defy Android Development] pedrodh:
After your post, I too guess most probably it's something wrong with 2.51, so why don't you flash something newer?
[Defy Android Development] Jygar:
That also means there is something wrong with the korean 2.2 official.
[Defy Android Development] Citynomad:
I always get the following error:

E:Can't mount /dev/block/mmcblk0p1 (or /dev/block/mmcblk0)

(No such file or directory)

Can't mount /sdcard

Android 2.51, rooted

No other recovery ever installed

Tried stock SD and my own SD. Both formatted several times in Windows and in Android.

Any ideas how to fix it?
[Defy Android Development] Jygar:
Looks like any 2.51 are not compatible! Spent most of the evening trying to work them and what you need to run is a Higgsy79 3.4.3_11 fixed setup.

I flashed Higgsy's fixed 3.4.3_11 and that is working fine, creating a backup now. It looks like this is a very perticular program and will only run with but a few SBF files.

In a few minutes Gingerbread will run.
[Defy Android Development] Jygar:
I've got a taste in my mouth and it taste like like GINGERBREAD.
[Defy Android Development] Citynomad:
Thanks for your help. Unfortunately, I'd like to have a Nandroid of my system first, before trying a fixed ROM, so I could get back to my system in case of problems or warranty.
[Defy Android Development] pedrodh:
actually it's more like the other way around, I've tested a lot of different 2.2 SBFs and they all worked ok, so I guess it's probably something specific to 2.51.

In that case, since we concluded that the problem is not related with installing SD Recovery, install that one, and I think with that one you'll be able to do a nandroid. After that, do like Jygar, just flash any recent SBF, and 2ndInit should work fine with that one ;)
[Defy Android Development] Citynomad:
I'm about to try this. Is there a way to uninstall this 2nd Init? To have everything "clean" again, before the flashing.
[Defy Android Development] pedrodh:
If you use the app, yes. If you simply use this script from adb no, because the some files get replaced without being backup first.
[Defy Android Development] sunoldman:
For anyone don't want lose downgrade.

Install

0. copy the zip files to sdcard

1. Install BootMenu first:http://xdaforums.com/show....php?t=1026853

2. Backup your data. BootMenu->Custom Recovery->backup and restore->Backup

3. Reboot->Stock Bootloader->flash the fixed sbf of 3.4.2-177-5 (Remove CG31,CG39)

http://xdaforums.com/show...3&postcount=18

4. Get into recovery again->wipe data/factory reset & wipe cache partition

5. install zip from sdcard ->choose the correct file

6. reboot and get into CM7

Restore

1.Flash the fixed sbf of your original stock sbf

(Method is written in http://xdaforums.com/showthread.php?t=966537)

2.BootMenu->Custom Recovery->WIPE->backup and restore->Restore->choose the correct file
[Defy Android Development] sunoldman:
I find a issue:

When start adb daemon in BootMenu, then select normal boot, the system won't start, the screen stays black. (Have to pull battery...)

But reboot is ok, the system can start normally.

Sorry, I find that I have chosen USB debugging first.
[Defy Android Development] rrhg:
All,

Anyone can explain the principe of this app. I don't understand how it works ? Actually, i'm on paysrom 5.1 sbf 3.4.3-11. Can i flash any rom with 2ndinit on this sbf or need to install sbf with the rom. And if i need to flash sbf's rom, how to do it without brick phone or just flash sbf boot only and the rom after.

My problem is all the rom is on another old sbf that 3.4.3-11.

Thks for help
[Defy Android Development] pedrodh:
You can install the 2ndInit from Pays ROM. Then you can enter the bootmenu, and with recovery flash other ROMs (wiping the existing one first), but of course I'm talking about .zip ROMs. Pays ROM it's not an SBF file, only Motorola ROMs are SBFs, and flashing them is more often to un-brick then to brick the phone, that is, if you soft-brick your phone somehow, then you can just flash a stock SBF from the stock bootloader to have your phone working again.
[Defy Android Development] rrhg:
Oh thks. If i understand, i don't need to flash sbf coming with another rom. Just enter in recovery and flash the rom. Oh amazing. Thks
[Defy Android Development] pedrodh:
Well, you don't need to flash another SBF, but remember it's not simply flash the new ROM. You have to wipe data and cache from custom recovery first, and if you will use cyanogenMod from quarx don't forget to set 2ndInit as the default boot on the BootMenu ;)
[Defy Android Development] rrhg:
Ok thks. Good news for trying many another roms ! ! ! :).
[Defy Android Development] ksubedi:
If you enable USB debugging, many stuff will work buggy, like clockworkmod recovery and normal boot. I couldnt figure out why it was doing so, but the Korean Devs are probably working on fixing it. Sorry about that.
[Defy Android Development] marhensa:
but last time i create nandroid from bootmenu.

with usb debugging on, there is no problem..
[Defy Android Development] labsin:
Did you lose it or is it dead? If second, how come? That we don't do the same.
[Defy Android Development] ksubedi:
I lost it on the mall. :(
[Defy Android Development] martin.flory:
THAT SUCKS! :(

This reminds me, are there any good apps to do the kill & track phone other than blur?

In retrospect i think it might be worth it.
[Defy Android Development] dedraks:
Hi people.

And if all of us make some donation? So he can buy another Defy.
[Defy Android Development] mauri121:
Maybe this is the 2nd init, saving me a lot of time changing roms =)
[Defy Android Development] Hudge:
I Would! Lets say 5 USD?
[Defy Android Development] Quarx:
What does the "error 0" in bootmenu?
[Defy Android Development] ksubedi:
can i please know where you got the error? i will try to help/contact korean devs :)
[Defy Android Development] madhuranand007:
I cannot able to mount USB through ClockWorkrecovery.
[Defy Android Development] ksubedi:
Yea, for some reasons that feature is not working properly, try it again after restart :)
[Defy Android Development] Zach21:
Has anyone tried flashing jboogie roms with this mod? Should I stay safe and use clockwork mod instead?
[Defy Android Development] dlamber7:
This uses same recovery, so you can flash jboogie roms if you like.
[Defy Android Development] polovinamozga:
Hi all.

I have questions about logwrapper.

Last time i think that logwrapper is system service and it start all time when system init.

Now i renamed lowrapper to logwrapper.bin

and logwrapper now its script

with

#!/system/bin/sh
/sbin/recovery

But when system started nothing happened.

Whats wrong?
[Defy Android Development] Epsylon3:
logwrapper is replaced by bootmenu, its how bootmenu is started....

please update first post... 0.8 is out

edit: hmm sorry wrong thread... itd Second Init 0.8
[Defy Android Development] diamond_4g64:
Hi! I am on this bootmenu configuration since a while and i am stuck... i finally got the setup of the drivers ready and i followed every step to get the sdk tools and java developpers installed on my computer.

The problem is that i enter in terminal on my computer adb devices to make shure my phone is well connected

Then i type;

Adb shell

su ( i get the dolar before su)

Then the # apears on the other line so everything seems ok but from now on it gives me file not found or bad command when i try to type;

cp-R/sdcard/bootmenu/data/bootmenu

.... is there something that is wrong. I am in usb debugging and the device is well connected if i type adb devices... must i have the phone on or off ( i tried on)

Please help
[Defy Android Development] hackergnome:
use 2ndinit 1.9 apk to install its easier... just install the apk...

howto is in the forum...

bdw there should be a space bw cp_-R_/sdcard/(replace _ with space
[Defy Android Development] diamond_4g64:
Yes i tried with spaces and without them but it did not work. I will check at home tonight and post exactly how i write it but while i am at work i will try 2nd init. Thanks alot for your advice since everything that i am able to do now is because of you guy!! Thanks again!!!
[Defy Android Development] diamond_4g64:
Thanks again for your advice i have used 2ndinit and it works great!! Now to find how to copy my rom and flash cyano7.1

I an supposed to instal clockworkmod recovery but after installing the clockworkmod app what ever i press i get; must instal cloworkmod recovery and i get a selection but when i choose defy it says that my model is not yet availlable??? How do you get past this? It asks if i have installed manually and if i say yes it asks what version between ;

Clockworkmod 2.x or clockworkmod 3.x
[Defy Android Development] xBlackDroid:
awesome, thanks fot this :)

working perfectly
[Defy Android Development] chaihg:
Great job. Now the only thing left will be to have something to enable putting sbf file on sd card and flash it directly without a pc :p
[Defy Android Development] peetr_:
The root folder is only for temporary storage, to give it right permissions to run the script, after that it goes into the system folder and probably somewhere else to run that on the boot. But nothing goes into pds folder.

And yes, I reflashed with sbf and everything worked fine again.

Edit:

bootmenu file in /sbin

rootsh in /

mount_ext3.sh in /system/bin

maybe something else?
[Defy Android Development] adlx.xda:
Usually I restore a sbf when my defy it's so screwed it won't enter the recovery, so no way I could flash a "sbf on sdcard (or some form derived from an sbf)" from there. So, although it is possible (not directly as sbf, but in a treated form yes), I don't see it very useful.
[Defy Android Development] adlx.xda:
@ksubedi Could you request intohim to post the bootmenu sources on GitHub? Would be interesting for the community.
[Defy Android Development] peetr_:
This one should be made sticky, it's a great improvement for development.
[Defy Android Development] Borowik13:
Have you noticed that it works if you connect your off phone to power up ? But not while starting stock recovery.

It is so good mod, I remember time when I have flashed phone 20 times in one day because I want to edit framework-res.apk. Now only backup. Thank people who did this :D
[Defy Android Development] ksubedi:
Yeap :) i will contact him
[Defy Android Development] kirpeace:
can i flash custom firmware using this?
[Defy Android Development] ksubedi:
Not SBF files, use RSD Lite for that, but you can use recovery included on this to flash .zip format ROM's and updates. :)
[Defy Android Development] psicodelico:
In this update is used openrecovery or clockwork?
[Defy Android Development] ksubedi:
its clockworkmod recovery, but its called openrecovery as its not officially supported by clockworkmod :)
[Defy Android Development] psicodelico:
I didnt know that :).

P.S. ADB is working.
[Defy Android Development] kirpeace:
if i flash other sbf will it remove this custom recovery?
[Defy Android Development] psicodelico:
Yeah! If you flash other sbf you need to re-install this tool.
[Defy Android Development] zyxwvut:
working great over here!

I like this alot!!
[Defy Android Development] Quarx:
We are waiting for 2nd-boot! And it makes it possible to create AOSP and CM7! ;)
[Defy Android Development] adlx.xda:
Has anyone been able to run su from abd?
[Defy Android Development] Quarx:
ADB run as root at startup after mount system.

This is ADB.zip for install from recovery.

Making only for defy :)

#!/system/bin/sh
/system/bin/busybox killall usbd
/system/bin/busybox mount -o rw,remount /
rm /sbin/adbd
cp /system/bin/adbd /sbin/adbd
/system/bin/busybox mount -o ro,remount /
/system/bin/busybox killall usbd
setprop persist.service.adb.enable 1
echo "msc_adb" > /dev/usb_device_mode
[Defy Android Development] racca:
yeah we are all waiting for that, in the mean time, it's possible to get CM7/ASOP with just 2nd-init.
[Defy Android Development] Jokerchris2000:
But now that 2nd-init is here how long will it take to create CM7 for the Defy?

Is the 2nd-init now a way to load unsigned kernerl modules after the original kernel?
[Defy Android Development] drsouly:
as far as i know it's not ... but is should save the rom devs a hell lot of time
[Defy Android Development] Quarx:
I'm starting create CM7 for defy... with 2nd-init :) 2nd-boot not necessarily

About result i'm will write here
[Defy Android Development] Sqoerk:
It's done, when it's done...

The 2nd init is to load a complete different kernel after the original kernel. The "new" kernel is used from the system then :)
[Defy Android Development] drsouly:
would be nice if you keep us updated ... do u have a twitter channel or something like that?
[Defy Android Development] Jokerchris2000:
Thats great news...

But i always thought that creating a custom kernel for a device without the sources is a very difficult process. Or can we use some things from the milestone where they got CM already!?
[Defy Android Development] johnw.xda:
can this flash the kernel? /init.rc?

thank you.
[Defy Android Development] Sqoerk:
No custom kernel can be flashed, only Motorola signed.
[Defy Android Development] ksubedi:
Glad to see some developement already going on here. Keep us updated, maybe a new thread about cm developement? Good luck :) I finally think that we are quite near motorola milestone in terms of developement.
[Defy Android Development] kashavsehra:
Excellent news!!!!! Keep up the good work...
[Defy Android Development] AkkiandDefy:
Quarkx thank you ! If it works I will donate money to you...
[Defy Android Development] demolition23:
but if ADB works before boot, we can change every parametr.

Does moto bootloader check the kernel at booting?
[Defy Android Development] pedrodh:
I've been following this topic and been playing around with this, I also have been playing with the recovery bootstrap coding in the last few days (thanks Tenfar by the way, for the help he gave me on that) so all that knowledge came in handy and now I'm sharing back with the community. I've put together a small app that installs this 2ndInit menu automatically, no need to push stuff to sdcard, or run scripts, etc, because the app does all that automatically. I've tested this on 3 Defy phones, works ok.

Just install the apk, open the app called "Defy 2ndInit", press the button to install, and then reboot 2 times as indicated on the first post instructions, and all is installed and well. This is based on ksubedi work, and actually uses the tar.gz file from him (I hope you don't mind, if you do please tell), so great credit goes to him and others who helped on that.

You guys can test, and let me know how it went with you. I'll update the app with newer versions of this MOD when they exist ;).
[Defy Android Development] marhensa:
nice mate :)

you make it easier to do..

is there option to uninstall the ksubedi 2nd init from your APK?
[Defy Android Development] pedrodh:
No, not yet. But I can add it as well of course ;)

Anyway, if something goes really wrong you can always use RSD Lite to restore the phone, since this doesn't mess with things that could really brick the phone.
[Defy Android Development] kirpeace:
then pls add it it will be much easier then flashing sbf
[Defy Android Development] dskrilz:
So with this done in what ways are we still limited by the locked bootloader? Will we be able to have the same level of customization as an unlocked bootloader, assuming someone puts the dev time?
[Defy Android Development] pedrodh:
I'm coding the uninstall functionality now, but before that I want to report a problem to ksubedi.

If users only use the "bootmenu_ksubedi_0.3.1.zip" file, that install never creates the file "system/bootmenu/mount_ext3.sh.bak", so the uninstall on that zip file will not work, and also that installer does not backup the file in question, which is a bug.
[Defy Android Development] ksubedi:
Yes, sorry about that, this time there is no uninstall script, i will write one and update the script tonight. The uninstall script on the given zip is to remove the older version of the bootmenu so that users get a fresh install of the new one. :)

Edit: And thanks for your work, i was going to make an apk myself, but due to my busy schedule nowdays, i couldnt do it. Please put it on market after you have done. If you dont have a market account, contact me, i can put it there for you. :)
[Defy Android Development] psicodelico:
When you have done, put the file on market. Will be better to update :)
[Defy Android Development] Antszej:
Soo is there any chance to port cm7 on current kernel from motorola? Or is it too difficult? (I can try but... if its not even possible...)
[Defy Android Development] psicodelico:
Yes, is possible and maybe will take a long time.

The guy called Quarx started the process:

http://xdaforums.com/showpost.php?p=12807724&postcount=42
[Defy Android Development] Jokerchris2000:
Ha Quarx.

All the time i thought from where i now your Name and your profile picture. And now i remember that i've used your ROM's for the LG GT540 before :-D

So seems like we both switched to a proper device ;-)

Greetz and good luck for CM7
[Defy Android Development] pedrodh:
So, here's the second version. Allows uninstall for those who want that option, and I coded some safe checkings before flashing.

I've also placed the app on the Android Market as suggested, with the name "Defy 2ndInit".

I'm thinking, maybe I should open a thread for this tool, and stop the offtopic with the apps posts :P.
[Defy Android Development] add.thebad:
so does this work by loading a custom init.rc ontop of the stock one allowing us to work around things

and does this mean a custom kernel can be loaded
[Defy Android Development] javi422:
okay so for space reasons I won't quote all the first past but I cannot overall says root is read only permissions what could I do in this.case? Thanks in advance
[Defy Android Development] psicodelico:
mount with read and write permissions

/system/bin/mount -o remount,rw rootfs /
[Defy Android Development] marhensa:
downloading from market :D

thanks mate...
[Defy Android Development] javi422:
thanks ^_^
[Defy Android Development] unrafa:
Works well ; installed from market; thanks!

So 100 people say yes, 3 people said No to the question asqued.. i wonder if they know something the rest of us don't
[Defy Android Development] psicodelico:
I was thinking the same.
[Defy Android Development] sunoldman:
About the uninstall.sh

If you want to restore the original mount_ext3.sh, the code should be

/busybox cp /system/bootmenu/mount_ext3.sh.bak /system/bin/mount_ext3.sh

is it?

sorry for asking this silly question,

the code

/busybox cp /system/bootmenu/mount_ext3.sh.bak /system/bin/

automaticly change the filename.
[Defy Android Development] kirpeace:
i get error package file not signed
[Defy Android Development] demolition23:
Can anyone answer if we can load custom kernel?

Or bootloader checks the kernel at boot if is signed?

Sent from my MOTO Defy :-)
[Defy Android Development] Quarx:
I have successfully launched the CM7 on defy!

BT, 3D, Sd-card working :)

I will create git on Github soon
[Defy Android Development] demolition23:
Greatest news ever in defy section!!!!!!

Well done!!!!!

Sent from my MOTO Defy :-)
[Defy Android Development] Filipitripi:
oh my god

I think is better open one specific post to CM7 :D

You need some one tester ¿¿

Or you can upload the files to test it :P
[Defy Android Development] marhensa:
AMAZING NEWS!!

CM7 based from gingerbread 2.3.3

and 11 april, CM7 was final!!

can't wait for your thread and tutorial :D
[Defy Android Development] pomah:
How does this method affect the speed of ROM? Any downsides?
[Defy Android Development] Simplestas:
No downsides, except boot is delayed by < 5 sec.

Quarx, keep rocking!
[Defy Android Development] mussio:
hi everyone just got my defy today running 2.1 can i just install this recovery or do i have to follow this guide? http://xdaforums.com/showthread.php?t=897445
[Defy Android Development] drsouly:
wtfff... thanks alot man. you should create a cm related thread
[Defy Android Development] je198ß:
Is there anything, that doesn't work (Wifi,3g, Cam...) ?