How To flash [ SYSTEM.IMG ] using TWRP

Search This thread

vinay durva

Senior Member
Dec 30, 2015
59
7
Adilabad
Hii.. All , I'm using A Lyf wind mobile , I have my my orginginel ( system.img ) file I don't have PC Computer :(:(. , I'm using TWRP 3.0 .. Somebody help me how to flash a System.img using TWRP
_ THANKS _
 

ykgetnet

New member
Jun 27, 2018
2
0
24
Ethiopia
TWRP not showing system.img flashing option

I have one problem after backup my frimware using miracle box I ported TWRP recovery version 3.1.1 using my backup recovery ( stock recovery which I backup it using miracle box) and flashed it to my phone Tecno pop 2 plus it's running mt6580 chipset on Android 8.1 go edition & everything is working fine but when I try to flash gsi rom wihch is supposed to be flashed in to system.img but the only choice I got is
1- boot
2- recovery
it doesn't show system. in short it doesn't give me a choice to flash system.img file
 

lebigmac

Account currently disabled
Jan 31, 2017
1,342
990
Hi is it safe to flash system or super partition directly from TWRP using dd command? Do you have to use the bs and truncate option or not?
@munjeni told me that it's not good idea to use dd for this because it can cause hard brick.

What about lpflash from the partition tools? I tried it but it gives weird error.

Another option I was thinking about was flashing using this twrp command from the command line but it doesn't support super partition
restore PARTITION-TO-RESTORE BACKUP-NAME
 
Last edited:

ineedroot69

Senior Member
Nov 13, 2019
836
1
181
Hi is it safe to flash system or super partition directly from TWRP using dd command? Do you have to use the bs and truncate option or not?
@munjeni told me that it's not good idea to use dd for this because it can cause hard brick.

What about lpflash from the partition tools? I tried it but it gives weird error.

Another option I was thinking about was flashing using this twrp command from the command line but it doesn't support super partition
restore PARTITION-TO-RESTORE BACKUP-NAME
you need to be very careful flashing system.img it might trigger dm-verity
 

ineedroot69

Senior Member
Nov 13, 2019
836
1
181
here's a screenshot of me flashing system just to show i'm alpha male :sneaky:
don't try this unless you know nothing would go wrong

fsafggg.png
 

lebigmac

Account currently disabled
Jan 31, 2017
1,342
990
Here is screenshot of me flashing system from recovery using dd command.
Funny thing is it actually worked LOL!
Took almost 8 minutes though as you must use raw file. Doesn't work with sparse file! I know because I've tried it lol

IMG_20210313_123046.jpg

you need to be very careful flashing system.img it might trigger dm-verity
Thanks but I already disable dm verity and verification like this:
Code:
avbctl disable-verification
avbctl disable-verity
 
Last edited:

ineedroot69

Senior Member
Nov 13, 2019
836
1
181
Here is screenshot of me flashing system from recovery using dd command.
Funny thing is it actually worked LOL!
Took almost 8 minutes though as you must use raw file. Doesn't work with sparse file!

View attachment 5248501
The development on my device is quite dead also I'm the one who dump that system.img so I know it's completely stock at first I was worried about that sparse error but done flashing system.img multiple times and it always work 😆 also I already trigger dm-verity that's why I'm not afraid casually flashing it .. does disable dm-verity would work if you already trigger it? One way to found out I do experiment then
 

Greydesk

Senior Member
Jan 23, 2011
56
5
I'm in this thread to learn how to flash system.img from TWRP. I have a moto g8power that I successfully installed lineageos, twrp, root with magisk, and gapps. I want to take gapps off. I have found out that I can do this by wiping the system partition and flashing the original system.img. I have the system.img on the phone and I can see it in TWRP. However, the available partitions to flash to are:
Boot
DTBO
Super
Recovery
Logo
super

Which partition do I flash system.img to? When I installed LineageOS, I used adb and the fastboot commands. With TWRP installed, I don't have access to the fastbootd mode so I can't use ADB to install.

Any help appreciated.

Greydesk
 

Greydesk

Senior Member
Jan 23, 2011
56
5
I'm in this thread to learn how to flash system.img from TWRP. I have a moto g8power that I successfully installed lineageos, twrp, root with magisk, and gapps. I want to take gapps off. I have found out that I can do this by wiping the system partition and flashing the original system.img. I have the system.img on the phone and I can see it in TWRP. However, the available partitions to flash to are:
Boot
DTBO
Super
Recovery
Logo
super

Which partition do I flash system.img to? When I installed LineageOS, I used adb and the fastboot commands. With TWRP installed, I don't have access to the fastbootd mode so I can't use ADB to install.

Any help appreciated.

Greydesk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Yes sir I'm Booting Into TWRP , Then > install > install images >. I found 2 options 1st one BOOT 2cond RECOVERY , but I won't to flash SYSTEM.img
    I remember now that TWRP doesn't flash system.img correctly, system.img isn't a standard .img, you need PC and use fastboot.

    Sent from my SM-S903VL using Tapatalk
    2
    Thanks Sir.. Any Another way to flash system , i don't have A PC:(

    I know it is too late, but you can enter in Advaced > Terminal and then run this command:
    dd if=/sdcard/system.img of=/dev/block/bootdevice/by-name/system

    If your mobile phone doesnt have by-name symlinks you will need to enter the correct partition.
    1
    Hii.. All , I'm using A Lyf wind mobile , I have my my orginginel ( system.img ) file I don't have PC Computer :(:(. , I'm using TWRP 3.0 .. Somebody help me how to flash a System.img using TWRP
    _ THANKS _
    TWRP can flash .img files without having to do anything special.

    Sent from my SM-S903VL using Tapatalk
    1
    Sir .. I was tried , there was only 2 options in TWRP 1st one recovery & 2cond one boot .. Which 1 ican select ,, I need to flash system.img
    I dont think you've booted into TWRP yet, I think you're looking at bootloader, select recovery and see if it boots to TWRP.

    TWRP has more than just 2 options, are you sure you have TWRP? What version is it? Does it look like this?
    http://cloud.tapatalk.com/s/58a730280544c/Screenshot_2017-02-17-12-15-48.png?


    If that's what you have, select Install then find your .img and flash it.



    Sent from my SM-S903VL using Tapatalk
    1
    it will not work.

    try to make a folder and "mount -o loop file in it.
    and it will be not mounted also if you specify file system type.
    (if it work probably you can use the file)

    so ,i don't know how fastboot write in partition or probably
    in to file system.

    however if you do a dd of your current system partition in a file , after will be correctly mounted , or rewrited correctly in the original partition if you need.

    then probably you cannot use fastboot system.img directly in twrp shell (using dd)

    this is my experience (e2303 sony / pexorom 3.0 twrp 3.1.1)

    if you are searching a fast way to know system partition device block

    cat /etc/fstab

    and look for system

    or just mount system in twrp , then in a terminal do a

    df -h

    and search for system

    for e2303 was /dev/block/mmcblk0p30
    (example)


    twrp have busybox and light kernel.
    so , is linux.

    for better support try to ask

    tonystark88