Android, DISABLE or uninstall more bloat on non-rooted devices (here an S8)

When normal uninstall or disable is not available for an app, we DO have a bigger axe for trimming devices, even un-rooted ones :mrgreen:

(image from here)

UPDATE 201-10-09: The below has been rewritten with “disable-user”, and the original “uninstall” toned down.

On Android, benign apps can be uninstalled (or at the least disabled) under Settings, Apps, for each app.

But unfortunately quite some bloat apps, does NOT fall in the benign category. Both by Google, the manufacturer and for branded devices by the carrier…

Yet all hope are not lost as we can do something using a pc! We can either Disable or LOGICALLY uninstall an app using a pc, even on non-rooted devices!!

Disable is reversible. But uninstall can (to my knowledge…) not be reverted on locked devices – though you can of course always do a factory reset. [*] See later for a re-install syntax, with some quirks though!

 

Below is from my Samsung S8, with info merged from
A mail from the guy behind must-have apps like 3c Battery Monitor that is part of 3c All-in-One Toolbox that I highly recommend.
https://forum.xda-developers.com/galaxy-s9-plus/help/list-bloatware-youd-recommend-to-rid-off-t3759500
https://www.androidsage.com/2018/08/29/how-to-remove-disable-uninstall-remap-bixby-button-samsung-galaxy-note-9-note-8-s9-s8

 

Here is the recipe with some examples

Connect the device to a PC (windows or mac), accept displayed prompts.

If not already enabled, on the device enable Developer Options (Under Settings About, Software information, click multiple times on Build number)

In Settings, Developer Options, set the USB-debugging mode TEMPORARILY to ON – remember to set to OFF again afterwards!!

On the PC find ADB.EXE (if not installed, it can be fetches from multiple sites – be sure to find a trustworthy one)

Open a CMD-box (no special privileges needed on the PC-side) and go to the suitable directory.

To check that it is Connected, and debugging is ON, enter the below, if it is, a device ID is listed (here a faked id)

ADB devices

List of devices attached
abcd1234abcd1234ab device

 

Here the disable-user syntax on devices with newer Android (Before M, use “disable”)
Due to a strange decision somewhere, disabling an app, does NOT mean that it is also stopped, so you need to EXPLICITLY stop it also. More on that after the disabling…
The good thing about disable-user is that it is reversible, the bad is that the junk is still there (but it does not completely disappear with pm uninstall either)

 

To address stuff we want to get rid of, we need to know/guess the package name, it is not directly visible from the Apps UI, but many tools can help with that, e.g. this.

ADD: With Android 9 Pie they seem to have added a THIRD name for some, that is shown in the Settings Apps – this can make things a bit more confusing….
“Hiya Service” was on Oreo called “android-ss-service-lib”, and has the package name “com.hiya.star”
Similar for some others. (e.g. the new name “Device Care”, is still handled as “Device Manager”)
So some of the below are not 100% correct packages names. For a script adjusted for Android 9 Pie, see this post

The below is Android 8.0.1 Oreo:

To get rid of BIXBY I checked for what contains “bixby” – it is not always that easy to know exactly what to search for, and more exists hiding behind odd names.

Be aware that ADB is case sensitive, for both commands and parameters

ADB shell pm list packages bixby

package:com.samsung.android.bixby.agent
package:com.samsung.android.bixby.es.globalaction
package:com.samsung.android.bixby.wakeup
package:com.samsung.android.bixby.plmsync
package:com.samsung.android.bixby.voiceinput
package:com.samsung.systemui.bixby
package:com.samsung.android.bixby.agent.dummy

And get rid of each:

ADB shell pm disable-user com.samsung.android.bixby.agent
ADB shell pm disable-user com.samsung.android.bixby.es.globalaction
ADB shell pm disable-user com.samsung.android.bixby.wakeup
ADB shell pm disable-user com.samsung.android.bixby.plmsync
ADB shell pm disable-user com.samsung.android.bixby.voiceinput
ADB shell pm disable-user com.samsung.android.bixby.agent.dummy
ADB shell pm disable-user com.samsung.systemui.bixby

