yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] Aex12:
With this modded version of TWRP you can now install A1 roms into the 5X.

How to install A1 roms using this TWRP:

https://xdaforums.com/mi-5x/how-to/guide-how-to-install-a1-rom-5x-t3777139

Oreo Modded TWRP 3.2.1-0 Download:

Google Drive

Nougat Modded TWRP 3.2.1-0 Download:

Google Drive

How to install:

- Unlock bootloader

- Enter in Fastboot Mode (Power Button + Vol Down)

- Flash using "fastboot flash recovery twrp.img"

- Enter in Recovery Mode (Power Button + Vol Up)

Which one should I download?

You should install the correspondent version according to your currently installed Android version. If your current system is Nougat, you should flash Nougat TWRP. Same for Oreo. It doesn't matter which version of Android are you going to install, but the one that you already have installed. If you are in Nougat and want to flash Oreo rom, after flashing it, be sure to flash Oreo TWRP. If you dont do it, recovery may not work.

How can I use the port feature?

First, download an A1 fastboot ROM. You can do so here. Then, flash system and boot partitions using fastboot.

After you flashed it, go to "Advanced" then tap on "Terminal". Write "a1to5x" and press Enter. Wait until it finishes. Make proper wipes and reboot.

Are there any other features?

I have enabled system.img and modem.img flashing, so people without a pc can flash A1 fastboot roms. But be careful, system.img can't be a sparse image (this are the images included on the a1 official fastboot rom), it should be a raw ext4 image. You can use simg2img to convert them. Modem.img can't neither be flashed directly from the downloaded fastboot rom. It should be a modem.img extracted with dd, you will need to ask some who flashed it with fastboot to extract it for you. I know it is not a very easy process, but at least people without pc now have a chance to update their phones.

In what roms does it works?

I have only tested it with official Android One Oreo rom, however, it should work with Nougat Android One and with custom roms. Try it and let me know in what roms does it work.

How do you port A1 roms to the 5X?

I have been asked this question a lot of times. I can't give a step by step guide since I don't have enough spare time to make a decent guide. If you are interested on the porting process, take a look at /sbin/a1to5x (inside twrp ramdisk), it is the script which takes cares of the automatic porting process. Inside it you will find how the ports are made.

Where is the changelog?

You can check it here

Donations:

If you like my work and want to contribute, you can donate via paypal.me/aex12

Device Tree: https://github.com/Aex12/android_device_xiaomi_tiffany

Manifest used: https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni

XDA:DevDB Information

Modded TWRP 3.2.1, Tool/Utility for the Xiaomi Mi 5X

Contributors

Aex12

Source Code: https://github.com/omnirom/android_bootable_recovery/

Version Information

Status: Stable

Current Stable Version: 3.2.1

Created 2018-03-07

Last Updated 2018-03-08
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] Ritwik Rahman:
Love Man... You Are Love Brother ❤️❤️❤️❤️
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] eurekaseven:
is it normal that the external memory is not shown?
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] vangame:
[MENTION=5982370]Aex12[/MENTION]

Thanks for your great work. I have some question.

Should we install an whole A1 fastboot rom or only install system.img and boot.img like the old one?
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] Aex12:
Forgot to mention it on the thread. Thanks for reminding, I am updating it right now. You should only flash system and boot. Modem and other firmware partitions can be flashed too, but they are not mandatory.
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] vangame:
And have someone test LineageOS 15.1 for Mi A1 with this recovery?
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] AncientLord:
Awesome work [MENTION=5982370]Aex12[/MENTION]. Thanks a lot
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] bartlomiejm:
Hello can I use it at tissot bootloader?
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] Gomo:
That was somthing I also have noticed.. without sd memory being shown I can't do a backup to SD Card.

Instead I'll have to do a local backup and connect to PC and copy files over, Early stages I guess we are lucky we can even see the Internal Memory right?

Alright so I was curious and thought I'd see what happens if I flash recovery Nougat Modded TWRP 3.2.1-0 ( While currently running Oreo )

I booted into recovery and instantly discovered that you no longer even have access to internal memory 0b shown.. Don't waste your time !

I flashed recovery Oreo Modded TWRP 3.2.1-0 using fast boot as you won't be able to flash a recovery rom using TWRP in this state..

https://www.xda-developers.com/how-to-install-twrp/

Shows an easy guide if you aren't sure howto do this :)
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] Hemir95:
Can not get back to MIUI Nougat or even get old recovery to work

