• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[solved] Google Play Store uninstalled, now cannot get it back

Search This thread

kaszebci

Member
Feb 19, 2017
6
4
tl;dr: I uninstalled com.android.vending via adb, now re-installing it from APK isn't bringing the icon, or the functionality, back.

So today I tried to use my phone as you do, and "Application Google Play Services has stopped" was popping constantly, stacking the messages one after another, making it hard to even browse through GUI. Restart or clearing app data and app caches didn't helped. So I connected it to PC, and did:

```
adb shell
su
pm disable com.google.android.gms
```

(note: I should've tried "safe mode". But I didn't, so I don't know if it would help.)

The service disable command stopped the errors, but nothing else worked - Google Maps, GMail, even contacts stopped showing - looks like they had no proper local copy (which is concerning as well, but not really the issue I'm trying to solve).


So keeping GMS disabled is not really an option. I tried installing version 21.something and 19.something via adb, these both were constantly crashing as well. I finally went down to `com.google.android.gms_18.7.19` and that one seem to be working. But before that, I started removing services which use GMS - as I assumed the crash is probably caused not by GMS just existing, but by being used incorrectly by other things. One of the removed ones was Play Store - I did:

```
adb shell pm uninstall --user 0 com.android.vending
```

Ok, so no play store. But no problem, it can be easily re-installed from apk, right? Well no. This is the issue.
I tried installing a lot of various versions, but the store just isn't popping in the menu, nor in the activities handlers:

```
# adb shell monkey -p com.android.vending 1
** No activities found to run, monkey aborted.
# adb shell am start -n com.android.vending/com.google.android.vending.activities.MainActivity
Starting: Intent { cmp=com.android.vending/com.google.android.vending.activities.MainActivity }
Error type 3
Error: Activity class {com.android.vending/com.google.android.vending.activities.MainActivity} does not exist.
```

In the "Settings" -> "Applications", the Play Store is on the list, but it is marked as "not installed". Trying to "DISABLE" it or "ENABLE" again does not do anything useful (it uninstalls the version I installed, but original is still missing).

So installing the store succeeds, it just doesn't seem to do anything. Example cmd I use for installation:

```
# adb install -r -d "com.android.vending_19.9.23-all_0_PR_309342545-81992300_minAPI16(armeabi,armeabi-v7a,mips,mips64,x86,x86_64)(nodpi).apk"
Performing Push Install
com.android.vending_19.9.23-all_0_PR_309342545-81992300_minAPI16(armeabi,armeabi-v7a,mips,mips64,x86,x86_64)(nodpi).apk: 1 file pushed, 0 skipped. 2.7 MB/s (21821561 bytes in 7.817s)
pkg: /data/local/tmp/com.android.vending_19.9.23-all_0_PR_309342545-81992300_minAPI16(armeabi,armeabi-v7a,mips,mips64,x86,x86_64)(nodpi).apk
Success
```

I tied extracting all the factory APKs from N910 stock images, but I can't easily figure out which APK stores the shop (yeah, I might try extracting them all, it's one line script after all).

Any idea what's going on, or what I should check?
 
Last edited:

kaszebci

Member
Feb 19, 2017
6
4
Ooh..

```
adb install -r --user 0 "com.android.vending_19.9.23-all_0_PR_309342545-81992300_minAPI16(armeabi,armeabi-v7a,mips,mips64,x86,x86_64)(nodpi).apk"
```

That worked. It took me far too long to figure out.

So I uninstalled the app from "--user 0" - so from system apps, but tried to re-install it for local user instead. Turns out the Play services won't work if installed this way.

Issue solved.
 
  • Like
Reactions: Symbianas

Symbianas

Member
Dec 8, 2021
13
0
I started to have exactly the same f***ing issue yesterday! I have wiped all data tried reinstalling ROM and still same errror... Why did this happen?
Does your fix corrects it forever?
I will need to try your solution. Thinking of moving to another custom ROM from almost original one.
 

Symbianas

Member
Dec 8, 2021
13
0
Sadly I am getting INSTALL_FAILED_VERSION_DOWNGRADE.
What ROM do you have? Does this work only with stock ROM?
 

kaszebci

Member
Feb 19, 2017
6
4
Condensing the story down for people who just want to solve constant "Application Google Play Services has stopped":

If you have this error, try downloading and installing "com.google.android.gms" APK in version "18.7.19".
You don't need to uninstall anything, you can just replace the existing package with:

```
adb install -r -d --user 0 "com.google.android.gms_18.7.19_(040300-262610125)-18719015_minAPI23(armeabi-v7a)(nodpi).apk"
```

options:
* -r will allow re-installing the package on existing installation
* -d will allow to downgrade the package if current version is newer
* --user 0 will install the package as system package, as the original package is installed this way (on Note4 stock images)

You need to find and download the proper APK file first, ofc.
 
  • Like
Reactions: Symbianas

dib3ns

Member
Oct 15, 2015
9
1
Samsung Galaxy Pocket
I also have this problem with Google Play services constantly crashing and making phone almost unusable.

I tried clearing app cache, safe mode. Did not help. Only uninstalling updates for Google Play Services stopped constant crashes, but left about half of my apps unusable state because they relay to recent version of GMS.

I will try manually install recent working google play services .apk and see if it helps.

But how to stop automatic update of Google Play Services to the crashing one again? Automatic updates disabled everywhere, including Auto Update Google apps.
 

Symbianas

Member
Dec 8, 2021
13
0
I also have this problem with Google Play services constantly crashing and making phone almost unusable.

I tried clearing app cache, safe mode. Did not help. Only uninstalling updates for Google Play Services stopped constant crashes, but left about half of my apps unusable state because they relay to recent version of GMS.

I will try manually install recent working google play services .apk and see if it helps.

But how to stop automatic update of Google Play Services to the crashing one again? Automatic updates disabled everywhere, including Auto Update Google apps.
Seems that clearing internal storage helped, so I think update + someold settings/data files causes this issue.
 

dib3ns

Member
Oct 15, 2015
9
1
Samsung Galaxy Pocket
Could You please specify? By clearing internal storage You mean wipe all data?

Because Nothing helps, uninstalling Play Services updates, clearing app cache and even clearing the data. Also I cannot manually install google pay services .apk file, after installing it gives me installation failed. Play store installs Play Services, but they start crashing right after that.

Galaxy Note4 910F with stock 6.0.1 Android and Magisk rooted.
 

kaszebci

Member
Feb 19, 2017
6
4
The issue returned for me, and I was able to make it go away again by clearing cache & data only for few specific apps. Details here:

I then allowed Google Store to update everything, and the issue didn't come back. So looks like the solution from the above thread really fixed it.
 

dib3ns

Member
Oct 15, 2015
9
1
Samsung Galaxy Pocket
Solved for me. I updated Google Play services from Play Store and appears that Google fixed the botched update by releasing new version. Hope they never botch it again and not trash my phone, but more permanent fix needed, like completely preventing unnecessary auto updates to critical Android parts.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Ooh..

    ```
    adb install -r --user 0 "com.android.vending_19.9.23-all_0_PR_309342545-81992300_minAPI16(armeabi,armeabi-v7a,mips,mips64,x86,x86_64)(nodpi).apk"
    ```

    That worked. It took me far too long to figure out.

    So I uninstalled the app from "--user 0" - so from system apps, but tried to re-install it for local user instead. Turns out the Play services won't work if installed this way.

    Issue solved.
    1
    Condensing the story down for people who just want to solve constant "Application Google Play Services has stopped":

    If you have this error, try downloading and installing "com.google.android.gms" APK in version "18.7.19".
    You don't need to uninstall anything, you can just replace the existing package with:

    ```
    adb install -r -d --user 0 "com.google.android.gms_18.7.19_(040300-262610125)-18719015_minAPI23(armeabi-v7a)(nodpi).apk"
    ```

    options:
    * -r will allow re-installing the package on existing installation
    * -d will allow to downgrade the package if current version is newer
    * --user 0 will install the package as system package, as the original package is installed this way (on Note4 stock images)

    You need to find and download the proper APK file first, ofc.