Skip to content

Commit

Permalink
Clean media fixup and update Recovery stable to 5.0.6
Browse files Browse the repository at this point in the history
This newer recovery has a better compatibility with ICS archives

update recoveryexit.sh :
 This script is made to exit from recovery to return in bootmenu

New icon for the bootmenu unified recovery (small cm logo)
Blue color like bootmenu, to remember its not exactly a CWM version...

Bootmenu recovery follows CWM/cyanogenmod mainline but is made to
be launched from the system partition (copied in ramfs before launch)

It has also some enhanced functions, like Advanced Backup and Restore

This project is also open source, available on github, CyanogenDefy
Tested on the Defy (ext3, SD) and the Atrix (ext4, Internal SD)

Change-Id: I38ef7e5b097b6d8d194b70228ce4b8e146d115a4
  • Loading branch information
tpruvot committed Mar 14, 2012
1 parent 61e1db4 commit 6a55f91
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 77 deletions.
6 changes: 3 additions & 3 deletions bootmenu/bootmenu.mk
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ PRODUCT_COPY_FILES += \
${bm_device}/bootmenu/script/reboot_command.sh:system/bootmenu/script/reboot_command.sh \
${bm_device}/bootmenu/script/recovery.sh:system/bootmenu/script/recovery.sh \
${bm_device}/bootmenu/script/recovery_stable.sh:system/bootmenu/script/recovery_stable.sh \
${bm_device}/bootmenu/script/recoveryexit.sh:system/bootmenu/script/recoveryexit.sh \
${bm_device}/bootmenu/script/sdcard.sh:system/bootmenu/script/sdcard.sh \
${bm_device}/bootmenu/script/system.sh:system/bootmenu/script/system.sh \
${bm_device}/bootmenu/script/media_fixup.sh:system/bootmenu/script/media_fixup.sh \
${bm_device}/bootmenu/script/pdsbackup.sh:system/bootmenu/script/pdsbackup.sh \

# prebuilt binaries (to clean...)
Expand Down Expand Up @@ -87,7 +85,8 @@ PRODUCT_COPY_FILES += \
${bm_device}/bootmenu/recovery/res/images/indeterminate6.png:system/bootmenu/recovery/res/images/indeterminate6.png \
${bm_device}/bootmenu/recovery/res/images/progress_empty.png:system/bootmenu/recovery/res/images/progress_empty.png \
${bm_device}/bootmenu/recovery/res/images/progress_fill.png:system/bootmenu/recovery/res/images/progress_fill.png \
${bm_device}/bootmenu/recovery/res/images/icon_clockwork.png:system/bootmenu/recovery/res/images/icon_clockwork.png \
${bm_device}/bootmenu/recovery/res/images/icon_cm.png:system/bootmenu/recovery/res/images/icon_bootmenu.png \
${bm_device}/bootmenu/recovery/res/images/icon_cm.png:system/bootmenu/recovery/res/images/icon_clockwork.png \
${bm_device}/bootmenu/recovery/sbin/badblocks:system/bootmenu/recovery/sbin/badblocks \
${bm_device}/bootmenu/recovery/sbin/dedupe:system/bootmenu/recovery/sbin/dedupe \
${bm_device}/bootmenu/recovery/sbin/dump_image:system/bootmenu/recovery/sbin/dump_image \
Expand All @@ -97,6 +96,7 @@ PRODUCT_COPY_FILES += \
${bm_device}/bootmenu/recovery/sbin/nandroid-md5.sh:system/bootmenu/recovery/sbin/nandroid-md5.sh \
${bm_device}/bootmenu/recovery/sbin/parted:system/bootmenu/recovery/sbin/parted \
${bm_device}/bootmenu/recovery/sbin/postrecoveryboot.sh:system/bootmenu/recovery/sbin/postrecoveryboot.sh \
${bm_device}/bootmenu/recovery/sbin/recoveryexit.sh:system/bootmenu/recovery/sbin/recoveryexit.sh \
${bm_device}/bootmenu/recovery/sbin/recovery:system/bootmenu/recovery/sbin/recovery_stable \
${bm_device}/bootmenu/recovery/sbin/resize2fs:system/bootmenu/recovery/sbin/resize2fs \
${bm_device}/bootmenu/recovery/sbin/sdparted:system/bootmenu/recovery/sbin/sdparted \
Expand Down
Binary file removed bootmenu/recovery/res/images/icon_clockwork.png
Binary file not shown.
Binary file added bootmenu/recovery/res/images/icon_cm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bootmenu/recovery/sbin/recovery
Binary file not shown.
39 changes: 39 additions & 0 deletions bootmenu/recovery/sbin/recoveryexit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/sbin/busybox ash

