[ROM][11] LineageOS 18.1 [OFFICIAL] - Sony Xperia XZ2 Compact ROMs, Kernels, Recoveries,

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
LineageOS is a free, community built, aftermarket firmware distribution of Android 10, which is designed to increase performance and reliability over stock Android for your device.
Code:
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
NOTE
Should you ever face any issues, capture logs. I also need to know what build you're on (build number or at least a date).
Hint: "It doesn't work" is not a bug report and posts like this will be ignored.
KNOWN ISSUEs
The Sony stock camera does not work at the moment.
INFO
This ROM does not use the device trees/kernel from sonyxperiadev (aka SODP). The device tree was made from scratch, and the stock kernel (based off 52.1.A.x.y) has been used.
DOWNLOAD
Official builds
NOTE: Since the official builds are signed, you can't simply upgrade from my unofficial builds -- you can either migrate to an official build using a script or do a clean install.
All unofficial builds
INSTRUCTIONS
Just flash the builds as usual. Make sure to be on the latest stock firmware.
SOURCE
LineageOS
Kernel

CHANGELOG
20210516:
- fixed WiFi display/screen casting
- addressed performance issues and lags
20210515:
- updated to 18.1
- fixed remaining most of the bugs
- set SELinux to enforcing
20201128:
- fixed NFC
20201127:
- initial public release.

Thanks a lot. Great to know you are working on LOS18.
I tried sideloading with the latest LOS17.1 recovery (and LOS 17.1 on the phone, naturally). I get an error. Do I absolutely have to be on stock?

Are you still working on this one?

I am trying to flash a LOS image onto a single SIM Phone, but it always fails with error "unknown fuse request opcode 2016" in the recovery.log, and the system image is empty after the flash.
I am using the latest STOCK TWRP 2020-06-14_21-07-37_twrp_apollo.tar.gz.
It fails on all LOS images I have tried, 18.0 17.1 etc. So far I haven't been able to flash a LOS image at all successfully.
The flash performs normally, but fails with an error after 2-3 minutes, and afterwards the system partition is empty.
The unit is a SONY XZ2 Compact Single SIM.
After discussion with someone, this maybe due to the LOS image having an incorrect System partition size(?). Why does it flash correctly on most people's units, but not on this one?
Anyone has an idea? I am attaching the twrp.log files.

Garfield24 said:
I am trying to flash a LOS image onto a single SIM Phone, but it always fails with error "unknown fuse request opcode 2016" in the recovery.log, and the system image is empty after the flash.
I am using the latest STOCK TWRP 2020-06-14_21-07-37_twrp_apollo.tar.gz.
It fails on all LOS images I have tried, 18.0 17.1 etc. So far I haven't been able to flash a LOS image at all successfully.
The flash performs normally, but fails with an error after 2-3 minutes, and afterwards the system partition is empty.
The unit is a SONY XZ2 Compact Single SIM.
After discussion with someone, this maybe due to the LOS image having an incorrect System partition size(?). Why does it flash correctly on most people's units, but not on this one?
Anyone has an idea? I am attaching the twrp.log files.
Click to expand...
Click to collapse
Hi!
I'got the same situation, with a bad downloaded los.zip file. Maybe it's the problem.
But what i saw in your description, the used twrp. If i known good, for Android 11 the working twrp for coming from stock to los is here what works for me ( apollo ):
" https://androidfilehost.com/?w=files&flid=318609 " ;
And don't flash it to the recovery or boot partitiom, just temperoraly boot it with fastboot.

lba810701 said:
Hi!
I'got the same situation, with a bad downloaded los.zip file. Maybe it's the problem.
But what i saw in your description, the used twrp. If i known good, for Android 11 the working twrp for coming from stock to los is here what works for me ( apollo ):
" https://androidfilehost.com/?w=files&flid=318609 " ;
And don't flash it to the recovery or boot partitiom, just temperoraly boot it with fastboot.
Click to expand...
Click to collapse
Nope, not working.
I flashed a stock image with newflasher and booted to the apps. Original image boots fine.
Then I rebooted into fastboot and did: fastboot boot twrp.img like you suggested.
TWRP runs fine, I wipe the partitions, and flash LOS. No operating system installed afterwards.
I don't think it's a corrupt .zip file, since I tried about 5 different ones.
When flashing I get a message: "Unable to find partition for path /cache" in red colour.
Anyone knows what that means?

Garfield24 said:
Nope, not working.
I flashed a stock image with newflasher and booted to the apps. Original image boots fine.
Then I rebooted into fastboot and did: fastboot boot twrp.img like you suggested.
TWRP runs fine, I wipe the partitions, and flash LOS. No operating system installed afterwards.
I don't think it's a corrupt .zip file, since I tried about 5 different ones.
When flashing I get a message: "Unable to find partition for path /cache" in red colour.
Anyone knows what that means?
Click to expand...
Click to collapse
H
Garfield24 said:
Nope, not working.
I flashed a stock image with newflasher and booted to the apps. Original image boots fine.
Then I rebooted into fastboot and did: fastboot boot twrp.img like you suggested.
TWRP runs fine, I wipe the partitions, and flash LOS. No operating system installed afterwards.
I don't think it's a corrupt .zip file, since I tried about 5 different ones.
When flashing I get a message: "Unable to find partition for path /cache" in red colour.
Anyone knows what that means?
Click to expand...
Click to collapse
Do you disabled the verified boot before rhe whole twrp process?
" fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img "

lba810701 said:
H
Do you disabled the verified boot before the whole twrp process?
" fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img "
Click to expand...
Click to collapse
Yes, I have tried that, too, just now again. As before, not working. I have tried so many things by now. The flash of the LOS image completes, but in step 2/2 I get "Unable to find partition for path /cache" , and it says completed. In the recovery log, there is an error "unknown fuse request opcode 2016" . The system partition is empty after the flash (7MB used).
I wonder, if there is a difference in the partitions on this specific phone. I am attaching the output of the following command:
cat /proc/partitions > /external_sd/partlog.txt
It writes an overview of partitions and their sizes to a file on the SD Card. There are 74 partitions on /sda. I wonder why anybody needs 74 partitions?
Can someone run the same command on their phone with a working and installed LOS and compare it to my file, if there is any difference to a phone that is working (partitions-sizes/-ordering?)?
I run the command from TWRP. Start up recovery TWRP and go to Advanced -> Terminal. There you can run the command.
cat /proc/partitions > /external_sd/partlog.txt
I would appreciate if someone could run that command on a phone where the LOS image works, and compare the file to my file, if there are any differences in the partitioning scheme or sizes. Sizes are important.
Any other suggestions also welcome.

Garfield24 said:
Yes, I have tried that, too, just now again. As before, not working. I have tried so many things by now. The flash of the LOS image completes, but in step 2/2 I get "Unable to find partition for path /cache" , and it says completed. In the recovery log, there is an error "unknown fuse request opcode 2016" . The system partition is empty after the flash (7MB used).
I wonder, if there is a difference in the partitions on this specific phone. I am attaching the output of the following command:
cat /proc/partitions > /external_sd/partlog.txt
It writes an overview of partitions and their sizes to a file on the SD Card. There are 74 partitions on /sda. I wonder why anybody needs 74 partitions?
Can someone run the same command on their phone with a working and installed LOS and compare it to my file, if there is any difference to a phone that is working (partitions-sizes/-ordering?)?
I run the command from TWRP. Start up recovery TWRP and go to Advanced -> Terminal. There you can run the command.
cat /proc/partitions > /external_sd/partlog.txt
I would appreciate if someone could run that command on a phone where the LOS image works, and compare the file to my file, if there are any differences in the partitioning scheme or sizes. Sizes are important.
Any other suggestions also welcome.
Click to expand...
Click to collapse
I attached it, but I'm on 17.1. Maybe help? But first round, it's seems the same except the last two line of the logs... In yours, there are "mcblk0" and "mmcblk0p1" what's missing from mine, but I haven't got sdcard so, maybe thats why.

lba810701 said:
I attached it, but I'm on 17.1. Maybe help? But first round, it's seems the same except the last two line of the logs... In yours, there are "mcblk0" and "mmcblk0p1" what's missing from mine, but I haven't got sdcard so, maybe thats why.
Click to expand...
Click to collapse
Yes, that definitely helps. Thank you. The last two lines is the SDCard, that's correct.
That means my phone has the same ROM size and partition size than yours, so the System partition is the same size.
I find an additional partition in your file in line 19:
254 0 1048576 zram0
I don't have a zram0 partition in my file and my phone.
The question now is: does that make any difference? Can that missing partition on my phone can cause the flash to fail?

