Related
Hi
Trying to flash TWRP but no ADB & Fastboot directory under Windows 10 program files/x86?!? Also should GApps go here? 32bit? What if SD card & internal storage is merged? End result is Lineage OS...
Could anyone link a good guide?
Which adb/fastboot utility did you install? If you install Minimal ADB 1.4.2, on my computer it's present under C:\Program Files (x86)\Minimal ADB and Fastboot. For 1.4.2: https://www.androidfilehost.com/?fid=745425885120698566
If you're trying to flash TWRP (ensure you've got either TWRP 3.0.2 or a more recent version, 3.1.1 for example, and that it's for athene devices), you could follow this guide: https://forum.xda-developers.com/showpost.php?p=67031805&postcount=3 Also, double check you've unlocked your bootloader before attempting any of this: https://forum.xda-developers.com/showpost.php?p=67031801&postcount=2 Bear in mind unlocking your bootloader will wipe your device and void your warranty.
Once you've flashed TWRP, then reboot straight to recovery - this is to ensure TWRP is not overwritten by the stock recovery. Once you've booted to the recovery, then TWRP should stick and you may reboot as normal.
EDIT - instead of flashing TWRP, you may wish to boot to TWRP (and look at step 4 below):
Copy the TWRP image file to your adb folder.
Boot into the bootloader and connect your device to your computer.
Open your adb client and verify your device is communicating by executing 'fastboot devices' without the quotes. You should get a response with your device's serial number.
To boot in TWRP, execute in the adb terminal 'fastboot boot <name of TWRP image>' without the quotes. E.g if your TWRP is twrp-3.1.1-athene_shreps.img, then the command you'd use is 'fastboot boot twrp-3.1.1-athene_shreps.img' (without quotes).
Afterwards, you'll be able to flash LineageOS and GApps. The main instructions for flashing a custom ROM are usually listed in the first post of each custom ROM (here's the link for the official LineageOS: https://forum.xda-developers.com/moto-g4-plus/development/rom-cyanogenmod-14-1-t3522101)
If you have your SD card and internal storage merged, then unless you can save the encryption key from your stock, your SD card will be wiped/inaccessible. SD cards mounted as portable storage appear to operate okay under both custom and stock ROMs. Thus, back up your SD card to your computer. You may wish to re-format your SD card as portable storage (and from what I've read on the Lenovo Motorola forums, that might help your SD card last longer, as it's not being subjected to encryption as it would be with adoptable storage).
1)You'll be flashing the LineageOS and GApps (can use either OpenGApps or BeanGApps) zips using TWRP. You need 7.1 arm Gapps (32 bit).
2)Download LineageOS and GApps to your device. Do not unzip them.
3)Reboot to TWRP recovery. Tap the Backup option on the main menu.
4)Back up your device in TWRP (make a note this is your stock backup). If you want this backup to be OTA friendly for stock updates, then do not 'swipe to allow modifications'. Back up the stock ROM, verify you've got the backup then reboot to TWRP, and then 'swipe to allow modifications'.
5)Go back to the main menu, and tap the 'Wipe'.
6)Under 'Advanced Wipe', select Dalvik/ART cache, system, data and cache. Double check these are the only ones you have ticked.
6a)Swipe to wipe.
7)Go back to the TWRP main menu.
8)Tap Install and locate your LineageOS and GApps zips.
9)Flash LineageOS first and then GApps.
10)Reboot to LineageOS.
If your device screen goes to sleep whilst in TWRP, press on the volume keys to wake up your device.
If you wish to revert back to near stock, you can flash your TWRP backup of your stock ROM (though this will revert any messages to the point when your backup was taken, you may wish to use Titanium Backup or MyPhoneExplorer to backup). If you decide to revert completely to stock, then if you were on the June 2017 stock update, please only flash the June 2017 or later stock firmwares: https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138
@echo92 if he would decide to flash back to a clean StockRom (by fastboot) in order to start with a complete unmodified System (stock boot, stock kernel & stock recovery) wouldn't it be better not to "flash" but just to "boot" once into TWRP and take a backup of the clean StockRom in order to save the stockrecovery too? So he could simply restore his clean stock if he wants to take a future OTA.
If he "flashes" TRWP permanently onto StockR he would backup Stock with modified recovery and might wonder, why he couldn't install an OTA.
Please correct me, if I'm wrong.
bullfinch110 said:
@echo92 if he would decide to flash back to a clean StockRom (by fastboot) in order to start with a complete unmodified System (stock boot, stock kernel & stock recovery) wouldn't it be better not to "flash" but just to "boot" once into TWRP and take a backup of the clean StockRom in order to save the stockrecovery too? So he could simply restore his clean stock if he wants to take a future OTA.
If he "flashes" TRWP permanently onto StockR he would backup Stock with modified recovery and might wonder, why he couldn't install an OTA.
Please correct me, if I'm wrong.
Click to expand...
Click to collapse
Oh definitely, that's an option, booting into TWRP and backing up the stock ROM. As I understand it, you have to back up your device without allowing TWRP to modify your system partition. If the backup is taken after that, I recently read that enabling that will cause an OTA to fail (since the type of OTA monitors if the system was ever mounted as read/write), even if the backup you took had no other changes.
It honestly depends on how much flashing the opening poster is planning on doing, if it's simply just LineageOS and OpenGApps, then might be worth booting into TWRP. However, to keep updated then you'd have to perform the updates when you've got a PC available (to be able to boot into TWRP), in which case the inconvenience of booting into TWRP with a PC might outweigh the downside of a custom recovery. For custom ROMs, we might have a similar issue ironically, where a user downloads an update for custom ROMs and cannot flash the update because they do not have TWRP on their device (albeit this issue is easier to fix). I concur that simply booting into TWRP may be more suitable for new users and those that do not realise the requirements/downsides of having a custom recovery. I'll add in the option of booting to TWRP in the previous post As the saying goes, with great power comes great responsibility.
Also, if the user flashes other files (e.g. a custom logo.bin to hide the bootloader warning), then the OTA would fail anyway, and custom logos aren't backed up by TWRP. For a logo.bin though, that can be easily replaced by a stock logo.bin (from the appropriate stock ROM) flashable in fastboot or in TWRP.
If the xda pros would establish a new status, like "Recognized Explainer", you were the first who 'd deserve it.
Thx!!!
I have successfully installed Lineage Flo (2013) on a Nexus 7! This practice (fell at every hurdle) & your post should bring the matter to a swift finish.
Many thx.
GUIDE SECTIONS QUICK LINKS
#1 - MIUI ROM, Types of MIUI ROM
#2 - TWRP, Types of TWRP, Flashing TWRP
#3 - Unlock, Root, Flashing via TWRP
#4 - Custom ROM, Types of custom ROMs
MIUI ROM
MIUI (pronounced as Me-You-I) is Xiaomi's custom built firmware like Samsung's OneUI, HTC's SenseUI, OnePlus's OxygenOS which is built on top of Android's AOSP base with its own modifications and features. At first glance it resembles like a hybrid between Google's Material Design and Apple's iOS. But unlike Stock Android or iOS, MIUI is very intuitive, feature rich and has multiple tweaking options. MIUI is updated regularly depending on the development branch. Xiaomi gathers reports, feedbacks and suggestions from the community, addresses the bug-fixes and integrates new features upon request. Most of Xiaomi devices are regularly patched with security updates every 2-3 months. The flagship "Mi" series like Mi9 receive quicker Android version updates than their budget "Redmi" series like Redmi 7, Redmi Note 7 Pro etc.
TYPES OF MIUI ROM
There are 2 development branches of MIUI ROMs for all Xiaomi devices.
A) Stable Builds
It is updated on a monthly basis or longer
New features are added slowly after testing
Higher system stability and less bugs than Beta ROMs
It has a four digit numbering scheme (X.X.X.X)
For eg. 8.X.X.X is MIUI8 Stable Build
Stable builds come in 2 variants
1. MIUI China Stable ROM
This ROM is pre-installed on all Xiaomi devices sold in China.
It is made for the Chinese market & contains Chinese MIUI apps.
Google Apps are absent. You can install them manually.
It supports Chinese & English languages.
2. MIUI Global Stable ROM
This ROM is pre-installed on all Xiaomi devices sold outside China.
It is made for the International market & contains English MIUI apps.
Google apps are pre-installed by default.
It supports 50+ languages.
B) Beta Builds
It is updated on a weekly/bi-weekly basis or longer.
New features are added quickly for testing.
Lower system stability and more bugs than Stable builds.
It has a three digit numbering scheme (X.X.X)
For eg. 6.11.21 is MIUI8 Beta build for 21th Nov, 2016.
This ROM is not pre-installed on any Xiaomi device.
You can install Beta build over Stable build manually.
Beta/Developer builds come in 2 variants.
1. MIUI China Beta ROM
It is made for the Chinese market & contains Chinese MIUI apps.
Google Apps are absent. You can install them manually.
It supports Chinese & English language.
2. MIUI Global Beta ROM It is made for the International market & contains English MIUI apps.
Google apps are pre-installed by default.
Supports more than 50+ languages.
TWRP
Team Win Recovery Project is a custom recovery which is flashed over the stock recovery as it gives user more options such as flashing custom ROMs, kernels & scripts, take full system backups, restore backups, root etc.
TYPES OF TWRP
1. TWRP by iscle: https://forum.xda-developers.com/mi-max-2/development/recovery-twrp-3-1-1-0-touch-recovery-t3652762
Based on Stock TWRP 3.1.1-0 with no modifications.
Ported from Redmi Note 4 (mido)
English language as default
Need to flash dm-verity zip immediately after flashing this TWRP, else your phone wont boot.
2. TWRP by xuefer: https://forum.xda-developers.com/mi-max-2/development/twrp-max2-oxygen-t3634437
Built using LineageOS 14.1 source
Built and tweaked for Mi Max 2 (oxygen)
Decryption support added for /data
Faster transfer using adb push
Extra fonts added
FLASHING TWRP
Unlock bootloader here: https://forum.xda-developers.com/mi-max-2/how-to/guide-unlocking-bootloader-mi-max-2-t3641257
Install "Minimal ADB+Fastboot Drivers": https://forum.xda-developers.com/showthread.php?t=2317790
Download TWRP file and copy the file in the C:\Program Files (x86)\Minimal ADB and Fastboot folder
Download dm-verity disabler and copy the file in your phone: https://build.nethunter.com/android-tools/no-verity-opt-encrypt/
Switch off phone. Hold Power + Volume Down to boot into fastboot mode. Connect it to PC.
Inside the folder where TWRP file is present, open command prompt window.
Type "fastboot devices". Your phone will get detected with serial number.
Type "fastboot flash recovery <recovery_name.img>". TWRP will get flashed on your device.
E.g. "fastboot flash recovery twrp_3.1.1-0.img".
Type "fastboot boot <recovery_name.img>". You will boot into TWRP. Disconnect phone from PC.
E.g. "fastboot boot twrp_3.1.1-0.img".
On the screen, swipe to allow modifications and select your language. Uncheck "Keep system read-only"
Select Install and then choose the dm-verity disabler zip and swipe to flash.
Select Backup and check all partitions. Swipe to backup. The backup will be stored in "TWRP" folder
Select Reboot and then system. You will be asked if you want to disable the stock recovery. Swipe to disable.
You will boot into MIUI with TWRP installed.
TWRP ZIPs
These zips are meant to be flashed with TWRP with a specific order. Before flashing any zip make sure you have taken full backup of your device partitions using TWRP.
1. no-verity-opt-encrypt: https://build.nethunter.com/android-tools/no-verity-opt-encrypt/
Also called as dm-verity disabler/lazy flasher
"dm-verity" is a feature in the MIUI kernel which checks and prevents the phone from booting normally if you modify the phone. (e.g. flash TWRP)
To prevent that, you need to flash the dm-verity disabler zip which removes dm-verity check and also decrypts the /data partition so that you can boot into MIUI normally.
Else you can flash a custom ROM immediately after flashing TWRP which removes the MIUI system and kernel
2. Xiaomi.EU ROM Patch: https://forum.xda-developers.com/mi-max-2/development/xiaomi-eu-rom-patches-dpi-change-t3656296
You need to install Xiaomi.EU ROM before installing these zips via TWRP.
MIUI to Google Apps: Replaces default MIUI apps with Google apps.
Google Now/Pixel Launcher: Replaces stock MIUI launcher and enables Google Assistant via build.prop tweak.
DPI changer: Change values from stock 440 (low res, bigger) to 325 (high res, smaller).
3. Hardware Key Disabler : https://forum.xda-developers.com/mi-max-2/themes/mod-disable-hardware-keys-lineageos-rom-t3696108
This mod enables on screen navigation bar and disables the hardware keys
You can revert back to stock configuration by flashing "enable_HWkeys.zip"
FLASHING VIA TWRP
Some important terms to remember:
Formatting data: Factory resets the phone, will erase internal storage, will remove encryption
Wiping data: Factory resets the phone, will not erase internal storage, will not remove encryption
Clean flash: Flashing a new ROM or an updated version of the same ROM by wiping or formatting data of current ROM in TWRP. Cache & dalvik is automatically wiped in TWRP.
Dirty flash: Flashing an updated version of the same ROM without wiping or formatting data of current ROM in TWRP. Cache & dalvik wipe is recommended in TWRP.
Treble TWRP: Custom TWRP which uses existing /cust partition and formats it into /vendor partition which is needed for non-MIUI Oreo and Pie ROMs where Treble is used.
Notes:
Always read the entire post & comments of the custom ROM page before asking any questions, chances are your query has already been answered.
You do not need to wipe /system partition manually, it its automatically wiped when a ROM is flashed by the updater-script inside the ROM zip. General rule of thumb is always clean flash any ROM, unless mentioned by the ROM developer or maintainer that dirty flashing is okay.
Requirements:
Unlocked bootloader with TWRP installed
Phone partition backup using TWRP
All data backup from internal storage (sms, contacts, files etc.)
Official MIUI ROM encrypts /data partition, you will need to Wipe > Format Data to decrypt it completely else need to flash dm-verity disabler zip or Magisk zip.
1. Rooting MIUI / non-MIUI ROM
Boot into TWRP (Power+Volume Up)
Install > Magisk zip
Reboot > System
2. Flashing official MIUI recovery ROM
Boot into TWRP
Wipe > Format data (if storage is encrypted)
Reboot > Recovery
Install > MIUI ROM zip + Magisk Zip
Reboot > System
3. Flashing custom MIUI ROM (Xiaomi.EU / RevOS / Mi Globe)
Boot into TWRP
Wipe > Format data (if storage is encrypted)
Reboot > Recovery
Wipe > Factory reset
Install > Custom MIUI ROM zip
Reboot > System
4. Flashing LineageOS/AOSP ROMs (Non-Treble)
Boot into TWRP
Wipe > Format data and Reboot > Recovery (if storage is encrypted)
Wipe > Factory reset
Install > Firmware + ROM Zip + Google Apps Zip
Reboot > System
5. Flashing LineageOS/AOSP ROMs (Treble)
Boot into Treble TWRP
Wipe > Format data (if storage is encrypted)
Reboot > Recovery
Wipe > Factory reset
Install > Firmware + ROM Zip + Google Apps Zip
Reboot > System
TYPES OF CUSTOM ROMs
There are mainly two types of custom ROMs for any Android device. You need to flash them on your phone using custom recovery such as TWRP.
1. Stock based ROMs
They are based on the factory ROM which came pre-installed on your device. In case of Xiaomi devices, developers take the stock China Stable/Beta MIUI ROMs as base, perform modifications and tweaking and then re-pack it. Examples of stock based MIUI ROMs.
Xiaomi.EU: https://xiaomi.eu/
MIUI Pro: https://miuipro.by/
Mi Globe: http://mi-globe.com/
Epic ROM: http://www.epicrom.pro/
2. Custom based ROMs
They are typically based on either AOSP or LineageOS code. They can either be ported from similar devices or built using the kernel source code of a particular device. Xiaomi has not yet released kernel source code for Mi Max 2. Kernel source codes are needed for relatively stable and bug-free experience on custom ROMs. Examples of some popular custom ROMs
A) AOSP based ROMs
AOSPExtended: https://www.aospextended.com/
Nexus Experience: http://www.nxrom.us/
SlimRoms: https://slimroms.org/
B) LineageOS based ROMs
LineageOS: https://lineageos.org/
Resurrection Remix: http://www.resurrectionremix.com/
XenonHD: http://www.xenonhd.com/
Reserved #4
Reserved #5
Thanks for wonderful explanation and for content too
Hi,
I flashed TWRP from PC using above procedure & tried to install no-verity-opt-encrypt (version 5.1.zip).
I got below error while installing :
Error: unpacking ramdisk failed
Phone booted normally & TWRP is not there.
How to fix this issue?
I know these questions are sometimes annoying, but for someone who hasn't been following Android development since Android 4.4.4, I'm a little overwhelmed by all this information. What does the "Oxygen" mean? Is it just a certain model of the Mi Max 2? I see all ROMs say Oxygen but none explain what it means. If it's a model of the Max 2, how can I know if the version I have is Oxygen?
Thanks and sorry if it's a dumb question
It's a code name for Max 2, so you don't mistakenly flash the wrong ROM, if it says Oxygen, than you're sure it's for your model, not for i.e. Mi Max...
Sent from my Mi Max 2 using Tapatalk
Hello,
I have a Mimax 2 bootloader unlocked, rooted, SuperSU, twrp 3.1.0-0 (cofface) installed. I installed, after some difficulties, the rom xiaomi.eu 7.12.28. When I'm in recovery, after the flash I sometimes have a red line that says "... no-verity-opt-encrypt ..." blah blah. But the phone boot normally, everything works fine. Do I have to install lazyflasher-no-verity-opt-encrypt or can I do without it?
thank you and sorry for my bad english
Hi, I have unlocked BL and installed Developer ROM 7.12.28. for a few weeks now. Can I install latest 8.1.4 developer ROM with TWRP without wiping cache/dalvik and will I keep my data/apps that way?
Thanks.
Sent from my Mi Max 2 using Tapatalk
@frulex, I installed the 8.1.4 (via updater) after using the 7.12.28, without any problem. That you erase the cache where not, you will not lose the data of your apps
What was the size of that update file you installed? I first got notification of 8.1.4 update and it said it's something like 95 MB file size. Tried to install it twice via updater, it starts updating, boots to TWRP and ends with error without installing. After reboot notification changed and now it offers update of full 1.5 GB 8.1.4 version ROM. I didn't have time to download and try that but I wonder will that also end in error and that's why I ask about downloading .zip and flashing through TWRP.
Sent from my Mi Max 2 using Tapatalk
These are the roms I used, as you see 8.1.4 weighs 1.2 Go
edit: I had uploaded an image of the explorer but it does not appear! (decidedly i'm struggling with this forum, lol)
Not many roms for this phone..it sux..I regret exchanging it with my oneplus 3..
How many ROMs have you expected in 3 days since kernel source has been released?
Sent from my Mi Max 2 using Tapatalk
good tutorial
thanks to you @SharkcpN . this is such a clearly, easily tutorial "How to Flash TWRP" for newbie like me..
I tried and succeed with no error at all.. once again, thanks for your good job :good:
Hi there! Thanks for the excellent thread and collection of links. I started here and found a setting on this phone's NVRAM that I have not seen mentioned anywhere else, and you will need it for LTE unlocking.
Below are the exact steps, many taken from this guide, that I used to go from a phone with an unlocked bootloader to flipping the LTE B2 and LTE B4 bits on. After I did it and rebooted, I suddenly had a working LTE connection!
I cannot yet PROVE that this actually enabled the bands, but it hasn't hurt anything. I will test for that in a couple days, because the only dumb thing I did was afterwards, when I accidentally re-locked the bootloader by not paying attention to what I was doing. If you use the MiFlash program to install a ROM, don't forget to change the setting in the lower right corner!
Notes for those wishing to use this as a guide:
I don't think you can brick the phone completely playing with just these settings, but you should be prepared to restore everything. Take backups where I mention them, and if you need the device working, you should have a current MIUI fastboot flashable image, available from the official website, on hand.
This is LTE only and there are different settings for GSM that work the same way.
The steps are numbered, but you should also understand mostly what they do.
You may ignore the VM part and just boot your normal Win7 with driver signature checking DISABLED (F8 on boot). I use Linux and I'm security-conscious about downloading programs that I can't verify, so I'm using a VM.
There is a dialpad option for opening the diag port (if you have root), but it did not work for me, so I have provided a method that I know works and it clears itself upon reboot
QXDM's NV browser has a checkbox for "DUAL SIM". You don't need to check it for this process, you won't lose SIM2.
Downloads section:
(REQUIRED) Most are in the links provided by OP:
MiFlash (official one)
QPST 2.7.460
QXDM 3.12.714
Minimal adb and fastboot
no-verity-opt-encrypt-6.0.zip
twrp-3.2.1-0-oxygen.zip
SuperSU-v2.82-201705271822.zip
(OPTIONAL, needed if you mess up. I chose to have it ready to go.):
From MIUI official site, go to the ROMs for the Max 2. The one on the download button here is NOT what you want.
Select Flashing guide, then on on the left hand side select FastBoot.
Download the image for your device. I have a copy of oxygen_global_images_V9.0.3.0.NDDMIEI_20171209.0000.00_7.1_global_298fd5f49c.tgz
SETUP SECTION (install tools and root phone):
Enable developer mode and USB debugging on phone
Boot into a Windows VM, pressing F8 to go into unsigned drivers mode
Install MiFlash, just to get the drivers
Install QPST and QXDM for later
Install adb and fastboot
Pass USB port through to VM and check adb is working by twice typing
Code:
adb devices
Shutdown phone and remove SD card from phone.
Add no-verity-opt-encrypt-6.0.zip and SuperSU-v2.82-201705271822.zip to SD card
Put SD card back in phone
Reboot phone into fastboot mode using PWR & VOL-, and re-pass to VM if needed
From cmd terminal in adb folder,
Code:
fastboot flash recovery twrp-3.2.1-0-oxygen.img
Code:
fastboot boot twrp-3.2.1-0-oxygen.img
Once TWRP comes up, install no-verity-opt-encrypt-6.0.zip
(OPTIONAL) Make a backup. I didn't because I don't want the ROM that's on there anyway.
Reboot and ensure MIUI loads
Shutdown phone and reboot into TWRP using PWR & VOL+
Install SuperSU as a system app
Reboot into MIUI
Access and edit the NVRAM:
Connect the device back to the computer, pass to VM if necessary
From your terminal in the adb folder,
Code:
adb devices
Grant debug permission on the device, if it asks again
Code:
adb shell
Code:
$su
Grant permission in superSU popup
Code:
#setprop sys.usb.config diag,adb
When the device reconnects, re-pass to VM if needed, and it may install another driver
Open QPST Configuration and make sure the device's port is enabled.
At the top, go to "start clients" and open "software download"
In the "Backup" tab, choose a location to save your file and hit Start, just in case you do break something
Once finished, close "software download" but leave QPST Configuration running
Open QXDM Professional
Under Options->Communications, make sure your phone is set "active" then set "target port" to the port it's on, then press OK
Go to NV Browser in the dropdown on the upper left.
Scroll down to 06828 :"nv_lte_bc_config_type.lte_bc_config"
Press READ and save this value somewhere in case you forget which bits you set! Mine was: 2061584302293
It's little-endian, and I wanted to flip bits from 0 to 1 to enable bands {2} and {4}, so I added 2^({2}-1)+2^({4}-1) = 10 to get a value of 2061584302303
Enter your new value in the "value" field and press "write"
Now, scroll down to the corresponding LTE prefs value at 65633
Read again. This should be the same number you had before, in hexadecimal format. Mine was 0x1E0000000D5, so to add B2 and B4 (Combined value 0xA), I changed it to 0x1E0000000DF
Again, enter your new value in the "value" field and press "write"
I doubt this requires any sort of "safe shutdown," but I hit "offline" then closed QXDM, then closed QPST, then rebooted the phone.
For a quick test, you can set network preferences to "LTE ONLY" by going to the dialpad and hitting *#*#INFO#*#*, then selecting your SIM card and using the dropdown in there. Mine was preferring HSPAP because the signal was stronger, even though the data was blocked.
Further testing I want to do when I get the bootloader unlocked again:
Use an app that shows what bands are in use to prove I'm on B2 or B4
Try disabling bands I will never use that have similar frequencies to the bands I want to see if signal improves
TWRP ZIPs
These zips are meant to be flashed with TWRP with a specific order. Before flashing any zip make sure you have taken full backup of your device partitions using TWRP.
1. no-verity-opt-encrypt: https://build.nethunter.com/android-...y-opt-encrypt/
Also called as dm-verity disabler/lazy flasher
"dm-verity" is a feature in the MIUI kernel which checks and prevents the phone from booting normally if you modify the phone. (e.g. flash TWRP)
To prevent that, you need to flash the dm-verity disabler zip which removes dm-verity check and also decrypts the /data partition so that you can boot into MIUI normally.
Else you can flash a custom ROM immediately after flashing TWRP which removes the MIUI system and kernel
2. Xiaomi.EU ROM Patch: https://forum.xda-developers.com/mi-...hange-t3656296
You need to install Xiaomi.EU ROM before installing these zips via TWRP.
MIUI to Google Apps: Replaces default MIUI apps with Google apps.
Google Now/Pixel Launcher: Replaces stock MIUI launcher and enables Google Assistant via build.prop tweak.
DPI changer: Change values from stock 440 (low res, bigger) to 325 (high res, smaller).
What does It mean??
Hey guys,
So recently I tried a few custom roms and noticed that the steps for all roms are slightly diffferent and that confused. Hence decided to try everything available and come to a easiest step by step conclusion:
Steps :
At the time of writing this guide I was on codeworkx universal TWRP running stock OOS 4.7.6 with Magisk 15.2. But the steps would work from any rom to any rom.
1) Flash codeworx universal TWRp from here : https://goo.gl/yXx2sK
2) Boot into twrp and using your pattern/pin decrypt data, yes thats the good part no matter if you are on stable or custom be it android 7.1.1/8.0/8.1 this recovery is able to decrypt all roms.
3) Make a nandroid backup and copy all contents of your internal storage to a pc/ choose the backup method of your choice.
4) Make sure you have at least 50% battery charged.
5) In twrp go to wipe . format data type yes and tick
6) Reboot to recovery
7) Perform a factory reset also wipe internal storage.
8) While in twrp copy the rom and firmware and gapps to your phone
9) Flash first the firmware if needed by the rom, then flash the rom and then gapps and then dm verity zip if needed by the rom. Wipe cache and dalvik. (note if you are flashing a stock rom please flash magisk and then make the first boot otherwise TWRP will be erased)
10) Boot into rom and set it up
11) Flash magisk or supersu if needed.
Heres a step by step video :
Credits :
@Funk Wizard
@codeworkx
xda developers
lineage os
team twrp
oneplus
Please note : Do this at your own risk. I would not be responsible for any damage.
If I have missed any names please PM me I will ensure i add it.
Why all this codeworx TWRP hype all of the sudden? Bluspark has never let me down yet. What is the difference between the two?
It's good if you add DM verity to the list as "if needed" because certain custom ROMs require it.
I'll be looking at this thread at some point in the future. Thanks.
Anyone followed the above and have comments to make ?
after flash any rom black screen and blue LED
any help
It's been a year already since I checked this sub and I am still using the TWRP that flickers and is chinese. Is there like an upgraded version for our device? Specifically for the non elite variant US version?
I think I might have screwed my phone because after I flashed a new rom(RR) my internal storage won't mount on recovery and when I connect it to pc. But I can see it in my phone when I'm on system(thank god) This is weird because I have not put any security lock on my phone before backing it up. So I am assuming that I need to update my TWRP to something latest to solve this issue, but I haven't been keeping up to this sub, i don't know if there's a newer compatible of TWRP.
And I also forgot why I did not went with the official one from TWRP. Maybe because it messes up the bootloader? or something like that, forgot since it's been a year already and I remember reading into a guide to use the chinese twrp.
[Solved]
If this happens to your device and you happen to use the chinese screen flicker fest TWRP, just go on and flash the latest official TWRP for our device. And you're going to be able to see your internal storage again.
you can either flash it ADB or from your recovery, but I flashed mine through TWRP
drckml said:
It's been a year already since I checked this sub and I am still using the TWRP that flickers and is chinese. Is there like an upgraded version for our device? Specifically for the non elite variant US version?
I think I might have screwed my phone because after I flashed a new rom(RR) my internal storage won't mount on recovery and when I connect it to pc. But I can see it in my phone when I'm on system(thank god) This is weird because I have not put any security lock on my phone before backing it up. So I am assuming that I need to update my TWRP to something latest to solve this issue, but I haven't been keeping up to this sub, i don't know if there's a newer compatible of TWRP.
And I also forgot why I did not went with the official one from TWRP. Maybe because it messes up the bootloader? or something like that, forgot since it's been a year already and I remember reading into a guide to use the chinese twrp.
Click to expand...
Click to collapse
Stop reading out of date articles, and use the latest Twrp here: https://twrp.me/leeco/leecolepro3.html
The Chinese bootloader issue is no longer an issue
* So to be clear about you issue you cannot boot to recovery.
* You do see you phone when you connect it to the computer...Right?
* BTW, I also have an X727
Your issue is most likely due to corruption and encryption
Backup whatever data you can and then use the All in One ( "AIT " ) tool to remove encryption ( NOTE: this is going to erase your data.
Next Using AIT install Twrp and magisk 17.1 or the easier way to resolve this may be to temporarily go back to stock.
Option 1
Try flashing the latest Twrp and magisk 17.1, using either ADB or AIT
After flashing boot into TWRP recovery
1. Go to "Wipe" and then to "Advanced Wipe".
2. Mark "Dalvik / ART Cache", "System", "Data" and "Cache".
3. "Swipe to Wipe" and proceed back the main menu.
4. Go to "Install".
5. Select the ROM zip file and then press "Add more Zips" and select the Gapps zip file, and then the Magisk file.
6. "Swipe to confirm Flash" and wait for some time.
7. After the flashing is finished, just reboot to recovery, check boxes to keep Twrp installed
8. Boot to system go through setup.
Option 2
You could flash my Recovery which includes Twrp and Root. ( Instructions at Link Below)
Afterwards you will be able to update the Twrp, and Root, then Flash whatever you want.
Le Eco Pro 3 X727 Twrp Backup : Clean Full Stock X727 recovery EUI 5.8.21s
https://forum.xda-developers.com/showpost.php?p=75021582
Option 3
Use All in One tool to restore my recovery, Flash a Stock Rom , or simply Flash TWRP/ROOT and then your Rom> Gapps> Magisk once again > Reboot to Recovery ( Check Boxes, for Twrp manager installation) Reboot to recovery > do not choose to make you drive read only! Clear Cache ( Not Dalvik) Reboot to system > Finished.
However, there is a faster way: @mauronofrio created a tool called: "TOOL ALL IN ONE"" and its great!
https://forum.xda-developers.com/and...ctory-t3358711
Its an excellent tool for keeping your drivers and adb up to date. Plus it will give ADB system wide privileges.
Mauronofrio's tool can also unencrypt your storage
After install the All in One Tool
Make sure to check for the AIT program for updates, to the tool itself and to ADB.
Next, click button to allow ADB privileges system wide.
Get more information here:*https://toolaio.tk**
XDA page for Le pro 3 : https://forum.xda-developers.com/le-...1#post71627491
* The all is one tool is excellent and you can use it to install everything you want.
* You can use it to unlock the bootloader.
* Remove Encryption
* Install TWRP,
* Install your Rom, Gapps and Magisk etc.
* The tool will also update your existing installation of ADB, Android Drivers, and provide system wide ADB privileges.
Of course use ADB or AIT once the phone is restored but you would be better off buying an OTG adapter and a USB 3.0 USB Flash drive. This way you can quickly make changes on the fly. I recommend buying at least 32GB usb 3.0 drive. Absolutely, the OTG adapter is the best method, because you will have all of your files available for quick installation and you can make numerous nandroid backups of your favorite rom installations. So If you get bored with one Rom, you can quickly restore another Rom in 5 to 10 minutes.
Again , if you do not use an OTG drive. Just use ADB or AIT for flashing your files, the steps are same as with any other phone.
Finally, look past any typos, I don't have time to proofread after spending so much time on a single post.
Thanks for the detailed response!
my issue was, I can go to recovery but it is not mounting my internal storage. It was showing as 0mb. I am aware that this is usually happens when you encrypt your device and back it up in the recovery and try to restore. But I never put any encryption on my device let alone it doesn't even ask me for a password when I am on the recovery. Anyway, I solved it by just flashing the latest official TWRP on our device. And I'm glad that I am finally away from the buggy chinese twrp.
I was just worried if there was any dangers on flashing the official latest twrp because I am seeing a lot of people getting bricked. So much for the halfassed allowing us to unlock our bootloader in this device by leeco.
Anyway, I really appreciate all that detailed guide. I will keep them in reference in the future.
drckml said:
Thanks for the detailed response!
my issue was, I can go to recovery but it is not mounting my internal storage. It was showing as 0mb. I am aware that this is usually happens when you encrypt your device and back it up in the recovery and try to restore. But I never put any encryption on my device let alone it doesn't even ask me for a password when I am on the recovery. Anyway, I solved it by just flashing the latest official TWRP on our device. And I'm glad that I am finally away from the buggy chinese twrp.
I was just worried if there was any dangers on flashing the official latest twrp because I am seeing a lot of people getting bricked. So much for the halfassed allowing us to unlock our bootloader in this device by leeco.
Anyway, I really appreciate all that detailed guide. I will keep them in reference in the future.
Click to expand...
Click to collapse
That's great!
In the future
If you have an encryption issue again, and you have latest tarp and magisk.
Just format storage and reboot to recovery, then wipe and issue will be resolved.
Hi,
I'm sure someone else will have had my problem but I can't seem to find a straight forward solution.
I am wanting to upgrade my Samsung S7 Edge, SM-G935F Exynos, to the latest Lineage OS with Android 10 as Samsung are no longer supporting my phone. The phone is unlocked as supplied from Samsung.
I downloaded Odin v3.14 and successfully flashed TWRP 3.4.0.0 hero.2lte.img.tar. I activated Developer Options and OEM unlock before flashing.
I can enter TWRP but am unsure what I do regarding the Unmodified System Partition options on the 1st TWRP screen so I hit 'Keep Read Only' and then 'Reboot' only to find that the phone attempts to restart, I see the Samsung Galaxy S7 Edge splash screen which then goes off and restarts again repeatedly, so I can't check if all my data etc. is ok on the phone. I did back up Whatsapp and made s Smart Switch backup too but forgot to do Samsung & Google account backups before the flashing.
I'm assuming I've missed something out in the flashing procedure but am not sure of exactly what. I have previously flashed and upgraded Galaxy S3, S3 Mini & a Tab2 10.1 using earlier TWRP versions so it's not that I'm a total beginner. I also tried to do a rom backup via TWRP but that failed and also a wipe Dalvik cache but that also failed.
Please advise:
1. what I've done wrong if anything?
2. Best way to restore the phone without losing existing data if possible perhaps with stock rom flashing? I could try the Smart Switch Emergency Software recovery & Initialisation but I understand that resets the phone to Factory settings loosing all data.
3. Procedure to flash Lineage rom that's 'idiot proofed'?
Thanks in advance.
rebgershon said:
Hi,
I'm sure someone else will have had my problem but I can't seem to find a straight forward solution.
I am wanting to upgrade my Samsung S7 Edge, SM-G935F Exynos, to the latest Lineage OS with Android 10 as Samsung are no longer supporting my phone. The phone is unlocked as supplied from Samsung.
I downloaded Odin v3.14 and successfully flashed TWRP 3.4.0.0 hero.2lte.img.tar. I activated Developer Options and OEM unlock before flashing.
I can enter TWRP but am unsure what I do regarding the Unmodified System Partition options on the 1st TWRP screen so I hit 'Keep Read Only' and then 'Reboot' only to find that the phone attempts to restart, I see the Samsung Galaxy S7 Edge splash screen which then goes off and restarts again repeatedly, so I can't check if all my data etc. is ok on the phone. I did back up Whatsapp and made s Smart Switch backup too but forgot to do Samsung & Google account backups before the flashing.
I'm assuming I've missed something out in the flashing procedure but am not sure of exactly what. I have previously flashed and upgraded Galaxy S3, S3 Mini & a Tab2 10.1 using earlier TWRP versions so it's not that I'm a total beginner. I also tried to do a rom backup via TWRP but that failed and also a wipe Dalvik cache but that also failed.
Please advise:
1. what I've done wrong if anything?
2. Best way to restore the phone without losing existing data if possible perhaps with stock rom flashing? I could try the Smart Switch Emergency Software recovery & Initialisation but I understand that resets the phone to Factory settings loosing all data.
3. Procedure to flash Lineage rom that's 'idiot proofed'?
Thanks in advance.
Click to expand...
Click to collapse
1] You didn't formatted /data and/or flashed magisk or supersu after booting into twrp first time.
Note that you need to format /data under wipe in twrp and type yes and then again reboot in twrp. This is necessary step to disable encryption. And after that flash magisk without any reboot or flash your required rom by following your respective rom thread.
Please note that keeping system read only will cause you to flash in systemless root mode like magisk or super su in systemless mode. There is no difference between normal root mode and systemless root mode except that you will need to allow system modifications in twrp in normal root which will in turn trigger dm verity check and you will need to flash no verity zip to make phone bootable when system modification method (normal root) is selected. Plus system modification will cause certain apps to detect root easily plus increasing complications like I said above. So just keep read only and flash magisk and you will get root in systemless mode without any cons !
Here, you said you're getting a verification screen after rebooting twrp..
This can be caused either by.
1. Not formatting /data after booting twrp for first time
2. Not flashing magisk after formatting /data
3. Enabling system modifications and not flashing no verity zips/magisk
4. Oem unlock is not enabled..
2] You cannot restore data if you didn't back it up before messing with it, or you made a titanium backup/twrp backup.
Smart switch cannot flash phone anymore ..
Yes, flashing stock firmware using home_csc in odin, will not delete data and may restore your phone, but no guarantee that it will work, you can try though. Thats why its strictly advised to do backup before messing your phone in anyway..
3. Pls refer or ask in your respective rom thread.
Sent from my hero2lte using XDA Labs
shah22 said:
1] You didn't formatted /data and/or flashed magisk or supersu after booting into twrp first time.
Note that you need to format /data under wipe in twrp and type yes and then again reboot in twrp. This is necessary step to disable encryption. And after that flash magisk without any reboot or flash your required rom by following your respective rom thread.
Please note that keeping system read only will cause you to flash in systemless root mode like magisk or super su in systemless mode. There is no difference between normal root mode and systemless root mode except that you will need to allow system modifications in twrp in normal root which will in turn trigger dm verity check and you will need to flash no verity zip to make phone bootable when system modification method (normal root) is selected. Plus system modification will cause certain apps to detect root easily plus increasing complications like I said above. So just keep read only and flash magisk and you will get root in systemless mode without any cons !
Here, you said you're getting a verification screen after rebooting twrp..
This can be caused either by.
1. Not formatting /data after booting twrp for first time
2. Not flashing magisk after formatting /data
3. Enabling system modifications and not flashing no verity zips/magisk
4. Oem unlock is not enabled..
2] You cannot restore data if you didn't back it up before messing with it, or you made a titanium backup/twrp backup.
Smart switch cannot flash phone anymore ..
Yes, flashing stock firmware using home_csc in odin, will not delete data and may restore your phone, but no guarantee that it will work, you can try though. Thats why its strictly advised to do backup before messing your phone in anyway..
3. Pls refer or ask in your respective rom thread.
Thanks for your reply Shah though I'm still a bit confused by it.
UnIock OEM was enabled as was USB debugging.
Fortunately, I was able to reflash the stock rom and phone is working again but what sort of backup are you indicating in part 2. above), NAND, Smartswitch or just back up to google, Samsung & Whatsapp accounts?
In 1). of your reply you say 'You didn't formatted /data and/or flashed magisk or supersu after booting into twrp first time.
Note that you need to format /data under wipe in twrp and type yes and then again reboot in twrp. This is necessary step to disable encryption. And after that flash magisk without any reboot or flash your required rom by following your respective rom thread.'
I thought that if I do format /data my data would be lost and I want to make a NAND backup of the existing rom and data before flashing/modifying but if that doesn't loose the data, I assume then the steps are as follows:
1. Flash TWRP with Odin
2. Boot into Recovery-TWRP
3. Tap on the Read Only button on the 1st TWRP screen
4. Format /data under wipe in TWRP and tap yes and then reboot in TWRP. - Do you mean reboot the phone into TWRP of just go back into the TWRP main menu & when do I make the NAND backup?
5. Flash magisk or supersu from SD card no reboot
6. Flash Lineage OS rom from SD card.
7. Reboot.
Please correct any errors above as I've now tried 3 times since my original post without success but always managed to reflash the stock rom to get me going again.
Click to expand...
Click to collapse
rebgershon said:
Thanks for your reply Shah though I'm still a bit confused by it.
Click to expand...
Click to collapse
Thats why you read forums again and again and unless you are sure and know what you're doing, don't proceed with these things and read again.
rebgershon said:
UnIock OEM was enabled as was USB debugging.
Fortunately, I was able to reflash the stock rom and phone is working again but what sort of backup are you indicating in part 2. above), NAND, Smartswitch or just back up to google, Samsung & Whatsapp accounts?
Click to expand...
Click to collapse
Upto you which backup you prefer, saving data on separate storage is the main goal as rooting and flashing custom rom would erase all your data from phone.
rebgershon said:
I thought that if I do format /data my data would be lost and I want to make a NAND backup of the existing rom and data before flashing/modifying but if that doesn't loose the data, I assume then the steps are as follows
Click to expand...
Click to collapse
What you mean exactly ? What doesn't loose the data ? Flashing custom rom first time/rooting always erases your data and yes you need to backup before flashing/modifying.
rebgershon said:
1. Flash TWRP with Odin
2. Boot into Recovery-TWRP
3. Tap on the Read Only button on the 1st TWRP screen
4. Format /data under wipe in TWRP and tap yes and then reboot in TWRP. - Do you mean reboot the phone into TWRP of just go back into the TWRP main menu & when do I make the NAND backup?
5. Flash magisk or supersu from SD card no reboot
6. Flash Lineage OS rom from SD card.
7. Reboot.
Click to expand...
Click to collapse
In step 4. Reboot again in twrp after formatting /data.
When do you make nand backup?? Lol, at this point your phone would have nothing to backup, you should have made a backup the first time you tried modifying your phone. Because flashing stock rom like you said you did many times, already formats the phone.
If you mean you want to backup your phone again, then you can't backup in twrp in this stage. Backup before flashing twrp through any means.
Step 5 is correct, I don't know about step 6. I never flashed lineage and have no experience about it. Pls refer lineage's respective rom thread for exact steps. Good luck
Sent from my hero2lte using XDA Labs
shah22 said:
Thats why you read forums again and again and unless you are sure and know what you're doing, don't proceed with these things and read again.
Upto you which backup you prefer, saving data on separate storage is the main goal as rooting and flashing custom rom would erase all your data from phone.
What you mean exactly ? What doesn't loose the data ? Flashing custom rom first time/rooting always erases your data and yes you need to backup before flashing/modifying.
In step 4. Reboot again in twrp after formatting /data.
When do you make nand backup?? Lol, at this point your phone would have nothing to backup, you should have made a backup the first time you tried modifying your phone. Because flashing stock rom like you said you did many times, already formats the phone.
If you mean you want to backup your phone again, then you can't backup in twrp in this stage. Backup before flashing twrp through any means.
Step 5 is correct, I don't know about step 6. I never flashed lineage and have no experience about it. Pls refer lineage's respective rom thread for exact steps. Good luck
Sent from my hero2lte using XDA Labs
Click to expand...
Click to collapse
Thanks again Shah for your reply/help.
I followed the instructions and got the lineage rom installed and Gapps but I don't think Gapps installed properly as I wasn't able to restore any of the saved data from my google account and it wouldn't allow me to add any other accounts except email so for now I've restored the stock rom and my data.
Is there another Android 10 rom you can recommend besides lineage that will have a similar appearance to Samsung?
rebgershon said:
Thanks again Shah for your reply/help.
I followed the instructions and got the lineage rom installed and Gapps but I don't think Gapps installed properly as I wasn't able to restore any of the saved data from my google account and it wouldn't allow me to add any other accounts except email so for now I've restored the stock rom and my data.
Is there another Android 10 rom you can recommend besides lineage that will have a similar appearance to Samsung?
Click to expand...
Click to collapse
I don't recommend any rom except a stock rooted debloated one.. (like Alexndr's devbase)
Reason : because full custom roms have a high chance to mess up your phone's efs and permanent soft brick issues.
But, I'm in love with infinity wallpapers, dark mode and android 10 in general like all others these days.. so if you really want samsung android 10 for S7 edge, then Floyd V4 is your best bet.. see on rom and software developer section of s7 edge to find floyd v4. Its a s9 android 10 one ui 2 port...
Personally, I'm using latest alexndr's devbase rom. Because I'm still paranoid about fully custom or ported roms
Alexndr's devbase is a full stock oreo - debloated rom. Which has option to root during flashing in twrp too. Its perfect for my needs.
But maybe soon, I will change to Floyd v4 to experience the future.. who knows
Sent from my Legendary Hero2LTE using Tapatalk
shah22 said:
I don't recommend any rom except a stock rooted debloated one.. (like Alexndr's devbase)
Reason : because full custom roms have a high chance to mess up your phone's efs and permanent soft brick issues.
But, I'm in love with infinity wallpapers, dark mode and android 10 in general like all others these days.. so if you really want samsung android 10 for S7 edge, then Floyd V4 is your best bet.. see on rom and software developer section of s7 edge to find floyd v4. Its a s9 android 10 one ui 2 port...
Personally, I'm using latest alexndr's devbase rom. Because I'm still paranoid about fully custom or ported roms
Alexndr's devbase is a full stock oreo - debloated rom. Which has option to root during flashing in twrp too. Its perfect for my needs.
But maybe soon, I will change to Floyd v4 to experience the future.. who knows
Shah,
Many thanks for the recommendation of the FloydQ rom.
I installed it yesterday after making all backups inc. Smartswitch.
Very easy to install both from flashing and Aroma installation viewpoints. Ran 1st time without a glitch and phone now thinks its an S9+ running Android 10 a la Samsung. I even managed to transfer my Smartswitch backup to my wife's old S7 Edge and then used Smartswitch to transfer from that phone to the 'S9+'.
Only glitch was logging into my Samsung account but sorted that as well so all in all very happy so far.:good:
Click to expand...
Click to collapse