[MOD] [Update:5/5/2011] BootMenu - Recovery, 2nd Init , v0.5.1

Is this MOD helpful?

  • Yes

    Votes: 410 93.6%
  • No

    Votes: 28 6.4%

  • Total voters
    438
Search This thread

chaihg

Senior Member
Nov 15, 2010
496
53
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
 

peetr_

Senior Member
Oct 28, 2010
2,332
2,179
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! )
Sent from my Defy running adlxmod using Tapatalk

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?
 
Last edited:

adlx.xda

Inactive Recognized Developer
Feb 4, 2010
1,541
1,752
Madrid
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

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.

Sent from my Defy running adlxmod using Tapatalk
 
Last edited:

adlx.xda

Inactive Recognized Developer
Feb 4, 2010
1,541
1,752
Madrid
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 :)

@ksubedi Could you request intohim to post the bootmenu sources on GitHub? Would be interesting for the community.
 

Borowik13

Member
Dec 18, 2010
31
1
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
 

adlx.xda

Inactive Recognized Developer
Feb 4, 2010
1,541
1,752
Madrid
Has anyone been able to run su from abd?

Sent from my Defy running adlxmod using Tapatalk
 

Quarx

Inactive Recognized Developer
Jun 19, 2007
1,322
18,790
32
Omsk
www.quarx2k.ru
ADB run as root at startup after mount system.
This is ADB.zip for install from recovery.
Making only for defy :)

Code:
#!/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
 

Attachments

  • ADB.zip
    690 KB · Views: 187
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 43
    NOTICE: Sorry Guys, As i lost my defy, i will not be able to work for defy anymore :( So i will not be able to maintain this thread as well. Racca is maintaining another thread with updates for this bootmenu here which can now be called the official thread.

    Hello XDA,

    [Notice: You might have checked my signature and already figured out that i lost my Motorola Defy :( So i will be no longer able to develop anything for defy. I will not be able to edit the boot menu and optimize it, but i will still post all the updates i get from Korean Developers. I am sorry to say that i will not be able to work on porting MiUi to Defy anymore. I hope some other developer will handle the work and port MiUi to Defy. Just reply to this thread if you have anything. Thank You]

    This is a pre-boot menu that loads just before the android system starts, which allows you to enter recovery, start adb daemon, run 2nd init script, run 2nd boot and few more. I recently changed the format of this post so that i can easily add updates, and i hope you guys don't mind it, and if you want to check the old post, here is the link. I have also added an unofficial changelog. This MOD was developed by Korean Developers at http://cafe.naver.com/androiders, so big thanks goes to them.

    Status: Beta
    Latest Version: v0.5.1

    Last Update: 4/16/2011

    Usage:

    • Load second init.rc file which enables you to do a lot of things that were not possible before.
    • Load custom recovery before booting os, which makes it possible to restore your nandroid backup or flash a new rom even if your system is not booting.
    • Run ADB Daemon to debug system boot using logcat or similar tools, very useful for developers.
    • Change the default boot to 2nd init, so you can load the 2nd init on default boot.
    • And much more....
    Download:

    • Version 0.5.1 (Latest)
    • Version 0.5.0
    • Version 0.4.5
    • Version 0.3.1
    • Version 0.2.0
    XDA-Developer Forum Members, Download Latest Attached File, Non-Members, Click Here.

    Upgrading:


    • Simply follow the installation instructions, it will overwrite the old version and install the new one.

    Installation:

    • Download the latest zip file.
    • Create a folder “bootmenu” on your sd card and extract all the files inside the zip file there.
    • Turn on usb debugging on your phone. And use the following commands in adb:
      C:/> adb shell
      $ su
      # cp -R /sdcard/bootmenu /data/bootmenu
      # cd /data/bootmenu
      # chmod 755 *
      # ./install.sh
      # rm -R /data/bootmenu
    • The bootmenu will be installed.
    • Turn off USB Debugging.
    • Restart your device once.
    • Check the Using "Pre Boot Menu" section for instructions on how to use.
    Using Pre Boot Menu:

    • Turn your phone off.
    • Press the Power Button.
    • After 1-10 seconds, the blue led on your phone will light up for just 1.5 seconds (Still while the Motorola logo is being displayed).
    • Exactly when the led lights up, press the volume down button.
    • You will see the BootMenu, use the Volume Button to navigate up and down, and the power button to select an item.
    Changelog:

    Version 0.5.1

    • Bug Fixes
    • Minor Internal Script Changes
    Version 0.5.0

    • Bug Fixes
    • Few Changes In UI (Background)
    • Updated All Scripts, Better Compatibility With Most ROMS
    • Changed Directory Structure
    Version 0.4.5

    • Bug Fixes
    • Changed Name Of OpenRecovery To Custom Recovery
    • ADB Daemon Works Now
    • Few Minor Changes...
    Version 0.3.1

    • Replaced Tenfar's Recovery With OpenRecovery
    • Added 2nd Init Script
    • Bug Fixes
    • Minor UI Enhancements
    Version 0.2.0

    • Initial Release
    • Added BootMenu
    • Added Tenfar's Recovery
    What Works:

    • BootMeu
    • ADB Daemon
    • 2nd Init
    • Custom Recovery
    • Default Recovery
    • Setting 2nd Init As Default
    • Reboot
    • Normal Boot
    What Doesn't Work:

    • 2nd Boot (Can Be Done Via 2nd Init Though)
    Credits:

    • Korean Developer "ohnholic" and Other Korean Developers for creating this
    • Korean Forum User "intohim" for providing me this file and helping me translate Korean things to English.
    • Korean Forum User "고봉현" for mailing me about the updates as soon as they are released, and also for providing some files.
    • XDA Developer "tenfar" for his ClockWorkMod Port To Defy.
    • Developer "Koushik Dutta" for ClockWorkMod.
    • XDA User "pedrodh" for creating an easy installer.
    • And everyone i forgot to mention....
    Related Projects:

    P.S. I do not take any responsibilities for the damages caused by this tool. If you brick your device, the most i can do is *help* you recover your system. So use it on your own. Works on my phone.
    19
    I have successfully launched the CM7 on defy!
    BT, 3D, Sd-card working :)

    I will create git on Github soon
    8
    I'm starting create CM7 for defy... with 2nd-init :) 2nd-boot not necessarily
    About result i'm will write here
    4
    Wifi now works:)
    I have problem with RIL. - no errors, and does not work...
    When RIL will be ready I'll post the first test version.

    The sources will be uploaded on the GIT as some free time ..... too many university studies.
    My GIT - https://github.com/Quarx2k
    4
    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 ;).