[GUIDE] [Q&A] [TREBLE] From Stock to Treble - everything you need to know! - Xiaomi Mi A1 Guides, News, & Discussion

Here I will share all the info you need to know about using Treble on the Mi A1. Everyone is more than welcome to ask questions and clarification here, I am happy to answer and will update this thread over time. Thanks!
Contents
0. Key Terms
1. Restoring to Stock
-- 1.1. Requirements
-- 1.2. Full-device backup
-- 1.3. Stock restore process
2. "Treblize" (repartition) the device
3. Your first Treble ROM install
4. Installing AIO's, GSI's, Vendors and More
-- 4.1. Install a Treble AIO
-- 4.2. Install a Treble GSI
-- 4.3. Install/update a Vendor Pack
-- 4.4. Install a non-Treble ROM
-- 4.5. Restore a TWRP backup
5. Mods and Extras [Gapps, Magisk, custom kernels, etc.]
6. FAQ and Troubleshooting
----------------------------------------------
0. Key Terms
Throughout your Treble adventures, you may see lots of new terms. Here I will explain them all. This is essential reading!
Treble
Treble is the broad term of a new Android architecture model of splitting the system into two partitions:
System: where the Android OS goes, i.e. Oreo or later operating system;
Vendor, where the device-specific files go, such as drivers.
Before Treble, both the Android OS and device-specific files would live together on system. See below for a more detailed description of Vendor.
"Treblizing"
May also be called Treble-enable, Treble-conversion or some variation of that. This is the process of converting a non-Treble device to a Treble-capable one, unofficially, by changing the partition map of the device. This involves shrinking an existing partition - such as userdata or system in the case of the Mi A1 - in order to create a new vendor partition - or two vendor partition in the case for our Mi A1, one for each slot. Treblizing is just the preparation stage - you still need an AIO installation (see AIO below) before you are actually able to use a Treble ROM.
Vendor
Also known as Vendor Pack or Vendor Image. In the context of Treble, this is a standalone vendor image (either as a ZIP or usually as an IMG) that can be flashed to your Treble-enabled device for it to be compatible with a Treble system/ROM. These are similar to a kernel in the way that they are flashed to their own partition on your device and are compatible with many Treble ROM's. They are also similar to a kernel in that they are made specifically for one device to provide the low-level functionality of the system. It mostly includes drivers, but can also include apps and overlays that are automatically added at runtime to the Android OS that's living on System.
Treble developers for the Mi A1 may release standalone "vendor.img" for use on other ROM's - usually GSI's (see description of GSI below) but they are also part of an AIO (see description of AIO below).
GSI
Stands for "Generic System Image". This concept, introduced and developed by @phhusson is the creation of a System image that is device-agnostic - that is, it is a ROM that is designed to work with an existing Treble device, as long as the device has a GSI-compatible Vendor and kernel installation. For devices with official Treble support, phhusson makes the effort to try and adapt his GSI system for compatibility - but for unofficial Treble device like the Mi A1, it's our (tissot developers) responsibility to make a Vendor/Kernel that is as GSI-compatible as possible.
AIO
Stands for "All In One". This is a Treble firmware that includes a Kernel, System and Vendor image in the one ROM ZIP. This provides an all-in-one Treble experience through a device-specific Treble ROM. AIO's are designed to work well with their own ROM but should also strive to be compatible with a GSI.
An explanatory chart of Key Terms
{
"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"
}
Click here for full size image.
Ignore this spoiler (coded link to thumbnail because XDA thread edit breaks the IMG link)
Code:
https://img.xda-cdn.com/ic22y2zu5yi9EClrY11FS8FU5C0=/https%3A%2F%2Fimg.xda-cdn.com%2FU8u8IdA66PAFHOM4PsKNQbFHwSA%3D%2Fhttps%253A%252F%252Fimg.xda-cdn.com%252Fo1fMEJDyu5x7pv2B9KB323i8_IA%253D%252Fhttps%25253A%25252F%25252Fthumbs2.imgbox.com%25252Fd7%25252Fc2%25252FDxa93pOz_t.png
----------------------------------------------
1. Restoring to Stock
For the sake of consistency, I highly recommend everybody revert to a clean stock state. This ensures that as many of us are coming from the same place to eliminate inconsistency with reported bugs. If you're impatient or experienced though, feel free to skip this - but if you have issues, be sure to try again from here before asking for help.
Note that this will also restore you to the stock partition map, i.e. before "Treblizing".
1.1. Requirements
Unlocked bootloader and EDL access/drivers. See FAQ at bottom of this post for details on EDL.
Modern fastboot binary - it needs the "--set-active" option. Check with fastboot --help to see if it's listed in the usage.
Latest/recent official firmware package. Recommended "V.9.5.10.0.ODHMIFA" only because it's what I used, if you're not sure - but anything newer should be fine too.
Recent MiFlash version. I used 7.4.25 which can be downloaded from here.
1.2. Full-device backup
HIGHLY RECOMMENDED. While all this is relatively safe (as safe as device modding can be), I cannot be held responsible for any data loss or bricks. You can make a Low-Level backup with my tool here. You can use the "skip-systems-and-userdata" partition list to save time, since those can be backed up in TWRP anyway. This is here mostly as a failsafe.
Also backup your internal storage files. The Treblizing process may wipe your internal storage.
1.3. Stock restore process
Flash latest firmware (V.9.5.10.0.ODHMIFA at time of writing) in EDL mode with MiFlash. This will wipe your device (including Internal Storage) and restore stock partition map. This could take a while.
Optional: If Wifi is broken (you can check by booting ROM), flash the "tissot_images_V.9.5.10.0.ODHMIFA___persist-only" in MiFlash under EDL, attached. Just extract the ZIP and browse to the folder in MiFlash. You can replace the persist.img from official V.9.5.10.0.ODHMIFA or another ROM if you want to be sure it's genuine. Credits to @AlexAiS for discovering this.
Remember - you backed up your original persist.img in step 1 anyway, so this is not risky.
I am not sure how this works exactly. It seems MiFlash in EDL is able to re-build a MAC address while flashing the persist. I don't know where this MAC comes from though.
----------------------------------------------
2. "Treblize" (repartition) the device
If you looked at the chart, you'll know that this is just the first step. You will need to actually install an AIO ROM after this part. This is a ONE TIME PROCESS for getting Treble capability on your device.
Repartitioning is relatively painless ever since I created TWRP with Treble Manager. Read on for a walkthrough.
Fastboot boot to TWRP with mohancm's recovery img (i.e. recovery-3.2.1-1) if you don't already have TWRP installed. Do not get the installer - we're using the one with Treble Manager instead.
Install the latest TWRP with Treble Manager (v1.2 at time of writing, but of course latest version is best) then Reboot Recovery to actually load it. Be sure to read about TWRP with Treble Manager in that thread to understand how it works. If you have any questions specifically about the TWRP and Treble Manager, please ask in that thread.
Format Data in Wipe menu (to remove Stock encryption), then Reboot Recovery again (maybe not necessary but it can't hurt).
In TWRP, go to Advanced > Treble Manager and repartition the device by following the wizard. Userdata shrink is recommended, as per the in-menu description explaining this. Just try the Treble Manager and see yourself - it will ask you one last time before repartitioning so don't worry about it wiping without warning. Alternatively, you can just check the screenshots.
After finished it will reboot TWRP. You are now ready for installing a Treble AIO (and then a GSI, if desired), but be sure to still read on, especially the next section below (there is a known issue that you need to work around - otherwise a bootloop will occur).
----------------------------------------------
3. Your first Treble ROM install
THERE IS AN IMPORTANT STEP THAT MUST BE FOLLOWED HERE WHEN INSTALLING YOUR FIRST TREBLE ROM. FAILURE TO FOLLOW THESE INSTRUCTIONS WILL RESULT IN A BOOTLOOP.
Make a note of the current slot (in Reboot menu). If you followed this guide from Section 1, you should be in Slot A. If you're not, just swap any mention of Slot A and B in these steps.
Download a Treble AIO ROM (such as RR Treble Experimental) and flash in TWRP. This is required even if you want to use a GSI, since it has the required Vendor Pack and Kernel.
Immediately install TWRP with Treble Manager again, as you usually do, to re-inject TWRP into the new ROM boot image.
Reboot Recovery, NOT SYSTEM.
Confirm in Reboot menu that the device has successfully switched to Slot B. If it is still stuck in Slot A, this is a one-time bug that must be solved now - if you do not fix this then you will just bootloop.
If it is still stuck in Slot A, you must reboot to fastboot (make sure you have a current version, as explained in Section 1.1. "Requirements") and manually run the command:
Code:
fastboot --set-active=b
...after doing this once, slot switching should work fine in TWRP again. You should never have to do this again (unless you go back to stock then re-Treblize again).
In case you didn't know, all ROMs for our Seamless device actually install into the *other* slot that isn't currently active - that's why you always need to Reboot Recovery first before installing Magisk or Gapps and such.
I advise users from now on to keep an eye on their Slot switching whenever you install an AIO ROM to make sure it worked. If it happens again after these steps, please report it to me with as much details as possible (we're still trying to figure out this bug).
After following these steps, you should be able to flash Treble ROM's just as you would a normal ROM from now on. Your Treble transformation is complete. But read on for more help and walkthroughs if you need it.
----------------------------------------------
4. Installing AIO's, GSI's, Vendors and More
Assuming you followed Section 3 above, you are now ready to install anything as usual. But some users have expressed confusion about what they can and can't do from this point, so I will give you some example choices here.
4.1. Install a Treble AIO
At the time of writing this guide, currently the only Treble AIO is the RR Experimental build. If or when others come along, you can just install them like normal ROMs. We already did this in Section 3 above, but here is a simplified summary of that process:
Flash the AIO ROM in TWRP with Treble Manager 1.2+ - do NOT reboot
Immediately reflash TWRP with Treble Manager 1.2+ so you get the Treble-compatible TWRP back
Factory Reset if it's a different ROM, as you usually would in this case.
Make a note of which slot you are on right now
Reboot recovery
Make sure your device has now swapped to the other slot by checking the reboot menu. If it has not, you will need to repeat the fastboot --set=active step as explained in Section 3. (I don't know if this is necessary again - but I just want to warn users to be aware of this known bug)
Now that the slot has changed, you can install Gapps, Magisk and/or whatever other compatible additional mods you want.
4.2. Install a Treble GSI
You may remember from earlier that the Treble GSI's are just System images that use your existing Vendor and Kernel. We already have a Treble kernel and Vendor from an AIO (Section 3 or Section 4.1. above), so this is quite simple:
Download any GSI/Phh-Treble ROM's from the Treble-Enabled Device Development section and copy the IMG to device
Make sure your current slot is a Treble ROM slot (i.e. existing AIO or GSI working). Unlike AIO/ROM ZIP flashing, image flashing installs it to the CURRENT slot.
Flash the IMG to "System Image" in TWRP with Treble Manager 1.2+
Factory Reset if you're changing ROM's
Install any other mods (Gapps, GSI-compatible Magisk [i.e. 16.4 beta or later], etc.). You may need to boot the ROM once before installing any mods - this varies per GSI. Some existing mods may also be outright incompatible with the GSI.
Reboot
Note that since this is only a System image, there is no need to reinstall TWRP or Reboot Recovery.
4.3. Install/update a Vendor Pack
While you're on a current and working AIO or GSI slot, you can flash a vendor.img to update the driver/device level stuff for that ROM. This could be done to e.g. fix the Camera. This is useful if you're running a GSI.
Download a vendor.img from your AIO or Vendor Pack provider (e.g. RR AIO Experimental) and copy the IMG to device
Make sure your current slot is a Treble ROM slot (i.e. existing AIO or GSI working). Unlike AIO/ROM ZIP flashing, image flashing installs it to the CURRENT slot.
Optionally make a TWRP backup of Vendor (or more) if you want to be careful and it's your daily (I always do).
Flash the IMG to "Vendor Image" in TWRP with Treble Manager 1.2+
Reboot
Note that since this is only a System image, there is no need to reinstall TWRP, Reboot Recovery or install any Mods (Gapps, Magisk, etc) UNLESS it's a Vendor mod (as of time of writing, no Vendor mods exist yet).
4.4. Install a non-Treble ROM
This is simple, same as you're used to before Treblizing. But do note that this is only possible if you chose to resize Userdata when repartitiong with Treble Manager.
Download the ROM to your device
Optional - make sure the active slot is one with a Treble AIO/GSI ROM already - remember that ROM ZIPs install to the OTHER slot, not the currently active one; so this way you can easily switch back to the Treble ROM just by doing a Factory Reset (or TWRP restore of Data) and slot switch.
Factory reset
Install the ROM as per usual procedure (Install ZIP, reflash TWRP with Treble Manager 1.2+, reboot recovery to allow slot switch, install Gapps + Magisk + Mods, etc., reboot).
4.5. Restore a TWRP backup
There is nothing special about restoring a backup. Even if your backup was from a non-Treble ROM, you can restore that backup on a Treblized device. Obviously, though, any Treble ROM backup can only be restored on a Treblized device.
----------------------------------------------
5. Mods and Extras [Gapps, Magisk, custom kernels, etc.]
After you have confirmed that TWRP is booting in to the correct slot (see Section 3), you're ready to install other ROMs (see Section 4) followed by mods. I did briefly go over mods in Section 4, but I'll go into more detailed info about compatibility here.
Any usual Gapps should work fine, just as long as you flash after the slot is correctly set. Note that RR Camera (GCam) requires Gapps to be installed. I used Nano, they worked fine.
Also note that some GSI's will require you to boot the system first before installing Gapps.
Custom kernels must be marked Treble compatible for our device. Specifically (info for kernel developers) this means adding slotselect flag to vendor entry in DTB, and disabling dm-verity (so we can inject vendor changes to system).
It is reported that standard Magisk will work in RR Treble ROM, but it does NOT work on GSI. You need Magisk 16.4 beta or later for GSI's. Also see the FAQ section at the end for more info on the Magisk situation.
Some other ZIP's might need updating for Treble, really unsure. Experimentation is welcome. Just be sure you make TWRP backups before testing anything, of course!
--------------------------------
6. FAQ and Troubleshooting
Q) I get "cannot receive hello packet" in MiFlash
A) Just reboot EDL mode and try again. Usually only happens if you try to flash in EDL twice in a row. See the Low-level Backup/Restore/Unbrick toolkit thread for more info about EDL.
Q) How to Magisk with Treble? What is the TWRP and Magisk interaction?
A) Best to use Magisk 16.4 beta or later, it's reported as working on GSI's. Also note that Magisk is installed to the boot ramdisk (the same place as where TWRP goes) and this has the following implications:
Whenever you flash the TWRP installer, you will need to reinstall Magisk *after* you Reboot Recovery
TWRP installer will flash to BOTH slots, but Magisk will only flash to the CURRENT slot. So if you flash TWRP installer, it may erase any Magisk install on the inactive slot.
TWRP survival (in my recent TWRP builds) backs-up and restores the whole ramdisk. This will include Magisk, if it was already on the boot slot that it backs up.
Q) EDL mode? Eh?
A) EDL mode, or "Emergency DownLoad" mode, is a low-level mode for flashing devices. It is entered by the command:
Code:
fastboot oem edl
EDL mode is used to read/write to the eMMC more directly. It is used by this tool, as well as flashing with MiFlash.
Other important notes:
You will need good QDLoader drivers. These drivers gave me the best results.
You can exit EDL mode by holding Power button for ~10 seconds. Hold with VolDn to reboot into fastboot again, as one might expect.
Make sure you use a good USB-C cable.
Sometimes the flashing process can freeze. It will always report success when done. If it freezes, you need to reboot EDL mode. Try a different USB port or cable if you keep experiencing freezes.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

