手机刷机前要知道的一些基础知识
https://xqrp.com/657891.html
线刷:利用数据线将手机与电脑连接,刷入刷机包recovery 等固件的方式。
卡刷: 用电脑在手机fastboot 模式下刷入第三方rec, 也就是大家常说的twrp。刷入完成,用rec 方式进入twrp,进入电脑下载好卡刷包,然后复制移动进去内置存储,选中卡刷包,等待刷入完成即可。
这里有一个小技巧,如果实在自己官方系统不开机,你可以尝试一下刷第三方的rom 将就用。
ozip: ozip 是 oppo 的加密格式,无法直接解压修改,必须转换成zip才可以编辑,可以用ozip 转换zip 的工具来实现。
oppo Find X 解锁ROOT
安装深度测试app
手机开启USB 调试,然后使用adb 安装 apk
手机系统版本:
- ColorOs V11
- Android 11
- Find X 全网通版 (PAFM00)
- IMEI 1 : 862716047717796
- IMEI 2: 862716047717788
- 版本号: PAFM00_11_H.15
- 基带版本: Q_V1_P14,Q_V1_P14
手机解锁BL 申请
手机下载OPPO 社区
https://www.oppo.cn/thread-397164526-1

手机刷机降级
刷机图文详解教程:
下载卡刷包OTA固件ROM,通过官方的刷机教程,显示安装版本低于当前使用版本
现在的版本是最早的版本。
最低的话是只能降出厂版本。
刷root 步骤
刷机前提
手机USB 连接到笔记本,保证adb 可以进入到手机的shell 中。
手机通过深度测试。
首先进入fastboot 模式
我们可以看到Device STATE: locked, 此时说明手机的bootloader 处于锁定的状态。

输入以下的命令,对 bootloader 进行解锁。

手机的页面会从上面的页面弹到下面的页面,这个页面是询问是否能解锁,确认解锁就使用音量键选择 UNLOCK THE BOOTLOADER

申诉激活
【欢太科技】尊敬的用户,您好!当前需要您提交帐号申诉解决问题,为了提高申诉通过率,请点击:https://opdwz.cn/6Nz2E3h 查看申诉填写的图文操作指引。看完指导后再点击:https://safe.heytap.com 开始填写申诉。
温馨提醒: 1.申诉结果会在1-2个工作日内尽快发送给您; 2.申诉进度可点击:https://opdwz.cn/ZF7zUvu 查询。3.帐号脱绑请点击申诉首页的“忘记帐号”进行申诉。 如有疑问,请点击https://opdwz.cn/jARRBzl 寻求在线客服帮助,祝您生活愉快!
参考moto 手机里的视频 ,最后一步 是打开查找功能
这里遇到了两个问题
问题1: 由于设备时二手手机,所以买了刷机的时候,有激活锁,因为是二手手机,所以并不知道原始的激活码。
解决:在淘宝花了30块钱,远程通过盲人模式绕过了激活锁,后面有时间把绕过激活锁这个流程发布出来。
问题2: 由于oppo 并没有发布官方的rom,不小心刷了第三方的社区的rom,手机成砖了。、
解决: 跟oppo的客服打电话求助,说这一块要带着发票和购买凭证去刷机,然后在软磨硬泡下,最终同意我拿到线下维修点,帮我刷机。
参考
OPPO Find X 解锁 BootLoader & root
https://wuxianlin.com/2018/09/22/oppo-findx-root/
小米只能进fastboot 和rec 救砖
https://blog.csdn.net/weixin_49941977/article/details/126836851
moto 手机ROOT
root
https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-b
https://www.bilibili.com/read/cv18455372
先注册账号,然后下载sdk tools ,主要是安装 adb 和fastboot工具
然后把oem解锁打开,这样才能解锁bl。
关机,同时按住音量键和电源键。进入到fastboot模式
电脑获取unlock_data

1
| 3A25715324260537#5A59323246435A52504B005854323135332D0000#CE1B023F6A41419996033FB2FA351C0AC857A93AF987B17F09E9307F74AF1404#FF648548000000000000000000000000
|
然后把unlock data 提交到moto

moto 会让你请求unlock key的值,

然后你的邮箱会收到一封解锁码的邮件
X2A4XZK43D65OKRHBA5F
然后下载boot.img
https://mirrors.lolinet.com/firmware/motorola/pstar_retcn/official/CMCC/
需要根据你的安卓版本,系统标识 来确定安装 对应的zip 压缩包

然后打开线刷包,把boot.img 文件提取出来,再 adb push 到手机。

然后手机安装Magisk ,官方Github:https://github.com/topjohnwu/Magisk/releases

