# ROM Flashing guide ## Motorola Edge 50 Pro (eqe) ## 1. Prerequisite 1. Make sure your computer has adb and fastboot. Setup instructions can be found [here](https://wiki.lineageos.org/adb_fastboot_guide.html). 1. Enable USB debugging on your device. 1. Boot your device with the stock OS at least once and check every functionality. 1. Remove all Google accounts from your device to avoid “Factory reset protection” :::warning ⚠ Make sure that you can send and receive SMS and place and receive calls (also via WiFi and LTE, if available), otherwise it won’t work on Custom ROM either! Additionally, some devices require that VoLTE/VoWiFi be utilized once on stock to provision IMS. ::: ## 2. Unlocking the bootloader :::info 🛈 Skip if you already have it unlocked ::: Follow the instructions at [Motorola Support](http://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-a) to unlock your bootloader. ## 3. Installing custom recovery 1. Download and flash provided recovery.img and vendor_boot.img from fastboot ``` fastboot flash recovery recovery.img fastboot flash vendor_boot vendor_boot.img ``` 2. Boot into recovery mode ``` fastboot reboot recovery ``` ## 4. Ensuring all firmware partitions are consistent :::info 🛈 The steps below only need to be run once per device. ::: In some cases, the inactive slot can be unpopulated or contain much older firmware than the active slot, leading to various issues including a potential hard-brick. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot. To do this, sideload the `copy-partitions-20220613-signed.zip` package by doing the following: 1. Download the [copy-partitions-20220613-signed.zip](https://mirrorbits.lineageos.org/tools/copy-partitions-20220613-signed.zip) file. 2. Sideload the `copy-partitions-20220613-signed.zip` package: * On the device, select “Apply Update”, then “Apply from ADB” to begin sideload. * On the host machine, sideload the package using: `adb -d sideload copy-partitions-20220613-signed.zip` 3. Now reboot to recovery by tapping “Advanced”, then “Reboot to recovery”. ## 5. Installing ROM 1. Download ROM package. 2. Boot into recovery mode. 3. Now tap **Factory Reset**, then **Format data / factory reset** and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage, as well as format your cache partition (if you have one). 4. Return to the main menu. 5. Sideload the ROM package but do not reboot before you read/followed the rest of the instructions! * On the device, select “Apply Update”, then “Apply from ADB” to begin sideload. * On the host machine, sideload the package using: ```adb -d sideload filename.zip```. :::success **🛈 INFO**: * Once you see a back arrow at the top left corner of your recovery the sideload is completed. Progress on your pc will stop at around 47%. This is normal behaviour. * If you get the error Error Applying update: 7 (ErrorCode: kInstallDeviceOpenError) while flashing the ROM, flash the [super-empty.img](https://lineage.samarv121.dev/eqe-20250206_034115/super_empty.img) from fastboot mode using fastboot wipe-super super_empty.img before sideloading the ROM again. ::: :::success **🛈 TIP**: After the package is installed, recovery will inform you that reboot to recovery is required to install add-ons. In case you want to do that, please select “Yes,” otherwise “No”. ::: ## 6. All set! Once you have installed everything successfully, you can now reboot your device into the OS for the first time! * Click the back arrow in the top left of the screen, then “Reboot system now”.