…And a few extra parts with names hard to guess (here I used “system info for android” )

ADB shell pm disable-user com.samsung.android.visionintelligence
ADB shell pm disable-user com.samsung.android.app.spage

 

To get rid of Faecesbook

ADB shell pm list packages facebook

package:com.facebook.services
package:com.facebook.katana
package:com.facebook.system
package:com.facebook.appmanager

ADB shell pm disable-user com.facebook.services
ADB shell pm disable-user com.facebook.katana
ADB shell pm disable-user com.facebook.system
ADB shell pm disable-user com.facebook.appmanager

 

To get rid of “Sport

ADB shell pm list packages sport

package:com.samsung.android.widgetapp.yahooedge.sport
package:com.google.android.backuptransport

(Note the false positive of the search: tranSPORT)

ADB shell pm disable-user com.samsung.android.widgetapp.yahooedge.sport

 

To get rid of “Finance

ADB shell pm list packages finance

package:com.samsung.android.widgetapp.yahooedge.finance

ADB shell pm disable-user com.samsung.android.widgetapp.yahooedge.finance

 

To get rid of “Samsung Voice, after first searching “voice” I found out it was “svoice”

ADB shell pm list packages svoice

package:com.samsung.svoice.sync
package:com.samsung.android.svoice

ADB shell pm disable-user com.samsung.svoice.sync
ADB shell pm disable-user com.samsung.android.svoice

 

Here used to disable Samsungs Gallery

adb shell pm list packages gall

package:com.sec.android.gallery3d

adb shell pm disable-user com.sec.android.gallery3d

 

Here for the sticker-stuff

adb shell pm list packages stick

package:com.samsung.android.provider.stickerprovider
package:com.samsung.android.app.camera.sticker.facear.preload
package:com.samsung.android.stickercenter
package:com.samsung.android.app.camera.sticker.stamp.preload

adb shell pm disable-user com.samsung.android.app.camera.sticker.facear.preload
adb shell pm disable-user com.samsung.android.app.camera.sticker.stamp.preload
adb shell pm disable-user com.samsung.android.stickercenter
adb shell pm disable-user com.samsung.android.provider.stickerprovider

 

Of course other bloat can also be disabled, but I think you got the picture by now… See below for script

NOTE To each disable we need to explicitly stop it also (most of them are started, and they are NOT stopped by a disable!!!)

You will need to copy the commands and replace “pm disable-user” with “am force-stop” (some -not all- you can alternatively stop from within the UI, but much more cumbersome one by one). You most likely also want to clear the cache and data for the disabled app (do not expect the storage usage to go to zero though…)

Here an example:

adb shell pm disable-user com.sec.android.gallery3d
adb shell am force-stop   com.sec.android.gallery3d
adb shell pm clear        com.sec.android.gallery3d

If you later wish to, you can reenable it by

adb shell pm enable com.sec.android.gallery3d

(note it is “enable” not “enable-user”)

 

On the phone/phablet, set the debugging option back to increase security:
In Settings, Developer Options, Set the usb-debugging back to mode OFF

 

My (current 2018-12-13) BAT-script for butchering additional bloat on the S8

@If %1.==. goto calls
ADB shell pm disable-user %1
ADB shell am force-stop   %1
ADB shell pm clear        %1
@goto :EOF

:calls
@Echo Make sure the device is connected, and USB-debugging is enabled (and preferable pull the dos-box of this wide)
@Pause

REM ---------- Gallery
@Call %0 com.sec.android.gallery3d

REM ---------- Stickers, "Default live sticker", "Default stamp", "StickerCentre", "StickerProvider"
@Call %0 com.samsung.android.app.camera.sticker.facear.preload
@Call %0 com.samsung.android.app.camera.sticker.stamp.preload
@Call %0 com.samsung.android.stickercenter
@Call %0 com.samsung.android.provider.stickerprovider