After a LOT of trial and error I am making a description, how to get a running LOS on your SONY XZ2 Compact Single SIM (and probably Dual SIM). This is not a description for people, who got it running the easy way. It's for people that tried everything, and can't get it running, and are in desperation and lost.
General description first: The SONY XZ2 Compact is a phone with 2 slots. These phones don't have a recovery partition, so you cannot meaningfully boot into a recovery partition like on old phones. It now has a boot partition (2 of them - slot A and slot B), and you can boot an operating system from these slots. These slots are completely separate, you can boot an operating system in slot A and another separate one in slot B. These slots (from a user perspective) are separate, and there is very little interchange between them (or more or less none).
Prerequisits: TWRP, I used the Version from MartinX 2020-06-14_21-07-37_twrp_apollo.tar.gz , link is here: https://androidfilehost.com/?w=files&flid=306949
Use a STOCK TWRP
Extract the .img files with 7-zip (7-zip.org), until you have the .img file separate.
Newflasher:
[TOOL] Newflasher (xperia command line flasher)
Disclaimer: newflasher tool was made for testing and educational purposes, ME is not responsible for what you do on/with your device using newflasher, you must agree that you using newflasher on your own risk, I am not responsible if you brick...
forum.xda-developers.com
I used v42, probably newer versions work, too, try not to use an older version
Booting into fastboot: hold Volume-UP and then plugging a USB cable to the computer. The blue light should be lit, if fastboot is active, screen stays blank.
Booting into flash mode: hold Volume-DOWN and then plugging a USB cable to the computer. The green light should be lit, if flash mode is active, screen stays blank.
Now let's get to the process of flashing LOS:
Step 1 - Flash an original working SONY image into Slot A:
Boot into fastboot mode, so the blue light is on.
Type:
fastboot reboot bootloader
(Sometimes the computer doesn't recognise the phone after this command, then just unplug the USB, wait until the phone is off, and try again beginning Step 1. It can fail a couple of times, but it will also work in between).
fastboot --set-active=a
fastboot reboot bootloader
You can check that Slot A is active by typing the command
fastboot getvar all
in the output check the line current slot active: a
Run Newflasher (how to use Newflasher is beyond the scope of this post, google it) to flash an original stock SONY image. You need to be in flash mode for Newflasher with the green light lit.
Answer the first question what to do when done with Newflasher with 'p'=Power Off, and all others with 'n'=No.
When Newflasher completes, check the last few lines output, it should say setting slot A active and OKAY. That confirms that you flashed the original SONY image in Slot A.
You now have a fully working operating system in Slot A. However there is a bug in Newflasher and that bug destroys the boot process in Slot B, which means you'll be only able to boot Slot A, booting Slot B will fail.
Should you decide to boot the operating system (you don't have to), make sure you don't set up authentication (pin code, fingerprint), skip setting that up, so your data partition doesn't get encrypted.
Step 2 - Flash an original working SONY image into Slot B:
Boot into fastboot mode, so the blue light is on.
Type (similar to Step 1):
fastboot reboot bootloader
fastboot --set-active=b
fastboot reboot bootloader
You can check that Slot B is active by typing the command
fastboot getvar all
in the output check the line current slot active: b
WARNING: DO NOT BOOT Slot B, as it will fail 2-3 times (you'll notice the phone vibrating upon crash and reboot), because the phone will then put you back on Slot A, and you'll flash Slot A again. Make sure YOU DON'T BOOT the operating system in Slot B, or you'll end up in Slot A again.
Run Newflasher (how to use Newflasher is beyond the scope of this post, google it) to flash an original stock SONY image. You need to be in flash mode for Newflasher with the green light lit.
Answer the first question what to do when done with Newflasher with 'p'=Power Off, and all others with 'n'=No.
When Newflasher completes, check the last few lines output, it should say setting slot B active and OKAY. That confirms that you flashed the original SONY image in Slot B.
You now have a fully working operating system in Slot B. However there is a bug in Newflasher and that bug destroys the boot process in Slot A, which means you'll be only able to boot Slot B.
At this point in time, if you would try to boot into Slot A, it will boot up to the SONY logo, and then crash, and reboot up to the SONY logo, and then crash. Should you get stuck in that loop, insert a USB cable and hold Volume-UP, it'll catch the crashing loop, and you'll end up in fastboot.
Step 3 - Boot the original SONY image up to the home screen where the apps show:
Actually you should be in Slot B already, but if you are not:
Boot into fastboot mode, so the blue light is on.
Type (similar to Step 2):
fastboot reboot bootloader
fastboot --set-active=b
fastboot reboot bootloader
You can check that Slot B is active by typing the command
fastboot getvar all
in the output check the line current slot active: b
Boot the phone's operating original stock image in Slot B, until you are at the home screen with the apps. This sets up all the defaults for your phone, and updates any ROM images in the chips (like modem etc.).
Make sure you don't set up authentication (pin code, fingerprint), skip setting that up, so your data partition doesn't get encrypted.
Power off your phone.
Step 4 - Flash twrp into Slot B
Type (similar to Step 2):
fastboot reboot bootloader
fastboot --set-active=b
fastboot reboot bootloader
fastboot flash boot twrp.img
This will flash TWRP as boot in Slot B. Make sure in the screen output it was flashed in boot_b.
Should you make an error here, start with Step 1. The reason here is, we want LOS in Slot A, and not TWRP.
Boot your TWRP in Slot B.
WARNING: DO NOT flash VBMETA, it'll break the boot process, and you can start from Step 1.
Step 5 - Flash LOS into Slot A
Once TWRP is running, go to Wipe.
WARNING: DO NOT perform factory reset.
Go to Advanced Wipe, and ONLY WIPE 'Data' and 'Dalvic Cache'
WARNING: DO NOT WIPE System or Internal Storage. You'll loose mount points under Linux, and the LOS image flash will fail.
Go back to TWRP home screen.
From there go to Advanced and from there to ADB Sideload.
From the computer start installing your LOS image (sideload).
On the computer type:
adb sideload <Your LOS image>.zip.
ATTENTION: During flashing, the phone will show, which slot it flashes. It should flash and show: "flashing inactive Slot A". If you accidentally flash Slot B, start from the beginning Step 1.
Best results I had with the image from the LOS homepage https://download.lineageos.org/xz2c
Download the zip file, don't unpack it, use adb sideload to upload the zip file.
Forget about the Recovery image on the LOS homepage. You don't need it.
When flashing completes, you can wipe Delvic Cache.
WARNING: DO NOT WIPE 'cache', since a 2 slot phone doesn't have a cache partition, and it will fail to wipe it.
Do NOT install the TWRP app, skip this step.
Reboot
Step 6 - Boot LOS
LOS is in Slot A, TWRP is in Slot B.
You can alternate between the slots from fastboot.
fastboot reboot bootloader
fastboot --set-active=a
fastboot reboot bootloader
A reboot should boot LOS.
ATTENTION: When the LOS image has finished booting and you get to the date/time screen, the LOS will hang a while (30s). Just let it do it's job, I think (not sure), it's creating the data in the user partition. After 30s or so use the back key, and try setting the time again. This only happens on the very first boot.
Let me know as feedback, if I can clarify better or if this description is ok.

Hello,
if there is anything I can help with getting official support for LineageOS 18.1 pls let me know.

Garfield24 said:
After a LOT of trial and error I am making a description, how to get a running LOS on your SONY XZ2 Compact Single SIM (and probably Dual SIM). This is not a description for people, who got it running the easy way. It's for people that tried everything, and can't get it running, and are in desperation and lost.
General description first: The SONY XZ2 Compact is a phone with 2 slots. These phones don't have a recovery partition, so you cannot meaningfully boot into a recovery partition like on old phones. It now has a boot partition (2 of them - slot A and slot B), and you can boot an operating system from these slots. These slots are completely separate, you can boot an operating system in slot A and another separate one in slot B. These slots (from a user perspective) are separate, and there is very little interchange between them (or more or less none).
Prerequisits: TWRP, I used the Version from MartinX 2020-06-14_21-07-37_twrp_apollo.tar.gz , link is here: https://androidfilehost.com/?w=files&flid=306949
Use a STOCK TWRP
Extract the .img files with 7-zip (7-zip.org), until you have the .img file separate.
Newflasher:
[TOOL] Newflasher (xperia command line flasher)
Disclaimer: newflasher tool was made for testing and educational purposes, ME is not responsible for what you do on/with your device using newflasher, you must agree that you using newflasher on your own risk, I am not responsible if you brick...
forum.xda-developers.com
I used v42, probably newer versions work, too, try not to use an older version
Booting into fastboot: hold Volume-UP and then plugging a USB cable to the computer. The blue light should be lit, if fastboot is active, screen stays blank.
Booting into flash mode: hold Volume-DOWN and then plugging a USB cable to the computer. The green light should be lit, if flash mode is active, screen stays blank.
Now let's get to the process of flashing LOS:
Step 1 - Flash an original working SONY image into Slot A:
Boot into fastboot mode, so the blue light is on.
Type:
fastboot reboot bootloader
(Sometimes the computer doesn't recognise the phone after this command, then just unplug the USB, wait until the phone is off, and try again beginning Step 1. It can fail a couple of times, but it will also work in between).
fastboot --set-active=a
fastboot reboot bootloader
You can check that Slot A is active by typing the command
fastboot getvar all
in the output check the line current slot active: a
Run Newflasher (how to use Newflasher is beyond the scope of this post, google it) to flash an original stock SONY image. You need to be in flash mode for Newflasher with the green light lit.
Answer the first question what to do when done with Newflasher with 'p'=Power Off, and all others with 'n'=No.
When Newflasher completes, check the last few lines output, it should say setting slot A active and OKAY. That confirms that you flashed the original SONY image in Slot A.
You now have a fully working operating system in Slot A. However there is a bug in Newflasher and that bug destroys the boot process in Slot B, which means you'll be only able to boot Slot A, booting Slot B will fail.
Should you decide to boot the operating system (you don't have to), make sure you don't set up authentication (pin code, fingerprint), skip setting that up, so your data partition doesn't get encrypted.
Step 2 - Flash an original working SONY image into Slot B:
Boot into fastboot mode, so the blue light is on.
Type (similar to Step 1):
fastboot reboot bootloader
fastboot --set-active=b
fastboot reboot bootloader
You can check that Slot B is active by typing the command
fastboot getvar all
in the output check the line current slot active: b
WARNING: DO NOT BOOT Slot B, as it will fail 2-3 times (you'll notice the phone vibrating upon crash and reboot), because the phone will then put you back on Slot A, and you'll flash Slot A again. Make sure YOU DON'T BOOT the operating system in Slot B, or you'll end up in Slot A again.
Run Newflasher (how to use Newflasher is beyond the scope of this post, google it) to flash an original stock SONY image. You need to be in flash mode for Newflasher with the green light lit.
Answer the first question what to do when done with Newflasher with 'p'=Power Off, and all others with 'n'=No.
When Newflasher completes, check the last few lines output, it should say setting slot B active and OKAY. That confirms that you flashed the original SONY image in Slot B.
You now have a fully working operating system in Slot B. However there is a bug in Newflasher and that bug destroys the boot process in Slot A, which means you'll be only able to boot Slot B.
At this point in time, if you would try to boot into Slot A, it will boot up to the SONY logo, and then crash, and reboot up to the SONY logo, and then crash. Should you get stuck in that loop, insert a USB cable and hold Volume-UP, it'll catch the crashing loop, and you'll end up in fastboot.
Step 3 - Boot the original SONY image up to the home screen where the apps show:
Actually you should be in Slot B already, but if you are not:
Boot into fastboot mode, so the blue light is on.
Type (similar to Step 2):
fastboot reboot bootloader
fastboot --set-active=b
fastboot reboot bootloader
You can check that Slot B is active by typing the command
fastboot getvar all
in the output check the line current slot active: b
Boot the phone's operating original stock image in Slot B, until you are at the home screen with the apps. This sets up all the defaults for your phone, and updates any ROM images in the chips (like modem etc.).
Make sure you don't set up authentication (pin code, fingerprint), skip setting that up, so your data partition doesn't get encrypted.
Power off your phone.
Step 4 - Flash twrp into Slot B
Type (similar to Step 2):
fastboot reboot bootloader
fastboot --set-active=b
fastboot reboot bootloader
fastboot flash boot twrp.img
This will flash TWRP as boot in Slot B. Make sure in the screen output it was flashed in boot_b.
Should you make an error here, start with Step 1. The reason here is, we want LOS in Slot A, and not TWRP.
Boot your TWRP in Slot B.
WARNING: DO NOT flash VBMETA, it'll break the boot process, and you can start from Step 1.
Step 5 - Flash LOS into Slot A
Once TWRP is running, go to Wipe.
WARNING: DO NOT perform factory reset.
Go to Advanced Wipe, and ONLY WIPE 'Data' and 'Dalvic Cache'
WARNING: DO NOT WIPE System or Internal Storage. You'll loose mount points under Linux, and the LOS image flash will fail.
Go back to TWRP home screen.
From there go to Advanced and from there to ADB Sideload.
From the computer start installing your LOS image (sideload).
On the computer type:
adb sideload <Your LOS image>.zip.
ATTENTION: During flashing, the phone will show, which slot it flashes. It should flash and show: "flashing inactive Slot A". If you accidentally flash Slot B, start from the beginning Step 1.
Best results I had with the image from the LOS homepage https://download.lineageos.org/xz2c
Download the zip file, don't unpack it, use adb sideload to upload the zip file.
Forget about the Recovery image on the LOS homepage. You don't need it.
When flashing completes, you can wipe Delvic Cache.
WARNING: DO NOT WIPE 'cache', since a 2 slot phone doesn't have a cache partition, and it will fail to wipe it.
Do NOT install the TWRP app, skip this step.
Reboot
Step 6 - Boot LOS
LOS is in Slot A, TWRP is in Slot B.
You can alternate between the slots from fastboot.
fastboot reboot bootloader
fastboot --set-active=a
fastboot reboot bootloader
A reboot should boot LOS.
ATTENTION: When the LOS image has finished booting and you get to the date/time screen, the LOS will hang a while (30s). Just let it do it's job, I think (not sure), it's creating the data in the user partition. After 30s or so use the back key, and try setting the time again. This only happens on the very first boot.
Let me know as feedback, if I can clarify better or if this description is ok.
Click to expand...
Click to collapse
So this works for 17.1 - but have you tried it on 18.1?
Asking because 17.1 works well for me following the official install method (via stock LOS recovery), whereas 18.1 fails.

landsome said:
So this works for 17.1 - but have you tried it on 18.1?
Asking because 17.1 works well for me following the official install method (via stock LOS recovery), whereas 18.1 fails.
Click to expand...
Click to collapse
It works on my phone, however:
I only have a 18.0 image from Olivier. Link is here: https://androidfilehost.com/?w=files&flid=320371
Use the 700MB image, the 200MB image (dated 20201206) probably won't work, the file size is too small. Not sure what the 200MB image is for. At the time of this post the image that worked was dated 20201205.
Anybody working on a 18.1 image, please post it here? I don't have the expertise to help with 18.1 image.
Directly flashing 18.0 image by Olivier crashed my phone, I am not sure why. There is no real reason I know of, but it did.
I first flashed official LOS 17.1 image from LOS homepage using the method above, and it worked. Boot the image to the home screen to intialise everything on LOS. Should it fail, you have a corrupt LOS image. I only had nightly builds available at the time of this post. Maybe that changes soon...
I then went back to slot B and booted TWRP again. I then sideloaded the LOS 18.0 .zip image from Olivier with adb sideload <imagefile.zip> without wiping anything. Don't wipe any partitions, just flash the 18.0 LOS image over the existing installation in Slot A.
When booting the LOS 18.0 image, it says data corrupt (I don't know why), and it boots into the LOS recovery and asks for a factory reset. Do a factory reset, you'll loose all data on the phone, so backup what needs to be backed up first. You probably need to install the apps again as well.
After the factory reset, the phone boots LOS 18.0 just fine.
I noticed there is no email client in the LOS 18.0 image from Olivier. Should you need it, the following tip:
IMPORTANT: When in TWRP (before you flash LOS 18.0), MOUNT System and Data in the mount menu.
You can then find the apk for the LOS email client in the LOS 17.1 image:
/system/system/product/app/Email/Email.apk
/system/system/product/app/Exchange2/Exchange.apk
Copy these apk in the TWRP file manager to /data/media/downloads
Boot LOS 17.1 and backup these apk files to your PC to install on LOS 18.0. The apk files are in your phone's download directory after the copy operation in TWRP.
The Exchange.apk is an extension package to the Email.apk to add Exchange client functionality.
IMPORTANT: After installing the apk on LOS 18.0, and even before you start them for the first time, go to Settings, and give "Email" and "Exchange" all permissions on your phone. Just allow everything. If you don't do that, the applications will crash upon start.
Hope that helps. Any questions, please ask.

A new build is up, please check the OP. Feel free to test and report bugs - we'd like to enable official 18.1 weekly builds soon.

Olivier said:
A new build is up, please check the OP. Feel free to test and report bugs - we'd like to enable official 18.1 weekly builds soon.
Click to expand...
Click to collapse
Thanks. We appreciate this.

Hi,
I have a problem with Wire application.
Microphone is not working on call and video call.
Microphone is working to record a message. Permissions are OK.
I had the same problem on LOS 17 so I thought upgrade will resolve it. NO.
Did anyone experience the same problem?

Raphos said:
Hi,
I have a problem with Wire application.
Microphone is not working on call and video call.
Microphone is working to record a message. Permissions are OK.
I had the same problem on LOS 17 so I thought upgrade will resolve it. NO.
Did anyone experience the same problem?
Click to expand...
Click to collapse
I have the exact same problem with LOS 17, and with 18 too!
Wire is not only the affected program, skype has for example the exact same issue.
And unfortunately I do not know how to fix it.

Thanks for your reply.
Ok, good to know. I have a Z3 compact on LOS 17 and a Z5 Compact on LOS 15, Wire is working fine.
Microphone is working with whatsapp calls. Maybe Devs are whatsapp shareholders

Raphos said:
Ok, good to know. I have a Z3 compact on LOS 17 and a Z5 Compact on LOS 15, Wire is working fine.
Click to expand...
Click to collapse
I can confirm to that LOS 17 and 18 on other devices have no issues, thus it seems xz2c specific

Related

[IME][GUIDE][EXPERIMENTAL] HTC U12+ - „Dual-Boot” Slots A & B

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hello everybody,
first I have to inform you that this thread is to be regarded as highly experimental. I would like to warn all users, and advise against using this guide, who are not yet fully familiar with Treble A/B devices, and do not know how to debug problems!
If you continue, you are doing so on your own responsibility. I cannot accept any liability and/or responsibility for any problems that might occur during the process, such as bricks and other incidents. If you proceed from here on, you agree to personally take full responsibility for everything you do!​
Prerequisites
You are familiar with the Universal HTC RUU/ROM Decryption Tool and know how to use it.
You have a current RUU.zip for your device downloaded onto your PC (ATTENTION software version has to be the same as on your currently activ full stock slot!)
Your bootloader has to be Unlocked/S-ON
You don't panic when something goes wrong.
Guide
First: Start from scratch! What I'm saying is that the first thing you have to do is RUUing back to Stock.
Second: Never, I repeat, never use a PIN/password for the boot! Of course you can use a PIN, a password, or a screen lock pattern, but never for the boot process as long as you want to use a dual boot!
Okay, let's get started:
Use the Universal HTC RUU/ROM Decryption Tool to extract the system.img and the boot.img using the -sf command.
Copy system.img and boot.img to your fastboot/adb folder on your PC (NOT system_other.img, NOT boot_signed.img).
Rename the RUU to 2Q55IMG.zip, and copy it to the root directory of your extSD
Flash your RUU to restore a full stock system to your primary slot, slot A.
Power off your device
Reboot to download mode
Hold the power button pressed to power up your U12+.
Keep the Power button pressed and wait for the very first vibration.
In this very moment you got to release the Power button, press the Volume Up button immediately and hold it until the bootloader shows up.
If you did everything correctly, you'll now see the bootloader mode.
Navigate with the Volume Down key, until "DOWNLOAD MODE" is shown on the top of the screen.
Press Power once to enter it.
Flash your stock /boot and /system images to inactive second slot
flash boot.img to current inactive slot, using
Code:
fastboot flash boot_b boot.img
flash system.img to current inactive slot, using
Code:
fastboot flash system_b system.img
(this one takes a while to start, and will be flashed in three steps, so give it some time! It'll show an error first, so let's hang it on that very error for some seconds - see post #2 for further details.)
Reboot your device to active slot A, and set everything up
Activate Developer Options and check USB Debugging
Reboot to bootloader using adb reboot bootloader
Change active slot to slot B unsing
Code:
fastboot --set-active=b
Reboot to now active slot B once, and let it settle
Now you can start to modify slot B according to your wishes. So I run slot A as full stock system, while I have installed ViperU12+ in my slot B CleanSlate kernel, Magisk and Magisk, having a custom slot and a stock slot.
If an OTA update is offered, you only have to switch the active slot back to slot A, use the
Code:
fastboot --set-active=a
, reboot the device and install the update.
DISCLAIMER: the modified slot will be completely overwritten during this update process, so you should only install the OTA update when a new RUU is available, if you want to keep the "dual boot" option. If an OTA arrives and there is already a RUU for it, you have to install it after changing the slots as just described, and carry out the steps 1 - 12 for the now inactive slot again to realize a second modified slot.
​
XDA:DevDB Information
HTC U12+ (IME) - „Dual-Boot” Slots A & B
Contributors
@5m4r7ph0n36uru,
Created 2018-09-08
Last Updated 2017-10-17
Error handling during flashes
Error #1: "Cannot load system.img"
What can I do, if fastboot doesn't flash the system image, but throws an error stating
Code:
fastboot flash system_b system.img
Invalid sparse file format at header magic
Sending sparse 'system_b' 1/3 (1041175 KB)
OKAY [ 34.445s]
Writing sparse 'system_b' 1/3
(bootloader) HOSD CL#1050003
(bootloader) [email protected]
(bootloader) [email protected]%
FAILED ()
Finished. Total time: 131.327s
Solution: Well, let the device stay in this state for tiny seconds (in fact, it can be up to 25 seconds), and DO NOT interrupt the process of flashing! This is a fastboot problem that prevents images as large as system.img from being flashed in one step, or rather as a single file. Therefore, fastboot will start splitting system.img into three parts after a certain waiting time, and flashing each part separately, but one after the other. Patience is called for here. Don't panic, because it will have been flashed successfully in the end!
Reserved #2: just in case!
this is smart.
does it mean that I have an untouched 1.15. system on slot a ,cause I ve run that OTA 1.21. with magisk? so I can "downgrade" and can recieve updates again?
wiQbold said:
this is smart.
does it mean that I have an untouched 1.15. system on slot a ,cause I ve run that OTA 1.21. with magisk? so I can "downgrade" and can recieve updates again?
Click to expand...
Click to collapse
Didn't test to switch slot when running to different versions like you do. But in theory this should work, as long as 1.15. is still pristine, as that's what Treble is meant for - having a fallback solution once the first update hit. Maybe you could try and let us know here, for me to add a separate post regarding that very fact.
Sent from my HTC U12+ using XDA Labs
I read somewhere, I think in one of your threads, that there is a trigger on a partition (dont know the name now) that will be triggerd if I root.
thought it is systemwide. so I will try it at next update if I could recieve an OTA, with slot a.
@5m4r7ph0n36uru
This was a great write up. I had the same idea in mind yesterday, but you know this stuff and I don't. So you don't need to install the OS(you know what I mean) in slot-b? Only boot + system? Didn't know that.
Also was thinking what @wiQbold posted regarding switching slots for OTA. Of course that'll only work for the next OTA, will require RUU-ing afterwards. Good for one OTA with the switching.
P.S. - Just want to say THANK YOU for your time, patience and effort with everything you're doing!!!
P.P.S. - Allow just a small, very small token of my appreciation: 7S360226N84122301
k_l_o said:
P.P.S. - Allow just a small, very small token of my appreciation: 7S360226N84122301
Click to expand...
Click to collapse
Thanks a million mate. Really much appreciated! Time for a good and well done Gin I guess
I am asking you to question or deny that my reasoning is correct.
I had v1.15, I made flash Magisk, root. When it was released v1.21 I could not do OTA, so I threw a full RUU.
Without any slots, I uploaded Magiska, root and when it was made public - ViperU12 +
I have an active "slot-A".
And now clou:
If next week HTC will provide v1.25.401.3 (for DUGL) then I will be able to download OTA without a problem after changing the active "slot-A" to "slot-B"?
Now, when writing, I thought I was thinking about "slot-A" when I have ViperU12, Magisk - can I change the active slot on "slot-B" and use STOCK system?
I suspect that user applications will not be on "slot-B"?
regards
q.
qriozum said:
I am asking you to question or deny that my reasoning is correct.
I had v1.15, I made flash Magisk, root. When it was released v1.21 I could not do OTA, so I threw a full RUU.
Without any slots, I uploaded Magiska, root and when it was made public - ViperU12 +
I have an active "slot-A".
And now clou:
If next week HTC will provide v1.25.401.3 (for DUGL) then I will be able to download OTA without a problem after changing the active "slot-A" to "slot-B"?
Now, when writing, I thought I was thinking about "slot-A" when I have ViperU12, Magisk - can I change the active slot on "slot-B" and use STOCK system?
I suspect that user applications will not be on "slot-B"?
regards
q.
Click to expand...
Click to collapse
No you can't as after a RUU slot_b is empty imho. It is used for the first OTA after RUUing, as the update patches all files and copies them onto alot_b. So I'm afraid that, regarding your situation you got to RUU yet again to take the OTA.
That's exactly why I wrote to keep both slots at the same version of dual booting, and to setup the inactive slot_b right after RUUing, and modify that very slot. That way you can run modified on slot_b, and switch to the unmodified still freshly RUU'd slot_a as soon as the update arrives.
The will patch up all files, and copies them over to slot_b overwriting it completely. So the tinkered slot gets lost and replaced by the pristine, updated software version, making slot_b the now active slot. Thus you'd have to wait for the RUU to drop, decrypt it to obtain system and boot image, flash them to the now inactive slot_a, and start modifying slot_a, while you still kept all your apps that'd mean some work to be done after every update, like flashing Magisk and so on to your inactive slot.
That's why I wrote my warnings in the OP, that this one's actually really finicky and should only be done with proper knowledge. You always need to know which ones your pristine slot, as you never ever may boot TWRP if on that very slot to keep the ability to take further OTA. You should only boot TWRP if on the inactive slot, that you ser up as dual boot to tinker with it.
Sent from my HTC U12+ using XDA Labs
Hi, I have followed all of your directions I believe, Have stock ROM on Slot A and fastboot flashed decrypted boot.img and system.img on slot B but cannot get the "fastboot -set-active=b" command to work. Any suggestions? All I get is the usual list of commands when a command doesn't work. Thanks for all you do Buddy.
I noticed as shown in my screenshot that the set active slot commands for a and b are slightly different, with the a slot having a comma at the end. I was just wondering if these commands were accurate?
I can't get either command to be recognized, I've also tried the other similar command from your other thread.
Sorry for the trouble but I am stuck.
LibertyMonger said:
I noticed as shown in my screenshot that the set active slot commands for a and b are slightly different, with the a slot having a comma at the end. I was just wondering if these commands were accurate?
I can't get either command to be recognized, I've also tried the other similar command from your other thread.
Sorry for the trouble but I am stuck.
Click to expand...
Click to collapse
As it turns out, I had an outdated fastboot.exe and that was the issue. But I think the commands in the o.p. are a little off and need corrected? Sorry for the posts.
Anyway, the commands for changing slots that are shown in the O.P. are a little off. They should be
fastboot --set-active=b
fastboot --set-active=a
And if these commands do not work, it is most likely your fastboot.exe (platform-tools) is out of date, needs updated.
LibertyMonger said:
Anyway, the commands for changing slots that are shown in the O.P. are a little off. They should be
fastboot --set-active=b
fastboot --set-active=a
And if these commands do not work, it is most likely your fastboot.exe (platform-tools) is out of date, needs updated.
Click to expand...
Click to collapse
It's correctlly shown when opened on the webview. XDA labs app is the problem here. It tends to not show several lines and mix up code and none code environments. Same applies for multiple quotes, which aren't shown correctly on the Labs App.
Sent from my HTC U12+ using XDA Labs
5m4r7ph0n36uru said:
It's correctlly shown when opened on the webview. XDA labs app is the problem here. It tends to not show several lines and mix up code and none code environments. Same applies for multiple quotes, which aren't shown correctly on the Labs App.
Sent from my HTC U12+ using XDA Labs
Click to expand...
Click to collapse
It was showing the same on my Windows PC as my XDA app but it shows fixed now so no big deal. My main issue was the fastboot .exe but now I can't get "fastboot flash system_b system.img" to work. boot.img flashes fine but I get this error with system.img
Invalid sparse file format at header magic
Sending sparse 'system_b' 1/3 (1046655 KB) OKAY [ 44.078s]
Writing sparse 'system_b' 1/3
(bootloader) HOSD CL#1044991
(bootloader) [email protected]
(bootloader) [email protected]% FAILED () Finished. Total time: 223.063s
I guess it means the image is too big? I don't know but I been trying to figure this out for 3 days now.
I tried everything I could find to fix my slot b and finally resorted to last resort, I ran Sunshine S-Off and reverted back to the 1.15 ROM so I could take the 1.21 OTA and that fixed it. I am currently booted on Slot b. Just in case anyone runs into this issue, S-Off and flashing an older ROM zip in download mode fixes it. Seamless update still worked even though it seemed I had no ROM on slot b.
---------- Post added at 01:33 PM ---------- Previous post was at 01:15 PM ----------
So now I have stock 1.25 on slot a and just set slot b to active and booted up and have stock 1.21 on slot b. So I am thinking for this Dual-Boot to work to customize slot b, would I need to take the OTA on slot b? Kind of confused at this point. But I guess I will figure it out. At least I can boot both slots now.
---------- Post added at 01:47 PM ---------- Previous post was at 01:33 PM ----------
Taking the OTA on slot b didn't work, slot b is still on the 1.21 OTA. This is a little too confusing so I may give up for a while until I learn something. I could try fastboot flashing boot.img and system.img to boot b now I guess. Does it matter in what I order I flash them? Since boot.img was working and system.img was failing, I could try flashing system.img first to see if it is successful and then flash boot.img. Just to be safe. We will see...
---------- Post added at 02:07 PM ---------- Previous post was at 01:47 PM ----------
Fastboot flashing system.img failed again and now can't boot slot b so I am giving up for now. Gonna temp. S-Off and revert back to 1.15 to fix it again and just leave it be for a while. I either have a corrupt decrytped system.img or I have done something else wrong. At least it was a learning experience.
LibertyMonger said:
So now I have stock 1.25 on slot a and just set slot b to active and booted up and have stock 1.21 on slot b. So I am thinking for this Dual-Boot to work to customize slot b, would I need to take the OTA on slot b? Kind of confused at this point. But I guess I will figure it out. At least I can boot both slots now.
Click to expand...
Click to collapse
Actually that's the way it works if you take all OTAs up to the latest. You'll be on 1.25. on Slot A and shouldn't tinker with that very slot, as that's the one to switch to, as soon as the next OTA arrives.
So you'd switch to Slot B for tinkering which is on 1.21. Best would be to have a 1.25. boot.img and system.img at hand. Both can be flashed using fastboot. BUT flashing the system image, fastboot tries to flash it as one large image, which will end in a command prompt output, that the process failed. If you now just leave it there and wait - lets say 30 seconds - fastboot will restart the flashing proceedure and flash the system.img in three parts, one after another.
So you'll be on 1.25 on both slots and not receiving the OTA availability message for 1.25 on Slot B any longer.
Now you can tinker with Slot B, flashing Magisk, a Magisk ROM and the like.
As soon as the next OTA drops, it'll notify you, and you'd have to switch back to Slot A, download the OTA and let it patch up Slot B. After the OTA it'll swith to Slot B and you'll be greated by an updated, full stock system, with software > 1.25. If you want to start tinkering again it is important to backup stock boot.img and system.img from the now active stock Slot B, switch to Slot A, and repeat the procedure written above in italic letters.
Hope that clears things up a bit.
5m4r7ph0n36uru said:
Actually that's the way it works if you take all OTAs up to the latest. You'll be on 1.25. on Slot A and shouldn't tinker with that very slot, as that's the one to switch to, as soon as the next OTA arrives.
So you'd switch to Slot B for tinkering which is on 1.21. Best would be to have a 1.25. boot.img and system.img at hand. Both can be flashed using fastboot. BUT flashing the system image, fastboot tries to flash it as one large image, which will end in a command prompt output, that the process failed. If you now just leave it there and wait - lets say 30 seconds - fastboot will restart the flashing proceedure and flash the system.img in three parts, one after another.
So you'll be on 1.25 on both slots and not receiving the OTA availability message for 1.25 on Slot B any longer.
Now you can tinker with Slot B, flashing Magisk, a Magisk ROM and the like.
As soon as the next OTA drops, it'll notify you, and you'd have to switch back to Slot A, download the OTA and let it patch up Slot B. After the OTA it'll swith to Slot B and you'll be greated by an updated, full stock system, with software > 1.25. If you want to start tinkering again it is important to backup stock boot.img and system.img from the now active stock Slot B, switch to Slot A, and repeat the procedure written above in italic letters.
Hope that clears things up a bit.
Click to expand...
Click to collapse
Thanks a lot buddy, much appreciated. I ended up with 1.21 on slot a cause I reverted back to 1.21, therefore when I took the OTA, it put 1.25 on slot b. So if 1.25 must be on slot a, I will have to revert back to 1.15 so that I will get two OTA's, ultimately leaving me with 1.25 on slot a and 1.21 on slot b. I noticed, trying to flash the RUU on slot b caused my slot b to be unbootable. It bootloops about 10 times before it gives up and returns to boot on slot a.
Thanks again for all your work buddy. I just post my experience to help just in case others run into my issues. Learning from mistakes and experience.
Curiosity, at least for me.
I had a clean system (after RUU) prepared according to your tutorial. On the "B" partition, I applied ViperU12 +, but I had a problem with the weather clock widget (it did not refresh the time after the screen went out under NovaLauncher). Full wipe did not do anything.
I decided to upload a full RUU. I followed the tutorial - I uploaded RUU, I made a flash boot and system on the "B" partition. I checked the active partition (it was "A"), so I started the system to configure it and then change the active partition to "B".
What is my surprise when after the initial configuration, the wizard informs me that I have to enter my Google account information because the account (FRP) was assigned to this device.
I have never met such a message after the RUU. RUU always cleaned the device "to the very bottom".
Hmmm ... what do you think about it?
regards
q.

[TWRP]LG V40 / Judypn

Code:
#include "std_disclaimer.h"
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this Recovery
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
Requirements
Unlocked bootloader
working ADB/fastboot on a PC
the TWRP image downloaded
Pie firmware on the active slot
Installation guide (pre metadata encryption):
Copy the twrp image to your phones storage and/or micro sdcard
Start cmd/powershell/terminal with working adb/fastboot
Reboot to bootloader
adb reboot bootloader OR
turn off the phone (or reboot), as soon as it turns on, hold volume down while USB cable is connected
If youre unofficially bootloader unlocked, and you nuked laf, its volume up and USB for you
fastboot boot TWRP-judypn-boot.img
Confirm allow system modifications if asked
Press cancel if asked for a password (aka when youre encrypted, could also be that it doesnt show you /data at all and no password screen)
Go to Advanced -> Install Recovery Ramdisk
Select the TWRP image which you copied to your phone/sdcard earlier
TWRP will now be installed to both slots (boot_a and boot_b)
Go to Reboot -> Recovery to make sure TWRP is successfully installed
Features:
Install recovery ramdisk:
Selecting this, and then an image (e.g. of TWRP) allows you to install the ramdisk (where TWRP resides for example) into both currently installed kernels/boot images
Inject TWRP after install:
Automatically injects current installed TWRP into the boot image of the ROM/zip youre installing when ticked
Broken:
LGs encryption on Stock
encryption on other ROMs(?)
How to flash ROMs (PRE metadata encryption):
Reboot to TWRP
Make a backup
Install -> select the ROM zip -> tick Inject TWRP -> Swipe for install
wait... ROM will be installed into the NON ACTIVE slot (if youre on a, it will be installed to b, and vice versa)
Reboot system
for gapps, magisk or other mods:
DO NOT REBOOT TO SYSTEM from last step
Go back -> Reboot -> select the non active slot (to where the rom got installed to) -> select recovery
Install gapps, magisk, and whatever else you want
Reboot system
How to initially flash ROMs (metadata encryption):
Reboot to existing TWRP
Make a backup of everything you want to keep
Copy backup to PC (or another external medium)
Flash the ROM
Do NOT inject TWRP (this will break recovery otherwise)
Go to reboot -> Select opposite slot
Reboot to recovery
Perform factory reset (this is to setup encryption)
Apply update (from ADB) with adb sideload for gapps/magisk
reboot to bootloader
fastboot boot judypn_TWRP_bootable-metadata.img
Use as usual
Reboot system
How to update ROMs (metadata encryption):
Reboot to bootloader
fastboot boot judypn_TWRP_bootable-metadata.img
Install -> Select ROM zip
do NOT inject TWRP
Reboot -> select opposite slot (it will tell you even which it installed the ROM to)
Reboot bootloader
fastboot boot judypn_TWRP_bootable-metadata.img
Install gapps/magisk
Or
reboot recovery
apply update -> from adb (in e.g. Lineage recovery)
On PC: adb sideload <new version zip>
(Advanced -> ) Reboot recovery
adb sideload gapps/magisk
reboot system
Warnings:
Updating a ROM means reflashing the mods you flashed too (e.g. Gapps), addon.d doesnt work properly
Be aware of the slot you are currently on
If youre flashing a ROM to a slot, make sure you also have the required firmware (abl, modem, and so on) in that slot
Infos:
System image/Vendor image and system/vendor are redundant, the image variants are direct copies of the partition (and also their size) while the others are "simply" files copied and repacked
How to use decrypted stock by @Xsavi : https://forum.xda-developers.com/lg-v40/how-to/guide-twrp-data-access-stock-t3970149
Metadata encryption TWRP requires 10 firmware to use properly, no guarantee for it to work on Pie firmware!
Download:
Metadata bootable: https://drive.google.com/file/d/1hdzeH3AIQVf3siQNsI27IS_vmghPESEG/view?usp=sharing + Install zip: https://drive.google.com/file/d/1CQUfg54zD838detcIJqdRiKXdVNtd6Iy/view?usp=sharing
Bootable: https://drive.google.com/open?id=1UnIFbJlXHl6x4azq6H6yS-PRfk-omdTP
Old: https://drive.google.com/open?id=1p3IrbeOxM4ay01JccyifWDuxqqrE0_Dl
Sources:
device tree: https://github.com/SGCMarkus/android_device_lge_judypn-twrp/tree/android-9.0
kernel: https://github.com/SGCMarkus/android_kernel_lge_sdm845/tree/lge-pie-v409-20a
XDA:DevDB Information
TWRP for Judypn, ROM for the LG V40
Contributors
SGCMarkus
ROM OS Version: 9.x Pie
Version Information
Status: Alpha
Created 2019-09-20
Last Updated 2019-09-20
Hmm interesting I see ?
Wow. The V40 got TWRP too. Awesome.
Wooo new twrp! Great work Markus!
How hard would it be to get this working on the V35? I can get it to install and boot into recovery, but it does not register touch input.
Well, having a big issue. I installed TWRP, Install custom rom w/ twrp inject, reboot menu, selected the slot where the rom, restarted, no TWRP, No root, but custom rom and now it comes up as unknown in LG UP so I can try to fix it. I think its mostly a brick since I can't do anything. No Fastboot either because im in slot b and cant switch because no root or fastboot.
lowridincrew said:
Well, having a big issue. I installed TWRP, Install custom rom w/ twrp inject, reboot menu, selected the slot where the rom, restarted, no TWRP, No root, but custom rom and now it comes up as unknown in LG UP so I can try to fix it. I think its mostly a brick since I can't do anything. No Fastboot either because im in slot b and cant switch because no root or fastboot.
Click to expand...
Click to collapse
did you have pie firmware also in the slot where you installed LOS to?
otherwise.... nothing is ever really a brick, you still have 9008 mode as last option
Fixed. Case of the bad drivers. LGUP didn't wanna read so I went to a different computer. Read it through LGUP, flashed Stock, rebooted to recovery, TWRP popped up.
How do the two slots work? I thought that these were for current ROM in one and then new ROM in the other, alternating with each ROM update. Why is one for the ROM and the other holding system partition additions? I would expect gapps to integrate into both A and B sides at once on top of each ROM...
Is there documentation on this?
So I'm bootloader unlocked, rooted on pie and cannot access fastboot. How do I go about installing twrp?
EDIT: tried different USB-C cables and one worked like a charm.
seacrow01 said:
So I'm bootloader unlocked, rooted on pie and cannot access fastboot. How do I go about installing twrp?
Click to expand...
Click to collapse
What happens if you try and access the bootloader aka the fastboot...
Ainz_Ooal_Gown said:
What happens if you try and access the bootloader aka the fastboot...
Click to expand...
Click to collapse
Nothing, phone just reboots like nothing is there. neither the button combo nor the "adb reboot bootloader" command works.
So I got on of the US models unlocked bootloader Verizon I got fastboot can I flash this one to my 405ua verizon?
In fastboot i see Judypn But I believe they flashed a open Korean on mine Im trying to get back to US firmware twrp and magisk if at all possible
Well I can confirms this works for pie on a 405ua unlocked bootloader...Nice work mate...
After reading through a bit and playing around. I got recovery installed on ramdisk recovery. Got out of my bootloop by fastboot flashing stock boot img from my current firmware. I did notice slot b I still have stock recovery which helped getting out of the failed encryption loop. And I also have download mode there.
How to unlock bootloader in indian firmware????
why i cannot enter fastboot mode on my lg v40 v405UM with android pie. When i command adb reboot bootloader it goes to restart phone.Not enter fastboot mode. Please help me.Sorry for my english
Hi anyone can help me after flashing twrp my phone doesnt reboot or does it take long to boot after flashing twrp
lowridincrew said:
Fixed. Case of the bad drivers. LGUP didn't wanna read so I went to a different computer. Read it through LGUP, flashed Stock, rebooted to recovery, TWRP popped up.
Click to expand...
Click to collapse
What drivers did you use? I can't get my LGUP to recognize the device. I'm trying to flash stock back to a working copy of Lineage 16 with twrp.
Broken:
LGs encryption on Stock
encryption on other ROMs(?)
exFat for external SDs
Does this mean just within recovery or within Pie?.... The exFat part, that is
xaxxelous said:
Broken:
LGs encryption on Stock
encryption on other ROMs(?)
exFat for external SDs
Does this mean just within recovery or within Pie?.... The exFat part, that is
Click to expand...
Click to collapse
Both, as pie uses the same kernel as TWRP when booted

H931 Devices Possibly Other Variants Wifi Fix Android 10 Roms (Liquid 10, LineageOs)

Short Story: Updated to pie us99830b kdz after flashing some things and clean flashed 10 roms again and somehow wifi wanted work ok since then. I also made backups but I am not clear if they will work without first getting pie blobs through kdz. This fix is not necessary on all LG V30 variants so first check if your model works with the roms fine. May also want to double check Zachs adb shell commands do not work on your device or do that also just in case (bottom).
Suggestions: This may actually take some time if you run into problems. Might be good idea to throw your sim in another phone so you don't stress. Smoke a bowl or open a beer.
Warning: AOSP rules may apply here although everything seems well with both permissive/enforcing for me. See that thread. Proceed at your own risk. If anytime you are not detected in download mode you must flash an oreo stock twrp zip such as h93120h or us99820e.
Files: Wifi working for me with this method on each 10 rom I have tested(Liquid, Lineage, AEX, ION, Havoc) so find one of those. You may also need us99820b kdz(us99810d if 20b doesn't boot clean some reason), the h93030q twrp zip, kernel(huamea 1.9.3 suggested) and h930 22j modem (https://drive.google.com/file/d/16o93WU262HWv2fKPYnMxC81GY6bJ3Txd/view?usp=sharing).
Quick Steps:
20b kdz partion all boot to setup screen then power down+fastboot+install/boot twrp+ magisk-decrypt-ak3remover zips+boot to setup screen again(don't setup) then power down+download mode+ 30b kdz partition all. Decrypt error for me first boot with 30b kdz so "reset phone" may be needed if greeted with that screen. Get to actual setup screen on 30b then power down+fastboot+twrp(cancel on encrpyt error)+format+wipe all(but sd)+reboot recovery. Then finally your selected poison havoc q+open gapps+magisk+decrypt for a clean flash. After booting in once I then reboot to twrp and flash huamea because it temporarilly removes root which needs to be reflashed.
Troubleshooting Suggested Steps:
Prior Potentially Unecessary Steps*
i. First install the 10 rom without wifi and make a backup or use mine below of chosen rom (in my case us99830b clean flashed to liquid/lineage)
ii. Clean flash h93030q twrp zip +magisk+disable encrypt+22j modem.img boot to startup screen then reboot to recovery
iii. Format data then wipe all but sdcard/otg and restore the Q backup. Goal here is to get the wifi initially clicked in, but the calling quite likely will still not work now. You can attempt to flash some stock modems to see if they work for you but I had no such luck. Reflash 22j modem after if you do test others.
iv. If the 30b kdz has not been booting up flash us99820b kdz partition all then reinstall twrp. If the 20b kdz restarts by itself after booting up you must partition dl all us99810d kdz first before 20b.
Steps
1. Format data then wipe all but micro sd don't reboot
2. Go back and reboot recovery
3. Magisk+disable encrypt
4. Power off then download mode(volume up while plugging in cable)
5. Partition dl all us99830bkdz using patch lgup
6. Let it boot to first welcome screen but don't setup anything
7. power off then fastboot mode(volume down while plugging in cable)
8. In adb & fastboot enter fastboot flash recovery then fastboot boot twrp.img
9. Will get decrypt error still in twrp for second just hit cancel
10. Repeat steps 1 & 2
11. FLash Liquid 10.1+Opengapps or Microg if wanted+ Magisk+ disable decrypt zips and boot it to start screen but don't setup
12. -Optional-Reboot Recovery Flash Humea kernel 1.5-1.9.3 or another to stabilize wifi/ better battery life(could possibly be done in prior step, may possibly lose root) and reboot
13. Andy's Fingerprint fix for internal error promp at startup(some roms ok without): Download osmosis busybox and magisk props config hide. Reboot then type "su" in any terminal then "props", follow prompts and select lg-v30 h930. The error should go away on boot.
*The prior steps here initally fixed wifi for me but I still didn't have calling, so I chose partition dl all partitions(only way kdz seems to boot) using patched lgup back to us99830b to test again which I assumed would cancel this procedure out so alas still not 100% sure if required. A dev has said though if you get wifi on your device once you will always have it. Wifi has been sticking for me afterwards until flashing any oreo kdz then I must re follow quick steps.
Backups - magisk w/ huamei Kernel 1.5, opengapps, fingerprint fixed
LineageOs 17 https://drive.google.com/drive/folders/1uQSDWDYFjGlEQ-gdyyn8QVgT5tB6Cjku?usp=sharing
Liquid 10 https://drive.google.com/drive/folders/1w9e_oLWpDR5bWk5jhs4xs1H9Q-AOv0NI?usp=sharing
Zachs Faster Wifi Fix for some lucky LG V30 users:
" - you need a kernel with dm-verity disabled (custom kernel, etc.) - for now the one of the haumea_I.base kernels allow this process
- Magisk must be installed (root permissions)
- get into a shell and become root (adb shell -> su ; or via other means)
- cp -a /vendor/etc/wifi/WCNSS_qcom_cfg.ini /mnt/vendor/persist-lg/wifi/WCNSS_qcom_cfg.ini
- in my example wlan_mac.bin is copied to /storage/emulated/0/joan_int/wlan_bins/wlan_mac.bin (that's internal storage and a newly created folder joan_int and subfolder wlan_bins)
so the final command to "fix" all is
cp -a /vendor/etc/wifi/WCNSS_qcom_cfg.ini /mnt/vendor/persist-lg/wifi/WCNSS_qcom_cfg.ini
cp /storage/emulated/0/joan_int/wlan_bins/wlan_mac.bin /mnt/vendor/persist-lg/wifi/wlan_mac.bin
chmod 644 /mnt/vendor/persist-lg/wifi/wlan_mac.bin
you copy over the WCNSS_qcom_cfg.ini file to the expected place (the symbolic link is wrong)
and copy over the missing wlan_mac.bin also to the expected place"
wlan_mac.bin here https://drive.google.com/file/d/1GM-IBe0CJ9hA4s2TAzas8IJcN67FOMR3/view?usp=sharing
Shouts out to @ChazzMatt , @SGCMarkus, @kherio, Andy, Zach, Chiru, Harris, and others on telegram for the group think. Any difficulities after following these steps you can hit up @tyl xda / Andy on telegram, he was able to use a slightly differed spin using persist lg files which may work for you. I will try to update as things get figured out

GUIDE: How to unbrick your Zenfone 6 (ZS630KL)

Hello.
This guide will help you unbrick your device in case your devices hangs as it boots, and always boots into fastboot mode and recovery is unavailable and the like.
Note: Unlocked bootloader is not required to do any of the actions described in this guide.
Disclaimer: I'm in no way responsible for the actions you perform and whatever happens to your device due to these actions. Proceed at your own risk.
Prerequisites:
Service firmware. Can be downloaded here. It's an older build, but it will do the trick and it's the only one I could find freely available at the time of writing. Only for WW SKU
Zip for your desired build. Can be found here.
- Note: For this guide, my desired build will be WW-17.1810.1910.63, which is a special case, as you will need to flash in the following order: Service Firmware -> WW-16.1220.1909.194 -> WW-17.1810.1910.63. In other cases, unless noted otherwise in a description of the build on the ASUS website, Service Firmware -> Desired build will suffice.
Platform tools of Android SDK. Latest package can be downloaded from: Windows | Linux. Somewhat optional but good to have.
Step 1 - Preparing the environment
This is not required but for the sake of simplicity and keeping everything in one place, create a folder and name it whatever you like, for example ASUS or Unbrick
Create a sub-folder inside the folder you've created in the previous step, call it service_firmware, download and unzip service firmware into this folder
Download files for the desired builds from the above link. For this specific case, WW-16.1220.1909.194 and WW-17.1810.1910.63.
3.a If you have microSD card, transfer zip file for the desired build into its root and insert the card into the phone.
3.b. If you do not have a microSD card, download and unzip platform tools mentioned in the prerequisites as you will need adb to flash firmware/s via sideload
Step 2 - Flashing service firmware
Connect your phone via USB
Enter fastboot mode via one of the methods:
1.1. Turn off your device, then turn it on while holding down the power and volume up buttons at the same time. Release the power button when it powers up (keep holding the volume up button)
1.2. If you have platform tools, you can do adb reboot fastboot
Open CMD (windows) | Terminal (unix)
CD into the folder with service firmware from item #2 from the step above.
Make sure your phone is detected by typing fastboot devices
Ensure battery is at least 20% charged. Aside from normal means, it's possible to check the battery charge via fastboot oem get-batcap.
Sample output: (bootloader) bat cap = 35, which means that the battery is 35% charged.
IMPORTANT NOTE BEFORE CONTINUING:
By default, flashing with one of the scripts wipes your userdata, in other words, it performs a factory reset.
It is possible to avoid userdata wipe (although not encouraged) but keep in mind, unless you flash your current build after flashing service firmware, your phone will not boot up.
If you absolutely would like to preserve your userdata, even if for the sake of backing it up before doing a factory reset, you have to edit the flashall script in the following way:
Windows: Open flashall.cmd in your favorite text editor, go to line #298 and change it from fastboot -w to REM fastboot -wand save the changes.
Unix: Open flashall.sh in your favorite text editor, go to line #275 and change it from $fastbootcmd -w to #$fastbootcmd -w and save the changes.
Once again, this is not encouraged as it can potentially cause issues later on. You've been warned.
Run the script
1. 1. Windows: In the CMD you opened earlier, type flashall.cmd
1. 2. Unix: In the Terminal you opened earlier, type ./flashall.sh
Note: An obvious note, do not disconnect your device from your PC while flashall script is running. Your device will reboot a few times during the execution.
Once script outputs format logdump... and the phone reboots, service firmware will be flashed.
Step 3 - Upgrade to your desired build
Enter Recovery mode via one of the following methods:
1.1. If your phone is turned on and USB debugging is enabled, use command adb reboot recovery
1.2. While in fastboot mode, navigate to Recovery Mode using Volume Up/Down buttons and select with a single press of a Power button
1.3. While in fastboot mode, issue one of the following commands : fastboot reboot recovery or fastboot oem reboot-recovery
Once in Recovery Mode, you have 2 ways to proceed:
A: Update from SD card
A.1. Select Apply update from SD card option
A.2. Navigate your SD card and select UL-ASUS_I01WD-ASUS-16.1220.1909.194-1.1.1-user.zip
A.3. Confirm your choice with a single press of the Power button
A.4. Once you're back to the menu of Recovery Mode, reboot by selecting Reboot system now and enter Recovery Mode once again via any of the above methods
A.5. Select Apply update from SD card option again
A.6. Navigate your SD card and select UL-ASUS_I01WD-ASUS-17.1810.1910.63-1.1.1-user.zip
A.7. Confirm your choice with a single press of the Power button
A.8. Once you're back to the menu of Recovery Mode, select Reboot system now
B: Update through ADB Sideload
B.1. Select Apply update from ADB option
B.2. In your CMD/ Terminal, issue command adb sideload "UL-ASUS_I01WD-ASUS-16.1220.1909.194-1.1.1-user.zip"
B.3. Once you're back to the menu of Recovery Mode, reboot by selecting Reboot system now and enter Recovery Mode once again via any of the above methods
B.4. Select Apply update from ADB again
B.5. In your CMD/ Terminal, issue command adb sideload "UL-ASUS_I01WD-ASUS-17.1810.1910.63-1.1.1-user.zip"
B.6. Once you're back to the menu of Recovery Mode, select Reboot system now
Note: Like I've mentioned earlier, these steps are specifically for build WW-17.1810.1910.63. If your target build does not require another build for an update, you can skip steps A.4 to A.7 or B3 to B5
That's pretty much it. If you followed the steps above correctly, you should once again have a running phone with your desired build of firmware.
If you have any questions, do not hesitate to ask.
Cheers.
Hello i've a question (sorry for my bad English). This morning my phone was bricked (red message logo), and with this tuto i remove this logo and i found my original recovery.
But when i want to install firmware from recovery with SDcard option, i've a message no SDcard found and impossible to install firmware. (even after several tries)...
If i reboot my phone i have android logo bootloop...
Can you help me???
https://drive.google.com/file/d/1GStfEgZFpb66JRaAmjeYOKmyn9d8WcPz/view?usp=sharing
https://drive.google.com/file/d/1FSRZfI1vNAyDQDZaLDGrHyiC-lImsYhr/view?usp=sharing
Thank you and Happy New Year...
Thanks for the link to that service firmware!
_Kuroi_ said:
This guide will help you unbrick your device in case your devices hangs as it boots, and always boots into fastboot mode and recovery is unavailable and the like.
Cheers.
Click to expand...
Click to collapse
Thanks a lot mate, you made my day!
Please, one question: can you tell me, if both slots (A & B) are flashed by this method?
Thanks!
Thank you so much!
I've wanted to go back to stock for so long, but I haven't been able to find a stock ROM. I've even contacted ASUS support and they couldn't even get it! Thank you so much for the download and for the guide, you've made my week. I'll be smiling every time I use my phone thanks to you!
Great guide. I have a soft bricked device after flashing Lineage 16.0 recovery. Have a boot loop and can't get to recovery. I realise the mistake was flashing the recovery as should have just booted it.
Has anyone else had success with this on a Zenfone 6?
For those who need it; managed to resolve by downloading the stock firmware from Asus, extracting the boot.img and flashing it. Back working.
Didn't try the guide but this is quicker in this scenario if you have flashed a custom recovery to the boot partition. There is no separate recovery partition so this soft bricked the device, overwriting boot with recovery (I followed the guide here for LineageOS which is ill advised) . Should be booting the recovery rather than flashing, or booting into stock recovery and using the installer zip for your custom recovery.
Steps to recover:
1. Download stock firmware from Asus - make sure you use the same firmware version installed on the device or you may find it will boot but some hardware such as WiFi or others may not work.
2. Extract the archive and then you need to extract the boot.img from payload.bin - see this article and use the payload dumper
3. Flash your boot.img with fastboot flash boot boot.img
4. Reboot
Device should restart and boot up. Now to see why TWRP and LineageOS custom recoveries won't boot.
Hi, I followed your tutorial down to the letter, but when trying to install the ROM from stock recovery, I'm getting this error
"Eackage is for product ASUS_I01WD but expected WW_I01WD
Installation aborted"
Any fix? I'm trying to flash the latest Android 10 rom, but no luck.
This worked for me, but I'm still in CSC FastBoot Mode and when Android boots, I'm asked to insert a previous pin, which nothing works. Any advice?
kenturky said:
Hi, I followed your tutorial down to the letter, but when trying to install the ROM from stock recovery, I'm getting this error
"Eackage is for product ASUS_I01WD but expected WW_I01WD
Installation aborted"
Any fix? I'm trying to flash the latest Android 10 rom, but no luck.
Click to expand...
Click to collapse
hey, did you manage to fix this? i'm having the exact same problem
sapientsaxonsaboo said:
1. Download stock firmware from Asus - make sure you use the same firmware version installed on the device or you may find it will boot but some hardware such as WiFi or others may not work.
2. Extract the archive and then you need to extract the boot.img from payload.bin - see this article and use the payload dumper
3. Flash your boot.img with fastboot flash boot boot.img
4. Reboot
Device should restart and boot up. Now to see why TWRP and LineageOS custom recoveries won't boot.
Click to expand...
Click to collapse
I tried to install latest firmware from
https://www.asus.com/Phone/ZenFone-6-ZS630KL/HelpDesk_BIOS/
everything goes fine but it shows till this moment:
fastboot flash boot_b boot.img
Sending 'boot_b' (98304 KB) OKAY [ 2.295s]
Writing 'boot_b' FAILED (remote: 'Flashing is not allowed for non-official image')
any suggestions ?
kenturky said:
Hi, I followed your tutorial down to the letter, but when trying to install the ROM from stock recovery, I'm getting this error
"Eackage is for product ASUS_I01WD but expected WW_I01WD
Installation aborted"
Any fix? I'm trying to flash the latest Android 10 rom, but no luck.
Click to expand...
Click to collapse
Taylor Moon said:
hey, did you manage to fix this? i'm having the exact same problem
Click to expand...
Click to collapse
Try flashing latest image of Android 9 and then flash Android 10
Can somebody please help me with my problem?
So I was able to get my hands on a new 8gb/512gb matte black version of this. Was setting up the phone, updated to Android 10 first before transfering sms, call logs and updating apps. Went to turn off the phone to insert my SIM card and now the phone won't turn on. It vibrates every time I press the power button but then nothing. Currently it's connected to the supplied charger with the LED light lit red. It was already charging while I was using it, had about 70% battery before I switched it off. I've tried volume down + power button for 10 seconds, LED light turns off and it vibrates, and it keeps vibrating every 10 seconds when it's connected to the charger (doesn't keep vibrating when it's not connected). Can feel the area between the fingerprint reader and camera pretty hot during this. Volume up + power doesn't work either. Any ideas?
Click to expand...
Click to collapse
Also, the phone gets detected when I connect it to my laptop but I can't do an "adb reboot" or "adb reboot fastboot" as it says the "error: device is not found."
I left it on charge overnight and the LED changed from red to green too.
Any help would be greatly appreciated.
CVonV said:
Can somebody please help me with my problem?
Also, the phone gets detected when I connect it to my laptop but I can't do an "adb reboot" or "adb reboot fastboot" as it says the "error: device is not found."
I left it on charge overnight and the LED changed from red to green too.
Any help would be greatly appreciated.
Click to expand...
Click to collapse
When you connect it to your laptop, go to device manager and check what it is detected as.
_Kuroi_ said:
When you connect it to your laptop, go to device manager and check what it is detected as.
Click to expand...
Click to collapse
I can't seem to find any listing that would correspond to the phone under the Ports section :/
CVonV said:
I can't seem to find any listing that would correspond to the phone under the Ports section :/
Click to expand...
Click to collapse
Maybe upload a screenshot of the devices listing?
_Kuroi_ said:
Maybe upload a screenshot of the devices listing?
Click to expand...
Click to collapse
I thought it would've been listed in the Ports section but it's right at the top under "Android Device" as "Android ADB Interface". I believe I have the correct Qualcomm drivers installed.
Attached screenie also shows device not found when I try an "adb reboot" in command prompt.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hmm, I half expected it to be listed as QDLoader 9008, but then it would be under serial ports.
Try fastboot commands instead of adb and also try holding power + vol down for 10-15 seconds
Great guide @_Kuroi_ , I will be trying it out soon. The service rom you are using is pretty old. So I grabbed the last P update service firmware (WW-16.1220.1909.194) and the latest Q build I could get currently (WW-17.1810.2002.133). I have a subscription to one of the paid firmware sites for reasons like this. This way people have more options and it will simplify most people's updating because they can go from the new P service rom to any Q ota. Q firmware doesn't really make sense until it's not being updated anymore but it's here just in case someone finds it useful. If there is some incompatibility in the future or something that requires a newer update I will grab it then. If there isn't I will grab the last firmware once Q is stopped being updated.
WW-16.1220.1909.194
Here
WW-17.1810.2002.133
Here
WW-17.1810.2009.176
Here
Feel free to update your guide to incorporate these all I ask is a credit in the OP for providing it.
After running ./flashall.sh I get the following output:
Done.
target reported max download size of 805306368 bytes
File system type is raw !!!
Erase successful, but not automatically formatting.
File system type raw not supported.
Erasing 'userdata'...
OKAY ( 0.266s)
Sending 'userdata' (1888 KB)...
OKAY ( 0.067s)
Writing 'userdata'...
OKAY ( 0.003s)
Erasing 'metadata'...
OKAY ( 0.027s)
Finished. Total time: 0.799s
Rebooting...
(I changed square brackets to round brackets in the output because otherwise it wouldnt let me post this comment because of bbcode)
I don't seem to have a recovery partition by the end of it and "adb devices" doesn't show me anything.
Does anyone know what might have gone wrong?

How To Guide How to flash ROM and TWRP on POCO F3 / k40 / mi11x. And an explanation. A very important guide

Mandatory instructions for beginners (and not only beginners) to install ROM and other on poco f3​Prerequisite, unlocking the bootloader​For questions, if something is not clear, please write to "Conversations", I will try to correct it in a post with a simpler explanation. And I will answer the question (I am not a 24/7 support service, so duplicate your question in the ROM discussion thread in order to give an answer if I'm busy)​
This is your last chance. After this, there is no turning back. You take the blue pill - the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill - you stay in Wonderland and I show you how deep the rabbit-hole goes
Click to expand...
Click to collapse
!!! The spoiler below is a must-read before doing anything with your device. !!!​
Spoiler: Let's discuss several points at once
Spoiler: 1. Drivers and utilities - download immediately and install so that there are no further questions
1. Fastboot and adb - Tools_r31.0.3
2. Miflash or Mi Flash Tool
3. USBDrivers - QDloader
Spoiler: 2. Features and disadvantages of our device
2.1 We have a so-called A/B partition structure - this is when two spaces are used for system partitions (read more in google) the essence is that there are "Firmware" partitions
Spoiler: code
Code:
"dsp.img", "/dev/block/bootdevice/by-name/dsp_a"
"dsp.img", "/dev/block/bootdevice/by-name/dsp_b"
"xbl_config.img", "/dev/block/bootdevice/by-name/xbl_config_a"
"xbl_config.img", "/dev/block/bootdevice/by-name/xbl_config_b"
"modem.img", "/dev/block/bootdevice/by-name/modem_a"
"modem.img", "/dev/block/bootdevice/by-name/modem_b"
"tz.img", "/dev/block/bootdevice/by-name/tz_a"
"tz.img", "/dev/block/bootdevice/by-name/tz_b"
"bluetooth.img", "/dev/block/bootdevice/by-name/bluetooth_a"
"bluetooth.img", "/dev/block/bootdevice/by-name/bluetooth_b"
"abl.img", "/dev/block/bootdevice/by-name/abl_a"
"abl.img", "/dev/block/bootdevice/by-name/abl_b"
"featenabler.img", "/dev/block/bootdevice/by-name/featenabler_a"
"featenabler.img", "/dev/block/bootdevice/by-name/featenabler_b"
"keymaster.img", "/dev/block/bootdevice/by-name/keymaster_a"
"keymaster.img", "/dev/block/bootdevice/by-name/keymaster_b"
"uefisecapp.img", "/dev/block/bootdevice/by-name/uefisecapp_a"
"uefisecapp.img", "/dev/block/bootdevice/by-name/uefisecapp_b"
"qupfw.img", "/dev/block/bootdevice/by-name/qupfw_a"
"qupfw.img", "/dev/block/bootdevice/by-name/qupfw_b"
"xbl.img", "/dev/block/bootdevice/by-name/xbl_a"
"xbl.img", "/dev/block/bootdevice/by-name/xbl_b"
"cmnlib.img", "/dev/block/bootdevice/by-name/cmnlib_a"
"cmnlib.img", "/dev/block/bootdevice/by-name/cmnlib_b"
"cmnlib64.img", "/dev/block/bootdevice/by-name/cmnlib64_a"
"cmnlib64.img", "/dev/block/bootdevice/by-name/cmnlib64_b"
"devcfg.img", "/dev/block/bootdevice/by-name/devcfg_a"
"devcfg.img", "/dev/block/bootdevice/by-name/devcfg_b"
"hyp.img", "/dev/block/bootdevice/by-name/hyp_a"
"hyp.img", "/dev/block/bootdevice/by-name/hyp_b"
"imagefv.img", "/dev/block/bootdevice/by-name/imagefv_a"
"imagefv.img", "/dev/block/bootdevice/by-name/imagefv_b"
"aop.img", "/dev/block/bootdevice/by-name/aop_a"
"aop.img", "/dev/block/bootdevice/by-name/aop_b"
and there are partitions directly ROM /data, /system /system_ext, /vendor, /product, /odm, /vendor_boot, /boot
2.2 miui based ROMs update all of these sections. In the case of firmware, they are put in both slots at once. Although this is not necessary in essence.
ROMs of a custom type, those based on a "pure" android are often flashed for only partitions of the ROM, but not in 100% case
2.3 For our device, there are 3 types of ROM installation files, 2 of which are divided into two types of installation methods
2.3.1 Let's start simple, Official miui image for fastboot - installation is recommended via miflash, has all partitions inside the archive. There are also 3 files inside - for easy installation of all partitions, for installing all partitions and formatting the memory, as well as for installing all partitions and locking the bootloader (the memory is formatted automatically), the name of the .bat files speaks for themselves
2.3.2 Next - the installation .zip archive of unofficial MIUI for TWRP. Not all partitions, but the main ones (always stitched into section A), including firmware (stitched into both slots A and B)
2.3.3 Sideload type firmware (99% of all custom ROMs) are divided into two installation methods.
Inside the archive there is a payload.bin file in which the rom and sometimes firmware sections are packed
Installation always goes to the adjacent NOT active memory slot, and after completion, makes the adjacent slot active to load the firmware
Installation via PC, via ADB (on the phone, AOSP recovery adb sideload/twrp adb sideload mode) or installation via TWRP directly from the device
2.4 Custom ROMs for fastboot, usually used for a clean installation, which implies cleaning and data from memory (pictures, etc.) inside sometimes have firmware sections and always rom sections. Inside, as the author saw fit, there are .bat launchers for updating (does not erase all data) and for a clean installation (erases all data)
2.5 Another very important feature of the AB structure in our case is two types of fastboot mod. It is called bootloader - official miui is completely flashed through it, and there is a fastbootD mode that is built into the boot sector in aosp recovery or in twrp, it is also needed for flashing img images. Ask what are the differences if this and that fastboot?
The answer is idiotic
Bootloader can flash all main partitions only in both A and B sections at the same time command type - "fastboot flash system_ab system.img"
He knows how to essentially flash a couple of partitions into a certain slot, we only need in this case vendor_boot and boot command type "fastboot flash boot_a boot.img" or instead of A you need to write B
FastbootD, on the other hand, can flash img images separately into the desired slot A or B
2.6 Poco f3/k40/mi11x does not have a separate partition for recovery/twrp,the whole thing is stored in the boot sector in the ramdisk, and the kernel is also stored there. Several factors follow from this knowledge.
2.6.1 To install TWRP, you must first boot into a temporary TWRP, the command type is "fastboot boot twrp.img". Inside TWRP, in the Advanced tab, click install recovery ramdisk, and select the img twrp image on the phone
2.6.3 To install aosp recvoery, you need to flash boot "fastboot boot boot.img"
2.6.4 After installing magisk, as it is stored in the RAMDISK. If you install TWRP again in ramdisk, the magisk will be deleted
2.6.5 When installing the magisk, TWRP does not crash
2.6.6 When installing kernel.zip via TWRP, TWRPis not deleted.
2.6.7 After updating the ROM, or changing the ROM, the TWRPis deleted, since the boot sector is bundled with all the ROMs as a whole and mainly with aosp recovery included, some romodels can immediately push TWRP into it. But it's better to play it safe and flash it yourself
2.6.8 When entering TWRP, it writes the installation .zip archives to the active slot, and always works with the active slot A or B, the exception concerns firmware, wrote above in paragraph 2.3
2.6.9 install recovery ramdis on surveillance writes TWRP to both slots
Spoiler: 3. Regarding TWRP and AOSP recovery
3.1 There are currently only 2 TWRPs from Nebrassy and from vasishath. What is the difference? God knows. In fact, they are bugged equally strongly, so I will write instructions using the example of Nebrassy, from experience there are no problems with it.
3.2 AOSP recovery is like it was 10 years ago cwm recovery if anyone remembers. Serves only for switching to fastbootD and ADB sideload mode, updating the firmware over the air, and sometimes cleaning the data. Supplied by many ROM developers as a necessary component (in fact, not so)
Now, based on the knowledge above, we have an understanding of how and what works. Now we need to disassemble the installation procedure. Here, too, not everything is so simple. There are two options for each installation. And in addition, we have 10 ways to install firmware. Why 10? And all due to the fact that I was unaware and had to write a small script called DFE. Isn't there a ready-made one on the Internet? According to my tests, they simply don't work.
Spoiler: Briefly about DFE
Somewhere 90% of ROM Developers out of the box have such a function as data encryption, DFE removes "flags" from one file in the /vendor section so that the system encrypts the data "Entire /data section" at startup therefore, just like with TWRP, after changing or updating the firmware, you need to flash it through TWRP.
- Why should I remove encryption? - ask a question
I will answer, in fact, there is no need, if only you are ready to always back up all data to a flash drive or PC from the internal memory of the phone when changing the firmware, because not all firmware have the same encryption keys, and you can install the firmware, but it is simply will not start at best, at worst everything will be encrypted over a new one and all files will be lost.
But literally all the instructions from the developers of the ROM are written precisely taking into account the fact that you will format the date when installing their firmware. Also, if encryption is disabled, TWRP will not ask for a password to see the memory, and therefore your data is at risk when the phone is stolen, since it will not be difficult to pull them out.
For all cases, you cannot do format data before installing the firmware, otherwise the PC will not see the memory, format data is done only at the end of the installation.
Spoiler: Installing temporary TWRP
Method 1:
1. We drop twrp.img into the folder with adb
2. In windows, hold down shift + right mouse button in an empty space in the folder, open a shell or cmd
3. The console will open, in the case of win10 / 11, if this is a shell, you need to register cmd
4. Reboot the phone into fastboot mode / bootloader (volume down + power button) and connect it to the computer via the wire
5. We write to the command "fastboot boot twrp.img"
6. TWRP will start by itself
Method 2:
1.Download TWRP Autoruner https://drive.google.com/file/d/1HsA1XAEzFgEo0n7K1Vf0QqPlyEICzkpd/view?usp=sharing
2. Unpack anywhere
3. Boot into FastBoot
4. Run the batch file in the folder
Spoiler: Setting TWRP to "permanent" - within the same ROM (Before the first ROM update, or before the first ROM change)
Method 1: Works ALWAYS
1. Go to the advanced tab and select install recvoery ramdisk
2. Find the twrp.img file on your phone and select it
3. If TWRP shows "Error opening: No such file or directory"
then you need to change the active slot in the Reboot contribution, then back and flash TWRP into the ramdisk again
Method 2: For TWRP from Nebrassy does not work 100% of the time
In the same place, in the advanced tab, click flash current TWRP
Method 3: For TWRP from Vasishath. does not work 100%
In the same place, in the advanced tab, click Inject TWRP
Before flashing custom, it is recommended to install a miui stock or a custom miui. It is advisable to drain through a fastboot by analogy with the spoiler instruction, from point 1 to point 9
This is done in order to update all sections in memory, remove tails from other ROMs. Refresh the markup of the sections. Otherwise, there may be errors, not working conditional nfc, lags, whatever. In the best case, the ROM simply won't be installed. At worst, there will be a bad opinion about the ROM because of your own wrong actions and an extra day for flashing and configuring another or the same ROM.
All files are additional here​
Spoiler: If the memory in TWRP is not visible
1. You saw that the PC does not see the memory on the device, or the TWRP is empty (this already means that all the data has been erased)
2. Download one of these TWRO to your computer
recovery_vasishath_nonflags.img or recovery_nebrassy_nonflags.img
3. Through that TWRP where everything is empty, we do format data (yes)
4. Reboot bootloader
5. On the PC we prescribe "fastboot boot twrp.img" any of the post
6. TWRP is loaded (the computer and TWRP sees the memory, but this is not all, nothing will work)
7. In the advanced tab, click fix context
8. In the mounts tab, remove the checkbox from the date and put it back.
9. Now you can upload files from your computer
10. You flash the ROM, you can not do the date format again, when the system boots, it will erase everything from memory, and if you did not set dfe, then the date itself will be encrypted, if you set the data in the same way, it will be erased, but there will be no encryption.
Note:
These TWRPs will not see the date (files in memory) if the data is encrypted, usually TWRP asks for a password when entering it, or you can see it in the security tab.
This TWRP works fine with the already decrypted date, if you use the DFE patch, everything works normally
In this TWRP, the encryption flags are simply removed, so that after the date format when entering TWRP, the date is not encrypted with keys from TWRP and does not break from this
Spoiler: Installation using DFE patch (HentaiOS and Proton AOSP excluded)
When using DFE, you should not use internal methods of updating in ROM, when the firmware is updated in the background, and when you reboot it is already updated, as I wrote earlier, the sections are updated, and therefore the DFE stops working, and it is rather difficult to predict when the system has updated itself, and if DFE will stop working, all data will be deleted, and the ROM simply will not start, so it's better to manually set everything.​
Spoiler: ROM Type Official MIUI Fastboot
1. Download zip with fastboot image MIUI
2. Unpack it to a convenient place
3. You need to go to the folder, and look for the flash_all_except_storage.bat file there
4. You need to open it with a text editor and delete the last line with the text "fastboot reboot"
5. Now, through miflash, we look for the directory with this file
6. We transfer the phone to fastboot mode (Hold the power button + volume rocker down)
7. We connect the device with a wire to the computer and, in the program, select the bottom right flash_all_except_storage.bat, press flash
8. After the end of the process, you need to boot into TWRP
9. In TWRP, if you did everything correctly, then the memory is not erased.
10. We transfer DFE from the computer to the phone, or if you did it in advance, then we flash it. in 99% of cases, an inscription will come out that you need to pre-flash SystemRW_1.32. Then we do it.
11. In the case of SystemRW, you need to reboot into TWRP, then either put it in RamDisk and just reboot, or click reboot bootloader and boot from the computer back to TWRP.
12. Repeat step 10.
13. If you have not used DFE before, then you need to do format DATA (yes). If you have updated the firmware in this way, then you do not need to do Format data. If you have changed the firmware, it is recommended to do wipe data, otherwise either the firmware will not boot, or it will not work correctly
Spoiler: ROM type Pyaload.bin for TWRP
1. Install TWRP in ramdisk and / or go into it
2. Flash .zip ROM file
3. Install TWRP in ramdisk
4. Reboot into TWRP
5. Flash DFE.zip
6. If you have not used DFE before, then you need to do format DATA (yes). If you have updated the firmware in this way, then you do not need to do Format data. If you have changed the firmware, it is recommended to do wipe data, otherwise either the firmware will not boot, or it will not work correctly
Spoiler: ROM type Payload.bin for ADB sideload via PC
1. Download the .zip ROM to your PC. Upload the archive to the adb folder
2. Then, according to the instructions from the developer, you can flash the vendor and vendor_boot ROM provided by the developer, or load into the temporary TWRP from nebrassy "fastboot flash boot twrp.img", or through the autoinstall script
3. Further, in the case of AOSP recovery fastboot --set-active = a and fastboot reboot recovery
5. In twrp, select the advanced section and click adb sideload. in AOSP recovery select Install update through ADB
6. In the console from the adb folder in which the archive from the ROM is located, write "adb sideload name_file_PZU.zip"
7. Flash DFE.zip
8. If you have not used DFE before, then you need to do format DATA (yes). If you have updated the firmware in this way, then you do not need to do Format data. If you have changed the firmware, it is recommended to do wipe data, otherwise either the firmware will not boot, or it will not work correctly
Spoiler: ROM Type Custom MIUI (For example Xiaomi.eu)
1. Download CustomMIUI.zip
2. Install TWRP in ramdisk and / or go into it
3. Flash CustomMIUI.zip ROM file
4. Install TWRP in ramdisk
5. Reboot into TWRP
6. Flash DFE.zip
7. If you have not used DFE before, then you need to do format DATA (yes). If you have updated the firmware in this way, then you do not need to do Format data. If you have changed the firmware, it is recommended to do wipe data, otherwise either the firmware will not boot, or it will not work correctly
Spoiler: ROM type Custom fastboot image.
1. Download fastboot ROM on PC
2. Unzip to a convenient place, and go to the folder, find the update.bat file there, you need to open it with a text editor and delete the last line with the text "fastboot reboot"
3. We transfer the phone to fastboot mode (Hold the power button + volume down)
4. Run update.bat and wait for the end of the procedure
5. After the end of the process, you need to boot into TWRP
9. In TWRP, if you did everything right, then the memory is not erased. Otherwise, I recommend using this method so that the memory appears.
10. We transfer DFE from the computer to the phone, or if you did it in advance, then we flash it.
11. If you have not used DFE before, then you need to do format DATA (yes). If you have updated the firmware in this way, then you do not need to do Format data. If you have changed the firmware, it is recommended to do wipe data, otherwise either the firmware will not boot, or it will not work correctly
Spoiler: Standard installation methods
Spoiler: ROM Type Official MIUI Fastboot
1. Download zip with fastboot image MIUI
2. Unpack it to a convenient place
3. Now, through miflash, we look for the directory with this file
4. We transfer the phone to fastboot mode (Hold the power button + volume ring down)
5. We connect with a wire to the PC and first select in the program at the bottom right flash_all_except_storage.bat (For updating), flash_all.bat (For Clean installation) flash_all_lock.bat (for clean installation and locking the bootloader) or press flash
6. The system will reboot itself. Ready
7. Additionally (Magisk, gapps and other zip) after a clean install with all files removed:
7.1 After loading into the system, we go through the device configuration, and we must put a pin or a graphic key
7.2 Flash temporary TWRP
7.3 If you need a TWRP on an ongoing basis, then we flash it into a ramdisk (Imstall recvoery ramdisk), the img image of the TWRP must be on the device
7.4 Flash the zip archives you need
7.5 You can make Wipe data to set up your phone again
8. If you updated your phone, you can do steps 7.2-7.4 Immediately after installing the update
Spoiler: ROM type Pyaload.bin for TWRP
1. Install TWRP in ramdisk and / or go into it
2. Flash .zip ROM file
3. Install TWRP in ramdisk
4. Make Format Data as indicated in the instructions of the firmware developer, or wipe date if you change it from custom to custom (does not always work), or just boot into the system (Risky !!)
5.Additional (Magisk, gapps and other zip):
5.1 If you have updated the ROM, you can flash additional files
5.2 If you have made format data, you need to boot into the system, go through the setup, put the lock key and reboot into TWRP, after that you can put an additional zip. and make wipe data to configure it again
Spoiler: ROM type Payload.bin for ADB sideload via PC
1. Download the .zip ROM to your PC. Upload the archive to the adb folder
2. Further, you can follow the instructions either from the developer, flash the vendor and vendor_boot provided by the developer, or boot into the temporary TWRP from nebrassy "fastboot flash boot twrp.img", or through the autoinstall script
3. Further, in the case of AOSP recovery fastboot --set-active = a and fastboot reboot recovery
5. In twrp, select the advanced section and click adb sideload. in aosp recovery select Install update through ADB
6. In the console, from the adb folder in which the archive with the firmware is located, write adb sideload_file_name.zip
7. At the end of the process, make Format Data as indicated in the developer's instructions, or wipe the date, if you change it from custom to custom (it does not always work), or just boot into the system
8.Additional (Magisk, gapps and other zip):
8.1 After loading into the system, we go through the device configuration, and we must put a pin or a graphic key
8.2 Reboot the phone into fastboot mode (volume down and hold down the power button) connect the computer, flash the temporary TWRP
8.3 If you need a TWRP for a constant, then we flash it into a ramdisk (Imstall recvoery ramdisk), the img image of a TWRP must be on the device
8.4 Flash the zip archives you need
9. If you updated your phone, you can do steps 8.2-8.4 Immediately after installing the update
Spoiler: ROM Type Custom MIUI (For example Xiaomi.eu)
1. Download CustomMIUI.zip
2. Install TWRP in ramdisk and / or go into it
3. Flash CustomMIUI.zip ROM file
4. Install TWRP to ramdisk
5. Reboot into TWRP
6. Make Format Data as indicated in the Developer's instructions, or wipe date, if you change miui to miui (does not always work), or just boot into the system
7.Additional (Magisk, gapps and other zip):
7.1 In case you have updated the ROM, you can flash additional files
7.2 If you have made format data, you need to boot into the system, go through the setup, put the lock key and reboot into TWRP, after that you can put an additional zip. and make wipe data to configure it again
Spoiler: ROM type Custom fastboot image.
1. Download fastboot ROM on PC
2. Unzip to a convenient place, and go to the folder, find the update.bat file and installformat.bat there FirestInstall.bat
3. Go into fastboot mode, connect the device to the PC and select the desired installer, or update, to update, or for a clean install installformat.bat or FirestInstall.bat (all data will be erased, including memory
4. Additionally (Magisk, gapps and other zip) after a clean install with all files removed:
4.1 After loading into the system, we go through the device configuration, and we must put a pin or a graphic key
4.2 Reboot the phone into fastboot mode (volume down and hold down the power button) connect the computer, flash the temporary TWRP
4.3 If you need TWRP for Permanent then we do it
4.4 Flash the zip archives you need
4.5 You can make Wipe data to set up your phone again
5. If you updated your phone, you can do steps 4.2-4.4 Immediately after installing the update
Thank you VERY much for the fantastic guide.
Just one question: what are the differences between the two available TWRP for Alioth: Nebrassi and Vasishath ?
Thanks man
michelD said:
Thank you VERY much for the fantastic guide.
Just one question: what are the differences between the two available TWRP for Alioth: Nebrassi and Vasishath ?
Click to expand...
Click to collapse
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
please read the entire section of the paragraph
LeeGarChat said:
Mandatory instructions for beginners (and not only beginners) to install ROM and other on poco f3​Prerequisite, unlocking the bootloader​For questions, if something is not clear, please write to "Conversations", I will try to correct it in a post with a simpler explanation. And I will answer the question (I am not a 24/7 support service, so duplicate your question in the ROM discussion thread in order to give an answer if I'm busy)​
!!! The spoiler below is a must-read before doing anything with your device. !!!​
Spoiler: Let's discuss several points at once
Spoiler: 1. Drivers and utilities - download immediately and install so that there are no further questions
1. Fastboot and adb - Tools_r31.0.3
2. Miflash
3. USBDrivers - QDloader
Spoiler: 2. Features and disadvantages of our device
2.1 We have a so-called A/B partition structure - this is when two spaces are used for system partitions (read more in google) the essence is that there are "Firmware" partitions
Spoiler: code
Code:
"dsp.img", "/dev/block/bootdevice/by-name/dsp_a"
"dsp.img", "/dev/block/bootdevice/by-name/dsp_b"
"xbl_config.img", "/dev/block/bootdevice/by-name/xbl_config_a"
"xbl_config.img", "/dev/block/bootdevice/by-name/xbl_config_b"
"modem.img", "/dev/block/bootdevice/by-name/modem_a"
"modem.img", "/dev/block/bootdevice/by-name/modem_b"
"tz.img", "/dev/block/bootdevice/by-name/tz_a"
"tz.img", "/dev/block/bootdevice/by-name/tz_b"
"bluetooth.img", "/dev/block/bootdevice/by-name/bluetooth_a"
"bluetooth.img", "/dev/block/bootdevice/by-name/bluetooth_b"
"abl.img", "/dev/block/bootdevice/by-name/abl_a"
"abl.img", "/dev/block/bootdevice/by-name/abl_b"
"featenabler.img", "/dev/block/bootdevice/by-name/featenabler_a"
"featenabler.img", "/dev/block/bootdevice/by-name/featenabler_b"
"keymaster.img", "/dev/block/bootdevice/by-name/keymaster_a"
"keymaster.img", "/dev/block/bootdevice/by-name/keymaster_b"
"uefisecapp.img", "/dev/block/bootdevice/by-name/uefisecapp_a"
"uefisecapp.img", "/dev/block/bootdevice/by-name/uefisecapp_b"
"qupfw.img", "/dev/block/bootdevice/by-name/qupfw_a"
"qupfw.img", "/dev/block/bootdevice/by-name/qupfw_b"
"xbl.img", "/dev/block/bootdevice/by-name/xbl_a"
"xbl.img", "/dev/block/bootdevice/by-name/xbl_b"
"cmnlib.img", "/dev/block/bootdevice/by-name/cmnlib_a"
"cmnlib.img", "/dev/block/bootdevice/by-name/cmnlib_b"
"cmnlib64.img", "/dev/block/bootdevice/by-name/cmnlib64_a"
"cmnlib64.img", "/dev/block/bootdevice/by-name/cmnlib64_b"
"devcfg.img", "/dev/block/bootdevice/by-name/devcfg_a"
"devcfg.img", "/dev/block/bootdevice/by-name/devcfg_b"
"hyp.img", "/dev/block/bootdevice/by-name/hyp_a"
"hyp.img", "/dev/block/bootdevice/by-name/hyp_b"
"imagefv.img", "/dev/block/bootdevice/by-name/imagefv_a"
"imagefv.img", "/dev/block/bootdevice/by-name/imagefv_b"
"aop.img", "/dev/block/bootdevice/by-name/aop_a"
"aop.img", "/dev/block/bootdevice/by-name/aop_b"
and there are partitions directly ROM /data, /system /system_ext, /vendor, /product, /odm, /vendor_boot, /boot
2.2 miui based ROMs update all of these sections. In the case of firmware, they are put in both slots at once. Although this is not necessary in essence.
ROMs of a custom type, those based on a "pure" android are often flashed for only partitions of the ROM, but not in 100% case
2.3 For our device, there are 3 types of ROM installation files, 2 of which are divided into two types of installation methods
2.3.1 Let's start simple, Official miui image for fastboot - installation is recommended via miflash, has all partitions inside the archive. There are also 3 files inside - for easy installation of all partitions, for installing all partitions and formatting the memory, as well as for installing all partitions and locking the bootloader (the memory is formatted automatically), the name of the .bat files speaks for themselves
2.3.2 Next - the installation .zip archive of unofficial MIUI for TWRP. Not all partitions, but the main ones (always stitched into section A), including firmware (stitched into both slots A and B)
2.3.3 Sideload type firmware (99% of all custom ROMs) are divided into two installation methods.
Inside the archive there is a payload.bin file in which the rom and sometimes firmware sections are packed
Installation always goes to the adjacent NOT active memory slot, and after completion, makes the adjacent slot active to load the firmware
Installation via PC, via ADB (on the phone, AOSP recovery adb sideload/twrp adb sideload mode) or installation via TWRP directly from the device
2.4 Custom ROMs for fastboot, usually used for a clean installation, which implies cleaning and data from memory (pictures, etc.) inside sometimes have firmware sections and always rom sections. Inside, as the author saw fit, there are .bat launchers for updating (does not erase all data) and for a clean installation (erases all data)
2.5 Another very important feature of the AB structure in our case is two types of fastboot mod. It is called bootloader - official miui is completely flashed through it, and there is a fastbootD mode that is built into the boot sector in aosp recovery or in twrp, it is also needed for flashing img images. Ask what are the differences if this and that fastboot?
The answer is idiotic
Bootloader can flash all main partitions only in both A and B sections at the same time command type - "fastboot flash system_ab system.img"
He knows how to essentially flash a couple of partitions into a certain slot, we only need in this case vendor_boot and boot command type "fastboot flash boot_a boot.img" or instead of A you need to write B
FastbootD, on the other hand, can flash img images separately into the desired slot A or B
2.6 Poco f3/k40/mi11x does not have a separate partition for recovery/twrp,the whole thing is stored in the boot sector in the ramdisk, and the kernel is also stored there. Several factors follow from this knowledge.
2.6.1 To install TWRP, you must first boot into a temporary tvrp, the command type is "fastboot boot twrp.img". Inside TWRP, in the Advanced tab, click install recovery ramdisk, and select the img twrp image on the phone
2.6.3 To install aosp recvoery, you need to flash boot "fastboot boot boot.img"
2.6.4 After installing magisk, as it is stored in the RAMDISK. If you install tvrp again in ramdisk, the magisk will be deleted
2.6.5 When installing the magisk, tvrp does not crash
2.6.6 When installing kernel.zip via TWRP, TWRPis not deleted.
2.6.7 After updating the ROM, or changing the ROM, the TWRPis deleted, since the boot sector is bundled with all the ROMs as a whole and mainly with aosp recovery included, some romodels can immediately push TWRP into it. But it's better to play it safe and flash it yourself
2.6.8 When entering TWRP, it writes the installation .zip archives to the active slot, and always works with the active slot A or B, the exception concerns firmware, wrote above in paragraph 2.3
2.6.9 install recovery ramdis on surveillance writes TWRP to both slots
Spoiler: 3. Regarding TWRP and AOSP recovery
3.1 There are currently only 2 TWRPs from Nebrassy and from vasishath. What is the difference? God knows. In fact, they are bugged equally strongly, so I will write instructions using the example of Nebrassy, from experience there are no problems with it.
3.2 AOSP recovery is like it was 10 years ago cwm recovery if anyone remembers. Serves only for switching to fastbootD and ADB sideload mode, updating the firmware over the air, and sometimes cleaning the data. Supplied by many ROM developers as a necessary component (in fact, not so)
Now, based on the knowledge above, we have an understanding of how and what works. Now we need to disassemble the installation procedure. Here, too, not everything is so simple. There are two options for each installation. And in addition, we have 10 ways to install firmware. Why 10? And all due to the fact that I was unaware and had to write a small script called DFE. Isn't there a ready-made one on the Internet? According to my tests, they simply don't work.
Spoiler: Briefly about DFE
Somewhere 90% of ROM Developers out of the box have such a function as data encryption, DFE removes "flags" from one file in the /vendor section so that the system encrypts the data "Entire /data section" at startup therefore, just like with TWRP, after changing or updating the firmware, you need to flash it through TWRP.
- Why should I remove encryption? - ask a question
I will answer, in fact, there is no need, if only you are ready to always back up all data to a flash drive or PC from the internal memory of the phone when changing the firmware, because not all firmware have the same encryption keys, and you can install the firmware, but it is simply will not start at best, at worst everything will be encrypted over a new one and all files will be lost.
But literally all the instructions from the developers of the ROM are written precisely taking into account the fact that you will format the date when installing their firmware. Also, if encryption is disabled, TvRP will not ask for a password to see the memory, and therefore your data is at risk when the phone is stolen, since it will not be difficult to pull them out.
For all cases, you cannot do format data before installing the firmware, otherwise the PC will not see the memory, format data is done only at the end of the installation.
Spoiler: Installing temporary TWRP
Method 1:
1. We drop twrp.img into the folder with adb
2. In windows, hold down shift + right mouse button in an empty space in the folder, open a shell or cmd
3. The console will open, in the case of win10 / 11, if this is a shell, you need to register cmd
4. Reboot the phone into fastboot mode / bootloader (volume down + power button) and connect it to the computer via the wire
5. We write to the command "fastboot boot twrp.img"
6. TWRP will start by itself
Method 2:
1.Download TWRP Autoruner https://drive.google.com/file/d/1HsA1XAEzFgEo0n7K1Vf0QqPlyEICzkpd/view?usp=sharing
2. Unpack anywhere
3. Boot into FastBoot
4. Run the batch file in the folder
Spoiler: Setting TWRP to "permanent" - within the same ROM (Before the first ROM update, or before the first ROM change)
Method 1: Works ALWAYS
1. Go to the advanced tab and select install recvoery ramdisk
2. Find the twrp.img file on your phone and select it
3. If TWRP shows "Error opening: No such file or directory"
then you need to change the active slot in the Reboot contribution, then back and flash TWRP into the ramdisk again
Method 2: For TWRP from Nebrassy does not work 100% of the time
In the same place, in the advanced tab, click flash current TWRP
Method 3: For TWRP from Vasishath. does not work 100%
In the same place, in the advanced tab, click Inject TWRP
Before flashing custom, it is recommended to install a miui stock or a custom miui. It is advisable to drain through a fastboot by analogy with the spoiler instruction, from point 1 to point 9
This is done in order to update all sections in memory, remove tails from other ROMs. Refresh the markup of the sections. Otherwise, there may be errors, not working conditional nfc, lags, whatever. In the best case, the ROM simply won't be installed. At worst, there will be a bad opinion about the ROM because of your own wrong actions and an extra day for flashing and configuring another or the same ROM.
All files are additional here​
Spoiler: If the memory in TWRP is not visible
1. You saw that the PC does not see the memory on the device, or the tvrp is empty (this already means that all the data has been erased)
2. Download one of these TVRPs to your computer
recovery_vasishath_nonflags.img or recovery_nebrassy_nonflags.img
3. Through that TWRP where everything is empty, we do format data (yes)
4. Reboot bootloader
5. On the PC we prescribe "fastboot boot twrp.img" any of the post
6. TvRP is loaded (the computer and TWRP sees the memory, but this is not all, nothing will work)
7. In the advanced tab, click fix context
8. In the mounts tab, remove the checkbox from the date and put it back.
9. Now you can upload files from your computer
10. You flash the ROM, you can not do the date format again, when the system boots, it will erase everything from memory, and if you did not set dfe, then the date itself will be encrypted, if you set the data in the same way, it will be erased, but there will be no encryption.
Note:
These TWRPs will not see the date (files in memory) if the data is encrypted, usually TWRP asks for a password when entering it, or you can see it in the security tab.
This TWRP works fine with the already decrypted date, if you use the DFE patch, everything works normally
In this TWRP, the encryption flags are simply removed, so that after the date format when entering TVRP, the date is not encrypted with keys from TWRP and does not break from this
Spoiler: Installation using DFE patch (HentaiOS and Proton AOSP excluded)
When using DFE, you should not use internal methods of updating in ROM, when the firmware is updated in the background, and when you reboot it is already updated, as I wrote earlier, the sections are updated, and therefore the DFE stops working, and it is rather difficult to predict when the system has updated itself, and if DFE will stop working, all data will be deleted, and the ROM simply will not start, so it's better to manually set everything.​
Spoiler: ROM Type Official MIUI Fastboot
1. Download zip with fastboot image MIUI
2. Unpack it to a convenient place
3. You need to go to the folder, and look for the flash_all_except_storage.bat file there
4. You need to open it with a text editor and delete the last line with the text "fastboot reboot"
5. Now, through miflash, we look for the directory with this file
6. We transfer the phone to fastboot mode (Hold the power button + volume rocker down)
7. We connect the device with a wire to the computer and, in the program, select the bottom right flash_all_except_storage.bat, press flash
8. After the end of the process, you need to boot into TWRP
9. In TVRP, if you did everything correctly, then the memory is not erased.
10. We transfer DFE from the computer to the phone, or if you did it in advance, then we flash it. in 99% of cases, an inscription will come out that you need to pre-flash SystemRW_1.32. Then we do it.
11. In the case of SystemRW, you need to reboot into TWRP, then either put it in RamDisk and just reboot, or click reboot bootloader and boot from the computer back to TWRP.
12. Repeat step 10.
13. If you have not used DFE before, then you need to do format DATA (yes). If you have updated the firmware in this way, then you do not need to do Format data. If you have changed the firmware, it is recommended to do wipe data, otherwise either the firmware will not boot, or it will not work correctly
Spoiler: ROM type Pyaload.bin for TWRP
1. Install TWRP in ramdisk and / or go into it
2. Flash .zip ROM file
3. Install TWRP in ramdisk
4. Reboot into TWRP
5. Flash DFE.zip
6. If you have not used DFE before, then you need to do format DATA (yes). If you have updated the firmware in this way, then you do not need to do Format data. If you have changed the firmware, it is recommended to do wipe data, otherwise either the firmware will not boot, or it will not work correctly
Spoiler: ROM type Payload.bin for ADB sideload via PC
1. Download the .zip ROM to your PC. Upload the archive to the adb folder
2. Then, according to the instructions from the developer, you can flash the vendor and vendor_boot ROM provided by the developer, or load into the temporary TVRP from nebrassy "fastboot flash boot twrp.img", or through the autoinstall script
3. Further, in the case of AOSP recovery fastboot --set-active = a and fastboot reboot recovery
5. In twrp, select the advanced section and click adb sideload. in AOSP recovery select Install update through ADB
6. In the console from the adb folder in which the archive from the ROM is located, write "adb sideload name_file_PZU.zip"
7. Flash DFE.zip
8. If you have not used DFE before, then you need to do format DATA (yes). If you have updated the firmware in this way, then you do not need to do Format data. If you have changed the firmware, it is recommended to do wipe data, otherwise either the firmware will not boot, or it will not work correctly
Spoiler: ROM Type Custom MIUI (For example Xiaomi.eu)
1. Download CustomMIUI.zip
2. Install TWRP in ramdisk and / or go into it
3. Flash CustomMIUI.zip ROM file
4. Install TWRP in ramdisk
5. Reboot into TWRP
6. Flash DFE.zip
7. If you have not used DFE before, then you need to do format DATA (yes). If you have updated the firmware in this way, then you do not need to do Format data. If you have changed the firmware, it is recommended to do wipe data, otherwise either the firmware will not boot, or it will not work correctly
Spoiler: ROM type Custom fastboot image.
1. Download fastboot ROM on PC
2. Unzip to a convenient place, and go to the folder, find the update.bat file there, you need to open it with a text editor and delete the last line with the text "fastboot reboot"
3. We transfer the phone to fastboot mode (Hold the power button + volume down)
4. Run update.bat and wait for the end of the procedure
5. After the end of the process, you need to boot into TWRP
9. In TWRP, if you did everything right, then the memory is not erased. Otherwise, I recommend using this method so that the memory appears.
10. We transfer DFE from the computer to the phone, or if you did it in advance, then we flash it.
11. If you have not used DFE before, then you need to do format DATA (yes). If you have updated the firmware in this way, then you do not need to do Format data. If you have changed the firmware, it is recommended to do wipe data, otherwise either the firmware will not boot, or it will not work correctly
Spoiler: Standard installation methods
Spoiler: ROM Type Official MIUI Fastboot
1. Download zip with fastboot image MIUI
2. Unpack it to a convenient place
3. Now, through miflash, we look for the directory with this file
4. We transfer the phone to fastboot mode (Hold the power button + volume ring down)
5. We connect with a wire to the PC and first select in the program at the bottom right flash_all_except_storage.bat (For updating), flash_all.bat (For Clean installation) flash_all_lock.bat (for clean installation and locking the bootloader) or press flash
6. The system will reboot itself. Ready
7. Additionally (Magisk, gapps and other zip) after a clean install with all files removed:
7.1 After loading into the system, we go through the device configuration, and we must put a pin or a graphic key
7.2 Flash temporary TWRP
7.3 If you need a TVRP on an ongoing basis, then we flash it into a ramdisk (Imstall recvoery ramdisk), the img image of the TVRP must be on the device
7.4 Flash the zip archives you need
7.5 You can make Wipe data to set up your phone again
8. If you updated your phone, you can do steps 7.2-7.4 Immediately after installing the update
Spoiler: ROM type Pyaload.bin for TWRP
1. Install TWRP in ramdisk and / or go into it
2. Flash .zip ROM file
3. Install TWRP in ramdisk
4. Make Format Data as indicated in the instructions of the firmware developer, or wipe date if you change it from custom to custom (does not always work), or just boot into the system (Risky !!)
5.Additional (Magisk, gapps and other zip):
5.1 If you have updated the ROM, you can flash additional files
5.2 If you have made format data, you need to boot into the system, go through the setup, put the lock key and reboot into tvrp, after that you can put an additional zip. and make wipe data to configure it again
Spoiler: ROM type Payload.bin for ADB sideload via PC
1. Download the .zip ROM to your PC. Upload the archive to the adb folder
2. Further, you can follow the instructions either from the developer, flash the vendor and vendor_boot provided by the developer, or boot into the temporary TWRP from nebrassy "fastboot flash boot twrp.img", or through the autoinstall script
3. Further, in the case of AOSP recovery fastboot --set-active = a and fastboot reboot recovery
5. In twrp, select the advanced section and click adb sideload. in aosp recovery select Install update through ADB
6. In the console, from the adb folder in which the archive with the firmware is located, write adb sideload_file_name.zip
7. At the end of the process, make Format Data as indicated in the developer's instructions, or wipe the date, if you change it from custom to custom (it does not always work), or just boot into the system
8.Additional (Magisk, gapps and other zip):
8.1 After loading into the system, we go through the device configuration, and we must put a pin or a graphic key
8.2 Reboot the phone into fastboot mode (volume down and hold down the power button) connect the computer, flash the temporary TWRP
8.3 If you need a TVRP for a constant, then we flash it into a ramdisk (Imstall recvoery ramdisk), the img image of a tvrp must be on the device
8.4 Flash the zip archives you need
9. If you updated your phone, you can do steps 8.2-8.4 Immediately after installing the update
Spoiler: ROM Type Custom MIUI (For example Xiaomi.eu)
1. Download CustomMIUI.zip
2. Install TWRP in ramdisk and / or go into it
3. Flash CustomMIUI.zip ROM file
4. Install TWRP to ramdisk
5. Reboot into TWRP
6. Make Format Data as indicated in the Developer's instructions, or wipe date, if you change miui to miui (does not always work), or just boot into the system
7.Additional (Magisk, gapps and other zip):
7.1 In case you have updated the ROM, you can flash additional files
7.2 If you have made format data, you need to boot into the system, go through the setup, put the lock key and reboot into tvrp, after that you can put an additional zip. and make wipe data to configure it again
Spoiler: ROM type Custom fastboot image.
1. Download fastboot ROM on PC
2. Unzip to a convenient place, and go to the folder, find the update.bat file and installformat.bat there FirestInstall.bat
3. Go into fastboot mode, connect the device to the PC and select the desired installer, or update, to update, or for a clean install installformat.bat or FirestInstall.bat (all data will be erased, including memory
4. Additionally (Magisk, gapps and other zip) after a clean install with all files removed:
4.1 After loading into the system, we go through the device configuration, and we must put a pin or a graphic key
4.2 Reboot the phone into fastboot mode (volume down and hold down the power button) connect the computer, flash the temporary TWRP
4.3 If you need TWRP for Permanent then we do it
4.4 Flash the zip archives you need
4.5 You can make Wipe data to set up your phone again
5. If you updated your phone, you can do steps 4.2-4.4 Immediately after installing the update
Click to expand...
Click to collapse
Many thanks for making this complete and detailed guide.
It was really needed!
Good job!
LeeGarChat said:
Mandatory instructions for beginners (and not only beginners) to install ROM and other on poco f3​Prerequisite, unlocking the bootloader​For questions, if something is not clear, please write to "Conversations", I will try to correct it in a post with a simpler explanation. And I will answer the question (I am not a 24/7 support service, so duplicate your question in the ROM discussion thread in order to give an answer if I'm busy)​
!!! The spoiler below is a must-read before doing anything with your device. !!!​
Spoiler: Let's discuss several points at once
Spoiler: 1. Drivers and utilities - download immediately and install so that there are no further questions
1. Fastboot and adb - Tools_r31.0.3
2. Miflash
3. USBDrivers - QDloader
Spoiler: 2. Features and disadvantages of our device
2.1 We have a so-called A/B partition structure - this is when two spaces are used for system partitions (read more in google) the essence is that there are "Firmware" partitions
Spoiler: code
Code:
"dsp.img", "/dev/block/bootdevice/by-name/dsp_a"
"dsp.img", "/dev/block/bootdevice/by-name/dsp_b"
"xbl_config.img", "/dev/block/bootdevice/by-name/xbl_config_a"
"xbl_config.img", "/dev/block/bootdevice/by-name/xbl_config_b"
"modem.img", "/dev/block/bootdevice/by-name/modem_a"
"modem.img", "/dev/block/bootdevice/by-name/modem_b"
"tz.img", "/dev/block/bootdevice/by-name/tz_a"
"tz.img", "/dev/block/bootdevice/by-name/tz_b"
"bluetooth.img", "/dev/block/bootdevice/by-name/bluetooth_a"
"bluetooth.img", "/dev/block/bootdevice/by-name/bluetooth_b"
"abl.img", "/dev/block/bootdevice/by-name/abl_a"
"abl.img", "/dev/block/bootdevice/by-name/abl_b"
"featenabler.img", "/dev/block/bootdevice/by-name/featenabler_a"
"featenabler.img", "/dev/block/bootdevice/by-name/featenabler_b"
"keymaster.img", "/dev/block/bootdevice/by-name/keymaster_a"
"keymaster.img", "/dev/block/bootdevice/by-name/keymaster_b"
"uefisecapp.img", "/dev/block/bootdevice/by-name/uefisecapp_a"
"uefisecapp.img", "/dev/block/bootdevice/by-name/uefisecapp_b"
"qupfw.img", "/dev/block/bootdevice/by-name/qupfw_a"
"qupfw.img", "/dev/block/bootdevice/by-name/qupfw_b"
"xbl.img", "/dev/block/bootdevice/by-name/xbl_a"
"xbl.img", "/dev/block/bootdevice/by-name/xbl_b"
"cmnlib.img", "/dev/block/bootdevice/by-name/cmnlib_a"
"cmnlib.img", "/dev/block/bootdevice/by-name/cmnlib_b"
"cmnlib64.img", "/dev/block/bootdevice/by-name/cmnlib64_a"
"cmnlib64.img", "/dev/block/bootdevice/by-name/cmnlib64_b"
"devcfg.img", "/dev/block/bootdevice/by-name/devcfg_a"
"devcfg.img", "/dev/block/bootdevice/by-name/devcfg_b"
"hyp.img", "/dev/block/bootdevice/by-name/hyp_a"
"hyp.img", "/dev/block/bootdevice/by-name/hyp_b"
"imagefv.img", "/dev/block/bootdevice/by-name/imagefv_a"
"imagefv.img", "/dev/block/bootdevice/by-name/imagefv_b"
"aop.img", "/dev/block/bootdevice/by-name/aop_a"
"aop.img", "/dev/block/bootdevice/by-name/aop_b"
and there are partitions directly ROM /data, /system /system_ext, /vendor, /product, /odm, /vendor_boot, /boot
2.2 miui based ROMs update all of these sections. In the case of firmware, they are put in both slots at once. Although this is not necessary in essence.
ROMs of a custom type, those based on a "pure" android are often flashed for only partitions of the ROM, but not in 100% case
2.3 For our device, there are 3 types of ROM installation files, 2 of which are divided into two types of installation methods
2.3.1 Let's start simple, Official miui image for fastboot - installation is recommended via miflash, has all partitions inside the archive. There are also 3 files inside - for easy installation of all partitions, for installing all partitions and formatting the memory, as well as for installing all partitions and locking the bootloader (the memory is formatted automatically), the name of the .bat files speaks for themselves
2.3.2 Next - the installation .zip archive of unofficial MIUI for TWRP. Not all partitions, but the main ones (always stitched into section A), including firmware (stitched into both slots A and B)
2.3.3 Sideload type firmware (99% of all custom ROMs) are divided into two installation methods.
Inside the archive there is a payload.bin file in which the rom and sometimes firmware sections are packed
Installation always goes to the adjacent NOT active memory slot, and after completion, makes the adjacent slot active to load the firmware
Installation via PC, via ADB (on the phone, AOSP recovery adb sideload/twrp adb sideload mode) or installation via TWRP directly from the device
2.4 Custom ROMs for fastboot, usually used for a clean installation, which implies cleaning and data from memory (pictures, etc.) inside sometimes have firmware sections and always rom sections. Inside, as the author saw fit, there are .bat launchers for updating (does not erase all data) and for a clean installation (erases all data)
2.5 Another very important feature of the AB structure in our case is two types of fastboot mod. It is called bootloader - official miui is completely flashed through it, and there is a fastbootD mode that is built into the boot sector in aosp recovery or in twrp, it is also needed for flashing img images. Ask what are the differences if this and that fastboot?
The answer is idiotic
Bootloader can flash all main partitions only in both A and B sections at the same time command type - "fastboot flash system_ab system.img"
He knows how to essentially flash a couple of partitions into a certain slot, we only need in this case vendor_boot and boot command type "fastboot flash boot_a boot.img" or instead of A you need to write B
FastbootD, on the other hand, can flash img images separately into the desired slot A or B
2.6 Poco f3/k40/mi11x does not have a separate partition for recovery/twrp,the whole thing is stored in the boot sector in the ramdisk, and the kernel is also stored there. Several factors follow from this knowledge.
2.6.1 To install TWRP, you must first boot into a temporary tvrp, the command type is "fastboot boot twrp.img". Inside TWRP, in the Advanced tab, click install recovery ramdisk, and select the img twrp image on the phone
2.6.3 To install aosp recvoery, you need to flash boot "fastboot boot boot.img"
2.6.4 After installing magisk, as it is stored in the RAMDISK. If you install tvrp again in ramdisk, the magisk will be deleted
2.6.5 When installing the magisk, tvrp does not crash
2.6.6 When installing kernel.zip via TWRP, TWRPis not deleted.
2.6.7 After updating the ROM, or changing the ROM, the TWRPis deleted, since the boot sector is bundled with all the ROMs as a whole and mainly with aosp recovery included, some romodels can immediately push TWRP into it. But it's better to play it safe and flash it yourself
2.6.8 When entering TWRP, it writes the installation .zip archives to the active slot, and always works with the active slot A or B, the exception concerns firmware, wrote above in paragraph 2.3
2.6.9 install recovery ramdis on surveillance writes TWRP to both slots
Spoiler: 3. Regarding TWRP and AOSP recovery
3.1 There are currently only 2 TWRPs from Nebrassy and from vasishath. What is the difference? God knows. In fact, they are bugged equally strongly, so I will write instructions using the example of Nebrassy, from experience there are no problems with it.
3.2 AOSP recovery is like it was 10 years ago cwm recovery if anyone remembers. Serves only for switching to fastbootD and ADB sideload mode, updating the firmware over the air, and sometimes cleaning the data. Supplied by many ROM developers as a necessary component (in fact, not so)
Now, based on the knowledge above, we have an understanding of how and what works. Now we need to disassemble the installation procedure. Here, too, not everything is so simple. There are two options for each installation. And in addition, we have 10 ways to install firmware. Why 10? And all due to the fact that I was unaware and had to write a small script called DFE. Isn't there a ready-made one on the Internet? According to my tests, they simply don't work.
Spoiler: Briefly about DFE
Somewhere 90% of ROM Developers out of the box have such a function as data encryption, DFE removes "flags" from one file in the /vendor section so that the system encrypts the data "Entire /data section" at startup therefore, just like with TWRP, after changing or updating the firmware, you need to flash it through TWRP.
- Why should I remove encryption? - ask a question
I will answer, in fact, there is no need, if only you are ready to always back up all data to a flash drive or PC from the internal memory of the phone when changing the firmware, because not all firmware have the same encryption keys, and you can install the firmware, but it is simply will not start at best, at worst everything will be encrypted over a new one and all files will be lost.
But literally all the instructions from the developers of the ROM are written precisely taking into account the fact that you will format the date when installing their firmware. Also, if encryption is disabled, TvRP will not ask for a password to see the memory, and therefore your data is at risk when the phone is stolen, since it will not be difficult to pull them out.
For all cases, you cannot do format data before installing the firmware, otherwise the PC will not see the memory, format data is done only at the end of the installation.
Spoiler: Installing temporary TWRP
Method 1:
1. We drop twrp.img into the folder with adb
2. In windows, hold down shift + right mouse button in an empty space in the folder, open a shell or cmd
3. The console will open, in the case of win10 / 11, if this is a shell, you need to register cmd
4. Reboot the phone into fastboot mode / bootloader (volume down + power button) and connect it to the computer via the wire
5. We write to the command "fastboot boot twrp.img"
6. TWRP will start by itself
Method 2:
1.Download TWRP Autoruner https://drive.google.com/file/d/1HsA1XAEzFgEo0n7K1Vf0QqPlyEICzkpd/view?usp=sharing
2. Unpack anywhere
3. Boot into FastBoot
4. Run the batch file in the folder
Spoiler: Setting TWRP to "permanent" - within the same ROM (Before the first ROM update, or before the first ROM change)
Method 1: Works ALWAYS
1. Go to the advanced tab and select install recvoery ramdisk
2. Find the twrp.img file on your phone and select it
3. If TWRP shows "Error opening: No such file or directory"
then you need to change the active slot in the Reboot contribution, then back and flash TWRP into the ramdisk again
Method 2: For TWRP from Nebrassy does not work 100% of the time
In the same place, in the advanced tab, click flash current TWRP
Method 3: For TWRP from Vasishath. does not work 100%
In the same place, in the advanced tab, click Inject TWRP
Before flashing custom, it is recommended to install a miui stock or a custom miui. It is advisable to drain through a fastboot by analogy with the spoiler instruction, from point 1 to point 9
This is done in order to update all sections in memory, remove tails from other ROMs. Refresh the markup of the sections. Otherwise, there may be errors, not working conditional nfc, lags, whatever. In the best case, the ROM simply won't be installed. At worst, there will be a bad opinion about the ROM because of your own wrong actions and an extra day for flashing and configuring another or the same ROM.
All files are additional here​
Spoiler: If the memory in TWRP is not visible
1. You saw that the PC does not see the memory on the device, or the tvrp is empty (this already means that all the data has been erased)
2. Download one of these TVRPs to your computer
recovery_vasishath_nonflags.img or recovery_nebrassy_nonflags.img
3. Through that TWRP where everything is empty, we do format data (yes)
4. Reboot bootloader
5. On the PC we prescribe "fastboot boot twrp.img" any of the post
6. TvRP is loaded (the computer and TWRP sees the memory, but this is not all, nothing will work)
7. In the advanced tab, click fix context
8. In the mounts tab, remove the checkbox from the date and put it back.
9. Now you can upload files from your computer
10. You flash the ROM, you can not do the date format again, when the system boots, it will erase everything from memory, and if you did not set dfe, then the date itself will be encrypted, if you set the data in the same way, it will be erased, but there will be no encryption.
Note:
These TWRPs will not see the date (files in memory) if the data is encrypted, usually TWRP asks for a password when entering it, or you can see it in the security tab.
This TWRP works fine with the already decrypted date, if you use the DFE patch, everything works normally
In this TWRP, the encryption flags are simply removed, so that after the date format when entering TVRP, the date is not encrypted with keys from TWRP and does not break from this
Spoiler: Installation using DFE patch (HentaiOS and Proton AOSP excluded)
When using DFE, you should not use internal methods of updating in ROM, when the firmware is updated in the background, and when you reboot it is already updated, as I wrote earlier, the sections are updated, and therefore the DFE stops working, and it is rather difficult to predict when the system has updated itself, and if DFE will stop working, all data will be deleted, and the ROM simply will not start, so it's better to manually set everything.​
Spoiler: ROM Type Official MIUI Fastboot
1. Download zip with fastboot image MIUI
2. Unpack it to a convenient place
3. You need to go to the folder, and look for the flash_all_except_storage.bat file there
4. You need to open it with a text editor and delete the last line with the text "fastboot reboot"
5. Now, through miflash, we look for the directory with this file
6. We transfer the phone to fastboot mode (Hold the power button + volume rocker down)
7. We connect the device with a wire to the computer and, in the program, select the bottom right flash_all_except_storage.bat, press flash
8. After the end of the process, you need to boot into TWRP
9. In TVRP, if you did everything correctly, then the memory is not erased.
10. We transfer DFE from the computer to the phone, or if you did it in advance, then we flash it. in 99% of cases, an inscription will come out that you need to pre-flash SystemRW_1.32. Then we do it.
11. In the case of SystemRW, you need to reboot into TWRP, then either put it in RamDisk and just reboot, or click reboot bootloader and boot from the computer back to TWRP.
12. Repeat step 10.
13. If you have not used DFE before, then you need to do format DATA (yes). If you have updated the firmware in this way, then you do not need to do Format data. If you have changed the firmware, it is recommended to do wipe data, otherwise either the firmware will not boot, or it will not work correctly
Spoiler: ROM type Pyaload.bin for TWRP
1. Install TWRP in ramdisk and / or go into it
2. Flash .zip ROM file
3. Install TWRP in ramdisk
4. Reboot into TWRP
5. Flash DFE.zip
6. If you have not used DFE before, then you need to do format DATA (yes). If you have updated the firmware in this way, then you do not need to do Format data. If you have changed the firmware, it is recommended to do wipe data, otherwise either the firmware will not boot, or it will not work correctly
Spoiler: ROM type Payload.bin for ADB sideload via PC
1. Download the .zip ROM to your PC. Upload the archive to the adb folder
2. Then, according to the instructions from the developer, you can flash the vendor and vendor_boot ROM provided by the developer, or load into the temporary TVRP from nebrassy "fastboot flash boot twrp.img", or through the autoinstall script
3. Further, in the case of AOSP recovery fastboot --set-active = a and fastboot reboot recovery
5. In twrp, select the advanced section and click adb sideload. in AOSP recovery select Install update through ADB
6. In the console from the adb folder in which the archive from the ROM is located, write "adb sideload name_file_PZU.zip"
7. Flash DFE.zip
8. If you have not used DFE before, then you need to do format DATA (yes). If you have updated the firmware in this way, then you do not need to do Format data. If you have changed the firmware, it is recommended to do wipe data, otherwise either the firmware will not boot, or it will not work correctly
Spoiler: ROM Type Custom MIUI (For example Xiaomi.eu)
1. Download CustomMIUI.zip
2. Install TWRP in ramdisk and / or go into it
3. Flash CustomMIUI.zip ROM file
4. Install TWRP in ramdisk
5. Reboot into TWRP
6. Flash DFE.zip
7. If you have not used DFE before, then you need to do format DATA (yes). If you have updated the firmware in this way, then you do not need to do Format data. If you have changed the firmware, it is recommended to do wipe data, otherwise either the firmware will not boot, or it will not work correctly
Spoiler: ROM type Custom fastboot image.
1. Download fastboot ROM on PC
2. Unzip to a convenient place, and go to the folder, find the update.bat file there, you need to open it with a text editor and delete the last line with the text "fastboot reboot"
3. We transfer the phone to fastboot mode (Hold the power button + volume down)
4. Run update.bat and wait for the end of the procedure
5. After the end of the process, you need to boot into TWRP
9. In TWRP, if you did everything right, then the memory is not erased. Otherwise, I recommend using this method so that the memory appears.
10. We transfer DFE from the computer to the phone, or if you did it in advance, then we flash it.
11. If you have not used DFE before, then you need to do format DATA (yes). If you have updated the firmware in this way, then you do not need to do Format data. If you have changed the firmware, it is recommended to do wipe data, otherwise either the firmware will not boot, or it will not work correctly
Spoiler: Standard installation methods
Spoiler: ROM Type Official MIUI Fastboot
1. Download zip with fastboot image MIUI
2. Unpack it to a convenient place
3. Now, through miflash, we look for the directory with this file
4. We transfer the phone to fastboot mode (Hold the power button + volume ring down)
5. We connect with a wire to the PC and first select in the program at the bottom right flash_all_except_storage.bat (For updating), flash_all.bat (For Clean installation) flash_all_lock.bat (for clean installation and locking the bootloader) or press flash
6. The system will reboot itself. Ready
7. Additionally (Magisk, gapps and other zip) after a clean install with all files removed:
7.1 After loading into the system, we go through the device configuration, and we must put a pin or a graphic key
7.2 Flash temporary TWRP
7.3 If you need a TVRP on an ongoing basis, then we flash it into a ramdisk (Imstall recvoery ramdisk), the img image of the TVRP must be on the device
7.4 Flash the zip archives you need
7.5 You can make Wipe data to set up your phone again
8. If you updated your phone, you can do steps 7.2-7.4 Immediately after installing the update
Spoiler: ROM type Pyaload.bin for TWRP
1. Install TWRP in ramdisk and / or go into it
2. Flash .zip ROM file
3. Install TWRP in ramdisk
4. Make Format Data as indicated in the instructions of the firmware developer, or wipe date if you change it from custom to custom (does not always work), or just boot into the system (Risky !!)
5.Additional (Magisk, gapps and other zip):
5.1 If you have updated the ROM, you can flash additional files
5.2 If you have made format data, you need to boot into the system, go through the setup, put the lock key and reboot into tvrp, after that you can put an additional zip. and make wipe data to configure it again
Spoiler: ROM type Payload.bin for ADB sideload via PC
1. Download the .zip ROM to your PC. Upload the archive to the adb folder
2. Further, you can follow the instructions either from the developer, flash the vendor and vendor_boot provided by the developer, or boot into the temporary TWRP from nebrassy "fastboot flash boot twrp.img", or through the autoinstall script
3. Further, in the case of AOSP recovery fastboot --set-active = a and fastboot reboot recovery
5. In twrp, select the advanced section and click adb sideload. in aosp recovery select Install update through ADB
6. In the console, from the adb folder in which the archive with the firmware is located, write adb sideload_file_name.zip
7. At the end of the process, make Format Data as indicated in the developer's instructions, or wipe the date, if you change it from custom to custom (it does not always work), or just boot into the system
8.Additional (Magisk, gapps and other zip):
8.1 After loading into the system, we go through the device configuration, and we must put a pin or a graphic key
8.2 Reboot the phone into fastboot mode (volume down and hold down the power button) connect the computer, flash the temporary TWRP
8.3 If you need a TVRP for a constant, then we flash it into a ramdisk (Imstall recvoery ramdisk), the img image of a tvrp must be on the device
8.4 Flash the zip archives you need
9. If you updated your phone, you can do steps 8.2-8.4 Immediately after installing the update
Spoiler: ROM Type Custom MIUI (For example Xiaomi.eu)
1. Download CustomMIUI.zip
2. Install TWRP in ramdisk and / or go into it
3. Flash CustomMIUI.zip ROM file
4. Install TWRP to ramdisk
5. Reboot into TWRP
6. Make Format Data as indicated in the Developer's instructions, or wipe date, if you change miui to miui (does not always work), or just boot into the system
7.Additional (Magisk, gapps and other zip):
7.1 In case you have updated the ROM, you can flash additional files
7.2 If you have made format data, you need to boot into the system, go through the setup, put the lock key and reboot into tvrp, after that you can put an additional zip. and make wipe data to configure it again
Spoiler: ROM type Custom fastboot image.
1. Download fastboot ROM on PC
2. Unzip to a convenient place, and go to the folder, find the update.bat file and installformat.bat there FirestInstall.bat
3. Go into fastboot mode, connect the device to the PC and select the desired installer, or update, to update, or for a clean install installformat.bat or FirestInstall.bat (all data will be erased, including memory
4. Additionally (Magisk, gapps and other zip) after a clean install with all files removed:
4.1 After loading into the system, we go through the device configuration, and we must put a pin or a graphic key
4.2 Reboot the phone into fastboot mode (volume down and hold down the power button) connect the computer, flash the temporary TWRP
4.3 If you need TWRP for Permanent then we do it
4.4 Flash the zip archives you need
4.5 You can make Wipe data to set up your phone again
5. If you updated your phone, you can do steps 4.2-4.4 Immediately after installing the update
Click to expand...
Click to collapse
I would propose to add and / or replace in the 1st spoiler "diriver and utilities" the link to this site
to download "miflashtool"
Xiaomi Flash Tool - Official Mi Flash Tool
Download the latest and Official Xiaomi Flash Tool from the Official Xiaomi Flash Tool Website.
xiaomiflashtool.com
where the latest version of the software is present.
RollDload said:
I would propose to add and / or replace in the 1st spoiler "diriver and utilities" the link to this site
to download "miflashtool"
Xiaomi Flash Tool - Official Mi Flash Tool
Download the latest and Official Xiaomi Flash Tool from the Official Xiaomi Flash Tool Website.
xiaomiflashtool.com
where the latest version of the software is present.
Click to expand...
Click to collapse
Okey, I'll do it later
I hope everything in this guide is clear. I just used Google translator. I do not speak English myself ideally
LeeGarChat said:
I hope everything in this guide is clear. I just used Google translator. I do not speak English myself ideally
Click to expand...
Click to collapse
Apparently yes, although I don't speak fluent English either. I can understand it while reading, but not everything, so I use the translator too and I was able to read and understand your guide without any problems. Some native speakers will probably disagree with me .
Very Informative Guide ! A must read for everyone
LeeGarChat said:
in 99% of cases, an inscription will come out that you need to pre-flash SystemRW_1.32. Then we do it.
11. In the case of SystemRW, you need to reboot into TWRP, then either put it in RamDisk and just reboot, or click reboot bootloader and boot from the computer back to TWRP.
Click to expand...
Click to collapse
Hi @LeeGarChat thanks for your interest in my SystemRW / SuperRW feat. MakeRW script
Does it work well on your Poco F3 device? You never sent me your log files...
If you're going to use my SystemRW / SuperRW feat. MakeRW project (or parts thereof) in your thread and make a video about it could you please at least have the decency to include a visible link (not hidden inside of spoiler tags!) to
the official SystemRW / SuperRW feat. MakeRW by lebigmac project thread​in the first post of this thread as well as in your video description? Thanks
And please keep in mind that unauthorized, unverified re-uploads of my SystemRW project files are not allowed!
The official download links in the official SystemRW / SuperRW feat. MakeRW by lebigmac thread work just fine!
I can't offer any customer support for old, unofficial, deprecated, unverified versions of my script which were reuploaded by 3rd parties but I can only offer support for the latest official version of my script downloaded directly from the official SystemRW / SuperRW feat. MakeRW by lebigmac project thread
Thank you!
Good news! New version of © SystemRW / SuperRW feat. MakeRW™ by lebigmac ® coming soon! Stay tuned!​
Hey Guys i need your help, i followed all the steps in that post but i could not find the " Onekey injection" so i ignored that step and installed the xiaomi eu rom. Everything went well, now when i want to boot in recovery mode it shows up the stock recovery
So my question is when i want to update my phone in the future, i have to install it through TWRP and if my data will be lost or no?
Kaddy2727 said:
Hey Guys i need your help, i followed all the steps in that post but i could not find the " Onekey injection" so i ignored that step and installed the xiaomi eu rom. Everything went well, now when i want to boot in recovery mode it shows up the stock recovery
So my question is when i want to update my phone in the future, i have to install it through TWRP and if my data will be lost or no?
Click to expand...
Click to collapse
which version did you flash of xiaomi eu, the weekly or the stable?
The latest versions should flash twrp as well. However, if you only upgrade there is no need to format data, so you do not lose your data, I always recommend that you do a backup before any modding operation because you never know what can happen.
To flash twrp download the image from here:
[RECOVERY] [12] [OFFICIAL] TeamWin Recovery Project
Introduction: Team Win Recovery Project or TWRP for short, is a custom recovery built with ease of use and customization in mind. We started from the ground up by taking AOSP recovery and loading it with the standard recovery options, then added...
forum.xda-developers.com
put the image filenametwrp.img in the folder where there is adb and fastboot
go to the folder where there is adb and fastboot, rename the filenametwrp.img to twrp.img then go to the address bar and type cmd and press enter, (a prompt window should open)
(In the phone) make sure you have enabled usb debug in developer settings and have authorized the pc.
now turn off the phone and start it in fastboot, then connect it to the pc via the usb cable
in the cmd you opened before type this
Code:
fastboot deviced
to check if it is recognized
if the phone code appears you can boot twrp by typing this
Code:
fastboot boot twrp.img
hit enter and the phone should boot into twrp
now in twrp go to advanced and search "install current twrp" in the options at the bottom below and flash.
you should now have twrp.
lebigmac said:
Hi @LeeGarChat thanks for your interest in my SystemRW script.
Does it work well on your Poco F3 device? You never sent me your log files...
Could you please include a link to my project in first post of this thread? Thank you!
Click to expand...
Click to collapse
I'll reply in his stead ....
As of now - latest Xiaomi betas for global 12.5.4 it does not work correctly doing it the way he described ( flashing 1.32rw inside twrp has to be done twice lol ) After flashing it twice you have to flash his patch then reboot the phone and format data.
Now phone will say decrypted but for who knows what reason everything is broken. Lots of silent crashes from the systemui and overall slowdown of the system/several apps refusing to work.
Fast charging is gone as well....
Strangely much less stuff appears to be broken in EEA version of the miui , still needs flashing twice the main script but at least fast charging works afterwards. System is slightly more stable but still overall suffering from slowdown.
I personally found that manual method of creating image from booted android does work somewhat. You only need to do it once by executing systemrw.sh then flashing the super.img .
What's the catch? You can't flash super.img through "fastboot flash super" command , it mangles partitions to the point where /vendor and /odm can't mount inside twrp.
I am curious tho maybe I don't need to enter twrp after flashing super image via fastboot? Maybe his fix is not necessary then and I just need to wipe and boot system to fix /vendor and /odm not being able to mount.... Hmmm
I'll try this when I'm free sometime , but for now I'm not using this due to performance issues mainly.
His script does let you at least get that decrypted status but for who knows what reason lots of stuff is broken... Could be magisk being flashed onto phone before partitions are extracted or overall twrp not being anywhere close to stable enough to handle all of this?
@Rstment ^m^
I can nowhere read sth. about this rw Script . Where does it play a role ? I just wanna flash a xiaomi.eu Rom. Are you talking about the official weekly/stable ?
Eclipse1991 said:
@Rstment ^m^
I can nowhere read sth. about this rw Script . Where does it play a role ? I just wanna flash a xiaomi.eu Rom. Are you talking about the official weekly/stable ?
Click to expand...
Click to collapse
Nah , it's related to decrypting rom. Not something you should worry about...
@Kaddy2727 @RollDload @Rstment ^m^ @Eclipse1991 @__halvar__
I wrote my SystemRW/SuperRW feat. MakeRW script for all Android power users out there that wish to make their stock read-only Android 10+ device read/write-able again to remove annoying bloatware and make more thorough customizations to their device.
If you like my SystemRW / SuperRW feat. MakeRW script and want to share your feedback with me (the original developer of SystemRW / SuperRW feat. MakeRW) or have any questions related to my script then please feel free to ask me in
the official SystemRW / SuperRW feat. MakeRW by lebigmac project thread ​
Rstment ^m^ said:
As of now - latest Xiaomi betas for global 12.5.4 it does not work correctly doing it the way he described ( flashing 1.32rw inside twrp has to be done twice lol ) After flashing it twice you have to flash his patch then reboot the phone and format data.
Click to expand...
Click to collapse
@Rstment ^m^
I do NOT recommend formatting /data after running my SystemRW / SuperRW feat. MakeRW script in recovery! You will lose all your personal files if you do this!
You just have to make sure that /data partition is properly decrypted and mounted in your custom recovery before running my SystemRW / SuperRW feat. MakeRW script. That's all.
im on miui global 12.5.6 do i need to flash the stock rom before flashing custom rom?
I tried the Custom MIUI Process with OneOS and when flashing ROM and after Recovery to Ramdisk and reboot, the internal storage contents disappear. What is the reason ? Caused both on 3.5.2 TWRP and 3.6.0 Official one.
Can be used as reference for xiaomi 11t pro? Cause I didn't see any custom rom for this device

Categories

Resources