Skip to content

Commit 7f0d4f5

Browse files
committed
修复在加载临时的 recovery.img 失败后没有切换回原来的槽位导致无法进入 recovery 模式的问题
1 parent 7cb3d9c commit 7f0d4f5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

shell/device-tools/flash/FlashTempRecovery.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ flashTempRecoveryForDevice() {
122122
echo "${outputPrint}"
123123
if echo "${outputPrint}" | grep -qi 'bad buffer size'; then
124124
echo "⏳ 匹配到 Bad Buffer Size 错误,准备切槽位再重试"
125-
switchToAnotherSlot
126125
clearMiscPartition
126+
switchToAnotherSlot
127127
outputPrint=$(fastboot boot "${recoveryFilePath}" < /dev/null 2>&1)
128128
exitCode=$?
129129
if (( exitCode == 0 )); then
@@ -132,6 +132,8 @@ flashTempRecoveryForDevice() {
132132
else
133133
echo "❌ 切换槽位后仍加载失败,最终失败原因:"
134134
echo "${outputPrint}"
135+
clearMiscPartition
136+
switchToAnotherSlot
135137
fi
136138
else
137139
echo "📝 未匹配到 Bad Buffer Size 错误,错误内容不触发切槽位逻辑"

0 commit comments

Comments
 (0)