Tuesday, May 16, 2017

Where is data of Google Play Services located in device? Can I safely delete it?



Just noticed that data in internal storage for Google Play Services app grew above 100Mib, so this app is officially space hog now.


So my questions are:



  1. What is the exact location for Google Play Services data? (for backing up)

  2. Can I safely delete Google Play Services data and let app recreate it?

  3. What I might lose if I delete Google Play Services data unsafely?



Answer




What is exact location for Google Play Services data?




Package name of Google Play Services is com.google.android.gms.


Default data directory of apps is under /data/data, and for Play Services, it is /data/data/com.google.android.gms.


Note that you can't simply copy-paste it into anywhere. To peek into data directory of an app you would need root access. Fortunately, for non-root devices, Play Services allows its backup using .


After installing ADB, enter this command in a shell:


adb backup -apk com.google.android.gms

This will save the backup in the file backup.ab located in the current directory.


To restore that backup, enter this command from the same current directory:


adb restore backup.ab



Can I safely delete Google Play Services data and let app recreate it?



By safely, if you mean clearing data from Settings → Apps→ Downloaded → Google Play Services, then you're good to go.


In Android 4.4.2 and 5.0.2, you don't get the straight option named Clear Data. Instead you get Manage space. Follow the screenshots:


(Click image to enlarge; hover to know details)


IMG: 1 IMG: 2 IMG: 3


However, in Android 4.2.1, there was no Manage Space but Clear Data. Perhaps, the former option is Android version specific and not app specific.


Doing adb shell pm clear com.google.android.gms is also safe, at least, my Play Store, and Gmail (both ridiculously dependent on Play Services) worked fine after executing both steps independently.



The data recreated too.



What I might lose if I delete Google Play Services data unsafely?



I don't know what unsafely would mean here other than purging the app directory of Play Services without uninstalling it, so I can't comment on it.


Anyhow, the front-end of Play Services is named Google Settings, the core of Google Apps, whose icon you would see in your app drawer. Simply open it, and the entries you would see are possibly responsible for the data collection of Play Services. And as I said above, the dependent apps worked fine without a hitch, so this app's data isn't something I would worry about. Your case may vary, so dig deeper into this app's GUI.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...