When i try to install back xiaomi.eu's miui rom after installing zip and do all the proper wipes, it reboot to system but says that encryption was interrupted and can't complete. So I tried to install back the nougat 3.2.1 recovery and try again, with the same result. again i tried to install the rom again with 3.1.1 recovery and same happens. With nougat recovery it can't mount any partition, so it can not opperate properly, only the oreo recovery works. the only rom that works and gets installed good is the oreo one that you submitted so what can i do to get back to my normal twrp recovery (no oreo) and to a miui rom? thanks

P.D: I also tried to flash with fastboot a a1 nougat rom and with the 3.1.1 twrp port it but no succes as it can no longer mount anything, only oreo twrp is working but still not get to work properly any other rom, via fastboot or via recovery. Bootloader is unlocked.
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] rogerssnpy:
What phone and model is this 4? It states nothing
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] adioph:
hi,

i tried to flash system.img from official MiA1 fastboot ROMs today but i got these message " target reported max download size of 536870912 bytes, is this a normal message? will the flash resume?
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] dancorpse:
I want to know this too!
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] Ritwik Rahman:
Comparing fstab with stock recovery / sd supported recovery might fix this issue...
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] AbrahamW08:
This recovery doesn't read my SD card. Only the internal storage.
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] udaan:
>Modem.img can't neither be flashed directly from the downloaded fastboot rom. It should be a modem.img extracted with dd, you will need to ask some who flashed it with fastboot to extract it for you

Yeah, anyone willing to do it for me?
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] Aex12:
Make sure to make a backup of your current modem, just in case.

It's from v9.5.9.0: https://mega.nz/#!UAhwAQLY!-8np_yuZnJscEUFh9bJuCkkqDkPuZrr8Aa6o0kkBq5Q
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] tuhi009:
My 5x does not go to recovery mode. My ROM is AOSPE. I am using OREO twrp. The device is not ROOTED

I can boot twrp using

fastboot boot twrp.img

but after using

fastboot flash recovery twrp.img

the phone does not go to recovery using Volume up + Power
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] udaan:
I think you need to fastboot flash boot image first, then go to twrp and flash it again from it.

---------- Post added at 08:14 AM ---------- Previous post was at 08:06 AM ----------

@Aex12 please update TWRP. I can't format /data /system etc from twrp made for MiA1(MohanCM's) but I cannot do it with yours. I have mi5x and it is ****ing stuck on boot. If I flash MiA1's fastboot rom I can get to fastboot and flash TWRP (since the bootloader is locked) but I can't do anything with your TWRP. But I can also flash MohanCM's twrp and I can do all that stuffs except for installing ROms and booting to it. im ****ing confused myself.
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] gregandkelly1:
Does this work on oxygen bootloader (not the tiffany one)?
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] 竹林里有冰:
I am a chinese,so I can't speak English very much.

I try to flash rr rom from a1 through this recovery,but I failed.I even can't flash it into my 5x phone,so I open the rr rom.I saw a file called payload.bin. Its size was 500+Mb.It was different from other rom. So how can I change it into the commom format rom？（The rom was RR-O-v6.1.0-20180612-tissot-Official.zip)
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] xemisxu:
https://xdaforums.com/mi-5x/how-to/guide-how-to-install-a1-rom-5x-t3777139
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] AncientLord:
[MENTION=5982370]Aex12[/MENTION],

Very nice effort and I appreciate it. Can you please update this recovery to support the Custom ROMs with Treble support? It fails to mount vendor thus can't install anything from recovery. I will appreciate this update.
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] VelaVelaVelvela:
Hi. Can I install the EU Beta Oreo ROM with this TWRP version?
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] AncientLord:
I am positive that you can. However, do it at your own risk. :cool:
[Xiaomi Mi 5X ROMs, Kernels, Recoveries, & Other De] Ph.amaral:
Reverting to MIUI after a1to5x install

If anyone could help me, I installed a A1 rom on my 5x, and for the most part, everything works. But now I can't go back to a 5x rom, it does install but i get no wifi and no signal. I guess something is still conflicting and i was not able to fully revert back to Mi 5x.
[Xiaomi Mi A1 Questions & Answers] 0lorenzo:
Is there a way to get rid of the boring message showed up every time if you have unlocked your bootloader?

"Your device software can't be checked for corruption. Please lock the bootloader "