REM ---------- Game Launcher , Game Tools
@Call %0 com.samsung.android.game.gamehome
@Call %0 com.samsung.android.game.gametools

REM ---------- Samsung Cloud
@Call %0 com.samsung.android.scloud

REM ---------- Gallaxy Apps, Gallaxy Essential Widget
@Call %0 com.sec.android.app.samsungapps
@Call %0 com.sec.android.widgetapp.samsungapps

REM ---------- Samsung Service Push
@Call %0 com.sec.spp.push

REM ---------- Gear VR Service
@Call %0 com.samsung.android.hmt.vrsvc

REM ---------- WithTV
@Call %0 com.samsung.android.app.withtv 

REM ---------- Voice Assitant
@Call %0 com.samsung.android.app.talkback 

REM ---------- Samsung Galaxy Friends
@Call %0 com.samsung.android.mateagent

REM ---------- Samsung DeX Home, Samsung DeX
@Call %0 com.sec.android.app.desktoplauncher
@Call %0 com.sec.android.desktopmode.uiservice

REM ---------- Photo Editor
@Call %0 com.sec.android.mimage.photoretouching

REM ---------- "Samsung Internet Panel", "Tasks edge" ,"Apps edge", "Clipboard Edge", "People Edge", "EdgeScreen"
@Call %0 com.samsung.android.app.sbrowseredge
@Call %0 com.samsung.android.app.taskedge
@Call %0 com.samsung.android.app.appsedge
@Call %0 com.samsung.android.app.clipboardedge
@Call %0 com.samsung.android.service.peoplestripe
@Call %0 com.samsung.android.app.cocktailbarservice

REM ---------- "Samsung Connect", "Samsung Connect", ?????
@Call %0 com.samsung.android.easysetup 
@Call %0 com.samsung.android.beaconmanager
@Call %0 com.samsung.android.oneconnect

REM ---------- Smartthings
@ECHO, ***YES*** the following disable fails - but stop works:
@Call %0 com.samsung.android.ststub

REM ---------- Div Bixby
@Call %0 com.samsung.android.bixby.agent
@Call %0 com.samsung.android.bixby.es.globalaction
@Call %0 com.samsung.android.bixby.wakeup
@Call %0 com.samsung.android.bixby.plmsync
@Call %0 com.samsung.android.bixby.voiceinput
@Call %0 com.samsung.android.bixby.agent.dummy
@Call %0 com.samsung.systemui.bixby
@Call %0 com.samsung.android.visionintelligence
@Call %0 com.samsung.android.app.spage

REM ---------- Div FaecesBook
@Call %0 com.facebook.services
@Call %0 com.facebook.katana
@Call %0 com.facebook.system
@Call %0 com.facebook.appmanager

REM ---------- Sport
@Call %0 com.samsung.android.widgetapp.yahooedge.sport

REM ---------- Finance
@Call %0 com.samsung.android.widgetapp.yahooedge.finance

REM ---------- Samsung Voice
@Call %0 com.samsung.svoice.sync
@Call %0 com.samsung.android.svoice

REM ---------- Calendar (Greenish icon)
@Call %0 com.samsung.android.calendar

REM ---------- Game Optimizing Service
@Call %0 com.enhance.gameservice

REM ---------- IMS Settings
@Call %0 com.samsung.advp.imssettings

REM ---------- Samsung Text-to-speech engine
@Call %0 com.samsung.SMT

REM ---------- "Samsung Themes", "Themes", UPSM="Ultra Power Saving Mode"
@Call %0 com.samsung.android.themestore
@Call %0 com.samsung.android.themecenter
@Call %0 com.samsung.upsmtheme


REM ---------- Google Text-To-Speech
@ECHO Accesibilities can not handle if this is disabled, so STOP only
REM @Call %0 com.google.android.tts
ADB shell am force-stop   com.google.android.tts


