Skip to content

Instantly share code, notes, and snippets.

@jazio
Last active August 23, 2024 20:46
Show Gist options
  • Save jazio/d45d4d97aab63574b0bb5488cde6babb to your computer and use it in GitHub Desktop.
Save jazio/d45d4d97aab63574b0bb5488cde6babb to your computer and use it in GitHub Desktop.
Install Custom ROM
Special boot modes
Recovery: With the device powered off, hold Volume Up + Power. Keep holding both buttons until the “MI” logo appears on the screen, then release.
Download: With the device powered off, hold Volume Down + Power. Keep holding both buttons until the word “FASTBOOT” appears on the screen, then release.
Steps.
# Prerequisites
Install fastboot and adb.
You will need the platform-tools from the Android SDK on your computer.
http://developer.android.com/sdk/index.html#linux-bundle-size
# Unlocking the bootloader
Note: The steps below only need to be run once per device.
See brand official unlocking site.
Developer Options = On / OEM Locking = On / USB Debugging = On
On your device, go into Settings -> About and find the Build Number and tap on it 7 times to enable developer settings. Press back and go into Developer Options and enable USB debugging. From your computer, open a command prompt and type:
adb reboot bootloader
You should now be in fastboot mode.
# Installing a custom recovery
Popular custom revovery tool: TWRP. Download: <recovery_filename>.img
adb reboot bootloader
fastboot devices
sudo fastboot flash recovery <recovery_filename>.img
sudo fastboot reboot
Sometimes recovery is persistent:
sudo fastboot flash antirbpass dummy.img
fastboot format userdata
#Installing custom ROM from recovery
From custom recovery: Wipe and Format Data, Select Cache and System partitions and Swipe to Wipe
Method 1: SIDELOADING
Sideload the <custom-rom-package>.zip
From custom recovery Advanced > ADB Sideload
From command line:
adb sideload <custom-rom-package>.zip
adb sideload <open_gapps-arm64-9.0-nano-xxx.zip>
adb sideload <addonsu-15.1-arm64-signed.zip>
Method 2: PUSHING
adb push <custom-rom-package>.zip /sdcard/
adb push open_gapps-arm64-9.0-pico-xxx.zip /sdcard/
adb push addonsu-15.1-arm64-signed.zip /sdcard/
@pointerblank550
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment