-1

Several years ago, a friend of mine was working on a Samsung S8 Active. He was trying to remove most of the apps on it so it was just a basic phone. He had some instructions for a Ponderosa system. He was having trouble with several things so I was helping him. We got a list of all the packages on the phone using ADB and then copied them into a text editor. We removed the name of any package that we didn't want and then saved the file and pushed it back onto the phone using ADB again. I'm not certain but there might have been an app or something on the phone that had something to do with it as well but the end result was that only the apps on the list were left on the phone. I believe that we could put a password in on the phone and the apps came back but I'm not 100% sure.

Since then I have lost the papers that had the instructions on them and the place we originally got them from no longer has them either. I have another Samsung S8 Active that needs the same system (or simular) put on it. I know how to get a list of all the app package names using ADB.

adb shell pm list packages

But does anyone know of a system that would be capable of removing apps by pushing a file to the phone? Is there an app that would work like I described? Any help would be appreciated.

ajarrow
  • 414
  • 2
  • 10
  • On unrooted devices regular apps can't uninstall other apps. An app could only open the dialog for uninstalling an app, but the user would have to execute the uninstallation. – Robert Feb 09 '22 at 09:44
  • create a shell script and run it from within phone. *'cmd package uninstall --user 0 $pkgname'* within *for* loop should do it – alecxs Feb 09 '22 at 15:45

1 Answers1

1

If you have the list of packages to remove in pkgs2rm, this would uninstall all the packages as long as they are installed apps

xargs -l adb uninstall < pkgs2rm 
Diego Torres Milano
  • 65,697
  • 9
  • 111
  • 134
  • So I would put the package names that I don't want on the phone in the ```pkgs2rm``` file and then run that command? And where is that file located? This sounds really familiar I'm pretty sure we did something like this. – ajarrow Feb 09 '22 at 12:30
  • I installed xargs and ran that command and it says ```The '<' operator is reserved for future use.``` I am working on Windows 10 – ajarrow Feb 09 '22 at 15:33
  • You may need [git-bash](https://www.educative.io/edpresso/how-to-install-git-bash-in-windows) – Diego Torres Milano Feb 09 '22 at 17:32