Have to mention this to avoid possible confusion, this question is not duplicate. This question is specific to using adb to uninstall a package. There are several similar questions but are all different from this one, as they're focused on removing an application by any means.
Please do not provide answers using "rm" command to delete the package files. Also, answers related to malformed package names, or trailing carriage returns. I think they're pretty much all covered in all the other questions.
pm uninstall functionality but after ROM upgrade. Some things won't uninstall anymore. For example the following two system apps (which I removed under previous ROM, significantly improving overall performance):
Now I get an error trying to pm uninstall them: Failure [DELETE_FAILED_INTERNAL_ERROR]
But other system apps (which won't uninstall through regular android interface) do uninstall via
pm uninstall command. Example:
So both are system apps, what could be the difference between them?
For reference, I upgraded from MIUI 188.8.131.52 to 184.108.40.206, and re-installed TWRP and SuperSU. This question is not specific to my ROM, as I see other people are in the same situation. But I seem to have an advantage being able to be able to uninstall some system apps. And am willing to contribute, to find a solution for everyone, to uninstall any app.
I tried: mount -o rw,remount /system
but that didn't solve it.
Please help out with any ideas along the way. Thanks!
Update 1 - Confirming steps to avoid intermittent issues
* Wiped all partitions in TWRP
* Installed Latest ROM (MIUI 220.127.116.11)
* Went back to TWRP, wiped only /Data
* Restored /Data from backed up version of the ROM that came with device (MIUI 18.104.22.168)
* Now after I boot into OS, ROM shows as latest (MIUI 22.214.171.124) in settings
Now I am able to pm uninstall every app I've tried. Even the most resilient: Google APP, Updater, Security.
This Frankenstein.. err I mean hybrid ROM works fine so far, and I've already removed many system packages, making the phone (Redmi 3S+) visibly faster. But I would still like to pinpoint what was causing this to make it into Generic Solution. So, if it ain't broke I'm willing break it, so next time it breaks we will know what's causing it and how to fix it.
Update 2 -
* Wiped all partitions and restored all partitions from Original ROM.
* Restored to factory settings (using TWRP)
* and after booting into ROM, went back to TWRP and made another backup
* Using same scenario as in Update 1 above, with only exception of using /Data from here. pm uninstall does not work.
Any thoughts on the differences between the two /Data partitions I should be focusing on?