Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
whirleyes
Old
(Last edited by whirleyes; 21st January 2013 at 07:58 AM.) Reason: closing thread for archiving purpose
#1  
whirleyes's Avatar
Recognized Developer - OP
Thanks Meter 1787
Posts: 832
Join Date: Aug 2007

 
DONATE TO ME
Phone [RECOVERY][ICS] BMM - Boot Menu Manager - v0.2.7 [ARCHIVE]

What is Boot Menu Manager?

Boot Menu Manager is like a second-stage loader. It run after Motorola bootloader and hijack android initial boot process. It allows you to to run custom command before booting android, run customized CWM-based recovery & booting from a second system partition. (Most people call this dual-booting.)

So, in summary, Boot Menu Manager is an almost complete package for toying with your phone.
It was specially design to work with our locked bootloader system & to prevent software brick.
(Trust me, you'll be using less fastboot after this)


Features
Quote:
Quote:
Fail safe hijack operation :
  • Loaded on each boot.
  • Configurable timeout, auto-boot to default setting.
  • Force showing Boot Menu Manager when boot using BP HW Diag & Boot AP
Quote:
CWM-based Recovery :
  • Based on latest open source CWM-5.5.0.4
  • Touch-able interface.(Experimental features)
  • Highly customized & added function like backup individual partition.
  • Safety features. - install hijack, install root, backup & protect root.
  • Safe partition format operation (Won't do real format of our locked/signed partition, just rm -r *)
  • System integrity check on exit of recovery : ensure system is bootable in next boot
  • Auto-removed file protection flag : ensure 100% successful nandroid restore
  • Working ADB & Mass-storage : ADB service is available as soon as Recovery is started.
  • Dual operation : Select between 1st & 2nd system.
Quote:
2nd-System :
  • Run a second system on abandon webtop partition
  • Great for testing ROM.
  • Recommended for ROM development.
Quote:
Custom init (via 2nd-init):
  • Boot android with customized init environment
    -Enable custom service
    -Disable stock background service (service like qe)
  • Bypass bp-tools (In some kernel - ChinaRetail)
Quote:
Insecure adbd:
  • Always run adb as root, so there's no need to run su command each time
  • Custom adb reboot mapping
    Code:
    adb reboot recovery -> Reboot to custom recovery
    adb reboot second -> Reboot to 2nd-system
    adb reboot stockrecovery -> Reboot to stock recovery
  • adb remount with noatime,nodirtime flag
    subsequent call to this command will remout /system as ro.
  • This feature is disabled by default. Use Boot Menu Manager app to enable/disable it
Quote:
Integration with android OS (via Boot Menu Manager app) :
  • Configure boot & recovery option.
  • Clean uninstall option
    Other recovery package lack this option & leave a leftover files on your system.
    (this leftover files cause OTA update to fail)
  • Reboot widget
Remarks and thanks

koush & CyanogenMod - CWM
TeamWin - touch related item for recovery
STS-Dev-Team (Hashcode&dhacker29) - Motorola Spyder related configuration
koush & cvpcs - hijack binary codes, bootstrap
Skrilax_CZ - 2nd-init

Special thanks

lukas77,dtrail1,leisures,sevenup30,FrAsErTaG & core720 for their ideas, support, bug report & testing for alpha release.

@Translation
androidol - Traditional & Simplified Chinese
maarawoe - Czech
spryte - German
pedrotorresfilho - Portuguese

HSD-Pilot -for helping with Q&A, guide


Redistribute

You're welcome to include/distibute Boot Menu Manager app on your ROM.
(Just make sure you don't re-sign it's security certificate)


How to install

Boot Menu Manager app is an application to provide an easy install way for Motorola Razr.
It also includes a simple updater, reboot widget & configuration tools.

Please respect my work & don't re-upload/re-publish on file sharing service. I've paid google to host this file for me.
Enjoy & give suggestion for improvement.
- Change logs
- Q/A

Quote:
WARNING : This release is only for ICS with 3.0.8 kernel. Although it has been tested many times, there is still a possibility for a bug to exist.Proceed at your own risk. Don't try this if you're not comfortable fixing your phone/fastboot/troubleshooting
Update : New thread for jellybean base build

XT909 : KAIZEN 0.1 - BMM 0.3.2
TF101 : PACman beta

- www.projectlense.com -
The Following 129 Users Say Thank You to whirleyes For This Useful Post: [ Click to Expand ]
 
whirleyes
Old
(Last edited by whirleyes; 10th August 2012 at 04:31 PM.)
#2  
whirleyes's Avatar
Recognized Developer - OP
Thanks Meter 1787
Posts: 832
Join Date: Aug 2007

 
DONATE TO ME
Info 2 extra info



Source code

BootMenu & Recovery source code is availabe at my github (razr-ics branch)


Official project page - WIP

http://www.projectlense.com/bootmenu/


Change logs (technical stuff~)
Quote:
BootMenu Manager app
0.2.0
- Initial public release
0.2.1
- Minor UI fix, add reboot widget
0.2.3
- fix hijack uninstall
- reallocate second system & recovery trigger file from /data to /preinstall
- add suppport for insecure adbd & 2nd-init
- add reboot option confirmation.
- add an option to clean/remove leftover files from RazrBootstrap (/preinstall/recovery/*)
- add /preinstall/recovery/update-binary symlink to BootMenu (for older version hijack(cvcps) / RazrBootstrap compatibility)
- add 1st & 2nd system manager
- add little integration with recovery (an attempt to mimic ROM manager)
- add live backup menu
0.2.4
- Minor change, fix blank screen on startup.
0.2.5
- Change startup behavior (Async task for backgroud task)
- Add check for Bootstrap installer
- Add Chinese translation (Thanks androidol)
0.2.6
- Fix download error & sha1sum miss matched for non MotoBlur based ROM (CM9/CM10/AOKP)
0.2.7
- Enable ROM manager function, add ROM Converter, Fix UI & Bugs (Download error)
Quote:
BootMenu packages & component
0.1
- alpha release

0.2.0
- Initial public release

0.2.1
/preinstall/bootmenu/binary/bootmenu
- Fix framebuffer. Revert back to /dev/graphics/fb0
- Add another fail-safe feature. Ignore bootmenu configuration file when booted with "BP HW Diag & Boot AP".
- Fix script boot_stock.sh (fix removal of /xbin = disable qe service)
/preinstall/bootmenu/binary/recovery
- Fix UI draw = results in faster restore & backup
- Add fast backup option (Only do backup /data, /cache & /system) = faster backup
- Add backup /pds as option (MAC address & stuff from factory)
- Fix backup of app inside .secure_android
- Disable format of /data & /cache (recovery will only do rm -r /path/*) = safer
- Checks /system/bin/logwrapper for correct version on exit (Prompt user if it's being replaced)
- Display battery level (approximation)

0.2.2
- Rebuild using SPDU 10 ICS source code

0.2.3
/preinstall/bootmenu/binary/bootmenu
- add suppport for insecure adbd & 2nd-init
- Red LED ON when booting by 2nd-init
- reallocate second system & recovery trigger file from /data to /preinstall
/preinstall/bootmenu/binary/recovery
- strip unused CWM function (We don't deal with flasing radio/boot.img, formatting filesystem on this recovery)
- change batt level from % to voltage
/preinstall/bootmenu/binary/adbd
- tweak/mods for bootmenu reboot action
/preinstall/bootmenu/rootfs/init
- tweak for custom init use.(appear as xXx-init in kernel log)
/preinstall/bootmenu/rootfs/2nd-init
- tweak for custom init use.(appear as 2nd-init in kernel log)

0.2.4
- Minor change, fix boot_second.sh script (Improve 2nd-init compatibility)
(bootmenu & recovery part remains at 0.2.3 until next updates/build)

0.2.5
/preinstall/bootmenu/binary/bootmenu
- Change to touch button system
/preinstall/bootmenu/binary/recovery
- Enable webtop format in recovery
- Add more reboot option
- Fix for Atrix2

0.2.6
/preinstall/bootmenu/binary/recovery
- rebuild & update to latest busybox 1.20.2

0.2.7
/preinstall/bootmenu/binary/bootmenu
- Add support to 2nd-system recovery boot (For ROM manager function)
/preinstall/bootmenu/binary/recovery
- Fix dalvik-cache erase, Add radio firmware flashing.

XT909 : KAIZEN 0.1 - BMM 0.3.2
TF101 : PACman beta

- www.projectlense.com -
The Following 38 Users Say Thank You to whirleyes For This Useful Post: [ Click to Expand ]
 
whirleyes
Old
(Last edited by whirleyes; 2nd August 2012 at 06:32 AM.)
#3  
whirleyes's Avatar
Recognized Developer - OP
Thanks Meter 1787
Posts: 832
Join Date: Aug 2007

 
DONATE TO ME
Question Q&A, tutorial, how-to

Q: What is this for??
Quote:
This is a stuff that helps you messing with your phone. It's powerful but lacks documentation.
(Currently I don't have time to do a full documentation).
Q: Is BootMenu same with what Cyanogen* BootMenu is??
Quote:
Maybe it's different from what Cyanogen* BootMenu is. My BootMenu just take the idea & the name, not the codes.
This is a very lightweight version of BootMenu. I rewrite it from scratch (code is based on ICS recovery).
It's not any doing any fancy stuff. It just wait for user input/timeout & do jobs based on predefined script.
That's all.
Q: I have a RazrBootstrap installed. Do I need to uninstall it??
Quote:
Not really. This installer will work. It will replace RazrBootstrap hijack with BootMenu hijack.
It will not remove RazrBootstrap files located at /preinstall/recovery. But it's a good idea to keep it (Useful when you restored a nandroid with a RazrBootstrap inside)
If you have low space on preinstall. you need to remove this folder manually.
Q: I want to reinstall RazrBootstrap/taking OTA. How do I remove BootMenu???
Quote:
Open BootMenu Manager. Select uninstall hijack, uninstall package (optional)
Q: I want to use a Safestrap based ROM
Quote:
1.Download Rom Converter from Google Play
2.Convert the ROM with it
3.Install it from BootMenu recovery
Q: My batt is messed up.
Quote:
Tips for getting a good batt stat. (Not messed up/inaccurate reading)
  • Always do ROM flashing with USB power connected & batt level at 100% (Recommended)
  • When batt level is not 100%
    • Reset both batt stat of stock & second
    • Reboot to stock, let it register current batt stat
    • Reboot to second, let it register current batt stat
Q: I want to install a ROM (Nandroid backup) in second system.
Quote:
1.Go to custom recovery, Backup&Restore, Advanced Backup, Backup Webtop.
2.Toggle second system recovery, Backup&Restore, Advanced Restore, Restore System.
3.Reboot.

Suggestion : If you have access to webtop fastboot files, you may skip the backup.
Q: Webtop backup took long time to finish.
Quote:
Original webtop content from Gingerbread 2.3.6 have too many small files & folder, that's why it's slow.
Since webtop partition is abandon in ICS, you only need to backup this partition once only.
Empty this partition if you're not using second system.
Code:
adb shell mkdir /tmp/webtop
adb shell mount -t ext3 /dev/block/webtop /tmp/webtop
adb shell rm -r /tmp/webtop/*
Update : ver 2.0.1 & newer has an option to do a "fast backup" (backup only data,cache&system)
Update : ver 2.0.5 & newer can do webtop format from recovery
Q: Will Webtop 3.0 works if I empty/delete all files in /dev/block/webtop?
Quote:
Webtop 3.0 is just ICS in tablet mode. It's no longer based on ubuntu. It will work
Q: I have a "low storage space" on 2nd system?
Quote:
Webtop partition size is only 1.3GB.
To make thing simple, the included boot_second.sh script bind mount /system & /data inside this webtop partition.
You have at least 4 option, if you want to have bigger /data
1.Reassign /data to /sdcard (IO speed depend on sdcard speed rating)
2.Reassign /data to /dev/block/userdata (this will replace all your data for stock system)
3.Reassign /data to /dev/block/cache (bind /cache to somewhere else e.g : /webtop/cache)
4.Use a lightweight ROM (/system size = small)

You need to modify these files to suit your needs.
/preinstall/bootmenu/script/boot_stock.sh
/preinstall/bootmenu/config/stock.recovery.fstab
/preinstall/bootmenu/script/boot_second.sh
/preinstall/bootmenu/config/second.recovery.fstab

Sorry, for now you all have to configure this files manually.
Q: What is 2nd-init??
Quote:
Its a method/hack to have a customized init environment. (Thanks to Skrilax_CZ)
cvcps made a good explanation of this on his blog... go read it if you are interested.
2nd-init. What it is and how it works.
Q: How to use BootMenu 2nd-init??
Quote:
1.Enable 2nd-init option in BootMenu Manager
2.Copy init files (*.rc) from ramdisk (rootfs) to /system/etc/rootfs/
3.Tweak / edit those file to suit your need(s)
4.Reboot.

*BootMenu will copy & overlay files in /system/etc/rootfs/ to ramdisk on startup. Then it loads 2nd-init.
*Red LED will lit to indicate a 2nd-init booting.
** IMPORTANT : Mount point for 2nd-system is need to be change. Else, 2nd-init will boot the 1st system.
** IMPORTANT : Don't overlay or replace /sbin/init with other version. (CM9,AOKP etc)
Q: What need to be change for 2nd-system+2nd-init??
Quote:
Basic init.mapphone_*.rc modification for 2nd-system:
Code:
on fs
  mount ext3 mmc@preinstall /preinstall noatime nodiratime barrier=0
  mount ext3 mmc@webtop /webtop noatime nodiratime barrier=0
  mkdir /webtop/system 0775 system system
  mkdir /webtop/data 0775 system system
  exec /preinstall/bootmenu/binary/busybox mount -obind /webtop/system /system
  exec /preinstall/bootmenu/binary/busybox mount -obind /webtop/data /data
  mount ext3 mmc@pds /pds noatime nodiratime barrier=0
  mount ext3 mmc@cache /cache noatime nodiratime barrier=0
** Above sample is for mounting ext3. Change it to reflex your setup. (I have all of them as ext4)
** All partition is mount directly (Skip disk checking).
** If partition is corrupted/not clean, boot to 1st-system & let it repair/check those partition.
Q: How to clone 1st-system to 2nd-system (simple)
Quote:
Make sure the total size of system & data is less than 1.3GB
Switch to 1st-system recovery
Code:
Backup & restore -> Selective backup
*backup system
*backup data
Switch to 2nd-system recovery
Code:
Backup & restore -> Selective restore
*restore system
*restore data
Optional, hijack in 2nd system is just a waste of resource.
Code:
System Keeper -> Remove logwrapper hijack
**Make sure the total size of system & data is less than 1.3GB
Q: How to clone 1st-system to 2nd-system (advance)
Quote:
Switch to 1st-system recovery mode. Connect to phone using adb
Code:
mount /data
mount /system
mount /webtop
rm -r /webtop/*
mkdir -p /webtop/data
mkdir- p /webtop/system
cp -a /data/* /webtop/data/
cp -a /system/* /webtop/system/
Optional, hijack in 2nd system is just a waste of resource.
Code:
rm /webtop/system/bin/hijack
rm /webtop/system/bin/logwrapper
mv /webtop/system/bin/logwrapper.bin /webtop/system/bin/logwrapper
**Make sure the total size of system & data is less than 1.3GB

XT909 : KAIZEN 0.1 - BMM 0.3.2
TF101 : PACman beta

- www.projectlense.com -
The Following 37 Users Say Thank You to whirleyes For This Useful Post: [ Click to Expand ]
 
pedrotorresfilho
Old
#4  
pedrotorresfilho's Avatar
Recognized Contributor
Thanks Meter 1047
Posts: 1,587
Join Date: Jan 2012

 
DONATE TO ME
Nice work whirleyes!
+1
The Following User Says Thank You to pedrotorresfilho For This Useful Post: [ Click to Expand ]
 
evonc
Old
#5  
evonc's Avatar
Senior Member
Thanks Meter 142
Posts: 519
Join Date: Dec 2011
Location: Toronto

 
DONATE TO ME
Sounds very promising. Looking forward to using it. Good work!
 
sevenup30
Old
#6  
sevenup30's Avatar
Senior Member
Thanks Meter 501
Posts: 736
Join Date: Jan 2011
Location: Montpellier

 
DONATE TO ME
Really glad you manage to release it !
I ll now try the apk!
 
Pzyduck
Old
#7  
Pzyduck's Avatar
Senior Member
Thanks Meter 636
Posts: 374
Join Date: Nov 2010
Location: La Rioja
The Best Recovery, amazing ;D
Firmware Team: Kent_lkc - Kwachu - daywalker04 - Pzyduck - Skrilax_CZ - toto221
My devices: Motorola V3i Marron>>>Motorola V9x>>>Motorola Milestone>>>Motorola Milestone 2>>>Motorola Atrix>>>Motorola RAZR>>>Motorola RAZR HD
"Firmware Team Forum"
 
whirleyes
Old
#8  
whirleyes's Avatar
Recognized Developer - OP
Thanks Meter 1787
Posts: 832
Join Date: Aug 2007

 
DONATE TO ME
Quote:
Originally Posted by sevenup30 View Post
Really glad you manage to release it !
I ll now try the apk!
haha.. only after a lot of sleepless nights and caffeinated days.

XT909 : KAIZEN 0.1 - BMM 0.3.2
TF101 : PACman beta

- www.projectlense.com -
The Following 7 Users Say Thank You to whirleyes For This Useful Post: [ Click to Expand ]
 
nespresso33
Old
#9  
Senior Member
Thanks Meter 33
Posts: 370
Join Date: Apr 2010
Thanks you, your app is great !

Small idea : add widget to reboot, hot reboot, recovery, etc ...
 
sevenup30
Old
#10  
sevenup30's Avatar
Senior Member
Thanks Meter 501
Posts: 736
Join Date: Jan 2011
Location: Montpellier

 
DONATE TO ME
I
Quote:
Originally Posted by whirleyes View Post
haha.. only after a lot of sleepless nights and caffeinated days.
Yeah you answered alot even with different timezone

Now the feedback
I cant find bootmenu on playstore(maybe only in french)
The app is great, the bootmenu is fine, and the install process goes well,( but it dont detect my Current version, because of alpha maybe
Anyway Great work

 
Post Reply+
Tags
bootmenu, bootstrap, ics, recovery
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...