REM ---------- Samsung "Sound detector"
@call %0 package:com.samsung.android.app.advsounddetector
:EOF

 

Here a collage of the (currently) disabled. (Some through the UI the rest with the above)

(You may note that some are marked “Not installed”, see a little later on that…)

Apart from that I uninstalled a few Samsung apps the regular way

After disabling and stopping the above bloat, the idle consumption (while I sleep) has gone down from 0.4%/h to 0.2%/h (And 0.4% was AFTER uninstalling/disabling the few allowed from within the UI)

to

Now the main culprit apart from the ‘system’ is the mail, (On my Priv it was typically around 1%, but of a faster discharge, so probably roughly the same amount of energy used)

Note that the ‘Firewall’ got substantially less to do too, I assume due to some of the data stealing has been reduced too (nice side effect!!)

And as can be seen the vast majority (87%) of the idle power-consumption is now communicating with the cell tower! (So the usage in aeroplane mode can be expected to be almost nothing).

(This usage can be slightly reduced If I place the phone on the window sill. I got about 33% at ‘High – 4″ – when I tried that one night last week)

The Priv was also at around 0.4%/h when idle. With very low usage I had 0.5%/h in mean over a week, see this.
So ‘slimmed down’ for the worst bloat the S8 is (even) leaner on the battery. As expected with a newer chispset. And I did not know the above method until recently, so never trimmed any of the stuff that could not be disabled through the UI on the Priv.

BUT nothing like “Android System” or “Kernel” did even get in the top 14 on the Priv over the 1 week period above, so at the highest 0.1% of battery…
So this must mean that there is still a LOT of bloat still hiding as system that should be weeded out on the S8… (Or that the Android Marshmallow with BB’s patches is just better optimized than Oreo with Samsung’s)

 

[*]

The ADB  does apart from disable-user and uninstall also offer other options like hide and unhide, though not mentioned in the more comprehensive guide here, but I get a permission error if I try…

The disable option seems to have been deprecated on newer Android, and been replaced by disable-user. I also get a permission error trying the disable.

Others seem to NOT experience the same limitation, so it MIGHT be something that is dependent on the Android version, or particular implementation of it, or unlocked bootloader. I’m currently on 8.0.0 on a Galaxy S8 (SM-G950F, exynos)

To test if I could reinstall after uninstall, I have tried to do it with the install -r, but get an error -3001, just like this and this – so either not possible, or we are making the same error). ADD see details further down, also a different mostly working syntax.

 

PS

Note that there is a package that appears in a rather odd way.

com.samsung.upsmtheme

Seen from ADB shell pm list packages , it is not hidden in any way. But you can not see it from within the device. Tried 3C Toolbox and other tools…

This is almost certainly the dark theme used by the MAX Power Saving Mode (selectable in Device Manager, Battery), that was previously known as “Ultra Power Saving Mode”. See e.g. here

(I have confirmed this by repeatedly listing the disabled packages while turning on UPSM / MAX , and the package is enabled before the mode cuts of the ADB connection. And the package is disabled when returning to the normal mode)

 

 


THE BELOW IS PRIMARILY NERDY, and related to the uninstalls I did before the disable-user


 

Before I learned the disable-user I used the more drastic uninstall

What I did looks very much like the above, but with the more drastic uninstall

e.g.

ADB shell pm uninstall -k --user 0 com.samsung.android.widgetapp.yahooedge.sport

rather than

ADB shell pm disable-user com.samsung.android.widgetapp.yahooedge.sport

 

If you do not care about the data of the apps, you could do the uninstall WITHOUT the “-k” parameter (k for “Keep data”)

 

Attempted reinstall of visible app.

(the below was still before I knew the disable-user syntax worked, so done while enabled)

I also tried to forcibly uninstall an app that appears in the Android Market as an installed app, but not uninstallable:

Note the Open, with no action to the left.

ADD: This app proved to be missed by some Samsung apps, including the camera, so think twice before uninstalling

I then tried to uninstall it forcibly as above:

