Expanded procedure to Oneplus One

This commit is contained in:
Michele Cereda
2023-02-25 22:48:53 +01:00
parent da7367c251
commit 2ca54eaffb

View File

@@ -1,32 +1,75 @@
# Magisk
1. [TL;DR](#tldr)
1. [Further readings](#further-readings)
> This procedure worked for the following devices:
>
> - OnePlus One
> - OnePlus 5
## TL;DR
> This procedure works for a **OnePlus 5** phone.
1. download and flash the os' recovery-flashable zip file
1. start the newly installed system
1. download and install the [latest version][releases] of Magisk's app
1. open Magisk
1. check the value of _Ramdisk_
1. download the os' recovery-flashable zip file
1. extract the `boot.img` file from the zip file
1. open the Magisk app
1. press the _Install_ button on the _Magisk_ card
1. choose _Select and Patch a File_ under _Method_
1. select the boot image; the Magisk app will patch the image to `[Internal Storage]/Download/magisk_patched_<random strings>.img`
1. copy the patched image to your computer using the file transfer mode or `adb`:
If the value of _Ramdisk_ is **_yes_**:
1. extract the `boot.img` or `init_boot.img` file from the firmware's zip file
1. check if the firmware also has a `vbmeta.img` or `vbmeta_*.img` file
1. press the **_Install_** button in the Magisk app
1. if the firmware did **NOT** have a `vbmeta` image file, check the _Patch vbmeta in boot image_ option
1. hit **_Next_** in the Options section
1. choose _Select and Patch a File_ in the Method section
1. select the boot image
1. hit **_Let's go_**
1. flash the patched boot image
If the value of _Ramdisk_ is **_no_**, follow the instructions at [magisk in recovery](https://topjohnwu.github.io/Magisk/install.html#magisk-in-recovery)
Now:
1. Flash the patched boot image:
- from the recovery, or
- from your computer with `adb` and `fastboot`
1. reboot to the system
To flash the patched boot image from your computer with `adb` and `fastboot`:
1. copy the patched boot image to your computer using the file transfer mode or `adb`:
```sh
adb pull /sdcard/Download/magisk_patched_<random strings>.img
adb pull '/sdcard/Download/magisk_patched_<random strings>.img'
```
1. reboot the device to the bootloader (fastboot)
1. flash the modified boot image:
```sh
sudo fastboot flash boot path/to/modified/boot.img
fastboot flash boot 'path/to/modified/boot.img'
```
1. reboot to the system
1. if the firmware **HAD** a separate `vbmeta` image file, patch the `vbmeta` partition:
```sh
fastboot flash vbmeta --disable-verity --disable-verification 'path/to/vbmeta.img'
```
## Further readings
- [How to Install Magisk on your Android Phone]
- [Magisk install]
<!-- project's references -->
[releases]: https://github.com/topjohnwu/Magisk/releases
<!-- internal references -->
<!-- external references -->
[how to install magisk on your android phone]: https://www.xda-developers.com/how-to-install-magisk/
[magisk install]: https://topjohnwu.github.io/Magisk/install.html