[Debloating] Xiaomi Poco F1 - Safe to remove services

conceptrat

New member
Jan 31, 2015
4
6
0
Hi i have debloted my poco but by mistake (due to copy paste) i have deleted "gallery" app. Is there any way to get it back or can download from any other source??
You can just use "adb" again to reverse this as long as you uninstalled with "--user=0". So, using your request to restore/reinstall the Gallery app, you'd type:

Code:
adb shell pm install-existing com.miui.gallery
or

Code:
adb shell cmd package install-existing com.miui.gallery
Tip: The second version is the actual "full" command to run the service "package". "pm" is just a short shell script located in "/system/bin" as follows:

Code:
$ cat /system/bin/pm
#!/system/bin/sh
cmd package "[email protected]"
$
which just callls "cmd package" with the passed in command arguments.​

I've used this to recover from removing a vital user component "com.android.providers.calendar" instead of "com.android.calendar". Don't ask but it results in no calendars and an uneventful life :p Anyway too much whisky :D

You could also use this to get out of a boot loop, as long as it's getting far enough to running the USB Debugging service or the lock screen. In this case you'll need to know exactly which package you removed that caused the boot loop, and then fire the following command off while the phone is booting until it succeeds:

Code:
adb shell cmd package install-existing <package name>
YMMV

Credit to: Vordx for this tip https://forum.xda-developers.com/android/help/how-to-install-uninstalled-packages-t3894235

For some more interesting "services" that you could, but possibly shouldn't, play with type:

Code:
adb shell cmd -l
 
  • Like
Reactions: Vicente Cabrera
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone