Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same as latest recovery. there is one more key point is that when we unm... #21

Open
wants to merge 1 commit into
base: gingerbread
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 32 additions & 17 deletions bootmenu/script/recovery_stable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,41 @@ export PATH=/sbin:/system/xbin:/system/bin
PART_DATA=/dev/block/mmcblk1p26
PART_SYSTEM=/dev/block/mmcblk1p21

# Moto 2.3.3 /tmp is a link to /data/tmp, bad thing ! &&
## /tmp folder can be a link to /data/tmp, bad thing !
[ -L /tmp ] && rm /tmp
[ -L /etc ] && rm /etc
mkdir -p /tmp
mkdir -p /res

mkdir /tmp
rm -f /etc
mkdir /etc
mkdir /res

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

rm -f /sdcard
mkdir /sdcard

chmod 755 /sbin
chmod 755 /res

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

if [ ! -f /sbin/recovery_stable ]; then
ln -s /sbin/recovery /sbin/recovery_stable
fi

chmod +rx /sbin/*

# rm -f /sbin/postrecoveryboot.sh

if [ ! -e /etc/recovery.fstab ]; then
cp /system/bootmenu/recovery/recovery.fstab /etc/recovery.fstab
fi

# for ext3 format
cp /system/etc/mke2fs.conf /etc/

Expand All @@ -43,30 +55,33 @@ touch /cache/recovery/log
touch /cache/recovery/last_log
touch /tmp/recovery.log

## adbd start
killall adbd


rm -f /sbin/adbd
ps | grep -v grep | grep adbd
ret=$?

if [ ! $ret -eq 0 ]; then
chmod 755 /system/bootmenu/script/adbd.sh
/system/bootmenu/script/adbd.sh
fi
# chmod 755 /system/bootmenu/script/adbd.sh
# /system/bootmenu/script/adbd.sh

# don't use adbd here, will load many android process which locks /system
killall adbd
killall adbd.root
fi

#############################
## mount in /sbin/postrecoveryboot.sh
umount /system
umount /data
umount /cache
umount -l /system
umount -l /data
umount -l /cache
#############################

# turn on button backlight (back button is used in CWM Recovery 3.x)
echo 1 > /sys/class/leds/button-backlight/brightness

/sbin/recovery_stable
/sbin/recovery_stable &

sync
killall bootmenu

exit