DEV Community

Sahil Garg
Sahil Garg

Posted on

How to uninstall and reinstall play store without root

I uninstalled Google play store from my phone as I a privacy respecting person and installed Aurora Store. But now as I have to give buy a new phone and sell the old one, I thought of reinstalling Google services, especially the play store. Then I used ADB for installing it but faced an error. But then I found a command for ADB that installed it without giving me any error. I was relieved a lot.
Now, I thought that I should share it with the community as someone out there might also be facing the same issue.

Installing the tool

Now for uninstalling the apps without root you will need to download a tool that is named ADB whose full form is "Android Debugging Tool".

Setup Computer with ADB Platform Tools

Windows Install:

  1. With Chocolatey: choco install ADB
  2. Download the zip, extract it in a folder, then Open Windows Explorer and browse to where you extracted the contents of this ZIP file. Then open up a Command Prompt from the same directory as this ADB binary. This can be done by holding Shift and Right-clicking within the folder then click the “open command prompt here” option. (Some Windows 10 users may see “PowerShell” instead of “command prompt”.) Linux Install with Terminal: sudo apt-get install android-tools-adb android-tools-fastboot MacOS Install with Homebrew:
  3. Homebrew install - ruby -e “$(curl -fsSL"
  4. ADB Homebrew Install - brew cask install android-platform-tools

Setup Phone for ADB Debugging

Open Settings, and select “About”.
Tap on “Build number” seven times.
Go back, and select “Developer options”.
Scroll down, and check the “Android debugging” or “USB debugging” entry under “Debugging”.
Plug your device into your computer.
On the computer, open up a terminal/command prompt and type:

$ adb devices
Enter fullscreen mode Exit fullscreen mode

A dialog should show on your device, asking you to allow USB debugging. Check “always allow”, and choose “OK”.
Note: If you don’t see this prompt on your device change the USB connection to MTP or File Transfer on the device

Uninstalling Google play store

In the terminal/command prompt type the command:

adb shell pm uninstall --user 0
Enter fullscreen mode Exit fullscreen mode

In this command we are basically uninstalling the play store for the User 0 that is the default user only. Without root it can't be uninstalled completely from the phone. This doesn't disable software updates from your OEM/Phone manufacturer. '' is the name of the package the play store has. I know it is a very confusing name. That is the reason I asked the name of the package on reddit. Now, we need a software for installing apps.

Other FOSS alternatives of Google Playstore

There are 2 best FOSS alternatives of play store.

  1. F-Droid: This is an app store that includes those apps only which come in the category of FOSS and hence there is an option for individual app where there repository is written.
  2. Aurora store: It uses Google play store API to let you install apps listed on Google play store. You can download it from its website or from F-Droid. In Aurora Store you can download apps without signing in to Google hence Anonymously or you have an option to signin to your Google account.

Installing FOSS alternatives

You have to download their apk from their websites and then just put them on your phone storage and then just click on the apk in the phone and Install it by clicking the install button. But you may need to enable the option in the settings that says 'install apps from Unknown sources', this setting will be available in the developer options.

Reinstalling Google Playstore

If you want to reinstall playstore. Plug your device into your computer. On the computer, open up a terminal/command prompt and type:

$ adb devices
Enter fullscreen mode Exit fullscreen mode

Now, in the same command prompt type:

$ adb shell cmd package install-existing
Enter fullscreen mode Exit fullscreen mode

Now you should get the line in the command prompt stating: "Package installed for user: 0". If this is shown, play store has been downloaded successfully. Now you can disconnect your phone from the computer.

Top comments (2)

poecilia profile image

Thanks for this information. The first part worked, but when I try to reinstall the Play Store, I get a message stating 'cmd' is not recognised. I am new to adb commands; is there a way to download additional commands like you can in linux?

sahilgarg profile image
Sahil Garg

cmd is the name of the terminal on windows. It is not a command. It is the name of the program where you run commands.