Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download older google play services?

Im going to use android google maps v2 with android emulator/android studio 0.4.0. One of requirements is to put in project google-play-services_lib with version lower/equal to emulator level. My emulator works with api lv 17. The question is, how to download older version of google-play-services_lib than those downloaded by android sdk manager?

like image 239
Jacob Avatar asked Jan 07 '14 21:01

Jacob


People also ask

Why I can't downgrade my Google Play Services?

Google Play Services is a system app, hence it cannot be uninstalled without root. In a situation whereby phone freezes, crash, or become unresponsive after updating to a newer version, the only solution is to revert (downgrade) to an older version that worked.

Is there a way to get an older version of an app?

Find what app you used to use, or you know has a version for your device. Click on it, and select Install. The App Store will consider your request for a moment, and then pop up a dialog box, asking you if you want to install the old app.

Can Google Play Services be reinstalled?

Google Play Services cannot be uninstalled on regular Android phones where Play Services was preinstalled. However, you can uninstall its updates by going to “Settings → Apps → System apps → Google Play Services.” Tap on the three-dot icon and select “Uninstall updates.” Restart your phone.


1 Answers

I realise that this is an old question, but I had the same problem today (for real devices not for the emulator) and have found a solution.

I know that you can add code to prompt the user to upgrade to the latest version (see the comment by @nathan-walters) but, for complicated reasons, in my case I need to work with whatever version the user already has installed on their device (if any) and hence prefer to compile/build with an older version of the client library (google-play-services_lib)

So researching further, I unpacked the xml that Android SDK Manager uses to find and install the 'extras' packages including the latest version of Google Play Services.
If you are interested start here: https://dl-ssl.google.com/android/repository/addon.xml

For the current version (as of Nov 10th 2014) that gives you the library for google-play-services_lib at:

https://dl-ssl.google.com/android/repository/google_play_services_6171000_r21.zip 

The older versions are in the same location on the google servers (although they could disappear at any time), so if you are prepared to move the current installed library aside and manually unpack an older zip then you can install an old version. I found the following:

  • https://dl-ssl.google.com/android/repository/google_play_services_3159130_r09.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_3225130_r10.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_3265130_r12.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_4030530_r13.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_4132530_r14.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_4242030_r15.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_4323030_r16.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_4452030_r17.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_5077000_r18.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_5089000_r19.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_6111000_r20.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_6171000_r21.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_6587000_r22.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_7095000_r23.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_7327000_r24.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_7571000_r25.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_7895000_r26.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_8115000_r27.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_8298000_r28.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_8487000_r29.zip
  • https://dl-ssl.google.com/android/repository/google_play_services_9080000_r30.zip

The same technique would allow you to test against the non-upgradable older versions Google Maps (Google Play Services) hardwired in older versions of the emulator. I haven't tested all these versions against the emulator but have successfully tested Google Maps in the emulator for an AVD based on Google APIs (API 19).

Google does make the occasional attempt to bring the emulator up to date. Here is an issue tracker thread discussing version incompatibility issues between the client library and the emulator and google's various attempts to fix them: https://code.google.com/p/android/issues/detail?id=57880

[UPDATE:]

@btrue see answer below now has a much better answer than my answer

go to:

<your path to android sdk>/extras/google/m2repository/com/google/android/gms/play-services/ 

where you will find directories containing the old releases in AAR format - just rename to .zip for extraction.

like image 51
Mike Avatar answered Sep 20 '22 11:09

Mike