安装完了之后,手机打开Magisk, 点击安装,选择一个修补文件,选择之前push 进去的boot.img。
然后在 /sdcard/Download/ 中可以看到一个magisk_patch_xx.ing 的文件。

把这两个文件下到本地目录中。

然后adb reboot bootloader,设备会重启,并且卡在bootloader 上。
然后电脑 fastboot flash boot magisk_patched_xxx.img

然后重启

打开magrisk,然后点击直接安装后设备会重启
然后adb 到设备里面,可以看到我们已经是最高的权限了。

安装Xpose 框架
安装LSPosed ,LSPosed 是Edxposed 的一个新分支,也是一款开源的GitHub上的Xposed 框架。
LSPosed 基于Riru 的ART 挂钩提供与原版Xposed 相同的API,可以在不修改APK文件的情况下调控程序的运行。
LSPosed开源地址:https://github.com/LSPosed/LSPosed/releases
adb push LSPosed /sdcard/ 中,然后用magisk 加载这个模块。重启
然后安装JustTrustMe.apk 和 justTrustMePlush-release.apk。然后再LSPosed 中启用这两个模块。
安装 drozer
见印象笔记 –“10-IOT”– “drozer 安装和使用” 。
安装 Inspeckage
下载路径(2018) https://github.com/ac-pm/Inspeckage/releases
安装Frida
https://www.52pojie.cn/thread-1100931-1-1.html
pip 安装Frida 和 frida-tools
下载 frida 版本:https://pypi.python.org/pypi/frida
esay_install frida_package.egg
下载 frida-tools : pip install frida-tools -i http://pypi.douban.com/simple/ –trusted-host pypi.douban.com
运行frida-ps 证明安装成功。
下载手机服务端的frida: https://github.com/frida/frida/releases
查看手机的指令架构

下载

连接Frida
手机端启动 frida

client 连接 frida,报错。

电脑端安装的frida 版本 (可通过 frida –version ) 与adb 传到手机中的 frida-server-版本号-android-arm64不一致。
确保版本一致后。执行 frida-ps -R (查看进程) 和 frida-ps -U ( 检查Usb 设备 )

问题:测试半天,版本不一致

雷电模拟器
1.下载模拟器
2.开启root
3.安装xposed,直接把xposed 拖入到模拟器的共享文件夹中安装。
https://themagisk.com/lsposed/
有很多教程,这里没有记录。
Pixel 6p root
Android 13 失败
Android 版本: 13
版本号: TQ1A.230205.002
IMEI号 : 358339773757307
第一步 进入bootloader
adb reboot bootloader
第二步 解锁bootloader
先使用fastboot devices 查看是否识别处于fastboot 模式的pixel。
然后 fastboot flashing unlock

第三步 下载对应的系统镜像
官网下载地址: https://developers.google.com/android/images?hl=zh-cn
第四步

android 14
前置条件
开启adb
解锁bootloader 为unlock
安装magisk
下载镜像文件
https://developers.google.com/android/images?hl=zh-cn
主要是获取boot.img 文件。

操作和moto 的一样。
ps: 如果fastboot boot xxx.img 没有效果,那就重启一下。重新来一次。
进入到magisk 的设置中,打开zygisk 按钮。
安装LSPosed
加载lsposed
https://github.com/LSPosed/LSPosed/releases 下载zygisk 版本的zip
然后adb push 到sdcard/Download/ 文件目录中
在magisk 中的模块栏中,添加本地模块,将zip 加载起来。然后重启。

安装apk
安装这个apk


pixel 6 升级Android14
旁加载升级
下载OTA镜像
https://developers.google.com/android/ota?hl=zh-cn#raven

进入到recover 模式
输入adb reboot recovery。
然后同事按住电源键 + 音量键提升按钮。
然后跳转到Recovery 清单中。
选择adb升级

然后会显示

sideload zip


升级完成

adb reboot 重启

参考: https://zhuanlan.zhihu.com/p/660890339
pixel 6P 通过出厂镜像刷机

