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

How To Guide Installing TWRP and LInageOS

Search This thread

DISCLAIMER: I WAS NEVER, HAVE NEVER BEEN, AND WILL NEVER BE RESPONSIBLE OF ANY DAMAGES AGAINST YOUR DEVICES BY YOUR OWN MIS-OPERATIONS

Code:
# knox_bit_warranty:0x1
#
# Your warranty is now void
#
# You have been warned.
#
# I will laught at you if you point the finger at me.

Hello everyone, in this guide i'll be showing you how to install TWRP with Andy Yan's LinageOS, or any other ROM you want.

Make sure to follow this guide if you haven't allready unlocked the bootloader and rooted your phone


INSTALLING TWRP

Code:
# If your not on the A125F model you will have to disable mtk secure boot and secure download and might even have to downgrade SW REV so you can install A125F fimware which supports a unoficial twrp build
# Make sure you are on android 11 and that you have followed the guide mentioned for unlocking the bootloader and rooting
1. Go in settings app
2. Go in to developer options (they should already be enbled if you folowed the guide mentioned)
3. Enable usb debuging if they aren't allready
4. Reboot to download mode, you can do it with the HW keys or send it from the Android Debuging Bridge (ADB)
For the HW key method power off the phone and conect it to the PC, then hold VOL UP and VOL DOWN at the same time. After that you should get two options, you want the first one which is just press VOL UP.
For the ADB method, install the most up to date SDK platform-tools version and open CMD or TERMINAl in the install folder and type adb reboot download.
A usb debuging request should pop up on the phone, you want to click allow, and it should reboot in to download mode.
5. Open odin, click on AP or PDA and select the twrp file you have downloaded and uncheck auto reboot in options then you can click start
6. After the flashing process hold VOL DOWN and POWER at the same time and immediately after the phone exits the download mode hold VOL UP and POWER at the same time
7. If you failed to boot in to TWRP the instalation process will have to be repeated again.


INSTALING LINAGEOS OR ANY OTHER CUSTOM ROM

Code:
# You will need an a external Sd_card if you are doing the method 1
Method 1.
1. Transfer the linageos .img file you have downloaded to your sd_card.
2. Boot in to TWRP, VOL UP + POWER while booting or adb reboot recovery.
3. Once in TWRP select wipe, click advanced wipe and select data, system, internal storage, cache, dalvik, optional(efs, and thoes other stuff, not going to name them.)
4. After successful wipeing go in to install and select storage, click Micro Sd card and click ok.
5. Click install image and find your LinageOs.img file and select it.
6. Now you should be in a install image screen, select System Image and swipe to FLASH.
7. Reboot and enoy.

Method 2.
1. Boot in to TWRP and go in to WIPE, selcect advanced wipe and check data, system, internal storage, cache, dalvik, optional(efs, and thoes other stuff, not going to name them.)
2. Go in to advanced options and select ADB sideload.
3. From the TERMINAL or CMD window type "adb devices" to check if your device is beeing recognized.
4. If the conections is confirmed type "adb sideload LineageOS.zip"
5. After flashing reboot and enoy.

If by any chance you get issues with flashing roms in TWRP because of problems with dynamic partitions flash DynaPatch to allow flashing to dynamic_partitions in recovery, you don't necesery need to use DynaPatch. You can use unviresal system rv disable enable, etc and etc. This is a problem in TWRP it self which soon should be fixed.
Another thing is if you rooted your phone the way in my guide, the patched boot_image might still stick to the new rom.
Knowng bugs:
LinageOs screen touch stop after putting the phone to sleep.



Credits
@edward0181 twrp
@AndyYan LinageOs
 
Last edited:
Yes. I don't understand also.
Have you patched just the boot.img or the whole AP file when selcting a file for patching in magisk?
 

RaresCelTare

Member
Apr 27, 2015
17
7
6. Now you should be in a install image screen, select System Image and swipe to FLASH.
7. Reboot and enoy.
Everything works (root/twrp) until the last 2 steps. Installing Lineage and enjoying it. I have downloaded the appropriate archive, unpacked and copied it to sdcard alonside with disable dm verity.
When I try to flash the rom, I get an error that sounds like this: couldn't find partition as system_image. What should I do.
 
