• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[GUIDE] [NOOB-FRIENDLY] Custom ROM Flashing Guide

Search This thread

AryanAA

Senior Member
May 13, 2017
360
227
Faridabad
Hi there,

I'm new to this Asus 5Z, used to flash my old HTC One M7 until unofficial LOS 17.1 but decided to change to a more powerful smartphone.

I tried (really tried hard) to follow your tutorial. My computer is W7 with adb & fastboot working (installed latest platform-tool), unlocked BL thanks to Asus apk, did all the things without issues until the step 10. When I flashed the rom (latest LOSMicro-G 18.1), twrp remains flashing and never stops.

And I did something stupid... rebooted to bootloader, as fastboot wasn't working (no device detected) i rebooted twrp, but adb wasn't working neither. And I... formated data, and wrongly rebooted to bootloader, thinking that I was going to try again.

I'm now stucked into bootloader (fastboot mode), it's impossible to power off the phone, I don't have twrp anymore and the phone isn't recognized by fastboot devices comand. On my computer, I removed android and asus drivers, tried to install them again, but I still have a yellow warning and a code 10 error.

So I'm unable to communicate with the phone and flash anything.

Can someone help me ?

What is the code 10 error? Also, did you try hard rebooting back to fastboot? (long press vol+powerup for 15-20sec). You can try edl as a last resort. Folks over at https://t.me/ASUSZenfone5ZGroup might be able to guide you better.
 

amitrahi04

Member
Mar 14, 2013
32
0
Tried flashing stock firmware, stuck in the boot loop. then decided to install a custom ROM.
Now cannot go past the second step(disable verity), keep getting this same error. Tried various versions of adb but nothing worked.
I unlocked the bootloader using the unofficial method, used the toolkit found here in zenfone 5z forum.
 

Attachments

  • Screenshot 2021-11-05 175738.jpg
    Screenshot 2021-11-05 175738.jpg
    42.6 KB · Views: 7
  • 20211105_180646.jpg
    20211105_180646.jpg
    1.1 MB · Views: 8