See attached file (not mi a1, but it' s pretty much the same)
[Xiaomi Mi A1 Questions & Answers] prasanna0007:
Simply lock your Bootloder of phone.
[Xiaomi Mi A1 Questions & Answers] 0lorenzo:
What if i need it unlocked?

Example for custom roms
[Xiaomi Mi A1 Questions & Answers] Rajeev:
In my knowledge if u relock bootloader when u r in custom rom u will get some issues.

Also this boot message cannot fix in my knowledge. If u rooted then its not adviced to relock bootloader. Relock ur bootloader only if u r in pure stock and no root...

Unlocked bootloader needs for custom roms and root and twrp
[Xiaomi Mi A1 Questions & Answers] 0lorenzo:
I have magisk correctly installed, but it looks like it' s not enought to get rid of the boot warning
[Xiaomi Mi A1 Questions & Answers] Rajeev:
Magisk won't help u to remove the boot warning. Its normal warning only when we unlock bootloader
[Xiaomi Mi A1 Questions & Answers] 0lorenzo:
Sorry i misunderstood your previous message, i understood that with root the warning would be gone.

I' m asking as newbie, can't we replace it with some other image, like they say on this thread?

https://www.google.it/amp/s/xdaforu...move-corruption-warning-message-t3248441/amp/
[Xiaomi Mi A1 Questions & Answers] Rajeev:
Thats because of my poor English:laugh:

Let me check that thread
[Xiaomi Mi A1 Questions & Answers] vimal suthar:
I rooted my Mi A1 and magisk installed. But when i rebooted my phone then root is gone by itslef. I mean when i rebooted then its unrooted by itslef. Sorry for my bad english
[Tilt, TyTN II, MDA Vario III General] Grey Area:
Help!

I have a Netgear DG834T router as provided by Sky. I have one wired and two wireless connections running into it (let's call them WD, WL1 and WL2 respectively).

On the connections page I can see all of them under "attached devices"...but now I want to connect using my Kaiser (actually an O2 XDA Stellar)

What happens...

On the Kaiser, I get an IP address (assigned by DHCP) as normal - but can't access the internet - or at least, can only access it very rarely - http://www.google.com can't be found, but http://www.bbc.co.uk can. No idea why.

On the router, under "attached devices", not only can I NOT see the Kaiser, but WL1 and WL2 also disappear. WD remains visible. The router cannot ping the IP address of the Kaiser (timed out). If I disable WiFi on the Kaiser, then WL1 and WL2 are immediately visible again. Internet connection on WL1 and WL2 works, even when they are not visible.

I HAVE connected to this network before without any problems.

What the hooting heck is going on, and how do I fix it?

Thanks!
[Tilt, TyTN II, MDA Vario III General] ChumleyEX:
Time to troubleshoot! What happens with this phone on another wireless network. We need to determine if it's the phone or the network. Do you have any friends with a phone like this? Can you use their phone on your network? Do you have any ROMs flashed, has this phone ever been on the network without problems?

If the phone works on another router try looking for firmware updates for the router. Those things really do need to be updated often and it could have something to do with that.
[Tilt, TyTN II, MDA Vario III General] Grey Area:
Only have access to one network :-(. Might be a couple of weeks before I can access a hotel one or something like that.

Think next door neighbour has similar phone, but different provider...will try if he'll let me!

No ROMS flashed.

It connected fine when I first had it. As far as I know, I've changed nothing since then.

2 out of 4 answered...with an option on three...I'll get back to you as soon as I've beaten up my neighbour and stolen his phone...

Joke!
[Tilt, TyTN II, MDA Vario III General] ChumleyEX:
There should be somewhere you can go to test that wireless. I can walk outside the building I'm in and find one.
[Tilt, TyTN II, MDA Vario III General] Grey Area:
You = US, me = UK. We still think the biro is a recent invention...
[Tilt, TyTN II, MDA Vario III General] Grey Area:
Neighbour's phone on my network gives the exact same problem. I've also noticed that when I click "Renew IP" on the Kaiser it doesn't work...it gives me 0.0.0.0, but will occasionally flash up the correct IP address. It's alomst as if the connection is being lost and remade every few seconds. The status ist gives me is "associated to network"...is that different to "connected"?

I've been trying to solve this on my router, but none of the settings seem to make any difference.
[Tilt, TyTN II, MDA Vario III General] cmcmill01:
Same here

I get the same with the router from sky.

Kaiser says I have an IP address, 192.168.0.5, but the it doesn't show up on the attached devices on the router.

What I find that works is hit renew IP maybe twice until you get a really wierd IP address like

169.254.*.**, actually not sure if I'm picking up another network, but for some reason I don't think I am.

I can then browse the web and sync via wifi.

Really pisses me of that it says that it has an IP address but doesn't connect.
[Tilt, TyTN II, MDA Vario III General] unwired4:
1) Make sure you dont have a proxy set up on your wifi connection on your device.

2) The 169. address is your device getting an unauthorised IP address as the router did not receive the correct encryption key from the device.

3) You can check if its an encryption thing by simply logging in to the router (192.168.0.1 in your web browser on pc) and changing the settings to turn wpa off and testing it. The routers username and password are on the card - its something like "sky" and "admin"
[Tilt, TyTN II, MDA Vario III General] ChumleyEX:
Yeah I agree, there is something up with that router.
[Tilt, TyTN II, MDA Vario III General] XtreMe_G:
with my router.....i have to set the wifi power mode on my kaiser to "best performance", any other setting and i get that "associated to network" ****. been this way every since the hermes and the wizard.
[Tilt, TyTN II, MDA Vario III General] cmcmill01:
No, proxy set-up as the device was bought unbranded in US.

