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: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??
Code:
adb shell pm install-existing com.miui.gallery
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:
which just callls "cmd package" with the passed in command arguments.
Code:
$ cat /system/bin/pm
#!/system/bin/sh
cmd package "[email protected]"
$
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
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>
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