com.xiaomi.account accidentally "debloated"


ADU5647

Members
20 Nov 2023
2
3
Dear all,

On the Xiaomi Mi10T Pro, I accidentally deleted the com.xiaomi.account app while using ADB AppControl to remove Chinese bloatware. When deleting with ADB AppControl, I checked the option "Create backup of the application to be deleted." After deleting, ADB AppControl automatically disconnected from the phone, and the phone displayed the "Device locked" screen with the options "Activate device" and "Wi-Fi settings" on the black screen. The phone is no longer recognized by ADB, and it seems that the developer mode was automatically deactivated. I know the password for the Xiaomi account. When entering the Xiaomi account password, the desktop with app icons is displayed for a second and then automatically returns to the lock screen. Is there a way to restore the application backed up with ADB in cold start mode? Is there another way to restore the phone without losing photos and other data (Xiaomi notes)? I would be very grateful for advice or service offers... Thank you very much.
 
. Unfortunately, ADB can no longer connect to the phone. I noticed that the phone still allows incoming calls and you can even answer them, and swipe down from the top to access various buttons such as Bluetooth, Wi-Fi, etc. However, when trying to access settings, it is blocked. It also does not allow access to the desktop. Does it make sense to send the phone to Xiaomi Service?
 
I had this exact same issue and I managed to mostly solve it. I'll say how I did it, hopefully it helps someone.
I "solved" this issue by managing to save the files on my phone to my computer, and then wiping the phone. (Note: You still need to know your Xiaomi Account's password)
When I entered my password to activate my device, it unlocked it for like half a second and then immediately locked it again. I connected my phone to my PC, rebooted my phone, went to WLAN settings, pulled down the notification menu and hit the notification "Charging this device via USB". This of course would take you to select between charging your phone/file transfer/photo transfer, but it got immediately locked. After this, I typed in my password and activated my phone, and right when I entered password, I started tapping my screen where the "File Transfer/Android Auto" option would show up, because whatever was supposed will happen when your phone gets unlocked for that fraction of a second. With some luck and a few tries, I managed to activate file transfer, and to my surprise I had full access to my phone's files even while it was locked. I saved all of my important pictures and files, I even wrote down all the apps I had installed, by looking at my Android folder. So with pretty much everything important saved, I could safely reset my phone. I just followed the standard procedure for wiping my phone without a password. I turned it off and held the power button and the volume up button simultaneously until the recovery menu showed up, and wiped everything from there. This reset everything back to factory settings, including reinstalling com.xiaomi.account, or whatever apps absence caused the issue. I still had to know my Xiaomi account password and my phone's old lock screen password.
So just like that, I got my phone back

EDIT: I also managed to recover the photos in my private album. The encrypted photos are stored at MIUI/Gallery/cloud/secretAlbum as .lsa and .lsav files. I found some code on GitHub (https://github.com/ObikBobik/miui-cloud-decryptor) that can decrypt these files, because apparently the encryption they used is not very good. (You'll need some basic computer skills to run the python script, but you can just ask ChatGPT for help)