Skip to content

Instantly share code, notes, and snippets.

@agichim
Last active June 17, 2025 22:49
Show Gist options
  • Save agichim/fecb65ac6a30140e3f5c24f63bf2a8c5 to your computer and use it in GitHub Desktop.
Save agichim/fecb65ac6a30140e3f5c24f63bf2a8c5 to your computer and use it in GitHub Desktop.

Revisions

  1. agichim revised this gist Mar 23, 2025. No changes.
  2. agichim revised this gist Mar 23, 2025. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion flash-custom-rom-motog8power.md
    Original file line number Diff line number Diff line change
    @@ -138,7 +138,7 @@ Here are two methods checking:
    12. When it's finished flashing it will ask you whether to format data, choose `yes`.
    13. IMPORTANT STEP > Now boot the phone into system and follow steps until you reach the Android homescreen.

    ## Flash TWRP recovery
    ## Flash TWRP recovery (only for Android 10 Stock ROM)
    >You have to do this step after each time you flash Stock firmware and after each OTA update of a custom ROM.
    >**Download the TWRP image for your specific device, in the case of Moto G8 Power you can find it in the [Telegram channel](https://t.me/motog8familyupdates), make sure to get the latest version. This is a different telegram channel than the one with the Moto Flash Tool. Search for TWRP in the channel.**
  3. agichim revised this gist Jul 3, 2024. 1 changed file with 64 additions and 59 deletions.
    123 changes: 64 additions & 59 deletions flash-custom-rom-motog8power.md
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,21 @@
    # Moto G8 Power Guide to Flash and Install a custom ROM
    ---
    id: 3UT7YPV6Qnr2UL6H6roQ0
    title: Motog8power
    desc: null
    updated: 1682709194077
    created: 1629568034286
    ---

    # Moto G8 Power guide to flash and install a custom ROM

    **BEWARE:**
    I am not a developer. I put together this guide for my future self and for others. I had help from the [Moto G8 Official Telegram channel](https://t.me/MotoG8Official) community. I followed these steps to flash my own Moto G8 Power, except for the steps where I explicityl state I didn't follow myself. Software and tools also get updated over time so stuff here may get old.
    I am not a developer. I put together this guide for my future self and for others. I had help from the [Moto G8 Official Telegram channel](https://t.me/MotoG8Official) community. Software and tools get updated over time so stuff here may get old.

    **For devs:** if you think some stuff needs changing or updating or better written, let me know.

    **Contents:**

    - [Guide to Flash Moto G8 Power for Dummies.](#guide-to-flash-moto-g8-power-for-dummies)
    - [Moto G8 Power Guide to Flash and Install a custom ROM](#moto-g8-power-guide-to-flash-and-install-a-custom-rom)
    - [Unlock Bootloader](#unlock-bootloader)
    - [Flash Stock Firmware](#flash-stock-firmware)
    - [Find out if your device has Slots A/B (or if your device supports Seamless Updates).](#find-out-if-your-device-has-slots-ab-or-if-your-device-supports-seamless-updates)
    @@ -77,68 +85,65 @@ I am not a developer. I put together this guide for my future self and for other
    **IMPORTANT**:
    >The reason you need to flash the Stock Firmware is because this will populate Slot B, which is "empty" by default and by doing this you don't risk bricking your device.
    ### Find out if your device has Slots A/B (or if your device supports Seamless Updates).
    ### 1. Find out if your device has Slots A/B (or if your device supports Seamless Updates).
    >Moto G8 Power (sofiar) supports Slots A/B. You can skip this step.
    Here are two methods checking:

    **First method**
    #### First method
    1. Install [Termux](https://f-droid.org/en/packages/com.termux/), it's a terminal for Android. When the page opens scroll down until you see a `Version 0.112` (or any version number) and at the bottom of that version number click on **Download APK**
    2. Install Termux on your phone. You might get prompted to allow installation of insecure apps. Toggle the button to allow.
    3. Open Termux and type `getprop ro.build.ab_update` and hit Enter.
    4. Immediately you should see `true`. If so, it means your device support Seamless Updates.

    **Second method** → I haven't tested this method
    1. You can install this [app](https://play.google.com/store/apps/details?id=com.kevintresuelo.treble) from Google Play

    **Assuming your device supports Seamless Updates:**

    1. **Download the Moto Flash Tool**
    1. Download the Tool [here](https://androidfilehost.com/?w=files&flid=323101&sort_by=date&sort_dir=DESC)
    2. There's also the [Telegram channel](https://t.me/motoflashtool) where you will find the same link (always download the latest version and you can algo get support on Telegram)
    3. Unzip the file
    4. Place the file in your `C:` drive, preferrably in the `Android` folder you created earlier in this guide.
    5. **IMPORTANT:** make sure the PATH of the Tool has no spaces in it. This means that the `Title` of every higher level folder where the Tool is, should not have any spaces in it. The Tool won't work if there are spaces in its PATH.
    **WRONG:** `C:\Android\my moto g8 power\moto_flash_tool_windows_v0.6.6moto_flash_tool_windows`
    **CORRECT:** `C:\Android\mymotog8power\moto_flash_tool_windows_v0.6.6moto_flash_tool_windows`
    2. **Download the Stock Firmware for you phone**
    1. Find the specific Stork Firmware for your device [here](https://mirrors.lolinet.com/firmware/moto/)
    2. On that website, you need to go into the folder specific to your device
    3. To find out which one is your device, go into `fastboot` and around the top of the text you should see a similar line (this example is made up) `MBM-3.0-sofiar_reteu-3db56gr5f11-223421`
    4. The important thing in that line is `sofiar_reteu`. Depending on your device, those words will be different, go into the folders of each corresponding word
    ```
    Moto G Power/G⁸ Power (Sofia/Sofiar)
    Moto G Stylus/G Pro (Sofiap)
    Moto G⁸/G Fast (Rav)
    ```
    **a.** open the folder corresponding to the first word
    **b.** open the folder called `official`, if there is no `official` folder, check the folder which has the largest size (that means all the Stock Firmware are in that folder)
    **c.** inside the `official` folder find the folder corresponding to the second word (e.g.: `reteu`).
    **d.** now you will see several Stock Firmware. Best option is to download the latest one (usually the one at the bottom of the list, or check the Android version number `10, 11` in the title of each Firmware). If you download an earlier Stock Firmware, after you flashed with the Moto Flash Tool you will need to boot your phone and do the OTA updates (meaning you need to into Software Updates in your Settings and update your phone). OTA means Over The Air (updates via Wi-Fi)
    5. The downloaded Stock Firmware is a .zip file. Copy that file inside the `Firmware` folder which can be found inside the Moto Flash Tool folder.
    6. Boot your phone into `fastboot`
    7. Connect it to your computer via USB. Make sure that on the fastboot screen at the bottom it says `Transfer Mode: USB Connected`
    8. Go into the Moto Flash Tool folder and open `moto_flash_tool-win.exe`
    9. The console will open.
    10. Select `Flash/extract stock firmare`
    11. Select the .zip file of the Stock ROM
    12. Type `n` and hit Enter, this will begin the flashing process. This will format data automatically at the end of the process.
    13. The console might no look like it's doing anything, sometimes it hangs, hit Enter and it will show the progress. The third line in the screenshot `Invalid sparse file format at header magic` is normal.fa
    1. When it finished flashing it will ask you whether to format data or not.
    2. Type `y` and hit enter, this will format the data.
    3. I don't remember what happens after the data format, but I think you can close the console or select an `Exit` option if there is one.
    4. Your device will boot into `fastbootd`
    5. Now boot the phone into system, until you reach the Android homescreen.

    ## Flash TWRP
    >This step you have to after each time you flash Stock ROM and after each OTA update of a Custom ROM.
    **Download the TWRP image for your specific device, in the case of Moto G8 Power you can find it in the [Telegram channel](https://t.me/motog8familyupdates), make sure to get the latest version. This is a different telegram channel than the one with the Moto Flash Tool. Search for TWRP in the channel.**

    **Download the custom ROM you want from the [Telegram channel](https://t.me/motog8familyupdates) to flash and place it on a SD Card** ← That is another Telegram channel.

    If you don't have the custom ROM and Magisk on your SD Card before flashing TWRP, it means that after flashing TWRP you need to boot into system, copy the custom ROM and Magisk on the SD Card and then boot back into recovery.

    After you flashed the Stock Firmware and booted on the homescreen follow the next steps:
    #### Second method → I haven't tested this method
    1. You can install this [app](https://play.google.com/store/apps/details?id=com.kevintresuelo.treble) from Google Play.

    ### Download the Moto Flash Tool
    1. Download the Tool [here](https://androidfilehost.com/?w=files&flid=323101&sort_by=date&sort_dir=DESC)
    2. There's also the [Telegram channel](https://t.me/motoflashtool) where you will find the same link (always download the latest version and you can algo get support on Telegram)
    3. Unzip the file
    4. Place the file in your `C:` drive, preferrably in the `Android` folder you created earlier in this guide.
    5. **IMPORTANT:** make sure the PATH of the Tool has no spaces in it. This means that the `Title` of every higher level folder where the Tool is, should not have any spaces in it. The Tool won't work if there are spaces in its PATH.
    - **WRONG:** `C:\Android\my moto g8 power\moto_flash_tool_windows_v0.6.6moto_flash_tool_windows`
    - **CORRECT:** `C:\Android\mymotog8power\moto_flash_tool_windows_v0.6.6moto_flash_tool_windows`

    ### Download the Stock Firmware for you phone
    >**Disclaimer**: the Moto Flash Tool only works with Android 10 Stock Firmware
    1. Find the specific Stork Firmware for your device [here](https://mirrors.lolinet.com/firmware/moto/)
    2. On that website, you need to go into the folder specific to your device
    3. To find out which one is your device, go into `fastboot` and around the top of the text you should see a similar line (this example is made up) `MBM-3.0-sofiar_reteu-3db56gr5f11-223421`
    4. The important thing in that line is `sofiar_reteu`. Depending on your device, those words will be different, go into the folders of each corresponding word
    ```
    Moto G Power/G⁸ Power (Sofia/Sofiar)
    Moto G Stylus/G Pro (Sofiap)
    Moto G⁸/G Fast (Rav)
    ```
    - open the folder corresponding to the first word
    - open the folder called `official`, if there is no `official` folder, check the folder which has the largest size (that means all the Stock Firmware are in that folder)
    - inside the `official` folder find the folder corresponding to the second word (e.g.: `reteu`).
    - now you will see several Stock Firmware. Best option is to download the latest one (usually the one at the bottom of the list, or check the Android version number `10, 11` in the title of each Firmware). If you download an earlier Stock Firmware, after you flashed with the Moto Flash Tool you will need to boot your phone and do the OTA updates (meaning you need to into Software Updates in your Settings and update your phone). OTA means Over The Air (updates via Wi-Fi)
    ### Flash stock
    1. The downloaded Stock Firmware is a .zip file. Copy that file inside the `Firmware` folder which can be found inside the Moto Flash Tool folder.
    2. Boot your phone into `fastboot`
    3. Connect it to your computer via USB. Make sure that on the fastboot screen at the bottom it says `Transfer Mode: USB Connected
    4. Go into the Moto Flash Tool folder and open `moto_flash_tool-win.exe`
    5. The console will open.
    6. Select `Flash/extract stock firmare`
    7. Select the .zip file of the Stock ROM
    8. Type `n` and hit Enter, this will begin the flashing process. This will format data automatically at the end of the process.
    9. The console might no look like it's doing anything, sometimes it hangs, hit Enter and it will show the progress. The third line in the screenshot `Invalid sparse file format at header magic` is normal.
    10. Type `y` and hit enter, this will format the data.
    11. Your device will boot into `fastbootd` and the console will continue flashing.
    12. When it's finished flashing it will ask you whether to format data, choose `yes`.
    13. IMPORTANT STEP > Now boot the phone into system and follow steps until you reach the Android homescreen.

    ## Flash TWRP recovery
    >You have to do this step after each time you flash Stock firmware and after each OTA update of a custom ROM.
    >**Download the TWRP image for your specific device, in the case of Moto G8 Power you can find it in the [Telegram channel](https://t.me/motog8familyupdates), make sure to get the latest version. This is a different telegram channel than the one with the Moto Flash Tool. Search for TWRP in the channel.**
    >**Download the custom ROM you want from the [Telegram channel](https://t.me/motog8familyupdates) to flash and place it on a SD Card** ← That is another Telegram channel.
    1. Power off device, boot into `fastboot`
    2. Copy the `twrp.img` (doesn't matter if the name is different) inside the `platform-tools` folder. You don't really have to this because you included `platform-tools` in the $PATH earlier.
    @@ -166,7 +171,6 @@ After you flashed the Stock Firmware and booted on the homescreen follow the nex

    ## Flash Magisk
    >This step has to be done after each ROM you flash or after each OTA update.
    **IMPORTANT:**
    >After flashing the ROM boot into system and then flash Magisk.
    The official source for Magisk is the [GitHub repo](https://github.com/topjohnwu/Magisk/releases)
    @@ -181,4 +185,5 @@ The official source for Magisk is the [GitHub repo](https://github.com/topjohnwu
    8. Flash it
    9. Boot into system
    10. Check if you have the Magisk app installed, if you don't, install the APK from GitHub
    11. You have Root
    11. You have root

  4. agichim revised this gist Aug 23, 2021. No changes.
  5. agichim revised this gist Aug 23, 2021. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions flash-custom-rom-motog8power.md
    Original file line number Diff line number Diff line change
    @@ -78,6 +78,7 @@ I am not a developer. I put together this guide for my future self and for other
    >The reason you need to flash the Stock Firmware is because this will populate Slot B, which is "empty" by default and by doing this you don't risk bricking your device.
    ### Find out if your device has Slots A/B (or if your device supports Seamless Updates).
    >Moto G8 Power (sofiar) supports Slots A/B. You can skip this step.
    Here are two methods checking:

    **First method**
    @@ -88,9 +89,6 @@ Here are two methods checking:

    **Second method** → I haven't tested this method
    1. You can install this [app](https://play.google.com/store/apps/details?id=com.kevintresuelo.treble) from Google Play
    2. If your device doesn't support Seamless Updates you should get a message like this in the app
    ![e3933b7a6bec18994eae35580a7f8208.png](:/330e508e04d74ab0af4c2f34f5afb56a)
    3. If your device does support Seamles Updates you will see a message contrary to the one in the screenshot above.

    **Assuming your device supports Seamless Updates:**

  6. agichim revised this gist Aug 23, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion flash-custom-rom-motog8power.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # Guide to Flash Moto G8 Power for Dummies.
    # Moto G8 Power Guide to Flash and Install a custom ROM

    **BEWARE:**
    I am not a developer. I put together this guide for my future self and for others. I had help from the [Moto G8 Official Telegram channel](https://t.me/MotoG8Official) community. I followed these steps to flash my own Moto G8 Power, except for the steps where I explicityl state I didn't follow myself. Software and tools also get updated over time so stuff here may get old.
  7. agichim revised this gist Aug 23, 2021. 1 changed file with 15 additions and 17 deletions.
    32 changes: 15 additions & 17 deletions flash-custom-rom-motog8power.md
    Original file line number Diff line number Diff line change
    @@ -8,12 +8,12 @@ I am not a developer. I put together this guide for my future self and for other
    **Contents:**

    - [Guide to Flash Moto G8 Power for Dummies.](#guide-to-flash-moto-g8-power-for-dummies)
    - [Unlock Bootloader](#unlock-bootloader)
    - [Flash Stock Firmware](#flash-stock-firmware)
    - [Find out if your device has Slots A/B (or if your device supports Seamless Updates).](#find-out-if-your-device-has-slots-ab-or-if-your-device-supports-seamless-updates)
    - [Flash TWRP](#flash-twrp)
    - [Flash Custom ROM](#flash-custom-rom)
    - [Flash Magisk](#flash-magisk)
    - [Unlock Bootloader](#unlock-bootloader)
    - [Flash Stock Firmware](#flash-stock-firmware)
    - [Find out if your device has Slots A/B (or if your device supports Seamless Updates).](#find-out-if-your-device-has-slots-ab-or-if-your-device-supports-seamless-updates)
    - [Flash TWRP](#flash-twrp)
    - [Flash Custom ROM](#flash-custom-rom)
    - [Flash Magisk](#flash-magisk)

    ## Unlock Bootloader
    >This step you only do ONCE.
    @@ -122,19 +122,17 @@ Here are two methods checking:
    8. Go into the Moto Flash Tool folder and open `moto_flash_tool-win.exe`
    9. The console will open.
    10. Select `Flash/extract stock firmare`
    11. I don't remember if there is another action you have to take after Step 10 or if the flashing begins
    12. If the console seems to be doing something, wait
    13. If it got to `Reboot to fastbootd` and some text below and the curso is blipping but you are not prompted into taking an action and you've been waiting around 5min or more then hit Enter and you can continue to the next Step. This issue I mention is because something the console hangs, gets stuck visually, but still work in the background. This is where it hung for me.
    ![ec058bc8850ce7b5991d2b46ec170de8.png](:/922832800eec4d9e964165a5eff30644)
    The third line in the screenshot `Invalid sparse file format at header magic` is normal.
    15. When it finished flashing it will ask you whether to format data or not.
    16. Type `y` and hit enter, this will format the data.
    17. I don't remember what happens after the data format, but I think you can close the console or select an `Exit` option if there is one.
    18. Your device will boot into `fastbootd`
    19. Now boot the phone into system, until you reach the Android homescreen.
    11. Select the .zip file of the Stock ROM
    12. Type `n` and hit Enter, this will begin the flashing process. This will format data automatically at the end of the process.
    13. The console might no look like it's doing anything, sometimes it hangs, hit Enter and it will show the progress. The third line in the screenshot `Invalid sparse file format at header magic` is normal.fa
    1. When it finished flashing it will ask you whether to format data or not.
    2. Type `y` and hit enter, this will format the data.
    3. I don't remember what happens after the data format, but I think you can close the console or select an `Exit` option if there is one.
    4. Your device will boot into `fastbootd`
    5. Now boot the phone into system, until you reach the Android homescreen.

    ## Flash TWRP
    >This step you only do ONCE.
    >This step you have to after each time you flash Stock ROM and after each OTA update of a Custom ROM.
    **Download the TWRP image for your specific device, in the case of Moto G8 Power you can find it in the [Telegram channel](https://t.me/motog8familyupdates), make sure to get the latest version. This is a different telegram channel than the one with the Moto Flash Tool. Search for TWRP in the channel.**

  8. agichim revised this gist Aug 21, 2021. 1 changed file with 27 additions and 18 deletions.
    45 changes: 27 additions & 18 deletions flash-custom-rom-motog8power.md
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,22 @@
    # This is a guide to Flash Moto G8 Power for Dummies.
    # Guide to Flash Moto G8 Power for Dummies.

    **BEWARE:**
    I am not a developer. I put together this guide for my future self and for others. I had help from the [Moto G8 Official Telegram channel](https://t.me/MotoG8Official) community. I followed these steps to flash my own Moto G8 Power, except for the steps where I explicityl state I didn't follow myself. Software and tools also get updated over time so stuff here may get old.

    **For devs:** if you think some stuff needs changing or updating or better written, let me know.

    **Contents:**
    [Unlock Bootloader](#unlock-bootloader)
    [Flash Stock Firmware](#flash-stock-firmware)
    [Flash TWRP](#flash-twrp)
    [Flash Magisk (get Root)](#flash-magisk)

    # Unlock Bootloader
    - [Guide to Flash Moto G8 Power for Dummies.](#guide-to-flash-moto-g8-power-for-dummies)
    - [Unlock Bootloader](#unlock-bootloader)
    - [Flash Stock Firmware](#flash-stock-firmware)
    - [Find out if your device has Slots A/B (or if your device supports Seamless Updates).](#find-out-if-your-device-has-slots-ab-or-if-your-device-supports-seamless-updates)
    - [Flash TWRP](#flash-twrp)
    - [Flash Custom ROM](#flash-custom-rom)
    - [Flash Magisk](#flash-magisk)

    ## Unlock Bootloader
    >This step you only do ONCE.
    1. Install [Android SDK](http://developer.android.com/sdk/index.html)
    2. Install the latest [Motorola USB Drivers](https://motorola-global-portal.custhelp.com/app/answers/detail/a_id/88481)
    @@ -66,12 +71,11 @@ I am not a developer. I put together this guide for my future self and for other
    33. On your phone you should see two option, choose with the Volume key the option at the bottom `Unlock bootloader`
    34. Device screen will return to fastboot mode and the line before last should say `flashing_unlocked`. That means you have unlocked the bootloader successfully.

    # Flash Stock Firmware

    Flashing Motorola Stock Firmware is not the same as flashing a Motorola Stock ROM via TRWP. The following steps apply for new devices which have Slots A/B.
    ## Flash Stock Firmware
    >Flashing Motorola Stock Firmware is not the same as flashing a Motorola Stock ROM via TWRP. The following steps apply for new devices which have Slots A/B.
    **IMPORTANT**:
    The reason you need to flash the Stock Firmware is because this will populate Slot B, which is "empty" by default and by doing this you don't risk bricking your device.
    >The reason you need to flash the Stock Firmware is because this will populate Slot B, which is "empty" by default and by doing this you don't risk bricking your device.
    ### Find out if your device has Slots A/B (or if your device supports Seamless Updates).
    Here are two methods checking:
    @@ -88,7 +92,7 @@ Here are two methods checking:
    ![e3933b7a6bec18994eae35580a7f8208.png](:/330e508e04d74ab0af4c2f34f5afb56a)
    3. If your device does support Seamles Updates you will see a message contrary to the one in the screenshot above.

    **Assuming you device supports Seamless Updates:**
    **Assuming your device supports Seamless Updates:**

    1. **Download the Moto Flash Tool**
    1. Download the Tool [here](https://androidfilehost.com/?w=files&flid=323101&sort_by=date&sort_dir=DESC)
    @@ -129,7 +133,9 @@ Here are two methods checking:
    18. Your device will boot into `fastbootd`
    19. Now boot the phone into system, until you reach the Android homescreen.

    # Flash TWRP
    ## Flash TWRP
    >This step you only do ONCE.
    **Download the TWRP image for your specific device, in the case of Moto G8 Power you can find it in the [Telegram channel](https://t.me/motog8familyupdates), make sure to get the latest version. This is a different telegram channel than the one with the Moto Flash Tool. Search for TWRP in the channel.**

    **Download the custom ROM you want from the [Telegram channel](https://t.me/motog8familyupdates) to flash and place it on a SD Card** ← That is another Telegram channel.
    @@ -145,9 +151,12 @@ After you flashed the Stock Firmware and booted on the homescreen follow the nex
    1. In your case copy the name of your TWRP image and the file format `.img` and paste it after the word `recovery` from the step above.
    5. Hit Enter
    6. Can't remember what happens next, but it flashes TWRP in a few seconds.
    7. Boot into **Recovery**. If the phone is still in `fastboot`
    7. Boot into **Recovery** if the phone is still in `fastboot`
    8. Choose `recovery` with the volume keys and hit the Power button
    9. The phone will boot into TWRP

    ## Flash Custom ROM

    10. Inside TWRP press on the **Wipe** button
    11. Press **Format Data**, the button at the bottom on the right-hand side
    12. Go back to main TWRP screen
    @@ -159,13 +168,13 @@ After you flashed the Stock Firmware and booted on the homescreen follow the nex
    18. After the ROM flashed DO NOT flash Magisk if you already have it on your SD Card
    19. Boot into System.


    # Flash Magisk
    ## Flash Magisk
    >This step has to be done after each ROM you flash or after each OTA update.
    **IMPORTANT:**
    >After flashing the ROM boot into system and then flash Magisk.
    The official source for Magisk is the [GitHub repo](https://github.com/topjohnwu/Magisk/releases)

    **IMPORTANT:** After flashing the ROM boot into system and then flash Magisk.

    1. Download the .apk file from GitHub and make a copy/duplicate.
    2. Rename the file extension instead of `.apk` to `.zip` ← I didn't read these official instructions, but instead download a Magisk.zip file from magisk.me (I'm not sure if this website is official or not, but I was lucky that it was a genuine file.)
    3. Copy the .zip file on your SD Card
    @@ -176,4 +185,4 @@ The official source for Magisk is the [GitHub repo](https://github.com/topjohnwu
    8. Flash it
    9. Boot into system
    10. Check if you have the Magisk app installed, if you don't, install the APK from GitHub
    11. You have Root
    11. You have Root
  9. agichim revised this gist May 5, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion flash-custom-rom-motog8power.md
    Original file line number Diff line number Diff line change
    @@ -170,7 +170,7 @@ The official source for Magisk is the [GitHub repo](https://github.com/topjohnwu
    2. Rename the file extension instead of `.apk` to `.zip` ← I didn't read these official instructions, but instead download a Magisk.zip file from magisk.me (I'm not sure if this website is official or not, but I was lucky that it was a genuine file.)
    3. Copy the .zip file on your SD Card
    4. Boot into Recovery
    5. Click on **Install*
    5. Click on **Install**
    6. Select SD Card as Storage
    7. Find the magisk zip file
    8. Flash it
  10. agichim revised this gist May 5, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion flash-custom-rom-motog8power.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # This is a guide to Flash Moto G8 Power for Dummies.

    **BEWARE:**
    I am not a developer. I put together this guide for my future self and for others. I had help from the [Moto G8 Official Telegram channel](https://t.me/MotoG8Official) community. I followed these steps to flash my own Moto G8 Power, except for the steps where I explicityl state I didn't follow myself.
    I am not a developer. I put together this guide for my future self and for others. I had help from the [Moto G8 Official Telegram channel](https://t.me/MotoG8Official) community. I followed these steps to flash my own Moto G8 Power, except for the steps where I explicityl state I didn't follow myself. Software and tools also get updated over time so stuff here may get old.

    **For devs:** if you think some stuff needs changing or updating or better written, let me know.

  11. agichim revised this gist May 5, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion flash-custom-rom-motog8power.md
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,7 @@ I am not a developer. I put together this guide for my future self and for other
    [Unlock Bootloader](#unlock-bootloader)
    [Flash Stock Firmware](#flash-stock-firmware)
    [Flash TWRP](#flash-twrp)
    [Flash Magisk (get Root)](flash-magisk)
    [Flash Magisk (get Root)](#flash-magisk)

    # Unlock Bootloader

  12. agichim revised this gist May 5, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion flash-custom-rom-motog8power.md
    Original file line number Diff line number Diff line change
    @@ -160,7 +160,7 @@ After you flashed the Stock Firmware and booted on the homescreen follow the nex
    19. Boot into System.


    # Obtain Root by flashing Magisk and installing the app
    # Flash Magisk

    The official source for Magisk is the [GitHub repo](https://github.com/topjohnwu/Magisk/releases)

  13. agichim created this gist May 5, 2021.
    179 changes: 179 additions & 0 deletions flash-custom-rom-motog8power.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,179 @@
    # This is a guide to Flash Moto G8 Power for Dummies.

    **BEWARE:**
    I am not a developer. I put together this guide for my future self and for others. I had help from the [Moto G8 Official Telegram channel](https://t.me/MotoG8Official) community. I followed these steps to flash my own Moto G8 Power, except for the steps where I explicityl state I didn't follow myself.

    **For devs:** if you think some stuff needs changing or updating or better written, let me know.

    **Contents:**
    [Unlock Bootloader](#unlock-bootloader)
    [Flash Stock Firmware](#flash-stock-firmware)
    [Flash TWRP](#flash-twrp)
    [Flash Magisk (get Root)](flash-magisk)

    # Unlock Bootloader

    1. Install [Android SDK](http://developer.android.com/sdk/index.html)
    2. Install the latest [Motorola USB Drivers](https://motorola-global-portal.custhelp.com/app/answers/detail/a_id/88481)
    3. Download [ADB files from Google](https://developer.android.com/studio/run/oem-usb) in `C:` in a new folder named `Android`
    5. Put your device in fastboot mode
    1. Power off your device (make sure your device is not connected with the USB cable, or it will power back on immediately)
    2. Hold the **power** button and the **volume down** button simultaneously until the screen boots into `fastboot` (you'll see some small text at the bottom of the screen on a black background)
    7. Connect your device via USB to your computer.
    8. Place the folder of the ADB files from Google in your $PATH
    1. Open Control Panel
    2. Open System
    3. Click on Advanced System settings on the left hand side panel
    4. In the new window click on Environment Variables...
    5. In the bottom pane (System variables) find PATH under the Variable column
    6. Select PATH
    7. Click on Edit...
    8. Below the last row, double click on an empty row
    9. Paste the path of your ADB files. e.g.: `C:\Android\platform-tools_r31.0.2-windows\platform-tools` → the idea is that the folder is located on your `C:` partition
    11. Restart your computer
    9. Open a terminal in the path where Android Studio was installed. e.g.: `C:\Program Files\Android\Android Studio\bin`
    10. Type `fastboot devices`.
    11. Your device should show like this `ZY227F2B6F fastboot`
    12. Type `fastboot oem get_unlock_data`
    13. The returned string will be used to retrieve your unlock key.
    ```
    (bootloader) 0A40040192024205#4C4D3556313230
    (bootloader) 30373731363031303332323239#BD00
    (bootloader) 8A672BA4746C2CE02328A2AC0C39F95
    (bootloader) 1A3E5#1F53280002000000000000000
    (bootloader) 0000000
    ```
    13. Copy the whole text where you have `(bootloader)` in front of each line
    14. Go to [Scrub Tools](https://motorola-global-portal.custhelp.com/app/standalone/bootloader/data_scrub)
    15. Paste the copied string in the text box
    16. Click `Format my data`
    17. It will remove all the extra text and space that do not belong to the string
    18. Copy the formatted string
    19. Go to the Motorola [website](https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-a).
    20. You have to Sign In or Create an account and Sign in.
    21. At the bottom click **Next**
    22. Now you will see the same instructions as in this guide, you can skip them if needed.
    23. Almost at the bottom, in Step 6 (on the website), paste the formatted string
    24. Click on the blue button `Can my device be unlocked?`
    25. If your device is unlockable, a "REQUEST UNLOCK KEY" button will now appear at the bottom of this page.
    26. Click `I Agree`
    27. Click on the blue button `REQUEST UNLOCK KEY`
    28. You will get the key via email along with instruction to unlock the bootloader
    29. Instruction [link](https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-c)
    30. Open a different terminal in the ADB files from Google, inside here `C:\Android\platform-tools_r31.0.2-windows\platform-tools`
    31. Type `fastboot oem unlock UNIQUE_KEY``fastboot oem unlock QUXJMX5U3YBFSSTJDFRH`
    32. Hit enter
    33. On your phone you should see two option, choose with the Volume key the option at the bottom `Unlock bootloader`
    34. Device screen will return to fastboot mode and the line before last should say `flashing_unlocked`. That means you have unlocked the bootloader successfully.

    # Flash Stock Firmware

    Flashing Motorola Stock Firmware is not the same as flashing a Motorola Stock ROM via TRWP. The following steps apply for new devices which have Slots A/B.

    **IMPORTANT**:
    The reason you need to flash the Stock Firmware is because this will populate Slot B, which is "empty" by default and by doing this you don't risk bricking your device.

    ### Find out if your device has Slots A/B (or if your device supports Seamless Updates).
    Here are two methods checking:

    **First method**
    1. Install [Termux](https://f-droid.org/en/packages/com.termux/), it's a terminal for Android. When the page opens scroll down until you see a `Version 0.112` (or any version number) and at the bottom of that version number click on **Download APK**
    2. Install Termux on your phone. You might get prompted to allow installation of insecure apps. Toggle the button to allow.
    3. Open Termux and type `getprop ro.build.ab_update` and hit Enter.
    4. Immediately you should see `true`. If so, it means your device support Seamless Updates.

    **Second method** → I haven't tested this method
    1. You can install this [app](https://play.google.com/store/apps/details?id=com.kevintresuelo.treble) from Google Play
    2. If your device doesn't support Seamless Updates you should get a message like this in the app
    ![e3933b7a6bec18994eae35580a7f8208.png](:/330e508e04d74ab0af4c2f34f5afb56a)
    3. If your device does support Seamles Updates you will see a message contrary to the one in the screenshot above.

    **Assuming you device supports Seamless Updates:**

    1. **Download the Moto Flash Tool**
    1. Download the Tool [here](https://androidfilehost.com/?w=files&flid=323101&sort_by=date&sort_dir=DESC)
    2. There's also the [Telegram channel](https://t.me/motoflashtool) where you will find the same link (always download the latest version and you can algo get support on Telegram)
    3. Unzip the file
    4. Place the file in your `C:` drive, preferrably in the `Android` folder you created earlier in this guide.
    5. **IMPORTANT:** make sure the PATH of the Tool has no spaces in it. This means that the `Title` of every higher level folder where the Tool is, should not have any spaces in it. The Tool won't work if there are spaces in its PATH.
    **WRONG:** `C:\Android\my moto g8 power\moto_flash_tool_windows_v0.6.6moto_flash_tool_windows`
    **CORRECT:** `C:\Android\mymotog8power\moto_flash_tool_windows_v0.6.6moto_flash_tool_windows`
    2. **Download the Stock Firmware for you phone**
    1. Find the specific Stork Firmware for your device [here](https://mirrors.lolinet.com/firmware/moto/)
    2. On that website, you need to go into the folder specific to your device
    3. To find out which one is your device, go into `fastboot` and around the top of the text you should see a similar line (this example is made up) `MBM-3.0-sofiar_reteu-3db56gr5f11-223421`
    4. The important thing in that line is `sofiar_reteu`. Depending on your device, those words will be different, go into the folders of each corresponding word
    ```
    Moto G Power/G⁸ Power (Sofia/Sofiar)
    Moto G Stylus/G Pro (Sofiap)
    Moto G⁸/G Fast (Rav)
    ```
    **a.** open the folder corresponding to the first word
    **b.** open the folder called `official`, if there is no `official` folder, check the folder which has the largest size (that means all the Stock Firmware are in that folder)
    **c.** inside the `official` folder find the folder corresponding to the second word (e.g.: `reteu`).
    **d.** now you will see several Stock Firmware. Best option is to download the latest one (usually the one at the bottom of the list, or check the Android version number `10, 11` in the title of each Firmware). If you download an earlier Stock Firmware, after you flashed with the Moto Flash Tool you will need to boot your phone and do the OTA updates (meaning you need to into Software Updates in your Settings and update your phone). OTA means Over The Air (updates via Wi-Fi)
    5. The downloaded Stock Firmware is a .zip file. Copy that file inside the `Firmware` folder which can be found inside the Moto Flash Tool folder.
    6. Boot your phone into `fastboot`
    7. Connect it to your computer via USB. Make sure that on the fastboot screen at the bottom it says `Transfer Mode: USB Connected`
    8. Go into the Moto Flash Tool folder and open `moto_flash_tool-win.exe`
    9. The console will open.
    10. Select `Flash/extract stock firmare`
    11. I don't remember if there is another action you have to take after Step 10 or if the flashing begins
    12. If the console seems to be doing something, wait
    13. If it got to `Reboot to fastbootd` and some text below and the curso is blipping but you are not prompted into taking an action and you've been waiting around 5min or more then hit Enter and you can continue to the next Step. This issue I mention is because something the console hangs, gets stuck visually, but still work in the background. This is where it hung for me.
    ![ec058bc8850ce7b5991d2b46ec170de8.png](:/922832800eec4d9e964165a5eff30644)
    The third line in the screenshot `Invalid sparse file format at header magic` is normal.
    15. When it finished flashing it will ask you whether to format data or not.
    16. Type `y` and hit enter, this will format the data.
    17. I don't remember what happens after the data format, but I think you can close the console or select an `Exit` option if there is one.
    18. Your device will boot into `fastbootd`
    19. Now boot the phone into system, until you reach the Android homescreen.

    # Flash TWRP
    **Download the TWRP image for your specific device, in the case of Moto G8 Power you can find it in the [Telegram channel](https://t.me/motog8familyupdates), make sure to get the latest version. This is a different telegram channel than the one with the Moto Flash Tool. Search for TWRP in the channel.**

    **Download the custom ROM you want from the [Telegram channel](https://t.me/motog8familyupdates) to flash and place it on a SD Card** ← That is another Telegram channel.

    If you don't have the custom ROM and Magisk on your SD Card before flashing TWRP, it means that after flashing TWRP you need to boot into system, copy the custom ROM and Magisk on the SD Card and then boot back into recovery.

    After you flashed the Stock Firmware and booted on the homescreen follow the next steps:

    1. Power off device, boot into `fastboot`
    2. Copy the `twrp.img` (doesn't matter if the name is different) inside the `platform-tools` folder. You don't really have to this because you included `platform-tools` in the $PATH earlier.
    3. Inside the `platform-tools` folder where you copied TWRP open your console (CMD or any other console you have on your computer, devs say PowerShell doesn't work well).
    4. Type `fastboot flash recovery twrp.img`
    1. In your case copy the name of your TWRP image and the file format `.img` and paste it after the word `recovery` from the step above.
    5. Hit Enter
    6. Can't remember what happens next, but it flashes TWRP in a few seconds.
    7. Boot into **Recovery**. If the phone is still in `fastboot`
    8. Choose `recovery` with the volume keys and hit the Power button
    9. The phone will boot into TWRP
    10. Inside TWRP press on the **Wipe** button
    11. Press **Format Data**, the button at the bottom on the right-hand side
    12. Go back to main TWRP screen
    13. Press **Install** → this step assumess you have the custom ROM already on your SD Card.
    14. Press the button at the bottom **Select Storage**
    15. Select **Micro SD card**
    16. In the file list, select the custom ROM
    17. Swipe to flash it.
    18. After the ROM flashed DO NOT flash Magisk if you already have it on your SD Card
    19. Boot into System.


    # Obtain Root by flashing Magisk and installing the app

    The official source for Magisk is the [GitHub repo](https://github.com/topjohnwu/Magisk/releases)

    **IMPORTANT:** After flashing the ROM boot into system and then flash Magisk.

    1. Download the .apk file from GitHub and make a copy/duplicate.
    2. Rename the file extension instead of `.apk` to `.zip` ← I didn't read these official instructions, but instead download a Magisk.zip file from magisk.me (I'm not sure if this website is official or not, but I was lucky that it was a genuine file.)
    3. Copy the .zip file on your SD Card
    4. Boot into Recovery
    5. Click on **Install*
    6. Select SD Card as Storage
    7. Find the magisk zip file
    8. Flash it
    9. Boot into system
    10. Check if you have the Magisk app installed, if you don't, install the APK from GitHub
    11. You have Root