Everything works (root/twrp) until the last 2 steps. Installing Lineage and enjoying it. I have downloaded the appropriate archive, unpacked and copied it to sdcard alonside with disable dm verity.
When I try to flash the rom, I get an error that sounds like this: couldn't find partition as system_image. What should I do.
Download the apropriate .img file for device. A/B. If that doesn't fix the problem then it is something with the TWRP, I'v been getting does error too. You are not the only one.
 
Last edited:

RaresCelTare

Member
Apr 27, 2015
17
7
@LAST_krypton
Already tried the A/B version, but let's verify that I got the right version:
lineage-18.1-20210914-UNOFFICIAL-treble_arm64_bvS.img.xz 563.8 MB
Could you also point me to a link for disable-dm-verity?
I reinstalled the magisk patched version since I need a working phone. Should I try again with the TWRP+Lineage? Maybe second time's the charm?
 
@LAST_krypton
Already tried the A/B version, but let's verify that I got the right version:
lineage-18.1-20210914-UNOFFICIAL-treble_arm64_bvS.img.xz 563.8 MB
Could you also point me to a link for disable-dm-verity?
I reinstalled the magisk patched version since I need a working phone. Should I try again with the TWRP+Lineage? Maybe second time's the charm?
That is the right treble version, If you pre rooted your phone mentioned in my rooting guide dm-verify is disabled. Try following both of my guides mentioned. Use this for dm-verify if you haven't followed my guide for rooting https://forum.xda-developers.com/t/...ncrypt-disk-quota-disabler-11-2-2020.3817389/
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Probably bugs with TWRP, I had problems with ADB SIDELOAD too, dev should fix them soon. If you don't see SYSTEM_IMAGE then flash DynaPatch to allow flashing to DYNAMIC_PARTITIONS in RECVOERY. You can find DynaPatch here, and you can ask about SIDELOAD problems...
    Thank you so much, it worked! LineageOS is now installed on my phone :)
    1
    I Have A127F, is it possible install TWRP and Lineage OS on this model? Thanks!
    TWRP is for A125F, but another dev is in progress of makeing TWRP for A127F. So just wait.
    1
    Hi I'm kinda new to this. So I followed your guide on unlocking the bootloader and rooting. I've also installed TWRP, no problems at all. Now I'm trying to install LineageOS to my phone, I don't have an external SD Card so I couldn't do method 1, I went to try method 2 which is through ADB sideload. If I don't start sideload on my phone it is detected by "adb devices", but when I start sideload on my phone it disappears from "adb devices" and I can't sideload the lineageos file into it(Tried on both my Linux and Windows system). I still don't know much so I tried playing around with it, I used "adb push" to put the lineageos file into the device and it worked, I can click on it in "Install Image" but in the install image screen I don't see "System Image" as a choice. I'm just wondering if there's anything I did that was wrong?
    Probably bugs with TWRP, I had problems with ADB SIDELOAD too, dev should fix them soon. If you don't see SYSTEM_IMAGE then flash DynaPatch to allow flashing to DYNAMIC_PARTITIONS in RECVOERY. You can find DynaPatch here, and you can ask about SIDELOAD problems...
  • 4

    DISCLAIMER: I WAS NEVER, HAVE NEVER BEEN, AND WILL NEVER BE RESPONSIBLE OF ANY DAMAGES AGAINST YOUR DEVICES BY YOUR OWN MIS-OPERATIONS

    Code:
    # knox_bit_warranty:0x1
    #
    # Your warranty is now void
    #
    # You have been warned.
    #
    # I will laught at you if you point the finger at me.

    Hello everyone, in this guide i'll be showing you how to install TWRP with Andy Yan's LinageOS, or any other ROM you want.

    Make sure to follow this guide if you haven't allready unlocked the bootloader and rooted your phone


    INSTALLING TWRP

    Code:
    # If your not on the A125F model you will have to disable mtk secure boot and secure download and might even have to downgrade SW REV so you can install A125F fimware which supports a unoficial twrp build
    # Make sure you are on android 11 and that you have followed the guide mentioned for unlocking the bootloader and rooting
    1. Go in settings app
    2. Go in to developer options (they should already be enbled if you folowed the guide mentioned)
    3. Enable usb debuging if they aren't allready
    4. Reboot to download mode, you can do it with the HW keys or send it from the Android Debuging Bridge (ADB)
    For the HW key method power off the phone and conect it to the PC, then hold VOL UP and VOL DOWN at the same time. After that you should get two options, you want the first one which is just press VOL UP.
    For the ADB method, install the most up to date SDK platform-tools version and open CMD or TERMINAl in the install folder and type adb reboot download.
    A usb debuging request should pop up on the phone, you want to click allow, and it should reboot in to download mode.
    5. Open odin, click on AP or PDA and select the twrp file you have downloaded and uncheck auto reboot in options then you can click start
    6. After the flashing process hold VOL DOWN and POWER at the same time and immediately after the phone exits the download mode hold VOL UP and POWER at the same time
    7. If you failed to boot in to TWRP the instalation process will have to be repeated again.


    INSTALING LINAGEOS OR ANY OTHER CUSTOM ROM

    Code:
    # You will need an a external Sd_card if you are doing the method 1
    Method 1.
    1. Transfer the linageos .img file you have downloaded to your sd_card.
    2. Boot in to TWRP, VOL UP + POWER while booting or adb reboot recovery.
    3. Once in TWRP select wipe, click advanced wipe and select data, system, internal storage, cache, dalvik, optional(efs, and thoes other stuff, not going to name them.)
    4. After successful wipeing go in to install and select storage, click Micro Sd card and click ok.
    5. Click install image and find your LinageOs.img file and select it.
    6. Now you should be in a install image screen, select System Image and swipe to FLASH.
    7. Reboot and enoy.
    
    Method 2.
    1. Boot in to TWRP and go in to WIPE, selcect advanced wipe and check data, system, internal storage, cache, dalvik, optional(efs, and thoes other stuff, not going to name them.)
    2. Go in to advanced options and select ADB sideload.
    3. From the TERMINAL or CMD window type "adb devices" to check if your device is beeing recognized.
    4. If the conections is confirmed type "adb sideload LineageOS.zip"
    5. After flashing reboot and enoy.

    If by any chance you get issues with flashing roms in TWRP because of problems with dynamic partitions flash DynaPatch to allow flashing to dynamic_partitions in recovery, you don't necesery need to use DynaPatch. You can use unviresal system rv disable enable, etc and etc. This is a problem in TWRP it self which soon should be fixed.
    Another thing is if you rooted your phone the way in my guide, the patched boot_image might still stick to the new rom.
    Knowng bugs:
    LinageOs screen touch stop after putting the phone to sleep.



    Credits
    @edward0181 twrp
    @AndyYan LinageOs
    2
    Probably bugs with TWRP, I had problems with ADB SIDELOAD too, dev should fix them soon. If you don't see SYSTEM_IMAGE then flash DynaPatch to allow flashing to DYNAMIC_PARTITIONS in RECVOERY. You can find DynaPatch here, and you can ask about SIDELOAD problems...
    Thank you so much, it worked! LineageOS is now installed on my phone :)
    1
    I Have A127F, is it possible install TWRP and Lineage OS on this model? Thanks!
    TWRP is for A125F, but another dev is in progress of makeing TWRP for A127F. So just wait.
    1
    Hi I'm kinda new to this. So I followed your guide on unlocking the bootloader and rooting. I've also installed TWRP, no problems at all. Now I'm trying to install LineageOS to my phone, I don't have an external SD Card so I couldn't do method 1, I went to try method 2 which is through ADB sideload. If I don't start sideload on my phone it is detected by "adb devices", but when I start sideload on my phone it disappears from "adb devices" and I can't sideload the lineageos file into it(Tried on both my Linux and Windows system). I still don't know much so I tried playing around with it, I used "adb push" to put the lineageos file into the device and it worked, I can click on it in "Install Image" but in the install image screen I don't see "System Image" as a choice. I'm just wondering if there's anything I did that was wrong?
    Probably bugs with TWRP, I had problems with ADB SIDELOAD too, dev should fix them soon. If you don't see SYSTEM_IMAGE then flash DynaPatch to allow flashing to DYNAMIC_PARTITIONS in RECVOERY. You can find DynaPatch here, and you can ask about SIDELOAD problems...