Because there are issues with this router, encryption and media streaming devices, I have only restricted the mac addresses with no encryption.

Still don't know about the 169. ip address beacuse doesn't seem to come up as am ISP.
[Tilt, TyTN II, MDA Vario III General] Grey Area:
Now then, how wierd is this?

After all these issues and kind of giving up on it as a bad job, I also noticed that out on the road, my GPRS wasn't working either - TomTom couldn't connect to the "plus" traffic service.

I get on the phone to O2 who told me that my phone hadn't been "provisioned". After one false start where they didn't seem to do anything about it, I have just (literally) had them tell me to go to the O2 Operator settings and tell it to update the "O2 UK Post Pay_GPRS" and reboot.

GPRS now works. And magically, so does my WiFi - IP address negotiated and full access to internet and my router's setup page granted. Working like a charm again.

So - seems to me it's an account setting, and nothing to do with either me poor ol' router or me nice new phone.

For completeness, I was occasionally getting the 169 IP address too, so it sounds like we have EXACTLY the same problem - suggest you get onto your service provider ASAP.
[Samsung Galaxy Tab A series Questions & Answers] cpubugs:
I've purchased 12 of these Tablets for my company. Out of the box they were android 6.0, as soon as we connected them to WiFi the 7.0 Update option came up so we updated all 12. We then loaded our Comodo MDM enrollment on them. Well Next time they rebooted 9 of them would not come up, they just sit at the samsung screen fading in and out. I went into recovery mode to try factory reset & wipe, I get the message that "mdm does not allow factory reset". So I tried resetting the cache which did nothing as well. So I loaded Odin and booted into odin mode tried to load a stock rom and I get the message that the device is in FRP mode and cannot load a custom image...

I have ALWAYS had droids and I favor Samsungs normally.... I have always rooted and unrooted every device I've ever had, but these have me stumped... I cannot get into USB debugging mode, I cannot get the things to boot at all. Every tutorial requires debugging mode. Samsung Business support is NO help at all. So I turn to the dark side... HELP!!!
[Samsung Galaxy Tab A series Questions & Answers] lewmur:
Sounds to me like the problem isn't with Google's FRP lock but with the Comodo MDM enrollment. First thing I'd do is contact their tech support. The FRP lock doesn't prevent you from flashing a ROM with Odin. The FRP lock would just ask for the Google login and password on the first reboot. And I have seen other security apps blame the FRP lock for not allowing a ROM to flash via Odin.
[Magisk] Jman420:
This project has been discontinued. The final state of the module can be found at the GitHub Repo https://github.com/Jman420/magisk_selinux_manager.

Magisk SELinux Manager

A Magisk Module dedicated to the manipulation and analysis of SELinux.

Features

* Select SELinux mode to set at startup

Usage

The SELinux mode to set at startup must be specified during module installation. The SELinux mode can be selected either by specifying the mode (permissive or enforcing) in the install zip's filename (ie. magisk_selinux_manager_v1.0_permissive.zip) or using your phone's volume keys when prompted.

Disclaimer & Recommendations regarding Permissive Mode