can i use this persist.zip inorder to solve the wifi issue in stock rom as well as some of custom rom too?

parasnarkhede said:
can i use this persist.zip inorder to solve the wifi issue in stock rom as well as some of custom rom too?
Click to expand...
Click to collapse
Yup. Just flash a stock persist.img in EDL mode. But backup your original in case, it could erase or change your BT MAC too.

@CosmicDan thank you so much for your work on this. Quite impressive if you ask me.
Tell me just something, every time you talk about "...do this or that in EDL mode..." you mean that we have to use your backup/restore tool, right?
I'm sorry for the noob question but, despite I'm quite familiar with Android, this is my first time using a device that has "slots" and that needs to boot to TWRP in order to flash it... there's some differences from all devices I had in the past and that's making doubt some stuff.
So, anyway, I'm currently using official BETA leaked by Xiaomi (Oreo 8.1 - OPM1.171019.019.8.5.11) so do I really need to reflash stock as you suggest? I mean...it's stock, beta but stock and I've never flashed any other custom ROM (since I've read that by doing it I could have issues with WiFi after returning to stock). So, what do you think? Is it really necessary to reflash stock? My partitions are all the original ones...the only thing different is system, right?
Thank you for your time and work.

Typhus_ said:
@CosmicDan thank you so much for your work on this. Quite impressive if you ask me.
Tell me just something, every time you talk about "...do this or that in EDL mode..." you mean that we have to use your backup/restore tool, right?
I'm sorry for the noob question but, despite I'm quite familiar with Android, this is my first time using a device that has "slots" and that needs to boot to TWRP in order to flash it... there's some differences from all devices I had in the past and that's making doubt some stuff.
So, anyway, I'm currently using official BETA leaked by Xiaomi (Oreo 8.1 - OPM1.171019.019.8.5.11) so do I really need to reflash stock as you suggest? I mean...it's stock, beta but stock and I've never flashed any other custom ROM (since I've read that by doing it I could have issues with WiFi after returning to stock). So, what do you think? Is it really necessary to reflash stock? My partitions are all the original ones...the only thing different is system, right?
Thank you for your time and work.
Click to expand...
Click to collapse
EDL mode is like fastboot mode, but even lower-level.
You enter into it with:
Code:
fastboot oem edl
It is needed by my backup tool yes, but it's also used to flash in MiFlash.
Will update the guide and FAQ with this info.

How to flash the persist file attached in the op in mi flash ?
You mean replace it with the one in the stock rom fastboot files and flash the whole rom again via mi flash ?

Ahmed Al-Sayed said:
How to flash the persist file attached in the op in mi flash ?
You mean replace it with the one in the stock rom fastboot files and flash the whole rom again via mi flash ?
Click to expand...
Click to collapse
Just browse to the folder with MiFlash....

CosmicDan said:
Just browse to the folder with MiFlash....
Click to expand...
Click to collapse
Oh, you mean choose only the persist.img file then mi flash will flash it automatically to the right partition ?

Ahmed Al-Sayed said:
Oh, you mean choose only the persist.img file then mi flash will flash it automatically to the right partition ?
Click to expand...
Click to collapse
No, you don't choose the persist.img. You choose the folder. You can't even choose a file in MiFlash, it's a folder browse.
It's the exact same method of flashing anything in MiFlash

CosmicDan said:
No, you don't choose the persist.img. You choose the folder. You can't even choose a file in MiFlash, it's a folder browse.
It's the exact same method of flashing anything in MiFlash
Click to expand...
Click to collapse
Which folder ?
The folder that i extracted the persist.img (attached in the op) in ? Or the srock rom folder after i replace the persist.img (attached in the op) with the one in the rom's folder and execute flash ?

Ahmed Al-Sayed said:
Which folder ?
The folder that i extracted the persist.img (attached in the op) in ? Or the srock rom folder after i replace the persist.img (attached in the op) with the one in the rom's folder and execute flash ?
Click to expand...
Click to collapse
DONT REPLACE PERSIST IN STOCK FIRNWARE. That does LITERALLY nothing, the persist is already from stock ROM!
Just extract the persist-only ZIP, and select it in MiFlash! Don't insert extra steps that I never said!

CosmicDan said:
DONT REPLACE PERSIST IN STOCK FIRNWARE. That does LITERALLY nothing, the persist is already from stock ROM!
Just extract the persist-only ZIP, and select it in MiFlash! Don't insert extra steps that I never said!
Click to expand...
Click to collapse
Thanks !

Dear sir,
I have few questions
1. Do we need any vendor image to flash with it?
2. How to revert back to stock rom (And erase vendor partition) from treble custom rom?
3. Can we revert back to stock partition map through mi flash tool in flastboot mode or edl mode?

Hopefully someone will make video soon, so that it becomes somewhat more easy to understand.

sudipta08sarkar said:
Dear sir,
I have few questions
1. Do we need any vendor image to flash with it?
2. How to revert back to stock rom (And erase vendor partition) from treble custom rom?
3. Can we revert back to stock partition map through mi flash tool in flastboot mode or edl mode?
Click to expand...
Click to collapse
1. I don't understand the question. The vendor image is part of the Treble ROM. You can get vendor from the RR Experimental thread for example.
2. By following Section 1.1.; Step 2 alone
3. By following Section 1.1.; Step 2 alone
CosmicDan said:
2. Flash latest firmware (V.9.5.10.0.ODHMIFA at time of writing) in EDL mode with MiFlash. This will wipe your device (including Internal Storage) and restore stock partition map. This could take a while.
Click to expand...
Click to collapse

Ritik99 said:
Hopefully someone will make video soon, so that it becomes somewhat more easy to understand.
Click to expand...
Click to collapse
Or you could tell us what part you're having trouble with so I can make it more easy to understand?
I don't understand how a video would make it easier. You need to be able to understand the process - not just copy what some guy is telling you to do.

CosmicDan said:
1. I don't understand the question. The vendor image is part of the Treble ROM. You can get vendor from the RR Experimental thread for example.
2. By following Section 1.1.; Step 2 alone
3. By following Section 1.1.; Step 2 alone
Click to expand...
Click to collapse
Ok I understand, but my query is, everytime I will flashing a new treble rom, will it flash vendor partition itself?

Congratulations, can't wait to test it on my a1.
One question, how about google play certified device status? Is still verified or not?
If i choose to shrink data partition, how much left for data? My a1 have 64 gb storage.

CosmicDan said:
Or you could tell us what part you're having trouble with so I can make it more easy to understand?
I don't understand how a video would make it easier. You need to be able to understand the process - not just copy what some guy is telling you to do.
Click to expand...
Click to collapse
Yup.. that what make people say "i do it the same as instruction and bricked my devices." It is because u just copy what other ppl do and dont know what exactly u do lol... Fir me, what in text is more worth.. because it explain everithing. And the video just a guidline of what u read.

sudipta08sarkar said:
Ok I understand, but my query is, everytime I will flashing a new treble rom, will it flash vendor partition itself?
Click to expand...
Click to collapse
Yes. Well, depends.
RR Treble has Vendor included, because it needs it. GSI's are just a system image that use your existing vendor.
squallbayu said:
Congratulations, can't wait to test it on my a1.
One question, how about google play certified device status? Is still verified or not?
If i choose to shrink data partition, how much left for data? My a1 have 64 gb storage.
Click to expand...
Click to collapse
If you.can tell me exactly what "Play Certified" actually is, then I might be able to answer that question.
The TWRP with Treble Manager tells you the size change.

Related

[RECOVERY][MOD] MultiROM v33 + TWRP v3.1.1 for Xiaomi Mi MIX (lithium)

