Yes @zypper, this is the better place to answer your question than here.
"Are both commands the same? "More or less yes. Maybe I misspelled it for a beginner. But this is not ill-will. It’s just routine. It must be direction and completeness
C:>adb devices
List of devices attached
1234eeee56789 device
C:>adb shell
a5y17lte:/ $
a5y17lte:/ $ pm uninstall -k --user 0
For example: a5y17lte:/ $ pm uninstall -k --user 0 foundation.e.weather
“adb uninstall --user 0” requires that “adb shell” has already been executed. Without having executed “adb shell” at least once, the following commands “adb-commandos” will not work.
adb shell - run remote shell interactively adb shell <command> - run remote shell command
The command “adb shell” allows to enter the interactive shell.
The (system) apps are not completely removed from the system, but only for the current user via parameter –user 0.
You can uninstall pre-installed Apps. Whether “easily” applies is subjective.
To uninstall Apps permanently …
Note the package name of the App in Settings - Apps & notifications - (select the App) - Advanced - (the package name is given at the bottom of the page, e.g. foundation.e.calendar)
If not done already, make the Developer options visible by tapping on the Build number in Settings - About phone a few times until you are being declared a developer.
If not done already, enable Settings - System - Advanced - Developer options - Android debugging
Connect your phone to a computer via USB.
If not done already, download the current Android SDK platform tools to the computer and unzip the ZIP file to a folder you can navigate to easily.
Open a command line/ terminal and navigate to the folder to which you unzipped the tools. If you are unfamiliar with the command line/ terminal, here’s a really good and short 1 page introduction to everything you need for now … https://tutorial.djangogirls.org/en/intro_to_command_line/
Enter the adb devices command to display an ID of the phone to make sure that ADB works with the connected phone (upon first usage the phone should ask you to confirm this access from the computer, there you should also be able to select that the phone remembers that decision, if you want).
Uninstall the App with the command adb shell pm uninstall --user 0 packagename
(instead of packagename enter the package name of the App you noted before)
If at some point you would want to bring an App back which was uninstalled in this way, use the command adb shell cmd package install-existing packagename
To get rid of a system app it does’t has to be uninstalled.
The app only needs to be diabled with: pm disable-user --user 0 packagename
To bring it back just use: pm enable packagename
Thanks for the informathion, I have disabled the system apps I don’t like, for purely aesthetic reason I would rather unistal them but until /e/ allows this to be done easily, I think it might be best not to.
Well, why not uninstall dialer and camera? On my phone I have disabled those two and installed some with similar functionality that like better. My attitude is there should be some level of access to the phone that allows you more or less to do anything. It doesn’t have to be easy to get there but it should be there. There could be a warning that you need to know what you are doing before entering this level. However at this level it should be entirely up the user what they do or don’t uninstall. After all if you have no idea what you are doing why are you uninstalling system apps in the first place?
Ok so skipping the introduction (adb install, dev.-options enable, etc.), which is prereq of course, it would mean:
I would also need some more research, how this differs from just disabling, but it somehow clear that the app is not completely gone from the system (like when you uninstall it). Otherwise bring back approach would mean adb (in normal mode) would have access to a store or so to actually re-install the app (+ within /system).
I think the easter egg app is unimportant enough to test.
:/ $ pm uninstall --user 0 com.android.egg
Success
:/ $ pm uninstall com.android.egg
Failure [DELETE_FAILED_INTERNAL_ERROR]
## it is a system app:
:/ # pm list package -s | grep egg
package:com.android.egg
## and after uninstall that way it stays/still visible in:
:/ $ ls /system/app
...
EasterEgg
...
:/ $ cmd package install-existing com.android.egg
Package com.android.egg installed for user: 0
## the same as? 'pm install-existing --user 0 com.android.egg'
So it is somehow “gone” and not visible for you in your user context anymore, but not completely gone from the system. Also it would be interesting if it is a difference in regards of updates. Will an OTA bring the App back or is it like one stated for the disable approach and it will stay disabled. We somehow drift away from the initial topic. Maybe a forums admin should split, if needed a this message.
Don’t be. I just wanted to say you were right in noticing that while the command is “uninstall”, it technically perhaps doesn’t quite uninstall. Perhaps worded poorly.