This module should be used to enable SELinux Permissive Mode only as a last resort only if appropriate SELinux Permissions can not be generated and injected into the SELinux Policy using selinux-inject, supolicy or magiskpolicy. Putting your device into Permissive Mode will essentially disable all of the operating system level security built into Android and allow any app in any context to do whatever it wants. Actions requiring root access will still trigger your SU Manager App, but all apps have elevated privileges due to permissive mode and may be able to take malicious actions on your device without needing root access. If you find that this module fixes issues you are experiencing with an app I recommend contacting the app developer and trying to work with them to isolate the necessary SELinux Permissions and have them injected into the SELinux Policy at startup.

Here is a discussion of some of concerns to consider when running your device in Permissive Mode : https://xdaforums.com/gen...risks-t3607295

GitHub Repo : https://github.com/Jman420/magisk_selinux_manager

Requirements

* SELinux enabled kernel

* Magisk v15.3+

Change Log

* v1.0.5 - Update Unity Installer Files to v1.5.4

* v1.0.4 - Update Unity Installer Files to v1.5.3

* v1.0.3 - Update Unity Installer Files to v1.5.2

* v1.0.2 - Update Unity Installer Files to v1.4.1

* v1.0.1 - Update Unity Installer Files to v1.4

* v1.0.0 - Initial Release

Special thanks!

* topjohnwu - For providing Magisk and the interesting insights that its source code gave into SELinux

* ahrion & zackptg5 - For providing the Unity Installer and Vol Key Input code

* Everyone who supported the old magisk_permissive_script module and giving me a bit of motivation to keep working on SELinux stuff

Release Distribution Plans

All Releases are available on the Magisk Module Repo. Releases will not be distributed here.
[Magisk] dredq:
What are the differences with this zip and the old one?
[Magisk] Didgeridoohan:
When installing the module you can choose if SELinux should be set to enforcing or permissive (it's written right there in the OP).
[Magisk] dredq:
Sorry. I saw that. I was wondering if there where any other differences.
[Magisk] Jman420:
Nope, if there were I'd have mentioned them.
[Magisk] samplebird:
I installed the module and set it to permissive, but when I restarted my phone now it is stuck in the boot animation. I tried uninstalling using the magisk uninstaller, but still the problem remains. Is there a way to undo the changes from Recovery? Thank you! Running lineage 14.
[Magisk] Jman420:
You can flash the zip again to uninstall, thanks to Unity Installer... but I don't expect that to do anything different than the Magisk Uninstall. You may need to debug your Magisk installation with Magisk Manager for Recovery (https://xdaforums.com/apps/magisk/module-tool-magisk-manager-recovery-mode-t3693165).
[Magisk] Didgeridoohan:
Did you try installing the module again and choosing enforcing instead of permissive?
[Magisk] Jman420:
Update v1.0.1 has been released on Magisk Repo. No real functionality updates, just updated Unity Installer to latest (v1.4). See change logs for Unity Installer here : https://xdaforums.com/android/software/module-audio-modification-library-t3579612

I've also migrated to using Semantic Versioning for this project (although it's probably not needed). See details here : https://semver.org/
[Magisk] :
The module doesn't seem to be part of the magisk repo yet. But v1.0.0 us working fine on my side anyway. :good:
[Magisk] Didgeridoohan:
Clear the repo cache (Manager settings) and reload the Downloads list (pull down).
[Magisk] :
That did the trick. Thx!
[Magisk] mxn2000:
Not working on Oreo b390 Huawei P10. SeLinunx remains on enforce:

watch this issue:

https://xdaforums.com/p10/help/magisk-16-0-p10-orea-t3765921
[Magisk] Didgeridoohan:
"Preserve Forced Encryption" doesn't have anything to do with SELinux. That's /data encryption...

Try running:

setenforce permissive

And if that still doesn't work, run this and use whatever options are available, or return with the result:

setenforce --help
[Magisk] Intelli69:
Every time I setenforce 1 it always says Permissive after .. Even after reboot or in the Twrp terminal .. Anytime I type grtenforce it always says Permissive. What do I type in terminal emulator to access this mod? Am I missing something here?? Lol sorry - still learning.
[Magisk] Didgeridoohan:
You don't have to do anything after installing the module. At installation your choose enforcing or permissive, and then that's what the module will set at each boot.
[Magisk] Intelli69:
OK I thought that was it! Thanks!