Removing Android Bloatware and backing up Stock apps

Quite a lot of new Android devices come with lots of bloatware that is preinstalled on the phone/tablet. For some apps it’s possible to deactivate these apps in the built in app management. However, most apps are installed as system apps and do not provide the possibility to be uninstalled.

Thankfully there is a possibility to also remove these apps via ADB.

Before removing any app it’s advised to first create a backup of all the installed APKs in case you remove any app that might be needed and therefore cause errors.

adb shell pm list packages > installed_packages.txt

foreach($line in ( Get-Content .\installed_packages.txt) )
{
    $app=$line.Split(":")[1]
    $app_path=$(adb shell pm path $app).Split(":")[1]
    Write-Host -ForegroundColor Yellow "$app : $app_path"
    adb pull $app_path ".\backup\$app.apk"
}

The above script will create a backup of all APKs currently installed on the device (including the ones which have been installed by the user).
To successfully run the script, adb needs to be in the path and initially pairing between the PC and the Android device must be established.

Removing the bloatware:

adb shell pm uninstall--user 0 <packagename>

#e.g. for AR-emoti-apks provided by samsung
adb shell pm uninstall --user 0 com.samsung.android.aremoji

Lists of mappings between the readalbe name (like in the Android apps management) and the package name (for Samsung devices) can be found on https://docs.samsungknox.com (e.g. https://docs.samsungknox.com/CCMode/T878U_Q.pdf)

Leave a Reply

Your email address will not be published. Required fields are marked *