{
"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"
}
MultiROM is one-of-a-kind multi-boot mod. It can boot any Android ROM as well as other systems like Ubuntu Touch, once they are ported to that device. Besides booting from device's internal memory, MultiROM can boot from USB drive connected to the device via OTG cable. The main part of MultiROM is a boot manager, which appears every time your device starts and lets you choose ROM to boot. You can see how it looks on the left image below and in gallery. ROMs are installed and managed via modified TWRP recovery. You can use standard ZIP files to install secondary Android ROMs and MultiROM even has its own installer system, which can be used to ship other Linux-based systems.
Features:
* Multiboot any number of Android ROMs
* Restore nandroid backup as secondary ROM
* Boot from USB drive attached via OTG cable
You can also watch a video which shows it in action.​
Warning!
It _is_ dangerous. This whole thing is basically one giant hack - none of these systems are made with multibooting in mind. It is no longer messing with data partition or boot sector, but it is possible that something goes wrong and you will have to flash factory images again. Make backups. Always.​
Installation
Firstly, there are videos on youtube. If you want, just search for "MultiROM installation" on youtube and watch those, big thanks to all who made them. There is also an awesome article on Linux Journal.
Note 1: Your device must NOT be encrypted (hint: if you don't know what it is, then it is encrypted).
To decrypt your device:
Backup ALL your data if you need to recover later (TWRP backup to USB or copy to your PC)
In fastboot mode:
Code:
fastboot format userdata
In TWRP: Flash Magisk (recommended) or SuperSU to avoid auto-encryption in next boot.
MultiROM has 2 parts you need to install:
Modified recovery (TWRP). Flash it as usual TWRP (fastboot flash recovery, or any flasher app if you're rooted).
MultiROM. Install it as usual zip from modded TWRP once flashed.
Go into TWRP MultiRom settings and be sure that "Enable No-KEXEC Workaround" is enabled (enabled by default)
Your current rom will not be erased by the installation.​Adding ROMs
1. Android
Go to recovery, select MultiROM -> Add ROM. Select the ROM's zip file and confirm. As for the space, clean installation of stock 6.x after first boot takes 900+mb of space.​
Updating/changing ROMs
1. Primary ROM (Internal)
Flash ROM's ZIP file as usual, do factory reset if needed (it won't erase secondary ROMs)
Go to MultiROM in recovery and do Inject curr. boot sector.
2. Secondary Android ROMs
If you want to change the ROM, delete it and add new one. To update ROM, follow these steps:
Go to MultiROM -> List ROMs and select the ROM you want to update.
Select "Flash ZIP" and flash ROM's ZIP file.
MIUI ROM as Secondary <--- Latest versions fix this, so you shouldn't need it anymore
Install MIUI as secondary via MultiROM settings in TWRP
Boot into your (rooted) primary
Edit fstab.qcom file in /storage/emulated/multirom/roms//boot/ and add /cache partition entries:
Code:
/dev/block/bootdevice/by-name/cache /cache f2fs nosuid,nodev,noatime,inline_xattr,flush_merge,data_flush wait,check,formattable
/dev/block/bootdevice/by-name/cache /cache ext4 nosuid,nodev,noatime,barrier=1 wait,check,formattable
Alternatively you can use attached file "fstab.qcom.txt" (rename to: fstab.qcom without .txt ). Be sure to set proper permissions (copy from original fstab.qcom, after renaming to fstab.qcom.bak, don't delete it...)
DON'T FORGET to flash Magisk / SuperSU after flashing to avoid re-encryption if you're flashing stock (not modded).
Known issues
You must wait a few seconds (3-5) before you get touch screen responsiveness in TWRP and MultiROM. (fixed by 2017.08.01 build) -- USUAL WHEN SWITCHING FROM MIUI
Some FCs on some secondary ROMs: Try using multiromfix.zip, thx to @Startrek852 (to disable sdcardfs support in that secondary) -- USE MAGISK 13.5+
Issues with TWRP to boot on 4GB/128GB model... (Working on troubleshooting...) -- PRELIMINARY FIX HERE
Reporting issues
As you surely understand, a simply "it does NOT work" is not enough... so please, report your issue describing scenario as much as you can, try following this (as much as possible information is welcome, it's very tiring for me asking what this, what that, etc...):
Issue description (what, how, when, etc...)
Device model : 4GB or 6GB RAM
Decrypted? /cache and /data FSs ? (We assume IS decrypted becaues you're using MultiROM, and EXT4 FS for /cache and /data if you don't know or manually formatted to F2FS)
TWRP version + MultiROM version
Primary ROM (name, better with version)
Firmware version
Secondary ROM (the one with the issue, name and better version)
Custom kernel ? (name and version if so) <--- In theory, we shouldn't support scenarios with custom kernels.... (they can touch system stuff that make things more complex)
Xposed ? <--- Sorry we DON'T support MultiROM if you use Xposed
Google Apps (name, better with version)
Magisk / SuperSU (version and if you use it in Primary and/or Secondary and version)
Logs <--- This would be amazing great and helpful !!!! (you can get them via adb shell, terminal or using any tool)
*Original post and example in this post, please: ​
Download
You can download all stuff from here, where you can find latest TWRP and MultiROM. If you need to uninstall MultiROM, you can use this uninstaller.
MultiROM Manager (apk) available here.​
Source code
MultiROM - https://github.com/MultiROM-dev/multirom
Modified TWRP - https://github.com/multirom-dev/Team-Win-Recovery-Project
MultiROM device tree - https://github.com/BitOBSessiOn/android_device_xiaomi_lithium​
Special thanks to:
@Tasssadar for creating this awesome utility
@nkk71 for the No-KEXEC workaround
@AdrianDC and all MultiROM guys involved in its development
@jcadduono for TWRP port
We will have to try soon... It's the perfect set up for flashaholics
Great news [emoji847][emoji847]
Envoyé de mon MIX en utilisant Tapatalk
I can't make it work
fil0s0f0 said:
I can't make it work
Click to expand...
Click to collapse
The MultiROM app from market is only for official devices (I haven't updated the Android app, imo it's not very useful), So you must follow OP steps.
If you have some issue, please, describe your problem and we will try to help.
Keep in mind that you must have unlocked bootloader, decrypted device, etc...
Device decrypted, bootloader unlocked, and well, there is no instructionbon op but, I figure out and I'll leave my feedback
fil0s0f0 said:
Device decrypted, bootloader unlocked, and well, there is no instructionbon op but, I figure out and I'll leave my feedback
Click to expand...
Click to collapse
Yes, there are, please, revise OP, and describe which steps have you followed to find out what's your issue. Thx
provided TWRP wont boot into it after flash. shows some scrambled image, shows animation with MultiRom image but wont enter recovery
also command: fastboot flash userdata
gives this output
Superb, I missed it in this great smarphone
acasmc said:
provided TWRP wont boot into it after flash. shows some scrambled image, shows animation with MultiRom image but wont enter recovery
also command: fastboot flash userdata
gives this output
Click to expand...
Click to collapse
Sorry:
fastboot format userdata
I correct OP.
The TWRP is tested... I will revise.
BitOBSessiOn said:
Sorry:
fastboot format userdata
I correct OP.
The TWRP is tested... I will revise.
Click to expand...
Click to collapse
could it be, that while I'm encrypted TWRP will not work? flashed it with Rashr and fia Fastboot method. didnt work either way.
acasmc said:
could it be, that while I'm encrypted TWRP will not work? flashed it with Rashr and fia Fastboot method. didnt work either way.
Click to expand...
Click to collapse
Too weird... I've just downloaded and flashed again with rashr and ok.
Which model do you own (128/256)? Primary rom...?
TWRP must work ok with encrypted /data (but you need decrypted for MultiROM).
I'm on latest Miui China Beta Developer ROM (7.7.20), model is 128Gb/4Gb
Mr.Raines TWRP is working fine for me.
acasmc said:
I'm on latest Miui China Beta Developer ROM (7.7.20), model is 128Gb/4Gb
Mr.Raines TWRP is working fine for me.
Click to expand...
Click to collapse
Can you try some of older versions in testing or backup folder in n AFH, please...?
Can you take a photo of error if it still occurs...?
there is only one TWRP in your folder. can you point me to another. I'll try no worries
acasmc said:
there is only one TWRP in your folder. can you point me to another. I'll try no worries
Click to expand...
Click to collapse
You can see /bak and /testing folders here:
https://www.androidfilehost.com/?w=files&flid=201564
Great mod, I was been using Dual boot patcher app to boot into multiple roms(currently 5 roms). Hopefully this mod makes the things easier than before lol. I may give it a go when i feel a fully clean start. Thanks for providing the mod[emoji106]
Konsstantine34 said:
Great mod, I was been using Dual boot patcher app to boot into multiple roms(currently 5 roms). Hopefully this mod makes the things easier than before lol. I may give it a go when i feel a fully clean start. Thanks for providing the mod[emoji106]
Click to expand...
Click to collapse
Usually I don't start to develop for a device before I can use MultiROM....
BitOBSessiOn said:
You can see /bak and /testing folders here:
https://www.androidfilehost.com/?w=files&flid=201564
Click to expand...
Click to collapse
tried other two that are on that link. still the same. sadly don't have another phone with me, to take a picture.
guess gonna have to wait for an update. :/
BitOBSessiOn said:
Note 1: Your device must NOT be encrypted (hint: if you don't know what it is, then it is encrypted).
Click to expand...
Click to collapse
About encrypting, Is it enough to flash the "no-verity-opt-encrypt-5.1".zip?, And if its not, Is there a guide of how to encrypt my device?

[Guide] How to install a GSI treble rom on our Daisy - Updated [5.11.18] - More easy.

This guide lets you install any GSI treble roms on our Daisy.
Read carefully and go step by step!
Update: Since Havoc OS doesn´t need permissive Kernel, I just installed the latest stock rom (9.6.9.0), flashed Havoc, set everything up and ended with sh...t... Camera´s not working, Opera freezes, everything sucks. It was a waste of time... So it´s still the situation:
If you want to use a custom GSI-Rom Only use this combination: Stock rom before flashing GSI: 9.6.4.0 and Kernel: Unofficial TWRP by Yshalsager - this combination works like a charm​
Let´s get started: Be sure you are on Stock 9.6.4.0 (july security patch) if not, your wifi will not work in treble rom!
1) Download latest AB arm 64 gsi build. - ONLY ARM 64 AB GSI WILL WORK!
2) If you don´t have fastboot and adb download it from here: https://forum.xda-developers.com/sho....php?t=2588979 and install it!
3) Extract gsi64-ab-image to adb folder and rename it to system.img
4.a) Windows 7: right klick on white space in your adb-folder: open command prompt here
4.b) Windows 10: open command prompt as admin and navigate to your adb folder
5.) Power off your Smartphone and press pwr and vol- together -> your screen will show FASTBOOT - connect your phone to your PC
6.) type in your command prompt
Code:
fastboot oem unlock
Important: this will format your SD - All data will be lost If you perform that step! -> Backup before!​7.) Phone will reboot, erase data and boot up. Power off again after boot up. Power + vol- to enter fastboot.
Now you have to decide: If you want to use Android 9 roms and TWRP together, you have to decrypt your data - else TWRP will not be able to read data! If you don´t care continue on step 11​
8.) Download a patched_boot.img and place it in your fastboot folder - since only 9.6.4.0 works without bugs, you have to choose the patched 9.6.4.0 boot
9)
Code:
fastboot boot patched_boot.img
10) Connect to internet and update Magisk manager, download a root explorer - you could use this and go to
/vendor/etc/ and open the file fstab.qcom in editor​replace the text "forceencryption=footer with "encryptable=footer" and reboot to bootloader​
11) Download this, rename it to boot.img and copy it to your fastboot folder
Code:
fastboot flash boot boot.img
12) Install official TWRP
13) After installing official TWRP reboot to TWRP agian and go to "wipe" -> "format data" and type "yes". Reboot to bootloader
14.) Download your GSI AB Image and place it in your fastboot folder
Code:
fastboot flash system [imagename].img
If you want, you can boot now to twrp and install magisk and/or gapps whatever - everything will work. Else you boot up your new system - Sometimes your GSI-rom will not boot up without a rooted kernel.
So if you stay in bootloop, just install magisk.zip!
Violla - Now you have a treble gsi rom on your Mi A2 Lite!
theres working twrp out for daisy, does this change anything refering to your first line:
"1) Download latest AB arm 64 gsi build. I would always use the gappsed version - twrp still not running for daisy... - ONLY ARM 64 AB GSI WILL WORK!"
thanks for the guide!
i really want to try this but im not sure which rom fully works. Also i'm not sure to do this without TWRP cause i'd like to have a complete backup of my device.
i'm in 9.6.9 version now with locked bootloader and unrooted
any suggests for me to try this rom
tutankpusch said:
theres working twrp out for daisy, does this change anything refering to your first line:
"1) Download latest AB arm 64 gsi build. I would always use the gappsed version - twrp still not running for daisy... - ONLY ARM 64 AB GSI WILL WORK!"
Click to expand...
Click to collapse
Updated: I removed that line...
merlin.berlin said:
thanks for the guide!
i really want to try this but im not sure which rom fully works. Also i'm not sure to do this without TWRP cause i'd like to have a complete backup of my device.
Click to expand...
Click to collapse
No problem - meanwhile there´s a official twrp here - and you can still use this guide
If you want to flash havoc 2.0 - I think it´s the best rom on earth , you will need to change your kernel to permissive that it will boot. To do that, read the thread there´s a vivid discussion how to do it...
elkhshap said:
i'm in 9.6.9 version now with locked bootloader and unrooted
any suggests for me to try this rom
Click to expand...
Click to collapse
If you like to have more features and/or pie (Android 9), then I would suggest to flash a custom gsi rom. If you can live with stock, I wouldn´t touch it.
Voodoojonny said:
No problem - meanwhile there´s a official twrp here - and you can still use this guide
If you want to flash havoc 2.0 - I think it´s the best rom on earth , you will need to change your kernel to permissive that it will boot. To do that, read the thread there´s a vivid discussion how to do it...
Click to expand...
Click to collapse
i want havoc OS but as i understand i can't use the fastboot method because i need the permissive fix, which only can be installed via TWRP, correct?
i would prefer fastboot over TWRP because all the problems with sdcard reading, encrypting etc.
merlin.berlin said:
i want havoc OS but as i understand i can't use the fastboot method because i need the permissive fix, which only can be installed via TWRP, correct?
i would prefer fastboot over TWRP because all the problems with sdcard reading, encrypting etc.
Click to expand...
Click to collapse
Hi,
there are so many reasons for havoc not to boot... and so less to boot...
BUT... If you won´t mind to use an unencrypted phone or no twrp, you can use (as I think) the best Android OS, havoc.
So think about, what is more important for you: TWRP or encryption.
1. With encryption: (Quite easy)
a) Go to stock 9.6.4.0 - July patch with mi flash and choose clean all (yes you will loose all your data -> back up everything) - Important: don´t install any ota after that!​b) Download latest havoc and place it in your fastboot folder​c) Download this TWRP and place it in your fastboot folder - you need this as Kernel​d) As lazy person, I would rename the havoc file to havoc.img and the twrp file to twrp.img​e) copy userdata.bin from stock to fastboot​
Code:
fastboot flash system havoc.img
Code:
fastboot flash boot twrp.img
Code:
fastboot flash userdata userdata.bin
Code:
fastboot reboot
Wait and wait and wait and violla, you have havoc!
f) Gapps: download gapps, copy it to your fastboot folder and rename it to gapps.zip. Boot to recovery - twrp will not be able to read your data -> skip and allow modifications​
Code:
adb push ./gapps.zip /sdcard
- Now you see gapps in your zip and you can install it!
g) Magisk: for magisk you need to download my patched twrp and place it in your fastboot folder​
Code:
fastboot boot patched_twrp.img
- After booting up, you can go to magisk manager (yes: upgrade first etc.... and install magisk using the "direct method"
2. If you want to remove encryption - then you can use twrp fully, use this guide: here
Important: If you use another stock rom than 9.6.4.0 or do an ota, you will loose wifi!​after doing all the steps:​
Code:
fastboot flash system havoc.img
- that´s it!
Now you can use havoc
Voodoojonny said:
Hi,
there are so many reasons for havoc not to boot... and so less to boot...
BUT... If you won´t mind to use an unencrypted phone or no twrp, you can use (as I think) the best Android OS, havoc.
So think about, what is more important for you: TWRP or encryption.
1. With encryption: (Quite easy)
a) Go to stock 9.6.4.0 - July patch with mi flash and choose clean all (yes you will loose all your data -> back up everything) - Important: don´t install any ota after that!​b) Download latest havoc and place it in your fastboot folder​c) Download this TWRP and place it in your fastboot folder - you need this as Kernel​d) As lazy person, I would rename the havoc file to havoc.img and the twrp file to twrp.img​e) copy userdata.bin from stock to fastboot​
Code:
fastboot flash system havoc.img
Code:
fastboot flash boot twrp.img
Code:
fastboot flash userdata userdata.bin
Code:
fastboot reboot
Wait and wait and wait and violla, you have havoc!
f) Gapps: download gapps, copy it to your fastboot folder and rename it to gapps.zip. Boot to recovery - twrp will not be able to read your data -> skip and allow modifications​
Code:
adb push ./gapps.zip /sdcard
- Now you see gapps in your zip and you can install it!
g) Magisk: for magisk you need to download my patched twrp and place it in your fastboot folder​
Code:
fastboot boot patched_twrp.img
- After booting up, you can go to magisk manager (yes: upgrade first etc.... and install magisk using the "direct method"
2. If you want to remove encryption - then you can use twrp fully, use this guide: here
Important: If you use another stock rom than 9.6.4.0 or do an ota, you will loose wifi!​after doing all the steps:​
Code:
fastboot flash system havoc.img
- that´s it!
Now you can use havoc
Click to expand...
Click to collapse
Please explain by video
thank you so much for this guide:good:
i'll try it later when im home:fingers-crossed:
Where do I find a userdata.bin file?
monzer said:
Where do I find a userdata.bin file?
Click to expand...
Click to collapse
In the Images-Folder of your stockrom after extracting...
- download fastboot stock rom
- extract archive
- look inside "images"
update: it´s userdata.img
Voodoojonny said:
In the Images-Folder of your stockrom after extracting...
- download fastboot stock rom
- extract archive
- look inside "images"
update: it´s userdata.img
Click to expand...
Click to collapse
Please post a video for ease of action
monzer said:
Please post a video for ease of action
Click to expand...
Click to collapse
Sorry, that will not happen!
Updated: view first post. This guide will definitely work well - and it´s easy! At least more easy than the other guides .
Voodoojonny said:
Updated: view first post. This guide will definitely work well - and it´s easy! At least more easy than the other guides .
Click to expand...
Click to collapse
No idea why you're useless taking pot-shots at other people, especially when you keep spreading lies about stock roms because you use a broken recovery. But have it your way.
Just keeping telling people to use a broken/untested recovery and bricking their phones, that forces them to reflash boot images. Can't wait until the bricks pile up.
I'm done with this website.
KezraPlanes said:
No idea why you're useless taking pot-shots at other people, especially when you keep spreading lies about stock roms because you use a broken recovery. But have it your way.
Just keeping telling people to use a broken/untested recovery and bricking their phones, that forces them to reflash boot images. Can't wait until the bricks pile up.
I'm done with this website.
Click to expand...
Click to collapse
If you would read, you would have noticed, that that broken and untested recovery is used as kernel, becouse it works great as kernel for gsi roms. Within the process it will be upgreaded by official twrp.
I spend a lot time, testing how to install custom roms on this phone, becouse I don't like like stock and I share my experience with others. Noone will break his phone with this! Perhaps you can try before complaining.
KezraPlanes said:
No idea why you're useless taking pot-shots at other people, especially when you keep spreading lies about stock roms because you use a broken recovery. But have it your way.
Just keeping telling people to use a broken/untested recovery and bricking their phones, that forces them to reflash boot images. Can't wait until the bricks pile up.
I'm done with this website.
Click to expand...
Click to collapse
Voodoojonny said:
If you would read, you would have noticed, that that broken and untested recovery is used as kernel, becouse it works great as kernel for gsi roms. Within the process it will be upgreaded by official twrp.
I spend a lot time, testing how to install custom roms on this phone, becouse I don't like like stock and I share my experience with others. Noone will break his phone with this! Perhaps you can try before complaining.
Click to expand...
Click to collapse
Lol, this site has gone way down hill... It's almost a joke now.
So many people asking for the 'easy' way and want answers to easily searchable questions. Sooo many multiple posts, and people not wanting to do the research themselves. How many threads need to be created on bricked devices because you didn't heed the warnings or follow the directions...
I wonder if xda even cares? This place use to be a great tool for the ones who like to tinker.
There are definitely a few folks keeping the spirit alive, but so many unnecessary posts - like what I'm writing right now...
Anyway thanks to anyone who puts time and effort for the greater good, we should all understand that tinkering with our devices can potentially have adverse effects.
Thanks for this noob friendly guide! a massive thanks! But hotspot still not working. Haven't tried the gcam but the stock camera is working but has no portrait and other features. The havoc os 2.0 looks snappy and buggy. Ill try other treble roms in few days
Any suggestions?
Bokoko006 said:
Thanks for this noob friendly guide! a massive thanks! But hotspot still not working. Haven't tried the gcam but the stock camera is working but has no portrait and other features. The havoc os 2.0 looks snappy and buggy. Ill try other treble roms in few days
Any suggestions?
Click to expand...
Click to collapse
You're welcome. Don't have problems with bugs and havoc 2.0... Interesting to test would be arrow pie! Benzo had problems with camera and flashlight... All the 8.1 can't handle the notch and overlay!

[Umidigi One Max] Custom ROM, Modding, Rooting - Complete guide

Welcome to this guide, where I will guide you through rooting, flashing custom roms, and more, on our little Umidigi One Max !
WARNING : I am not responsible for your phone breaking or exploding during the night under your pillow. Please advice. If you cannot boot anymore, keep reading, your phone is NOT dead.
OFFICIAL ROM (Android 8.1)
The Umidigi One Max comes with Android 8.1 Out of the Box. Manufacturer has no plan on having 9.0 on the phone. That's why we root then ! Let's get into it.
Rooting the phone without unlocking it, or installing TWRP
Everything you'll do on this phone will NOT require a bootloader unlock. Note that this method is only in case you don't want to have your data wiped, or don't have access to an SD card (thus you cannot flash .zip in TWRP, except for ADB Sideloads)
What you'll need
Download the latest ROM from Umidigi's website : https://community.umidigi.com/forum.php?mod=forumdisplay&fid=211
Choose the ".rar" file
"E" ROMs are for European versions. It doesn't really matter what you choose.
Download SP Flash Tool on the same thread you opened for the ROM. It's "SPFT" for short
Unzip both
Install Magisk Manager on your phone : https://github.com/topjohnwu/Magisk/releases/
Steps
IMAGE COURTESY OF bencebacsi @ Umidigi forums
In the unzipped ROM folder, find boot.img
Copy it to your phone storage using an USB cable or any other method
Open Magisk Manager, press install
Choose "patch boot image file"
{
"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"
}
Let magisk do it's job
Find the boot.img file you just copied
Copy the patched_boot.img back to your computer
Open SP Flash Tool
Open the "Download" tab
In "Scatter-loading file", press the folder icon and browse to the downloaded ROM folder. Choose the only file that shows up
Untick every box except for boot. There is a column called "Location" with a path, click on it to change to file.
Choose patched_boot.img
MAKE SURE YOU UNTICKED EVERYTHING EXCEPT BOOT
Click the "Download" button
Turn off your phone (not reboot) and connect is via USB
wait for the flash to succeed. Once done, unplug, boot, voila ! You got magisk !
Credits to topjohnwu for Magisk, what a great piece of work
Installing TWRP
Note that if you want to access the /data partition (internal storage), you'll have to wipe it ! If you do not need it, keep going, it won't wipe unless you want to.
What you'll need
Official TWRP recovery.img by chankruze : https://twrp.me/umidigi/onemax.html
Magisk.zip installer (NOT the manager) : https://github.com/topjohnwu/Magisk/releases/
SP Flash Tool : http://www.mediafire.com/file/wxlld9dfywk67jl/SP_Flash_Tool_v5.1916.rar/file
This method is shorter and requires less downloaded files.
Steps
Turn off your phone
Run SP Flash Tool
Load the scatter file (see pictures above) you downloaded from the latest ROM (see above as well)
Untick everything except recovery
Change path to recovery.img to be the TWRP image
Click "Download" and plug your phone
After it's done, unplug, and press Power + Vol Up
You'll see three options appearing. That's how you'll get to the recovery. Use Vol Up to scroll, and Vol Down to select. Choose Recovery Mode !
TWRP should boot by now
EXTRA STEP : Make /data readable. You will need to format data (YOU'LL LOSE ALL YOUR DATA) (Wipe > Format Data > Type "yes") and after that, flash this zip : https://androidfilehost.com/?fid=1322778262904004415
You can now proceed to flash zips, including Magisk.zip. If you made /data readable, you can send it to your internal storage. If not, use an SD CARD or ADB PUSH / SIDELOAD.
Returning to stock to fix issues / brick
Use SP Flash tool but instead of unticking everything, tick everything. Note that USERDATA, if ticked, will clear your data.
Ticking only certain partitions may work if you got issues with magisk or system mods and are still on Official ROM. Flashing boot and system will remove Magisk. If you are on custom ROM, you can flash their system again to fix issues as well. Make sure to choose the right system.img in SPFT !
OTHER ROMS
Installing GSI (Generic System Image) to get Android Pie 9.0
GSI takes advantage of Project Treble to create one system image that will work on most devices without issues due to a separate "vendor" partition. The One Max is Treble-compatible, but only up to 9.0 (No 10 Q for now)
This will allow you to get an AOSP experience, with it comes easy modding and theming, and less bugs, less chinese-spying (that's a thing apparently, but who cares really ? Not me to say the least)
GSI List
You can find a GSI List including bugs and download links in my other thread here : https://forum.xda-developers.com/android/development/gsi-gsi-experiments-t3941194
WARNING : DOWNLOAD GSIs WHICH ARE ARM64-AONLY AND NOT AB !
Installing a GSI
You will need TWRP Installed. Check above if it's not done yet. You'll also need the Magisk.zip, and I highly recommend you getting the disable-force-encryption zip
Start up by wiping /data in twrp (Wipe > Swipe the bar). It will not wipe the files in your internal storage (Music, Download, etc...). If you want to get access to /data in TWRP (which I highly recommend), you'll need to do a full format (Wipe > Format data > type yes).
Download a GSI (.img) and send it to your phone (Either using an SD Card, or adb push [file on computer] [destination folder]). Send Magisk and the disable-force-encryption zip at the same time.
Flash that system image using Install > Install Image > Browse to the .img file
Flash disable-force-encryption if you formatted /data (don't flash it if you didn't do that !)
Flash Magisk.zip
Reboot and profit !
Note that there might be some issues with the GSI you choose. Most GSI suffers issues regarding Wifi Tethering/Hotspot. Other than that, check for my thread for issues regarding GSIs.
Some GSI require installation of GAPPS (Google Apps). Download a GAPPS zip and flash it at : https://opengapps.org/ (Choose ARM64 and 9.0)
If Installation fails, saying that system size is too small, go to (Wipe > Advanced Format > Tick "System" > Repair or change file system > Resize File System) and try flashing again.
INTERESTING MODS FOR ALL ROMS
Magisk FDE.AI
A great system manager. Saves a ton of battery without a performance hit. You need magisk installed. XDA Thread : https://forum.xda-developers.com/apps/magisk/beta-feradroid-engine-v0-19-ultimate-t3284421
Fix SafetyNet not passing on custom ROMs/GSIs
SafetyNet will not pass by default on custom ROMs / GSIs.
Use Magisk Hide Prop Config : https://forum.xda-developers.com/apps/magisk/module-magiskhide-props-config-t3789228
Run 'su' then 'props' in a terminal emulator. Edit Device fingerprint, choose Pick a certified fingerprint. I recommend using Xiaomi Redmi Note 7, as it changes the status-bar to be notch sized.
Note that you may need to do this next fix to make 'su' work :
Root request not working with Magisk
On some GSIs, root requests will not show up. You need to move some vendor files over to system.
Use TWRP's File Manager (Advanced > File Manager) or Adb shell to copy theses files :
Code:
/vendor/lib/libdirect-coredump.so
COPIED TO
Code:
/system/lib/libdirect-coredump.so
Code:
/vendor/lib64/libdirect-coredump.so
COPIED TO
Code:
/system/lib64/libdirect-coredump.so
This will fix this issue until GSI / ROM creator fixes it in their ROM;
Enjoy your new phone ! Don't forget to say thanks to all the developers behind every project (not me ! I didn't do anything )
If you have any issues, feel free to ask questions !
See you on the other side
Downloaded phhusson's AOSP ROM
Extracted compressed image. Then...
Wiped Phone from TWRP w/ all three options Swipe, Formatted (Type "Yes"), and advanced wipe.
From TWRP went to:
Install > Install Image > Selected system-arm64-ab-gapp-su.img > Select Partition to flash image
From this screen it lists these partitions for selection:
-recovery
-nvram
-uboot
-boot
-logo
-tee
-System Image
I select System image. It starts flashing. After it has finished, I go to reboot, and that is when TWRP states "No OS installed".
Am I downloading the wrong image file?
*********************EDIT****************************
Nevermind. I downloaded system-arm64-aonly-gapps-su.img.xz and it boots fine with gapps included
Exactly, you downloaded A/B image, not A-only.
Using phhusson's AOSP ROM. I got the root requests show up. However the superuser app is blank. Nothing shows in the list.
Request for a video to install GSI
Hello
I'm using Umidigi One Max Android 8.1 and want to upgrade to 9.0 . Can you please make a YouTube video showing how to install the GSI version I'd gladly appreciate it.
Over the last month or so, I've tried multiple GSI ROMs, and stock. I've rooted stock, and everything runs nicely, I just can't stand the lack of features. Even rooted on stock, Google Pay still works. If I install a GSI ROM like Havok, root it, gpay will not work. Not sure why it works on stock rooted with magisk, but not with other ROMs.
I'm looking for a hacked stock rom for the one max that:
A.) Can be rooted.
B.) Can still run gpay.
C.) Has a advanced restart option to boot directly into recovery.
D.) Displays the battery in the status bar as a percentage rather a symbol, and a clock with seconds option.
If I had those options, I would stick with stock. I can accomplish all those options with Havoc GSI ROM, I just can't get NFC/gpay to work.
su
how did you repair su binsaries after flasing (in twrp the vendor folder is empty)
everything else works
@ _cab13_
thanks for tutorial
some comments/questions
Image shows MT6739 in phone image and scatter file of mt6739
My phone is MT6363 and appears to agree with online specs site such as
https://www.gsmarena.com/_umidigi_one_max-9525.php
Am I looking at the wrong tutorial or umm have you grabbed images from another phone and forgot to say so?
w1lh3lm3d said:
how did you repair su binsaries after flasing (in twrp the vendor folder is empty)
everything else works
Click to expand...
Click to collapse
You have to mount the folder system and vendor for reading and writing and you can copy it, this is in recovery mount
Very helpfull, thanks)
Has anyone tried dual SIM and SD hack on this phone? I cant get my to work. When I do the hack, phone does not see any sim cards nor SD card.
However if I put only two sims, or sim and SD everything works well.
It is almost like issue w Samsung but no warning message
can i use this process on umidigi one as well
q1. Can i use this process on umidigi one as well?
When i visit "Official TWRP recovery.img by chankruze : https://twrp.me/umidigi/onemax.html" and search on devices they don't have umidigi one or one pro only the one max option. Other than screen size all three are pretty much spec'd the same. The umidigi one just doesn't have wireless charging or nfc that one pro and one max have and one max has 6.3 waterdrop vs one/one pro 5.9 notch display but all 720x1520 9:19 aspect ratio configurations. I found a umidigi one and one pro twrp recovery image here _https://unofficialtwrp.com/umidigi-one-umidigi-one-pro-root-twrp-recovery/ so if i have that are all the other downloads for doing non-rooted device upgrade to 9 pie non-device specific downloads?
q2. Nice to see this process covers a way to get form 8.1 to 9 w/o rooting device. Having never done so i'm curious why other search hits cover steps that require rooting device if the upgrade can be achieved without doing that, any insights?
q3. Would you say the likelyhood of bricking my device, if trying to follow these instructions using umidigi one vs one max, very low? Trying to determine if i should first line up and have on hand backup phone to use if the chance of that happening is high.
does magisk install allow me to upgrade to android 9 pie?
does magisk install allow me to upgrade to android 9 pie from the default android 8.1 oreo on my umidigi one or do i have to use the twrp recovery setup option to enable installing gsi arrowos or pixel experience android 9 pie update?
myusrn said:
does magisk install allow me to upgrade to android 9 pie from the default android 8.1 oreo on my umidigi one or do i have to use the twrp recovery setup option to enable installing gsi arrowos or pixel experience android 9 pie update?
Click to expand...
Click to collapse
Yes, with the single installation of magisk you could upgrade to Android 9, but you would have many more functions through TWRP. how to remove encryption, backup, etc.
drkiro said:
Yes, with the single installation of magisk you could upgrade to Android 9, but you would have many more functions through TWRP. how to remove encryption, backup, etc.
Click to expand...
Click to collapse
Thanks for reply. I was trying to see android 9 pie in magisk modules listings reviewed elsewhere and wasn't seeing what looked like a full android 9 install but rather options that themed and existing android 8.1 like android 9.
q1. If i complete the spft application of magisk_patched.img version of boot.img and try the android 9 module update option that's a one way street correct?
q2. Can one disable magish_patched.img version of boot.img by using spft to put the oem boot.img back in place?
q3. Sounds like twrp is the best way to put the official pixel experience android 9 [ or 10 ] custom rom on my umidigi one device. Your article shows how to get twrp enabled without bootloader unlocking the device. Any insights as to why there are so many articles suggesting that you have to bootloader unlock device to get twrp custom recovery image installed?
myusrn said:
Thanks for reply. I was trying to see android 9 pie in magisk modules listings reviewed elsewhere and wasn't seeing what looked like a full android 9 install but rather options that themed and existing android 8.1 like android 9.
q1. If i complete the spft application of magisk_patched.img version of boot.img and try the android 9 module update option that's a one way street correct?
q2. Can one disable magish_patched.img version of boot.img by using spft to put the oem boot.img back in place?
q3. Sounds like twrp is the best way to put the official pixel experience android 9 [ or 10 ] custom rom on my umidigi one device. Your article shows how to get twrp enabled without bootloader unlocking the device. Any insights as to why there are so many articles suggesting that you have to bootloader unlock device to get twrp custom recovery image installed?
Click to expand...
Click to collapse
Magisik, is used so that android 9 can boot, (now 10), in the system update to android 9, you only update the System partition, everything else remains as the manufacturer installed it, when you install twrp, you only change the partition recovery, and when you install magisk you change the boot partition, all this can be reversed, if you install the original versions.
drkiro said:
Magisik, is used so that android 9 can boot, (now 10), in the system update to android 9, you only update the System partition, everything else remains as the manufacturer installed it, when you install twrp, you only change the partition recovery, and when you install magisk you change the boot partition, all this can be reversed, if you install the original versions.
Click to expand...
Click to collapse
just to clarify, with the magisik patched boot.img i'm then able to apply a module that enables access to android 9 [ or 10 ] in the system update UI at which point i will carry out a standard issue android 8.1 to 9 [ or 10 ] upgrade process vs twrp where it appears you directly apply a gis custom rom like the mainstream pixel experience or arrowos options?
myusrn said:
just to clarify, with the magisik patched boot.img i'm then able to apply a module that enables access to android 9 [ or 10 ] in the system update UI at which point i will carry out a standard issue android 8.1 to 9 [ or 10 ] upgrade process vs twrp where it appears you directly apply a gis custom rom like the mainstream pixel experience or arrowos options?
Click to expand...
Click to collapse
No, there is no custom rom, which can be installed from the system update, all are images of the system partition, which are called GSI, which are installed by means of fastboot, or by twrp, all of them can be found here: https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list
drkiro said:
No, there is no custom rom, which can be installed from the system update, all are images of the system partition, which are called GSI, which are installed by means of fastboot, or by twrp, all of them can be found here: https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-(GSI)-list
Click to expand...
Click to collapse
interested in what makes a gsi [ generic system image ] custom rom an official vs an unofficial image given the pixel experience is listed as unofficial and aosp, arrowos and resurrectionremix offerings i've seen referenced in many places are listed as official.
i'd like to try the only official android 10 q aosp listing on my umidigi one to get off the dated android 8.1 experience and onto the more current one. This article suggests i can get twrp onto my device without bootloader unlocking it and with ability to revert back to the factory oem image setup currently running on it, if that update causes me to loose functionality or stability, using twrp recovery.
Is that a correct interpretation of the instructions in this article, and your clarifications in our exchange? I'm interested in experimenting but would like to not loose ability to go back to non-bootloader unlocked factory oem image in the event i need to exercise device hardware warranty or sell it. Thanks for your clarifications and additional insights.
myusrn said:
interested in what makes a gsi [ generic system image ] custom rom an official vs an unofficial image given the pixel experience is listed as unofficial and aosp, arrowos and resurrectionremix offerings i've seen referenced in many places are listed as official.
i'd like to try the only official android 10 q aosp listing on my umidigi one to get off the dated android 8.1 experience and onto the more current one. This article suggests i can get twrp onto my device without bootloader unlocking it and with ability to revert back to the factory oem image setup currently running on it, if that update causes me to loose functionality or stability, using twrp recovery.
Is that a correct interpretation of the instructions in this article, and your clarifications in our exchange? I'm interested in experimenting but would like to not loose ability to go back to non-bootloader unlocked factory oem image in the event i need to exercise device hardware warranty or sell it. Thanks for your clarifications and additional insights.
Click to expand...
Click to collapse
You can return, to the Originate flashing state, this image, https://community.umidigi.com/forum.php?mod=viewthread&tid=18692&extra=page=1 , can experiment with any image and return it to the original state, the pixel experience does not work with this phone, in Android Q the NFC does not work, and the videos in whastapp, do not work. Android 10 image comes without gapps, you have to flash them. If the twrp you can flash it through fastboot