Top Liked Posts

  • There are no posts matching your filters.
  • 16
    Custom ROM Flashing Guide
    So after tons and tons of test builds, the good ol' devs managed to get everything working and gave us a super stable ROMs (many more to follow soon ;) ). However, since our device supports A/B scheme, a newbie can find it rather difficult to get used to flashing ROMs, kernels and even GApps! So I decided to prepare a simple guide which should help you get used to flashing ROMs and lots of other stuff.

    Disclaimer: If you don't know what bootloader is and/or don't know anything about Custom ROMs, I strongly recommend you to not try this on your own and rather watch some videos about them and the advantages/disadvantages associated with them.

    Notes:
    1. Prerequisites:


    • Unlocked Bootloader
    • ADB, Fastboot and Device Drivers (Google them)
    • Use Command Prompt instead of PowerShell for ease of use.

    STEPS:

    1. Boot into Fastboot mode (power+vol up) and run:
    Code:
    fastboot -w
    Note your active slot from here. Mine is 'b' as can be seen from the pic attached. Yours can be 'a' or 'b'.
    IMG_20100127_042423.jpg

    2. Download vbmeta from View attachment q_vbmeta.img and then do this:
    Code:
    fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

    3. Now run the following command in your fastboot using pc(obviously):

    If your active slot was 'a':
    Code:
    fastboot set_active b

    If your active slot was 'b':
    Code:
    fastboot set_active a

    4. Either restart bootloader directly from your phone (using volume and power keys) or do this:
    Code:
    fastboot reboot bootloader
    Your fastboot screen should now look like the following. Notice the change in the active slot (if yours was 'a' in the previous step, it should be 'b' now).
    IMG_20100127_042846.jpg

    5. It's TWRP time!!
    Download TWRP (both boot.img and permanent zip) by Jackeagle from here.

    Flash TWRP using:
    Code:
    fastboot flash boot boot.img
    Make sure the name of your downloaded twrp image file is boot.img! If not, either rename the file or change the fastboot code to that filename.img

    6. Now reboot to recovery using power and vol keys on your phone. You should see TWRP booting up now. If not, you've messed up somewhere, do the entire process again (correctly ;) ).

    7. Click on WIPE > ADVANCED WIPE, and choose System, Dalvik (Cache) and Data.

    8. Check ROM notes and see if it comes with inbuilt vendor or not. If it does, you can skip this step. If it doesn't, flash the following vendor zip in TWRP, depending on whether you want to stay encrypted or become decrypted (flash dfe after vendor if you do).

    Encrypted Vendor: https://sourceforge.net/projects/custom-romeo/files/Evolution-X/vendor_20_3.img/download

    9. Now, if you unlocked your bootloader via official apk (provided by Asus), then flash ABL.zip in TWRP/SHRP. However, if you unlocked unofficially, you can skip this step.

    10. Time to flash the ROM of your choice. :D ! Click on INSTALL and then choose the ROM you want to flash. SWIPE>>>>>>>>> :p

    11. Flash TWRP permanently using this: Permanent TWRP.

    12. Now, flash this simply in twrp. Flash the same vendor you flashed on the other slot. In other words, repeat Step 8 (no need to flash abl again) (skip flashing vendor if you skipped step 8).
    Note (optional): Mount vendor before performing this step just to be safe.

    13. Reboot to Recovery (IMPORTANT).

    14. After rebooting, twrp would have automatically switched to your active slot (the one you had in Step 1)(check this in reboot section of twrp).

    15. Now you can flash GApps, Magisk from the active slot anytime. This step varies from ROM to ROM as some ROMs have GApps pre-installed.
    Note: Access TWRP by pressing power+vol down button simultaneously.

    16. REBOOT>SYSTEM and you're done! Enjoy the ROM. 👼

    Credit Section:
    1. Jackeagle -- TWRP and ROM Developer
    2. Rohan Purohit -- ROM Developer
    3. Sandeep.Sethi -- Kernel Developer
    4. All the testers.

    Thank you and I hope this guide benefits the community.
    4
    OSS Vendor Flashing Guide
    Note: This guide is deprecated now, kindly refer to the guide above for latest ROM builds.

    So after tons and tons of test builds, the good ol' devs managed to get everything working and gave us a super stable ROMs (many more to follow soon ;) ). However, since our device supports A/B scheme, a newbie can find it rather difficult to get used to flashing ROMs, kernels and even GApps! So I decided to prepare a simple guide which should help you get used to flashing ROMs and lots of other stuff.

    Disclaimer: If you don't know what bootloader is and/or don't know anything about Custom ROMs, I strongly recommend you to not try this on your own and rather watch some videos about them and the advantages/disadvantages associated with them.

    Notes:
    1. Prerequisites:

      • Unlocked Bootloader
      • ADB, Fastboot and Device Drivers (Google them)
      • Use Command Prompt instead of PowerShell for ease of use.


    STEPS:

    1. Boot into Fastboot mode (power+vol up) and run:
    Code:
    fastboot -w
    Note your active slot from here. Mine is 'b' as can be seen from the pic attached. Yours can be 'a' or 'b'.
    View attachment 4785824

    2. Download vbmeta from View attachment 4961371 and then do this:
    Code:
    fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img

    3. Now run the following command in your fastboot using pc(obviously):

    If your active slot was 'a':
    Code:
    fastboot set_active b

    If your active slot was 'b':
    Code:
    fastboot set_active a

    4. Either restart bootloader directly from your phone (using volume and power keys) or do this:
    Code:
    fastboot reboot bootloader
    Your fastboot screen should now look like the following. Notice the change in the active slot (if yours was 'a' in the previous step, it should be 'b' now).
    View attachment 4785825

    5. It's TWRP time!!
    Download TWRP (both boot.img and permanent zip) by Jackeagle from here.

    Flash TWRP using:
    Code:
    fastboot flash boot boot.img
    Make sure the name of your downloaded twrp image file is boot.img! If not, either rename the file or change the fastboot code to that filename.img

    6. Now reboot to recovery using power and vol keys on your phone. You should see TWRP booting up now. If not, you've messed up somewhere, do the entire process again (correctly ;) ).

    7. Click on WIPE > ADVANCED WIPE, and choose System, Dalvik (Cache) and Data.

    8. Flash OSS Vendor. You can flash via fastboot by downloading and extracting OSS_Fastboot.7z. Navigate cmd to OSS folder and run:
    Code:
    fastboot flash vendor vendor.img

    Alternatively, you can simply flash OSS_Recovery.zip in TWRP/SHRP.

    9. Now, if you unlocked your bootloader via official apk (provided by Asus), then flash ABL.zip in TWRP/SHRP. However, if you unlocked unofficially, you can skip this step.

    10. Now, flash permanent twrp from here, change to the inactive slot and reboot to recovery again. Flash the same vendor you flashed on the other slot. In other words, repeat Step 8 (no need to flash abl again).

    11. Time to flash the ROM of your choice. :D ! Click on INSTALL and then choose the ROM you want to flash. SWIPE>>>>>>>>> :p

    12. Flash TWRP permanently using this: Permanent TWRP. Flash this simply in twrp.
    Note (optional): Mount vendor before performing this step just to be safe.

    13. Reboot to Recovery (IMPORTANT)

    14. After rebooting, twrp would have automatically switched to your active slot (the one you had in Step 1)(check this in reboot section of twrp).

    15. Now you can flash GApps, Magisk from the active slot anytime. This step varies from ROM to ROM as some ROMs have GApps pre-installed.
    Note: Access TWRP by pressing power+vol down button simultaneously.

    16. REBOOT>SYSTEM and you're done! Enjoy the ROM. 👼


    Credit Section:
    1. Jackeagle -- TWRP and ROM Developer
    2. Rohan Purohit -- ROM Developer
    3. Sandeep.Sethi -- Kernel Developer
    4. All the testers.

    Thank you and I hope this guide benefits the community.
    1
    I have performed step 8 and now I am in twrp. How to perform Step 9. Please suggest
    Edit- Thanks did it by copying the files to my otg and flashing through twrp.

    Glad you were able to succeed :)

    Thanks a lot for your comprehensive guide, got to unlock the bootloader and flash twrp as per the guide.
    However, I have a problem booting the ROM; the ROM installs perfectly well and I can reboot into recovery but can't get past the "ASUS" screen upon actually trying to boot the ROM.
    Am I missing something? I followed everything down precisely and I honestly don't know what am I messing up.
    A little help would be appreciated.

    Okay! Can you provide your bootloader version and slots on which you have stock rom and twrp?
    1
    I was able to flash elementalX using this guide. Thanks for detailed info,i found this guide more understandable than the 1 we have in how to flash gsi thread.
    1
    You have to wipe internal storage after flashing dfe zip using
    AryanAA, thank you for answer.
    I tried that, and, as you can see by the code inserted, fastboot do not see the userdata image/partition.
    I can't get to any of "storage" partitions (there is no partition, I could mount in TWRP), in order to push any ZIP for flashing.
    The only values I see are: system, vendor, firmware, ASDF, Factory, DSP, Micro SD card, usb_otg.
    When I select any of the above anc tap on "enable MTP", I hear the "USB device plug-in" sound in Windows, but nothing is visible by the explorer. Any idea, how to copy ZIP for flahsing?

    Or, how should I flash the DisableForceEncription.zip file through fastboot, if I can't push it to the internal memory?

    I used to get the same problems while doing fastboot -w, it is failing that's why you're unable to flash properly. I used this guide to solve my problem: https://www.xda-developers.com/adb-fastboot-any-directory-windows-linux/
    Using Method 1 should hopefully solve your issue.