ADB shell pm list packages gallery

package:com.sec.android.gallery3d

ADB shell pm uninstall -k --user 0 com.sec.android.gallery3d

Success

Then it appears as “uninstalled”

And I tried to reinstall it, and this fails (also after a restart)

(the link just give general suggestions.)

ADD: Thanks to a hint by GLumpy in the comments below, I got the right syntax for ‘re-installing’ 🙂

ADB shell cmd package install-existing com.sec.android.gallery3d

It worked fine for this, though not completely for my first attempts on the yahoo-stuff, where icon/widget does not reappear (even after a restart)

So IF a forcible uninstalled app can be reinstalled unrooted, I assume it must be done through ADB.

So by the packet info here

ADB shell pm list packages -u -f gallery

package:/system/priv-app/SecGallery2015/SecGallery2015.apk=com.sec.android.gallery3d

I tried these eight variants

ADB shell pm install -r --user 0 -i com.sec.android.gallery3d /system/priv-app/SecGallery2015/SecGallery2015.apk
ADB shell pm install -r --user 0 /system/priv-app/SecGallery2015/SecGallery2015.apk
ADB shell pm install -r -i com.sec.android.gallery3d /system/priv-app/SecGallery2015/SecGallery2015.apk
ADB shell pm install -r /system/priv-app/SecGallery2015/SecGallery2015.apk
ADB shell pm install --user 0 -i com.sec.android.gallery3d /system/priv-app/SecGallery2015/SecGallery2015.apk
ADB shell pm install --user 0 /system/priv-app/SecGallery2015/SecGallery2015.apk
ADB shell pm install -i com.sec.android.gallery3d /system/priv-app/SecGallery2015/SecGallery2015.apk
ADB shell pm install /system/priv-app/SecGallery2015/SecGallery2015.apk

All returning

Failure [-3001]

So I’m in the dark on how any reinstall could be done (even for the apps visible in the Android Market).

I have tried to remove the develop setting “Verify apps via USB” also

In Oreo the general “Unknown Sources” have been replaced by a new “Install Unknows Apps“, that leeds to a list of apps that are allowed to install unknown APKs.
(The same list can be accessed from Settings, Apps, ellipsis, Special Access, Install Unknown Apps)
I here tried to click the elipsis, and select Show System Apps. But I can not find anything that reflects what is accessed through ADB, the least unlikely candidate is “CaptivePortalLogin” – but that was not it…

Note that  in the comments below got re-install working just fine on a Xiaomi device with Pie, with the first of the above eight variants, so must be a Samsung issue – or some setting somewhere I have overlooked on my S8, maybe some security feature that has to been turned temporarily off… OR it is related to her phone having an unlocked bootloader.

 

Be carefull uninstalling the sticker-stuff

Before I knew the disable-user I removed the sticker stuff, and -to my surprise- this seems to have further reduced the ‘system’ activity overnight!
(BTW tried without the -k switch to do the reinstall tests)

ADB shell pm list packages stick

package:com.samsung.android.provider.stickerprovider
package:com.samsung.android.stickercenter
package:com.samsung.android.app.camera.sticker.facear.preload
package:com.samsung.android.app.camera.sticker.stamp.preload

Do NOT uninstall the provider, Samsung’s camera-app closes after about 4s! A factory reset was needed to clear up my mess!!
Also note that IF the stickercentre and stickers are uninstalled, and you click the (fixed) stickers icon in the camera-app it stops the camera!

ADB shell pm uninstall --user 0 com.samsung.android.provider.stickerprovider
ADB shell pm uninstall --user 0 com.samsung.android.app.camera.sticker.facear.preload
ADB shell pm uninstall --user 0 com.samsung.android.app.camera.sticker.stamp.preload
ADB shell pm uninstall --user 0 com.samsung.android.stickercenter

Did a factory reset to clear up the mess caused by this and when I later learned the disable-user, I did that instead on the sticker-stuff, and disabling it has no side-effects.