windows 系统直接运行flash-all.bat
运行日志
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
| Sending 'bootloader_b' (11574 KB) OKAY [ 0.369s] Writing 'bootloader_b' (bootloader) Flashing pack version slider-1.2-9152140 (bootloader) flashing platform gs101 (bootloader) Validating partition ufs (bootloader) Validating partition ufs (bootloader) Validating partition partition:0 (bootloader) Validating partition partition:1 (bootloader) Validating partition partition:2 (bootloader) Validating partition partition:3 (bootloader) Validating partition bl1_b (bootloader) Validating partition pbl_b (bootloader) Validating partition bl2_b (bootloader) Validating partition abl_b (bootloader) Validating partition bl31_b (bootloader) Validating partition tzsw_b (bootloader) Validating partition gsa_b (bootloader) Validating partition ldfw_b (bootloader) Flashing partition ufs (bootloader) Flashing partition ufs (bootloader) Flashing partition partition:0 (bootloader) Flashing partition partition:1 (bootloader) Flashing partition partition:2 (bootloader) Flashing partition partition:3 (bootloader) Flashing partition bl1_b (bootloader) Flashing partition pbl_b (bootloader) Flashing partition bl2_b (bootloader) Flashing partition abl_b (bootloader) Flashing partition bl31_b (bootloader) Flashing partition tzsw_b (bootloader) Flashing partition gsa_b (bootloader) Flashing partition ldfw_b (bootloader) Loading sideload ufsfwupdate OKAY [ 2.588s] Finished. Total time: 2.963s Rebooting into bootloader OKAY [ 0.000s] Finished. Total time: 0.002s < waiting for any device > Sending 'radio_b' (94060 KB) OKAY [ 3.294s] Writing 'radio_b' (bootloader) Flashing pack version g5123b-107485-221101-M-9242015 (bootloader) Flashing partition modem_b OKAY [ 0.121s] Finished. Total time: 3.421s Rebooting into bootloader OKAY [ 0.000s] Finished. Total time: 0.001s < waiting for any device > -------------------------------------------- Bootloader Version...: slider-1.2-9152140 Baseband Version.....: g5123b-107485-221101-B-9242015 Serial Number........: 1B231FDEE005T0 -------------------------------------------- extracting android-info.txt (0 MB) to RAM... Checking 'product' OKAY [ 0.000s] Checking 'version-bootloader' OKAY [ 0.000s] Checking 'version-baseband' OKAY [ 0.000s] Setting current slot to 'b' OKAY [ 0.083s] extracting boot.img (64 MB) to disk... took 0.294s archive does not contain 'boot.sig' Sending 'boot_b' (65536 KB) OKAY [ 2.322s] Writing 'boot_b' OKAY [ 0.079s] archive does not contain 'init_boot.img' extracting dtbo.img (16 MB) to disk... took 0.048s archive does not contain 'dtbo.sig' Sending 'dtbo_b' (16384 KB) OKAY [ 0.524s] Writing 'dtbo_b' OKAY [ 0.021s] archive does not contain 'dt.img' extracting pvmfw.img (1 MB) to disk... took 0.005s archive does not contain 'pvmfw.sig' Sending 'pvmfw_b' (1024 KB) OKAY [ 0.032s] Writing 'pvmfw_b' OKAY [ 0.003s] archive does not contain 'recovery.img' extracting vbmeta.img (0 MB) to disk... took 0.001s archive does not contain 'vbmeta.sig' Sending 'vbmeta_b' (12 KB) OKAY [ 0.001s] Writing 'vbmeta_b' OKAY [ 0.002s] extracting vbmeta_system.img (0 MB) to disk... took 0.000s archive does not contain 'vbmeta_system.sig' Sending 'vbmeta_system_b' (4 KB) OKAY [ 0.000s] Writing 'vbmeta_system_b' OKAY [ 0.002s] extracting vbmeta_vendor.img (0 MB) to disk... took 0.001s archive does not contain 'vbmeta_vendor.sig' Sending 'vbmeta_vendor_b' (4 KB) OKAY [ 0.000s] Writing 'vbmeta_vendor_b' OKAY [ 0.002s] extracting vendor_boot.img (64 MB) to disk... took 0.439s archive does not contain 'vendor_boot.sig' Sending 'vendor_boot_b' (65536 KB) OKAY [ 2.079s] Writing 'vendor_boot_b' OKAY [ 0.077s] archive does not contain 'vendor_kernel_boot.img' extracting super_empty.img (0 MB) to disk... took 0.000s Rebooting into fastboot OKAY [ 0.000s] < waiting for any device > Sending 'super' (4 KB) OKAY [ 0.001s] Updating super partition OKAY [ 0.019s] Resizing 'product_b' OKAY [ 0.003s] Resizing 'system_b' OKAY [ 0.003s] Resizing 'system_ext_b' OKAY [ 0.003s] Resizing 'system_a' OKAY [ 0.003s] Resizing 'vendor_b' OKAY [ 0.003s] Resizing 'vendor_dlkm_b' OKAY [ 0.002s] Resizing 'vendor_a' OKAY [ 0.003s] archive does not contain 'boot_other.img' archive does not contain 'odm.img' archive does not contain 'odm_dlkm.img' extracting product.img (2588 MB) to disk... took 17.016s Invalid sparse file format at header magic archive does not contain 'product.sig' Resizing 'product_b' OKAY [ 0.006s] Sending sparse 'product_b' 1/11 (262112 KB) OKAY [ 8.788s] Writing 'product_b' OKAY [ 0.321s] Sending sparse 'product_b' 2/11 (262124 KB) OKAY [ 8.759s] Writing 'product_b' OKAY [ 0.327s] Sending sparse 'product_b' 3/11 (262128 KB) OKAY [ 8.752s] Writing 'product_b' OKAY [ 0.338s] Sending sparse 'product_b' 4/11 (262116 KB) OKAY [ 8.779s] Writing 'product_b' OKAY [ 0.331s] Sending sparse 'product_b' 5/11 (262120 KB) OKAY [ 8.814s] Writing 'product_b' OKAY [ 0.331s] Sending sparse 'product_b' 6/11 (262124 KB) OKAY [ 8.867s] Writing 'product_b' OKAY [ 0.340s] Sending sparse 'product_b' 7/11 (262124 KB) OKAY [ 8.819s] Writing 'product_b' OKAY [ 0.304s] Sending sparse 'product_b' 8/11 (262128 KB) OKAY [ 8.894s] Writing 'product_b' OKAY [ 0.340s] Sending sparse 'product_b' 9/11 (262128 KB) OKAY [ 8.803s] Writing 'product_b' OKAY [ 0.356s] Sending sparse 'product_b' 10/11 (241248 KB) OKAY [ 8.124s] Writing 'product_b' OKAY [ 0.368s] Sending sparse 'product_b' 11/11 (41336 KB) OKAY [ 1.400s] Writing 'product_b' OKAY [ 0.104s] extracting system.img (840 MB) to disk... took 5.310s Invalid sparse file format at header magic archive does not contain 'system.sig' Resizing 'system_b' OKAY [ 0.006s] Sending sparse 'system_b' 1/4 (262116 KB) OKAY [ 8.625s] Writing 'system_b' OKAY [ 0.339s] Sending sparse 'system_b' 2/4 (262120 KB) OKAY [ 8.675s] Writing 'system_b' OKAY [ 0.318s] Sending sparse 'system_b' 3/4 (262140 KB) OKAY [ 8.607s] Writing 'system_b' OKAY [ 0.374s] Sending sparse 'system_b' 4/4 (71380 KB) OKAY [ 2.356s] Writing 'system_b' OKAY [ 0.147s] archive does not contain 'system_dlkm.img' extracting system_ext.img (353 MB) to disk... took 2.108s Invalid sparse file format at header magic archive does not contain 'system_ext.sig' Resizing 'system_ext_b' OKAY [ 0.007s] Sending sparse 'system_ext_b' 1/2 (262140 KB) OKAY [ 8.655s] Writing 'system_ext_b' OKAY [ 0.329s] Sending sparse 'system_ext_b' 2/2 (99100 KB) OKAY [ 3.283s] Writing 'system_ext_b' OKAY [ 0.166s] extracting system_other.img (24 MB) to disk... took 0.157s archive does not contain 'system.sig' Resizing 'system_a' OKAY [ 0.006s] Sending 'system_a' (25220 KB) OKAY [ 0.825s] Writing 'system_a' OKAY [ 0.103s] extracting vendor.img (509 MB) to disk... took 3.057s Invalid sparse file format at header magic archive does not contain 'vendor.sig' Resizing 'vendor_b' OKAY [ 0.007s] Sending sparse 'vendor_b' 1/2 (262116 KB) OKAY [ 8.684s] Writing 'vendor_b' OKAY [ 0.322s] Sending sparse 'vendor_b' 2/2 (257860 KB) OKAY [ 8.539s] Writing 'vendor_b' OKAY [ 0.334s] extracting vendor_dlkm.img (38 MB) to disk... took 0.181s archive does not contain 'vendor_dlkm.sig' Resizing 'vendor_dlkm_b' OKAY [ 0.008s] Sending 'vendor_dlkm_b' (39796 KB) OKAY [ 1.332s] Writing 'vendor_dlkm_b' OKAY [ 0.089s] archive does not contain 'vendor_other.img' Erasing 'userdata' OKAY [ 0.218s] Erase successful, but not automatically formatting. File system type raw not supported. Erasing 'metadata' OKAY [ 0.003s] Erase successful, but not automatically formatting. File system type raw not supported. Rebooting OKAY [ 0.000s] Finished. Total time: 397.746s
|
参考
Android 入门教程:ROOT 权限的获取
https://sspai.com/post/24296#!
模拟器安装xposed
https://blog.csdn.net/u014602228/article/details/117921430
记一次Android刷机的小结(青橙GO T5)
https://jmsliu.cn/tech/%e8%ae%b0%e4%b8%80%e6%ac%a1%e5%ae%89%e5%8d%93%e5%88%b7%e6%9c%ba%e7%9a%84%e5%b0%8f%e7%bb%93.html