[GSI][Android 10] Install AOSP 10 on Huawei Honor 6X.

POST - v14
(This number will increase every time the post is updated.)​What's new in v14?
Corrected some simple mistakes in procedure.​Modified overall post for better UX.​
​
Spoiler: Version Changelog
What's new in v13?
Modified Gapps part in requirements to make it more clear.​Added useful information section. for Pro Noobs and Ultra Noobs like me.​​What's new in v12?
Added User Contributions and feedback section.​Added Miscellaneous recommendations section.​Modified some steps in installation procedure to make it even more noob friendly.​Linked @lmaohelp's thread.​Decreased size of text in procedure.​​​
​
This ROM is based on Android 10 GSI builds of @phhusson (Thanks a ton to him).
Thanks to @Hami_Do for his hi6250 patches.
Thanks to Huawei for making their phones nearly unbrickable .
Thanks to @Djiban for his ideas on improving the thread.
Follow this thread only if you know what you're doing. I'm not responsibe for any damage or thermonuclear wars .
Read the post completely and understand it before doing anything ATLEAST FOR THE SAKE OF MANKIND .
This thread is best viewed in PC and is Noob Friendly.
Note that I was using flux substratum theme in the screenshots. Hence, icons and colors may vary on your device.​
Spoiler: Requirements
Requirements:
Huawei Honor 6X (Unlocked Bootloader. If not, follow this post (using PotatoNV) or YouTube video.
EMUI 8 (If not, you could follow this guide, direct file : link).
GSI from link (download system-quack-arm64-aonly-vanilla.img.xz, you could try others but arm64, a-only is must).
TWRP from attchments or link or any other TWRP recovery compatible with Honor 6X EMUI 8.
Gapps(Optional, I used nano OpenGapps, NikGapps gave an error during installing, You can also try others. You can directly try the img with gapps instead of vanilla but i prefer nano gapps over vanilla).
stock recovery.
Time.
PC.
ADB and Fastboot.
Patience.
Human Brain.
ALL IN ONE GUIDE : Check it out here. It contains every thing in detail all the way from bricked device -> EMUI 2 -> EMUI 5 -> EMUI 8 -> AOSP 10 (mentioned in this post). Thanks to @lmaohelp for his effort and describing everything in detail.
Useful Information :
What on the Earth is meant by Vanilla android? -> it is the stock / pure version of android without Google apps and services.​
What is OpenGapps? Check it out at OpenGapps.org!​
What is Nano (not the mathematical 10^-9) Gapps? It is a version of Gapps with Minimal installation which means only the core part of gapps is installed with very little major apps. They can be installed later.​
What is ARM64? it is a 64 bit operating system/platform.
What on the moon is AOSP? It stands for android open source project which is the purest form of android.
NOTE : My device bootlooped whenever I tried installing Magisk. So, better stick with the PHH-SuperUser that you get out-of-the-box with the system image.
NOTE : Skip every step with gapps if you are already using img with gapps.
What isn't working :
VoLTE (can't be fixed as per my knowledge), Camera (FIXED NOW | trying to find a fix, replacing libcamxxx could help), Flashlight (FIXED NOW | also trying to find a fix, fixing camera may fix this too).
CAMERA AND TORCH HAVE BEEN FIXED. Thanks to @Hami_Do (flash the attched patch file whenever you are bored, LOL)
What's Working :
Everything except the ones mentioned above VoLTE.
*Tell me if something else isn't working.
***If you have a bricked device/messed up somewhere during the process and unable to figure out what to do, follow this guide by @lmaohelp .***​Procedure :
Make sure your device is running EMUI 8.​
Extract downloaded image using some xz extractor(7zip can also do this), copy it to pc.​
Reboot your device to TWRP recovery.​
Format the data partition {Wipe > Format data > type "yes"}​
(Optional) In TWRP, choose wipe > advanced wipe > select system, data, cache and DALVIK and format them.​
Check if your device is detected by adb using
Code:
adb devices
.​
Move the img file using adb to device
Code:
adb push -p *img-name*.img /sdcard/
(the img file must be in adb directory).​
(Optional, only if you want nano gapps over vanilla) Move Gapps in the same manner
Code:
adb push -p *gapps-name*.zip /sdcard/
(the zip file must be in adb directory).​
Install img as system image {Install > Install Image > Select > Choose system image > Swipe➡}.​
(Optional, only if you want nano gapps over vanilla) Unmount and Remount system partition. Go to wipe > advanced wipe > Choose system > resize. Flash gapps.​
Flash stock recovery(also available in attachments) with twrp in the same way. push it with adb using
Code:
adb push -p STOCK_RECOVERY_RAMDISK.img /sdcard/
and flash it with twrp as "Recovery" after choosing install image.​
Disconnect your device from PC and reboot to recovery(stock one).​
Clear cache partition and perform a factory reset(You'll get an error during factory reset but you have to do it) (your device will bootloop if wiped with twrp itself).​
Reboot, Cross your fingers and wait.​
>If you flashed gapps over vanilla, the first boot would take about 5 mins. else, it would be very fast. Subsequent boots on both are quite fast.
>Sometimes, I observed that flashing gapps from internal storage caused bootloop(this is because of corrupt zip), in such case get back to EMUI 8, repeat the process by flashing gapps from micro sd.
*you'll get a warning that something wrong with your device every time you boot it. IGNORE IT.
Spoiler: Additionals
Additionals:
> If you messed up somewhere during installation, you can always recover your device by following this guide.
> If you have the update.zip file from the above mentioned EMUI 8 folder directly, you could just directly flash it after wiping data, system and cache(use adb push or microsd to transfer update.zip to device).
>Its better to charge your device to atleast 70% before doing anything as you'll have ample of time to recover it if you messed up something. If not, you can still charge your device in eRecovery mode and twrp but i found some issues like heating up and slow charging.
>Don't forget to set ringtone, notification and other sounds from settings after booting.
Spoiler: Updates
Updates :
I was able to install magisk by flashing unSU zip from @Hami_Do 's thread on hi6250 manual fixes and then flashing phh's magisk after deleting phh-su from /system/bin/ but sadly, I wasn't able to use quickswitch for other launchers as it needs magisk version of 20.4 (min.) but phh's magisk is 19.3 and substratum theme engine is not working (due to some error). So, I'm sticking with the root that comes out of the box and I recommend you to do the same. EXTRAS : The Phone and Messaging apps that came out of the box with the GSI stopped working after installing magisk. So, you are installing magisk, just replace these system apps from LineageOS ones or delete them and install the google phone and messaging from play store.
During multiple tests (installing, modifying and testing the GSI for its stability in multiple ways), I found that you need not always go back to stock EMUI 8 if you messed up something. This works without error but if you have some time, getting back to stock EMUI 8 is still recommended before installing some other ROM/GSI.
Try not to touch the finger print sensor when you are at the setup after first boot. This is making the finger print sensor not recognisable until next reboot.
User Feedback and Contributions :
Thanks to @OrionThyHunter for his feedback and some fixes :
Using the Greenify app will stop the finger print sensor from working. FIX : Disable "Alternative Screen Off Mode".
Thanks to @[email protected] for finding out he following issues :
Adaptive Brightness Doesn't work. Flash the attachment in this post to fix it.
To pass SafetyNet, follow this post.
Miscellaneous Recommendations :
Use Google Camera Go app for photos. Its much better than the GSI's stock one.
​
Happy Flashing !
{
"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"
}
thank you it worked, now waiting for volte and camera fix on next update.... please update soon.... waiting waiting waiting........
[email protected] said:
thank you it worked, now waiting for volte and camera fix on next update.... please update soon.... waiting waiting waiting........
Click to expand...
Click to collapse
I think VoLTE can't be fixed.
For camera, you have to replace each file in /system/lib/ starting with libcam(libcamxyz...) from stock emui 8 and check each possible combination with subsequent reboots. I'm a little bit busy right now as I'm working on AOSP 11(as I believe it'll run without much problems because it has been tested on other hi6250 devices) with @Djiban. You could just do this on your own. If you find any working combination, please post it in this thread.
[email protected] said:
thank you it worked, now waiting for volte and camera fix on next update.... please update soon.... waiting waiting waiting........
Click to expand...
Click to collapse
Finally, Fixed it dude(camera and torch) by replacing libraries! Found a patch that does the same thing. Updated the Original post.
Tried a lot to fix VoLTE but didn't work... will try again later.
CHECK IT OUT!
#endyourwait LOL!
Hi again, I got this installed using TWRP, and I still have TWRP installed because I don't have the stock recovery. The system boots but it is giving me an error saying encryption unsuccessful, with a button saying "erase all data" which does nothing, and I am unable to do anything.
I was having this error when I first installed EMUI 8 from EMUI 5 as well, but at least the button took me to eRecovery, where the factory reset would fail at 5-6%. Currently if I go into eRecovery and click factory reset, it just reboots and takes me to TWRP again. Also, when I go into eRecovery it asks me to reformat the partition because it is "corrupted", which somehow changes the file system for /data to f2fs, and causes the phone to be stuck on the android boot animation. When I change /data back to ext4 I am able to boot back to the screen of encryption unsuccessful.
How do I fix this issue and be able to use the phone? Attached is a screenshot of the error message the OS is giving me.
lmaohelp said:
Hi again, I got this installed using TWRP, and I still have TWRP installed because I don't have the stock recovery. The system boots but it is giving me an error saying encryption unsuccessful, with a button saying "erase all data" which does nothing, and I am unable to do anything.
I was having this error when I first installed EMUI 8 from EMUI 5 as well, but at least the button took me to eRecovery, where the factory reset would fail at 5-6%. Currently if I go into eRecovery and click factory reset, it just reboots and takes me to TWRP again. Also, when I go into eRecovery it asks me to reformat the partition because it is "corrupted", which somehow changes the file system for /data to f2fs, and causes the phone to be stuck on the android boot animation. When I change /data back to ext4 I am able to boot back to the screen of encryption unsuccessful.
How do I fix this issue and be able to use the phone? Attached is a screenshot of the error message the OS is giving me.
Click to expand...
Click to collapse
Did you flash stock recovery after flashing system image?
Get back to emui 8(if you have update.zip, you could directly flash it with twrp). Repeat the process. Flash stock recovery. Perform a factory reset. And boot it to the system for the first time. You could then flash twrp with fastboot.
***Do not do a factory reset with twrp! Its causing errors.***
Apparently it could be a faulty EMMC chip according to this website, which makes sense since TWRP is not able to mount the internal storage partition or the Dalvik / ART cache, and eRecovery is not able to reset the phone, which is a characteristic of EMMC failure, according to this website. I had to unplug the battery countless times when I was tinkering with the phone, because my power button is broken, and it definitely would've contributed to this failure according to what I have read. Well, guess I'm done with this phone lol
EDIT: Well I'm starting from scratch again but everything is installing fine so I guess nothing is wrong currently? Huawei factory reset even worked
Venkata Lochan Nune said:
Did you flash stock recovery after flashing system image?
Get back to emui 8(if you have update.zip, you could directly flash it with twrp). Repeat the process. Flash stock recovery. Perform a factory reset. And boot it to the system for the first time. You could then flash twrp with fastboot.
***Do not do a factory reset with twrp! Its causing errors.***
Click to expand...
Click to collapse
No, I don't know where to find the stock recovery file, where can I find it?
I managed to boot into EMUI 8 just fine since I did not have a password on the EMUI 5 OS before installing lol. Now I just need the stock recovery you are talking about so I can follow your steps.
do you mean, you testing ASOP 11 on honor 6x ? if yes wow......
[email protected] said:
do you mean, you testing ASOP 11 on honor 6x ? if yes wow......
Click to expand...
Click to collapse
Nope, not now. @Djiban is quite busy and for me to work, I'm not having a spare device. He'll do it when he's got free time.
I didn't find much noticeable differences between AOSP 10 and 11 execpt some ui improvements and under-the-hood improvements. So, I'll skip AOSP 11 and directly will work with AOSP 12 on future. I liked the new things introduced in android 12. So, I'll definitely work on it.
lmaohelp said:
No, I don't know where to find the stock recovery file, where can I find it?
I managed to boot into EMUI 8 just fine since I did not have a password on the EMUI 5 OS before installing lol. Now I just need the stock recovery you are talking about so I can follow your steps.
Click to expand...
Click to collapse
Do you have the update.zip file?
Or wait I'll attach one in few hours...
lmaohelp said:
Apparently it could be a faulty EMMC chip according to this website, which makes sense since TWRP is not able to mount the internal storage partition or the Dalvik / ART cache, and eRecovery is not able to reset the phone, which is a characteristic of EMMC failure, according to this website. I had to unplug the battery countless times when I was tinkering with the phone, because my power button is broken, and it definitely would've contributed to this failure according to what I have read. Well, guess I'm done with this phone lol
EDIT: Well I'm starting from scratch again but everything is installing fine so I guess nothing is wrong currently? Huawei factory reset even worked
Click to expand...
Click to collapse
This is because twrp on our phone doesn't support encryption-decryption things. So, they can only mount internal storage when you perform a complete data format by typing "yes".
Venkata Lochan Nune said:
Do you have the update.zip file?
Or wait I'll attach one in few hours...
Click to expand...
Click to collapse
I do, but I'm unfamiliar with how to get the recovery.img from the zip file. If you can tell me how to extract it or attach one that would be great!
lmaohelp said:
I do, but I'm unfamiliar with how to get the recovery.img from the zip file. If you can tell me how to extract it or attach one that would be great!
Click to expand...
Click to collapse
Actually, flashing it should replace twrp with stock one didn't it?
You can extract it with 7zip. It worked for me.
Venkata Lochan Nune said:
Actuall, flashing it should replace twrp with stock one didn't it?
You can extract it with 7zip. It worked for me
Click to expand...
Click to collapse
What do you mean by flashing it, the update file? I updated from EMUI 5 to EMUI 8 using a update.zip file and HWOTA method so I am not sure if that is the same thing as just flashing the update.zip file. Also, just extracting the files doesn't produce anything useful. I used a firmware extractor from this thread, which comes up with the files shown in the screenshot. Now I'm not sure which file is the stock recovery image. I also tried flashing Magisk for root access and using Flashify to backup the stock recovery image, but the app would just freeze, I'm not sure why.
lmaohelp said:
What do you mean by flashing it, the update file? I updated from EMUI 5 to EMUI 8 using a update.zip file and HWOTA method so I am not sure if that is the same thing as just flashing the update.zip file. Also, just extracting the files doesn't produce anything useful. I used a firmware extractor from this thread, which comes up with the files shown in the screenshot. Now I'm not sure which file is the stock recovery image. I also tried flashing Magisk for root access and using Flashify to backup the stock recovery image, but the app would just freeze, I'm not sure why.
Click to expand...
Click to collapse
Well you could directly flash update.zip with twrp.
Wail I'll attach it in a while. Just turned on my PC to search for it and this bloody "working on updates" came up.
lmaohelp said:
What do you mean by flashing it, the update file? I updated from EMUI 5 to EMUI 8 using a update.zip file and HWOTA method so I am not sure if that is the same thing as just flashing the update.zip file. Also, just extracting the files doesn't produce anything useful. I used a firmware extractor from this thread, which comes up with the files shown in the screenshot. Now I'm not sure which file is the stock recovery image. I also tried flashing Magisk for root access and using Flashify to backup the stock recovery image, but the app would just freeze, I'm not sure why.
Click to expand...
Click to collapse
Yeah I've faced the same problem with flashify and ofcourse other similar apps. The problem I usually get is that system partition isn't writable. After changing it to r/w, I get an error that boot image not found. (This doesn't happen in flashify, it just freezes). Not sure what the problem is maybe, huawei's anti modding measures...
This might be the stock recovery(its in between some 10 other recoveries so, not sure). Try it and inform me
EDIT : THIS IS NOT THE RIGHT ONE. STOCK RECOVERY WAS ATTACHED IN POST #1.
Venkata Lochan Nune said:
This might be the stock recovery(its in between some 10 other recoveries so, not sure). Try it and inform me.
Click to expand...
Click to collapse
I don't think that is the correct file, as I flashed it and "adb reboot recovery" just causes it to be stuck on the "your phone is unlocked" screen, and so does clicking the factory reset option in eRecovery. I tried extracting the RECOVERY_RAMDIS(K).img file and flashing it, which worked, and successfully failed (lol) to reset the phone.
EDIT: I got into the OS successfully. It is unexpectedly smooth, good job!
lmaohelp said:
I don't think that is the correct file, as I flashed it and "adb reboot recovery" just causes it to be stuck on the "your phone is unlocked" screen, and so does clicking the factory reset option in eRecovery. I tried extracting the RECOVERY_RAMDIS(K).img file and flashing it, which worked, and successfully failed (lol) to reset the phone.
EDIT: I got into the OS successfully. It is unexpectedly smooth, good job!
Click to expand...
Click to collapse
So you liked it?
And hey, attach the stock recovery for future reference if someone needs it.
Use the camera patch to fix cam and flashlight issues. It just replaces the libraries. Flash any emui 8 compatible twrp with fastboot. Take a migrate backup in case.
Google Camera GO app works like a charm and is better than the stock one so I recommended using it.
Enjoy your phone!

Oukitel k15 pro

Hey does anyone know about a custom recovery for oukitel k15 pro? Or can I get away with using the stock recovery and a patched magisk file? If so does anyone have a up to date link.
Also would lineage work on this phone.
Thanks in advance
Lewickham2022 said:
Hey does anyone know about a custom recovery for oukitel k15 pro? Or can I get away with using the stock recovery and a patched magisk file? If so does anyone have a up to date link.
Also would lineage work on this phone.
Thanks in advance
Click to expand...
Click to collapse
There is no custom recovery. Oukitel haven't even posted the official Android 11 ROM on their Download Center website yet, even though I sent them a message about it a week or two ago.
I bought the phone, but haven't gotten it yet.
I wouldn' t do anything to modify the ROM without having the official ROM from Oukitel to unbrick the phone just in case something goes wrong with Magisk or something.
There are ways to extract the ROM with SP Flash Tool or maybe something else, so I would do that first.
For rooting I found this link for Oukitel wp12 with Android 11, I think I would try the same method with K15 Pro
Oukitel WP12 Magisk root bootloop
I'm trying to root an Oukitel WP12 with Magisk. I've downloaded the firmware from the vendor's link and flashed it successfully just like for other Oukitel phones (WP6, WP10). I could also create a magisk-patched boot image. I followed regular...
forum.xda-developers.com
Then, if that's not enough and we want a custom ROM like Lineage, for example, then we would have to use a GSI ROM like those from here
Generic System Image (GSI) list
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
and follow something like the fastboot method outlined here for wp5
GitHub - adil192/OukitelWP5TrebleTips: Sharing my experience with flashing a GSI on a friend's Oukitel WP5 (3GB model).
Sharing my experience with flashing a GSI on a friend's Oukitel WP5 (3GB model). - GitHub - adil192/OukitelWP5TrebleTips: Sharing my experience with flashing a GSI on a friend's Oukitel WP5...
github.com
Maybe there's a better link for GSI fastboot for Oukitel with Android 11
If you try anything, let me know. I'm waiting for my k15 pro to arrive, possibly next week.
I need it rooted, at least.
Let me know the outcome of rootin the k15 pro and if you succeed please tell me the steps. Also do you know if lineage will be compatible eventually?
Is there any news yet?
Lewickham2022 said:
Is there any news yet?
Click to expand...
Click to collapse
My phone came from AliExpress after 3.5 months, jeez. Got a refund, too, which I might return, never mind.
I dumped/backed up ROM partitions, except userdata because it's big and backup unnecessary, unless you want to keep your personal data in raw binary state for later, and rooted the phone.
You need MTK VCom drivers installed, e.g. from here:
Download MediaTek USB VCOM Drivers for Windows (32 & 64 bit)
Download MTK USB VCOM Drivers for Windows 10 to connect MediaTek phones even in a bricked state. Also, check the Installation guide.
www.ytechb.com
Use mtkclient:
mtkclient/README.md at main · bkerler/mtkclient
MTK reverse engineering and flash tool. Contribute to bkerler/mtkclient development by creating an account on GitHub.
github.com
I unlocked bootloader first. Remember UNLOCKING BOOTLOADER WIPES ALL DATA, returns to factory settings, back up all personal data to PC or SD card first!
To unlock bootloader, if you don't know, go to Settings, About Phone, tap 7 times on Build Number, You are Developer flashes on, go to System, Developer Options, OEM unlocking on, USB debugging on.
MTKCLIENT has a command to unlock the bootloader, it would surely work, I used Fastboot before I learned of mtkclient.
If using Fastboot, turn off phone. Hold Volume up and Power. Choose Fastboot. Connect phone.
You need Minimal Fastboot and ADB installed:
Download Minimal ADB and Fastboot Tool (all versions)
Download the latest version of Minimal ADB and Fastboot Tool which allow you to install and setup the ADB and Fastboot files on the computer.
androidmtk.com
Open CMD, type:
fastboot devices
if phone is listed, then type:
fastboot flashing unlock
fastboot reboot
Never re-lock the bootloader if your phone is rooted or GSI Lineage or other ROM other than original is installed. More than likely would brick the phone.
Everything is explained in mtkclient readme, line by line.
I used Windows 10, works on 11 too, there is a guide for Linux, and even a Ubuntu live image to use. Back up partitions first. Oukitel still haven't posted ROM, but can extract it from the phone, no problem.
Root is explained, need to get modified Magisk for MTK, and flash patched boot and empty vbmeta. It worked like a charm. There are guides on XDA on how to flash System GSI images to Android Super partition. Might try it later. One is here:
How to flash GSIs on devices with dynamic super partition
* Disclaimer * 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 * before flashing GSI! YOU are choosing to make these modifications, and if *...
forum.xda-developers.com
GSI Lineage images are here:
Andy Yan's personal builds // GSI - Browse /lineage-19.x at SourceForge.net
sourceforge.net
You couldn't add GAPPS, though, no TWRP, unless there is another way, doubt it. Could install replacement MicroG. Plenty other GSI images here:
Releases · phhusson/treble_experimentations
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
Good luck.
MarkR7 said:
My phone came from AliExpress after 3.5 months, jeez. Got a refund, too, which I might return, never mind.
I dumped/backed up ROM partitions, except userdata because it's big and backup unnecessary, unless you want to keep your personal data in raw binary state for later, and rooted the phone.
You need MTK VCom drivers installed, e.g. from here:
Download MediaTek USB VCOM Drivers for Windows (32 & 64 bit)
Download MTK USB VCOM Drivers for Windows 10 to connect MediaTek phones even in a bricked state. Also, check the Installation guide.
www.ytechb.com
Use mtkclient:
mtkclient/README.md at main · bkerler/mtkclient
MTK reverse engineering and flash tool. Contribute to bkerler/mtkclient development by creating an account on GitHub.
github.com
I unlocked bootloader first. Remember UNLOCKING BOOTLOADER WIPES ALL DATA, returns to factory settings, back up all personal data to PC or SD card first!
To unlock bootloader, if you don't know, go to Settings, About Phone, tap 7 times on Build Number, You are Developer flashes on, go to System, Developer Options, OEM unlocking on, USB debugging on.
MTKCLIENT has a command to unlock the bootloader, it would surely work, I used Fastboot before I learned of mtkclient.
If using Fastboot, turn off phone. Hold Volume up and Power. Choose Fastboot. Connect phone.
You need Minimal Fastboot and ADB installed:
Download Minimal ADB and Fastboot Tool (all versions)
Download the latest version of Minimal ADB and Fastboot Tool which allow you to install and setup the ADB and Fastboot files on the computer.
androidmtk.com
Open CMD, type:
fastboot devices
if phone is listed, then type:
fastboot flashing unlock
fastboot reboot
Never re-lock the bootloader if your phone is rooted or GSI Lineage or other ROM other than original is installed. More than likely would brick the phone.
Everything is explained in mtkclient readme, line by line.
I used Windows 10, works on 11 too, there is a guide for Linux, and even a Ubuntu live image to use. Back up partitions first. Oukitel still haven't posted ROM, but can extract it from the phone, no problem.
Root is explained, need to get modified Magisk for MTK, and flash patched boot and empty vbmeta. It worked like a charm. There are guides on XDA on how to flash System GSI images to Android Super partition. Might try it later. One is here:
How to flash GSIs on devices with dynamic super partition
* Disclaimer * 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 * before flashing GSI! YOU are choosing to make these modifications, and if *...
forum.xda-developers.com
GSI Lineage images are here:
Andy Yan's personal builds // GSI - Browse /lineage-19.x at SourceForge.net
sourceforge.net
You couldn't add GAPPS, though, no TWRP, unless there is another way, doubt it. Could install replacement MicroG. Plenty other GSI images here:
Releases · phhusson/treble_experimentations
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
Good luck.
Click to expand...
Click to collapse
Thanks for the reply. I had a few problems with micro g on MI A2. After flashing micro g in magisk is there a certain gapps I need to flash? Or can I just download Google services after flashing micro g
Lewickham2022 said:
Thanks for the reply. I had a few problems with micro g on MI A2. After flashing micro g in magisk is there a certain gapps I need to flash? Or can I just download Google services after flashing micro g
Click to expand...
Click to collapse
I was wrong about LineageOS not having GAPPS preinstalled. The link I gave you:
Andy Yan's personal builds // GSI - Browse /lineage-19.x at SourceForge.net
sourceforge.net
has this system image of LineageOS with GAPPS included, vndklite are read/write system images that I saw someone said were working on Oukitel phones with Android 11, and are generally probably best to use, so if you use that one, you don't need microG, which would have to be installed from F-Droid store or something like that:
https://sourceforge.net/projects/andyyan-gsi/files/lineage-19.x/lineage-19.1-20220410-UNOFFICIAL-arm64_bgS-vndklite.img.xz/download
G or g in the name of the system indicates that GAPPS are included.
I will try to flash that one myself sooner or later. It's based on Android 12, and if it doesn't work for some reason then we would have to drop to Lineage 18.1, but those aren't with GAPPS, so microG required:
Andy Yan's personal builds // GSI - Browse /lineage-18.x at SourceForge.net
sourceforge.net
There are other ROM with plenty of customizations that might be ok.
Corvus OS
Download Corvus OS for free. Corvus OS is another retarded ROM with many retarded Customization. First, it's inspired by Dirty Unicorns (thanks to Alex Cruz), but then we picked many other features too.
sourceforge.net
has GAPPS
Rest is here to choose from:
Generic System Image (GSI) list
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
Funny, I'm using Xiaomi Mi A2 Lite now.
Lewickham2022 said:
Thanks for the reply. I had a few problems with micro g on MI A2. After flashing micro g in magisk is there a certain gapps I need to flash? Or can I just download Google services after flashing micro g
Click to expand...
Click to collapse
OK, it is possible to install Android 11 GSI system images on this phone. Android 12 images do not work, something to do with incompatible boot partition.
It's possible to try out GSI system images without flashing by installing this app:
GitHub - VegaBobo/DSU-Sideloader: A simple app made to help users easily install GSIs via DSU's Android feature.
A simple app made to help users easily install GSIs via DSU's Android feature. - GitHub - VegaBobo/DSU-Sideloader: A simple app made to help users easily install GSIs via DSU's Android feat...
github.com
Root is useful, but not necessary. Seems not to work, maybe needs flashed empty vbmeta_system and vbmeta_vendor like indicated below and I restored all to stock ROM except for boot.img with Magisk 24.3 and empty vbmeta.img
If you managed to make full backup of ROM with mtkclient, enable USB debugging, unlock bootloader, then to flash GSI images or Lineage 18.1 based on Android 11 (it works, but no image with gapps unless found somewhere else) you have to have installed Google Android USB driver from here
Get the Google USB Driver | Android Studio | Android Developers
The Google USB Driver is required to perform adb debugging on Windows with Google devices.
developer.android.com
Unpack files, connect phone in recovery, power + volume up then power+ volume up fast click, choose fastboot, that gives you FastbootD (colorful menu), which is now used to flash system partitions. Connect phone, install driver with .inf file.
You also need Google platform tools
SDK Platform Tools release notes | Android Studio | Android Developers
Android SDK Platform-Tools is a component for the Android SDK.
developer.android.com
Unpack anywhere if on Windows.
Run cmd, then "fastboot devices" to see if phone gets detected, should be there.
From here get product_gsi.img:
[Tutorial] Magisk on GSI on devices with dynamic partition
I hope you already know how to flash GSI on devices with dyamic partition already. If not then you can follow this guide: https://forum.xda-developers.com/t/how-to-flash-gsis-on-devices-with-dynamic-super-partition.4256667/#post-85271987 If...
forum.xda-developers.com
In mtk client is an empty vbmeta file - vbmeta.img.empty or similar, needs to be flashed to vbmeta, vbmeta_system, and vbmeta_vendor to disable verification of boot for magisk, and system and vendor for GSI system images. Can be done with mtkclient or normal fastboot ( power + volume down, choose fastboot, connect phone, run cmd, then "fastboot flash vbmeta vbmeta.img.empty (could be renamed to anything simple, name doesn't matter))
Then
fastboot flash vbmeta_system vbmeta_img.empty
Then
fastboot flash vbmeta_vendor vbmeta.img.empty
Same file to all three partitions, disables verification, worked for me. Can be done with GUI in mtkclient, same thing. Or commands in mtkclient
"python w vbmeta vbmeta.img.empty"
Etc.
Back to FastbootD -
"fastboot reboot fastboot" or power + volume up for recovery then click them again, choose fastboot.
Or probably "adb reboot fastboot" if phone is running system.
Run cmd, "fastboot devices" to be sure phone is detected, then
"fastboot flash product product_gsi.img"
This resizes dynamic system partition when flashing system images. This only modifies internal logical partitions within SUPER partition that contains Product, System, and Vendor. SUPER can be restored with mtkclient or just fastboot, I guess, I restored with mtkclient, works.
Then you can flash any system based on Android 11, stock phhusson GSI works. the system needs to be arm64, ab (for A/B partitions, indicated by letter B in name), vndklite, G or Gapps (if you want them), V is vanilla - no gapps, S is superuser but seems to have conflicts with magisk if you want that as root later. N is no superuser/root.
Eg.
"fastboot flash system Lineage-18.1-2021214-UNOFFICIAL-treble_arm64_bvS-vndklite.img" Rename this to 1.img or whatever, simpler to type
"fastboot flash system.1.img" or something like that.
"Invalid Sparse System Image At Magic Header" appears, but doesn't matter, starts flashing in 30 seconds or so, 10 or 11 chunks, maybe 2-3 minutes per system image.
Then
"fastboot reboot" go to recovery, power +volume up, click them again, choose wipe user data, wipe cache to get rid of old settings and apps from previous system.
"fastboot reboot recovery" should work too.
Seems that on custom ROMs Magisk 24.3 app gives option to directly patch boot image without need for flashing patched boot.img. Not sure about that. Just flashing patched boot.img in fastboot gives root, anyway.
If you just want newest Magisk then flash empty vbmeta and then patched boot Magisk generates. Those can be done in normal fastboot. Works fine.
Everything seems to work.

Categories

Resources