mirror of
https://github.com/palera1n/palera1n.git
synced 2026-11-25 15:13:42 +01:00
improve dfuhelper (#274)
* dfuhelper: erase lines properly * dfuhelper: simplify step function * dfuhelper: exit as soon as DFU is detected * dfuhelper: get rid of keep holding step wait for the previous step to finish instead
This commit is contained in:
1 parent
a69092d78a
commit
0824c53e78
1 file changed
+7
-4
+7
-4
@@ -31,11 +31,14 @@ remote_cp() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
step() {
|
step() {
|
||||||
for i in $(seq "$1" -1 1); do
|
for i in $(seq "$1" -1 0); do
|
||||||
printf '\r\e[1;36m%s (%d) ' "$2" "$i"
|
if [ "$(get_device_mode)" = "dfu" ]; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
printf '\r\e[K\e[1;36m%s (%d)' "$2" "$i"
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
printf '\r\e[0m%s (0)\n' "$2"
|
printf '\e[0m\n'
|
||||||
}
|
}
|
||||||
|
|
||||||
print_help() {
|
print_help() {
|
||||||
@@ -262,7 +265,7 @@ _dfuhelper() {
|
|||||||
step 4 "$step_one" &
|
step 4 "$step_one" &
|
||||||
sleep 3
|
sleep 3
|
||||||
"$dir"/irecovery -c "reset"
|
"$dir"/irecovery -c "reset"
|
||||||
step 1 "Keep holding"
|
wait
|
||||||
if [[ "$1" = 0x801* && "$deviceid" != *"iPad"* ]]; then
|
if [[ "$1" = 0x801* && "$deviceid" != *"iPad"* ]]; then
|
||||||
step 10 'Release side button, but keep holding volume down'
|
step 10 'Release side button, but keep holding volume down'
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user