Hi everyone!
So the Xiaomi ADB/Fastboot Tools, a Windows application I published on the subreddit about 6 weeks ago, receives its first major update (version 2.0) and I am also making it open-source and thus available for everyone to inspect the code or compile the program for themselves.
[The original post](https://www.reddit.com/r/Xiaomi/comments/84mo9k/xiaomi_adbfastboot_tools_a_gui_for_adb_and/)
[The repository on GitHub](https://github.com/Saki-EU/XiaomiADBFastbootTools)
A quick rundown on the features and changes if you can’t be bothered to check the OP:
**Features:**
* **Debloater** \- Remove unnecessary apps and services
* **Camera2 API Enabler** \- Enable the camera2 API of Android (TWRP required)
* **Get device properties** \- Retrieve tons of statistics and information about your phone
* **Image Flasher** \- Flash the boot/cust/modem/persist/recovery/system partition with an image (unlocked bootloader required)
* **Wiper** \- Wipe the cache or perform a factory reset
* **Bootloader Unlocker** \- Lock or unlock the bootloader of the Mi A1 \(OEM unlocking must be enabled\)
* **ADB Rebooter** \- Advanced rebooting options using ADB
* **Fastboot Rebooter** \- Advanced rebooting options using fastboot
[Screenshot](https://i.imgur.com/Ui0VdzI.png)
**Warning: Use the tool at your own risk. Removing factory apps which aren’t in the tool may break your phone.**
[Download](https://github.com/Saki-EU/XiaomiADBFastbootTools/releases)
Changelog:
Update v2.0.0.0
– Added new apps to the Debloater
– Added the ability to uninstall any app using the Debloater
– Added the Camera2 API Enabler
– Cleaned up the code and optimised some algorithms
Update v1.2.0.0
– Added new apps to the Debloater
– Optimised the algorithm of the Debloater
– The tinted buttons are now red
Update v1.1.0.0
– Tinted the text on buttons that perform irreversible actions
– Fixed some minor bugs, optimised code
Update v1.0.5.0
– Fixed an issue with codename reading in ADB mode
– Added Hangouts to the Debloater
Update v1.0.4.0
– Fixed an issue with serial number reading in fastboot mode
Update v1.0.3.0
– Added App Vault and Xiaomi SIM Activate Service to the Debloater
Update v1.0.2.0
– Optimised device loading algorithms
– Bootloader status is now displayed in ADB mode
– Leftover processes get killed on exit
Update v1.0.1.0
– Fixed scaling issues caused by higher scaling settings
Not on Mi Max 2 for me at least what I can see, but I am on xiaomi.eu, I use GCam but stock camera seems to work fine too. I’d think its the same for Global ROM. Only issue I see is that slow motion crashes GCam but if I ever need that I can use stock camera for that
Is there a list of what is safe to uninstall for MIUI debloat?
Hey, I have a question for you since google can’t help me with it, trust me, I tried.
I have a Mi A1 device and after I flashed the latest Oreo update ([official](http://en.miui.com/download-333.html)) on it, it went into a coma (bricked but not dead), i.e. the phone kept vibrating every 1 second when it’s connected to PC or when I push the power button. Can’t get to fastboot or recovery, screen doesn’t turn on and no charging screen when connected to power.
So I had to open up the back cover and did the “[two point short](http://en.miui.com/thread-1680467-1-1.html)” trick to force boot it to EDL mode, where I was able to flash the factory (earlier) fastboot image (Nougat) through Miflasher program.
After that I was able to boot to fastboot, and its default recovery. But the problem remains, I cannot boot to the system itself. When I press the power button it shows the splash screen and says **”The system has been destroyed”**. I can go to fastboot with volume down + power button combo. I tried to flash the same fastboot rom through fastboot as well, I got the same result.
I also flashed the official and unofficial TWRPs on it, it boots into them as well. I also tried to flash other custom ROMs in it through those TWRPs, following every step clearly, where they say that after flashing the ROM TWRP needs to be flashed again. I did all that. But the problem remains, after the flash and reboot it always shows me that **”The system has been destroyed”** message and the phone has to be shut down ([because it asks you to power it off on that message](https://u01.appmifile.com/images/2018/04/06/4ec4b36a-23d0-4850-9805-254e34eddd93.png).)
And ofc the phone is unlocked. Although it is easy for it to be locked and unlocked through fastboot anyway.
So I am basically stuck now. Do you know a way forward? Is there a cure for it? Or my last option is to take it to service center when I know for sure that they are going to ask me to change the motherboard. This device was bought in Hong Kong so the warranty card is useless here.
Thanks for reading.
I tried all of them. I flashed multiple times with all options selected one by one. Also one funny thing is that all other official fastboot roms gave me that first problem (vibrating, dead screen). Only one version of fastboot ROM (tissot_images_7.8.23_20170823.0000.00_7.1_61cf97d794) revived the phone and allowed me to get to fastboot.
Would I be right in assuming this won’t work if I haven’t unlocked with xiaomi?
I don’t believe so it should just enable google camera to be installed
Thanks for this, doing god’s work.
edit : btw your name reminded me of this song https://www.youtube.com/watch?v=CQLIA51zRLs
Wow that is so great!
Don’t use MIUI myself, so don’t need the tool. But I looked at the app, and noticed there are 2 “rebooter” sections
You’re a nice person. Can I ask what won’t work? Thanks!
Was the A1 bought from an official xiaomi store? There has been odd cases where mi 5x are modified to be a1 and they act quite funky.
I assume this is made for MIUI 9, but do you know if it works on MIUI 8?
Hmm… It says Android one in the back.
Thanks! 😀
>Warning: Use the tool at your own risk. Removing factory apps which aren’t in the tool may break your phone.
This, I didn’t read in the first place, if i have read it I wouldn’t have used it at all.
Nonetheless, I used it and removed some of the default apps which i didn’t like.
OP can you please share why it would break the phone, I mean it should give some error or something.. why go directly to “break”?
So it works on non-rooted Nougat-based MIUI ROM?
I’m waiting for me Redmi note 5 pro global, and am looking into roming and stuff to get rid off stock apps and get android 8 running on it, however I’ve never done it. Where can I learn about this stuff ?
[Getting this](https://i.imgur.com/jYb2q2a.png) when clicking on “Get device information”.
Also doesn’t seem to be working when clicking on Uninstall or clicking “Reboot into System”.
Status section is at first just listing the apps selected and then on selecting Reboot just stays there with “Rebooting…”
So basically whatever is there in the tool we can remove them and removing other apps (by other means) which are not there in this tool may cause bootloop
Mi 5 32GB. MIUI 9.5.2 Stable (NAAMIFA)|Android 7.0
> So you are connected in USB debugging (ADB) mode, right?
Developer options and USB debugging are ticked On in settings.
Any other way to check this connection?
> Does your phone info appear on the left when you click Load device (ADB) in options?
Nothing happens on doing this.
> It works for me and everyone else I’ve talked to, I wonder what’s the mismatch there.
Its probably on my end but i can’t get what it is.
List of devices attached
* daemon not running; starting now at tcp:5037
* daemon started successfully
a4d427e3 device
Then back to prompt.
Thanks for replying to me for this though. You don’t have to do it but I appreciate it.
Nothing. Same as before.
Thank you for the reply.!
Happy to report that it works on mac with wine 3.6.
Debloated some apps I didn’t like, love how the system just removes buttons that would’ve led to deleted apps, even though they should be there by default (e.g. remove Notes — option disappears in sync preferences). Thanks for the app.
Is it possible to flash images in EDL mode? or is the button only for booting into EDL?
So, if I wanted to flash persist img alone on Mi5s, where the persist FS is writable only in EDL mode, this tool isn’t for me?
I flashed the persist.img once before and remember it being a hassle.
I used MiFlash with edited partition.xml and rawprogram.xml from the MIUI fastboot image to flash only the one img I needed.
If you have an easier way of doing this, I’m all ears 🙂
I can’t find advertising services in debloater (analytics,msa etc.)
edit: it worked on mi store and other system apps, but don’t know how to remove msa..
Could you help me configure QFIL to flash only the persist.img? I’m thinking:
Programmer: prog_ufs_firehose_8996_ddr.elf
RawProgram xml:
I’d remove everything except for the persist line
… filename=”persist.img” label=”persist” …
but then I need to specify Patch.xml which mainly contains entries about gpt_main0.bin and gpt_backup0.bin
so maybe it’s best to leave these in RawProgram.xml:
… filename=”gpt_main0.bin” label=”PrimaryGPT” …
… filename=”gpt_backup0.bin” label=”BackupGPT” …
They seem to contain information about partitions, I’m not sure if that’s relevant in this case. Do you have any experience with this?
Config:
[un-edited rawprogram0.xml](https://gist.github.com/jatuvosiyi/71a28a5e7a24097bc5a527d15e1d9872) and
[after edit](https://gist.github.com/jatuvosiyi/4f77bb8d31de8ffa13495663ebcf0d0a), I wouldn’t touch anything in [patch0.xml](https://gist.github.com/jatuvosiyi/cea96ef179be7e92294e21e0b41ef456).
late reply my bad, but try verifying here:
https://www.mi.com/verify/
Thanks for this. I will try it tomorrow. :))
is it safe to remove it though? btw by package name you mean “com.miui.msa.global” or something else?
edit: is it possible that these spywares/adwares would be added to debloater in upcoming versions of adb tools?
MSA is included in u/sharkcpn ‘s list as I can see in the screenshot, so its prob safe to remove. He might know better than me about which apps are safe to either freeze or remove (I mean there might be some apps which are better to freeze than removing, it might prevent bootloops/data loss.) If you still want a package name list from me, I can do it, but remember I am no techie like you two…
why don’t you share this on miui forum btw? would they delete the thread if you post this in their forum?
I would suggest to add all Facebook apps to the list
* com.facebook.appmanager
* com.facebook.katana
* com.facebook.services
* com.facebook.system
There is only one “Facebook” app (I think it is katana) listed in the app launcher, but the other three remain if you uninstall Facebook app
Thanks, then it must be that I forgot to update the app
cant find page on gitub