Skip to content

Commit 5d8b733

Browse files
committed
[update] 新增一次刷机踩坑(被迫)
- fix some typos - android-backup add script link
1 parent 8ae3a47 commit 5d8b733

File tree

4 files changed

+48
-3
lines changed

4 files changed

+48
-3
lines changed

content/post/Android刷机的一般步骤.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,25 @@ internal storage # 个人资料存储:包含照片视频音乐等所有
153153
2. https://www.xda-developers.com/how-a-b-partitions-and-seamless-updates-affect-custom-development-on-xda/?newsletter_popup=1
154154
3. https://forum.xda-developers.com/t/how-to-fix-unable-to-mount-data-internal-storage-0mb-in-twrp-permanently.3830897/
155155

156+
### 被迫刷机
157+
158+
2024 年 11 月 19 夜,由于 xplore(一款很好用的文件管理器,可称塞班时代的遗珠)卡顿,实际上算不上卡顿,我猜是触发了系统的 bug,哪哪都不对劲,具体表现为打开 xplore 卡死,连带大返回都卡,然后恢复正常,可以使用其他应用。强制关掉 xplore 重新开依然如此,而且我还发现开 SDMaid 虽然能开,但里面的扫描一直卡在 0%. 这种场景之前也有过,必须重启才能恢复,所以我想是系统的 bug, 毕竟第三方 ROM -- [PixelPlusUI](https://ppui.site/device/munch) ([XDA](https://xdaforums.com/t/closed-rom-13-munch-pixelplusui-official-aosp.4543117/)). 不过这个 ROM 已经算很稳定的了,自带 Google 套件,在稳定性和可定制性上做到了很好的折中。
159+
160+
重点来了,于是乎我就重启嘛。可能是太久没见 Recovery 的原因(这个 rom 已经稳定用了一年又九个月),我鬼使神差地重启进入 twrp recovery,然后心想着来都来了,清下缓存再重启把。本来勾一个 cache 分区就行了,再次鬼使神差地多勾选了一个 **meta** 分区(虽然不知道它是干嘛的)。结果清完之后直接重启卡 twrp 了,进不去系统了。而且进了 twrp 还 data 分区解密失败。玩球了,数据又要丢了。
161+
162+
其实在准备刷机前,要先把手机密码都清掉,防止 twrp 解密分区失败的,但我这次压根没想刷机。所以带着密码删了清了 meta 分区,结果再次进 twrp,data 分区已经解不出来了。杯具了 orz
163+
164+
本次刷机遇到以下问题
165+
166+
- 格式化 data 分区失败,因为挂载失败,data 分区(系统应用,用户应用及其数据)是加密状态,此时只能选更改文件系统,再改回来,改回来之后惊奇的发现 internal data 分区(文档、照片、音乐、视频等)也被清掉了,直接还给我一台新机!🌿
167+
- 刷入 rom 之后,好几次还是卡 recovery,后来好了,不知道是不是操作步骤的问题。
168+
- 刷入 rom 成功开机后,再次回到 recovery 刷 magisk,刷完继续卡 recovery,只能重刷。
169+
- 重刷之后误操作切换了 slot,导致 `fastboot boot <twrp.img>` 执行失败(见 troubleshooting),这是真的惊悚,从来没遇到过,一度以为真的要成砖了,还好在 xda 找到了类似情况。
170+
- adb/fastboot 设备无权限。
171+
172+
谨此记录。
173+
174+
156175
## 3. Troubleshooting
157176

158177
---------------------
@@ -188,6 +207,19 @@ Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
188207

189208
> Note: 另外可以尝试使用 root 权限执行命令: `sudo adb``sudo fastboot`
190209
210+
**`fastboot boot recovery.img`报错 FAILED (remote: 'Failed to load/authenticate boot image: Load Error')**
211+
212+
这是由于意外切换了a/b slot,即本来 active 的是 a slot,被误操作切换成 b 了,所以 fastboot 执行不下去,切回来就可以。执行
213+
214+
```
215+
# try this
216+
fastboot set_active a
217+
# or
218+
fastboot set_active b
219+
```
220+
221+
see: https://xdaforums.com/t/troubles-reinstalling-twrp-failed-to-load-authenticate-boot-image-load-error.3926815/
222+
191223

192224
## Reference
193225

content/post/android-backup.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,16 +151,29 @@ for folder in ${folers_to_sync[*]}; do
151151
echo; echo # for two newlines
152152
done
153153
```
154-
修改变量`folders_to_sync`来配置你的同步文件夹,如果文件夹里面没有新增,则此操作会很快。此操作仅会同步手机端新增的文件到 PC.
154+
修改变量`folders_to_sync`来配置你的同步文件夹,如果文件夹里面没有新增,则此操作会很快。此操作仅会同步手机端新增的文件到 PC. 猛击[这里][6]获取最新脚本,文中的可能更新不及时,但也能用用。
155155

156156

157157
本段原帖参考我的[issue][5].
158158

159+
四、特殊应用备份
160+
---------------
161+
162+
有些应用提供了备份还原机制,而且使用上面的备份方法还原出来会有些问题;有些没法用上面的方法,用了还原了也不好使(如 Termux)。对于这些,就要特殊问题特殊对待了。
163+
164+
- AquaMail 自带账户和应用备份,用它的就好;
165+
- Termux 提供了 tar 备份机制,参考官方[Wiki][7].
166+
167+
这里提供一个脚本使用起来更加方便,猛击[这里][8]获取。
168+
159169
[1]: https://wiki.termux.com/wiki/Main_Page
160170
[2]: https://github.com/guyueshui/backup_script/blob/dev/yychi/
161171
[3]: https://github.com/YAWAsau/backup_script
162172
[4]: https://github.com/NeoApplications/Neo-Backup
163173
[5]: https://github.com/guyueshui/guyueshui.github.io/issues/20
174+
[6]: https://github.com/guyueshui/dotfiles/blob/master/bin/rsync_phone.sh
175+
[7]: https://wiki.termux.com/wiki/Backing_up_Termux
176+
[8]: https://github.com/guyueshui/dotfiles/blob/master/bin/termux-backup.sh
164177

165178
总结
166179
----

content/post/eye-comfortable-displayer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "护眼显示器选购指南"
33
date: 2023-06-14T19:56:54+08:00
44
keywords: []
55
categories: []
6-
tags: [显示器,护眼,va, ips]
6+
tags: [显示器,护眼,va,ips]
77
draft: false
88
mathjax: false
99

content/post/shell-intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ results in true if the result of the arithmetic evaluation is non-zero.
410410
[me@linuxbox ~]$ if ((1)); then echo "It is true."; fi
411411
It is true.
412412
[me@linuxbox ~]$ if ((0)); then echo "It is true."; fi
413-
[me@linuxbox ~]$]
413+
[me@linuxbox ~]$
414414
```
415415
416416
## Shell function

0 commit comments

Comments
 (0)