if [ ! -x /system/bin/bootmenu ]; then
mount /system
fi

if [ ! -f /cache/recovery/bootmode.conf ]; then
mount /cache
fi

if [ -f /system/bin/bootmenu ]; then

if [ -L /sbin/busybox ]; then
rm /sbin/busybox
# replace recovery symlink by full static busybox bootmenu version
/system/bootmenu/binary/busybox cp /system/bootmenu/binary/busybox /sbin/busybox

# keep recovery binary, for extra tools
# rm /sbin/recovery
fi

echo bootmenu > /cache/recovery/bootmode.conf
/system/bin/logwrapper /system/bin/bootmenu

# only for real recovery.img service
# /system/bin/toolbox stop recovery

exit 0
fi

# fast button warning
echo 1 > /sys/class/leds/red/brightness
usleep 50000
echo 0 > /sys/class/leds/red/brightness
usleep 50000
echo 1 > /sys/class/leds/red/brightness
usleep 50000
echo 0 > /sys/class/leds/red/brightness

55 changes: 0 additions & 55 deletions bootmenu/script/media_fixup.sh

This file was deleted.

2 changes: 0 additions & 2 deletions bootmenu/script/post_bootmenu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,4 @@ mount -o remount,ro rootfs /
mount -o remount,ro $PART_SYSTEM /system
##################################################

# /system/bootmenu/script/media_fixup.sh &

exit 0
7 changes: 4 additions & 3 deletions bootmenu/script/recovery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ mkdir -p /res
rm -f /etc
mkdir /etc

# hijack mke2fs & tune2fs CWM3
# hijack mke2fs
rm -f /sbin/mke2fs
rm -f /sbin/tune2fs
rm -f /sbin/e2fsck

# remove busybox link
rm -f /sbin/tune2fs

rm -f /sdcard
mkdir /sdcard

Expand All @@ -28,7 +30,6 @@ chmod 755 /res

cp -r -f /system/bootmenu/recovery/res/* /res/
cp -p -f /system/bootmenu/recovery/sbin/* /sbin/
cp -p -f /system/bootmenu/script/recoveryexit.sh /sbin/

if [ ! -f /sbin/recovery ]; then
ln -s /sbin/recovery_stable /sbin/recovery
Expand Down
7 changes: 4 additions & 3 deletions bootmenu/script/recovery_stable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ mkdir -p /res
rm -f /etc
mkdir /etc

# hijack mke2fs & tune2fs CWM3
# hijack mke2fs from CWM to prevent format
rm -f /sbin/mke2fs
rm -f /sbin/tune2fs
rm -f /sbin/e2fsck

# remove busybox link
rm -f /sbin/tune2fs

rm -f /sdcard
mkdir /sdcard

Expand All @@ -32,7 +34,6 @@ chmod 755 /res

cp -r -f /system/bootmenu/recovery/res/* /res/
cp -p -f /system/bootmenu/recovery/sbin/* /sbin/
cp -p -f /system/bootmenu/script/recoveryexit.sh /sbin/

if [ ! -f /sbin/recovery_stable ]; then
ln -s /sbin/recovery /sbin/recovery_stable
Expand Down
11 changes: 0 additions & 11 deletions bootmenu/script/recoveryexit.sh

This file was deleted.

0 comments on commit 6a55f91

Please sign in to comment.