Last active
February 16, 2023 00:08
-
-
Save mbalous/16926d6a0e758e736315387f975f7450 to your computer and use it in GitHub Desktop.
Uninstalls non-necessary packages from Samsung Galaxy devices running Android 13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param( | |
| [Parameter(Mandatory=$True)] | |
| [System.String] | |
| $adbPath | |
| ) | |
| if ([System.IO.File]::Exists($adbPath) -eq $false){ | |
| Write-Error "adb executable not found in $($adbPath)" | |
| return; | |
| } | |
| $apps = | |
| @( | |
| "com.samsung.android.bixby.wakeup" | |
| "com.samsung.systemui.bixby2" | |
| "com.samsung.android.app.settings.bixby" | |
| "com.samsung.android.app.spage" | |
| "com.samsung.android.app.routines" | |
| "com.samsung.android.bixby.service" | |
| "com.samsung.android.visionintelligence" | |
| "com.samsung.android.bixby.agent" | |
| "com.samsung.android.bixby.agent.dummy" | |
| "com.samsung.android.bixbyvision.framework" | |
| "com.samsung.android.samsungpass" | |
| "com.samsung.android.bixbyvision.framework" | |
| "com.samsung.android.aremoji" | |
| "com.samsung.android.aremojieditor" | |
| "com.samsung.android.stickercenter" | |
| "com.sec.android.mimage.avatarstickers" | |
| "com.samsung.android.livestickers" | |
| "com.samsung.android.aremojieditor" | |
| "com.sec.android.autodoodle.service" | |
| "com.sec.android.app.chromecustomizations" | |
| "com.android.chrome" | |
| "com.samsung.android.arzone" | |
| "com.samsung.android.tips" | |
| "com.samsung.android.service.health" | |
| "com.microsoft.skydrive" | |
| "com.facebook.services" | |
| "com.facebook.katana" | |
| "com.facebook.system" | |
| "com.facebook.appmanager" | |
| "com.samsung.android.app.tips" | |
| "com.samsung.android.samsungpassautofill" # Autofill with Samsungpass | |
| "com.samsung.android.ipsgeofence" # Samsung Visit In | |
| "de.axelspringer.yana.zeropage" # upday for Samsung | |
| "com.google.android.apps.accessibility.voiceaccess" # Voice access | |
| "com.google.android.apps.tachyon" # Google Duo | |
| "com.google.android.gm" # Gmail | |
| "com.google.audio.hearing.visualization.accessibility.scribe" # Live Transcribe | |
| "com.samsung.android.bbc.bbcagent" # Knox, | |
| "com.samsung.android.scloud" # Samsung Cloud | |
| ); | |
| Function GetProgramOutput | |
| { | |
| param([string]$exe, [string]$arguments) | |
| $psi = New-Object -TypeName System.Diagnostics.ProcessStartInfo -Property @{ | |
| FileName = $exe | |
| RedirectStandardOutput = $True | |
| RedirectStandardError = $True | |
| Arguments = $arguments | |
| UseShellExecute = $False | |
| } | |
| $process = New-Object -TypeName System.Diagnostics.Process -Property @{ | |
| StartInfo = $psi | |
| } | |
| $process.Start(); | |
| $process.WaitForExit(); | |
| $output = $process.StandardOutput.ReadToEnd(); | |
| $err = $process.StandardError.ReadToEnd(); | |
| return $output; | |
| } | |
| foreach ($app in $apps) { | |
| $args = "shell ""pm uninstall --user 0 $($app)"""; | |
| Write-Host "Uninstalling package '$($app)'."; | |
| Write-Host "Executing following adb command: $($args)" | |
| $output = (GetProgramOutput -exe $adbPath -arguments $args); | |
| write-host $output | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment