【搞机】安卓搞机备忘录(施工中) 2021-08-18 学习,APP,操作系统 暂无评论 68 次阅读 # 【搞机】安卓搞机备忘录 [TOC] ## 工具 ### adb ### fastboot ## 解 BL 锁 如果无法安装驱动的,可以去设备管理器里手动更新,驱动位置在 `miflash_unlock`。 ## 刷 REC ### TWRP ### 橙狐() ## 刷 [Magisk](https://github.com/topjohnwu/Magisk)(获取 Root 权限) - **MagiskSU**: Provide root access for applications - **Magisk Modules**: Modify read-only partitions by installing modules - **MagiskHide**: Hide Magisk from root detections / system integrity checks - **MagiskBoot**: The most complete tool for unpacking and repacking Android boot images ### 利用第三方 Rec 在 Github 获取最新或你喜欢的 Release 版本,进入第三方 Rec 直接刷入。 卸载记得用对应的 uninstall.zip 卸载包。 ### 修补 Boot 镜像 适用范围有空写。 1. 提取当前固件的 **boot.img** 文件 * 直接下载安装包并解压后,里面如果存在则可直接进行下一部 * 如果里面没有 **boot.img**,但是有 **payload.bin** 这个文件,则需要 **[payload_dumper](https://github.com/vm03/payload_dumper)** 进行再一次解包 * Python3,亲测 Python3.8.8 可行 * `pip install protobuf` * `pip install bsdiff4`,若提示缺少 `Microsoft Visual C++`,去 [这里](https://www.lfd.uci.edu/~gohlke/pythonlibs/) 找好心人 * Download payload_dumper.py and update_metadata_pb2.py * Extract your OTA zip and place payload.bin in the same folder as these files * Open PowerShell, Command Prompt, or Terminal depending on your OS * Enter the following command: python -m pip install protobuf * When that's finished, enter this command: python payload_dumper.py payload.bin * This will start to extract the images within the payload.bin file to the output folder you are in. 2. 手机安装 Magisk Manager 3. 点击安装,找到选择并修补一个文件,选择之前的 **boot.img** 文件,进行修补 4. 修补完成后的文件名大致为 `magisk_patched-*.img` 5. `adb reboot bootloader `,手机重启到 bootloader 6. `fastboot flash boot <修补后的 boot.img 路径> `,永久刷入;`fastboot boot <修补后的 boot.img 路径>`,单次有效,重启失效 7. `fastboot reboot`,重启 8. 之后可以在 Magisk Manager 里面,安装 -> 直接安装,重启,enjoy it ### 翻车 #### 1. 手动删除模块 模块路径 `/data/adb/modules`,把最可能导致翻车的给删了吧。 #### 2. 自动删除模块 #### 3. 卸载 ### 安装模块 ### 编写 ## Xposed ### EdXposed 前辈,但它死了。 ### [LSPosed](https://github.com/LSPosed/LSPosed) ### 安装 1. Install Magisk v23+ 2. Install [Riru](https://github.com/RikkaApps/Riru/releases) v25+ from Magisk repo. 3. [Download](https://github.com/LSPosed/LSPosed#download) and install LSPosed in Magisk Manager 4. Reboot. 5. Have fun! :) ### 模块 ### 翻车 ### 编写 标签: 笔记, 软件 CC0