• Stars
    star
    322
  • Rank 130,398 (Top 3 %)
  • Language
    Java
  • License
    GNU General Publi...
  • Created almost 8 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Google Play Store protobuf API wrapper in java

play-store-api Build Status Release downloads

Google Play Store protobuf API wrapper in java

Include

Get it from jitpack. Or...

Build separately

git clone https://github.com/yeriomin/play-store-api
gradlew :assemble
gradlew :build

Protobuf classes generation happens on assemble step, tests a ran on build step.

Usage

First login

        // A device definition is required to log in
        // See resources for a list of available devices
        Properties properties = new Properties();
        try {
            properties.load(getClass().getClassLoader().getSystemResourceAsStream("device-honami.properties"));
        } catch (IOException e) {
            System.out.println("device-honami.properties not found");
            return null;
        }
        PropertiesDeviceInfoProvider deviceInfoProvider = new PropertiesDeviceInfoProvider();
        deviceInfoProvider.setProperties(properties);
        deviceInfoProvider.setLocaleString(Locale.ENGLISH.toString());
        
        // Provide valid google account info
        PlayStoreApiBuilder builder = new PlayStoreApiBuilder()
            // Extend HttpClientAdapter using a http library of your choice
            .setHttpClient(new HttpClientAdapterImplementation())
            .setDeviceInfoProvider(deviceInfoProvider)
            .setEmail(email)
            .setPassword(password)
        ;
        GooglePlayAPI api = builder.build();
        
        // We are logged in now
        // Save and reuse the generated auth token and gsf id,
        // unless you want to get banned for frequent relogins
        api.getToken();
        api.getGsfId();
        
        // API wrapper instance is ready
        DetailsResponse response = api.details("com.cpuid.cpu_z");

Further logins

        // A device definition is required for routine requests too
        // See resources for a list of available devices
        Properties properties = new Properties();
        try {
            properties.load(getClass().getClassLoader().getSystemResourceAsStream("device-honami.properties"));
        } catch (IOException e) {
            System.out.println("device-honami.properties not found");
            return null;
        }
        PropertiesDeviceInfoProvider deviceInfoProvider = new PropertiesDeviceInfoProvider();
        deviceInfoProvider.setProperties(properties);
        deviceInfoProvider.setLocaleString(Locale.ENGLISH.toString());
        
        // Provide auth token and gsf id you previously saved
        PlayStoreApiBuilder builder = new PlayStoreApiBuilder()
            // Extend HttpClientAdapter using a http library of your choice
            .setHttpClient(new HttpClientAdapterImplementation())
            .setDeviceInfoProvider(deviceInfoProvider)
            .setToken(token)
            .setGsfId(gsfId)
        ;
        GooglePlayAPI api = builder.build();
        
        // API wrapper instance is ready
        DetailsResponse response = api.details("com.cpuid.cpu_z");

Examples

See tests and the project which this library was made for for examples.

Further studies

Looking through GooglePlay.proto will let you know what responses to expect.

License

play-store-api is Free Software: You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Credits

play-store-api is a fork of https://github.com/Akdeniz/google-play-crawler play-store-api has protobuf-java built-in. protobuf-java was modified to work with java 1.5 which is required for play-store-api to work on old android versions.

More Repositories

1

YalpStore

Download apks from Google Play Store
Java
2,372
star
2

token-dispenser

Stores email-password pairs, gives out Google Play Store tokens
Java
61
star
3

SmsScheduler

An android app which lets you schedule an sms to be sent at a specific time
Java
48
star
4

DumbphoneAssistant

An android app which lets you copy contacts to your SIM card
Java
30
star
5

WorkoutLog

An android app for tracking your gym progress
Java
17
star
6

BladeOfDarknessQuicksave

Adds quick save/load to Blade of Darkness slasher
Python
5
star
7

fdroidclient

Java
5
star
8

4chan-image-downloader

4chan Thread Image Downloader
JavaScript
4
star
9

AndTest

An app which helps you prepare for tests/exams
Java
3
star
10

redbean-single-file

ORM layer that creates models, config and database on the fly
PHP
3
star
11

svg-to-android

A small service which converts svg images to sets of png images suitable for use in an android app
HTML
3
star
12

q3logs

Yet another quake 3 log parser and stats analyzer
PHP
3
star
13

openbox-starter-kit

Openbox setup and configuration scripts to be used after system installation
Shell
3
star
14

andtest-core

AndTest core classes
Java
2
star
15

andtest-server

AndTest REST server, can receive, validate, store and dispense tests.
Java
2
star
16

andtest-maker

Takes text files. Spits out json tests compatible with AndTest.
Java
2
star
17

getopt

A small PHP getopt helper/library. Provides a customizable input parameter interpretation and usage message generation.
PHP
1
star
18

dwm

My own dwm build, nothing to see here
C
1
star
19

tpb-time-formatter

The Pirate Bay Upload Time Fromatter
JavaScript
1
star
20

php-frameworks-benchmark

A benchmark of popular PHP frameworks
PHP
1
star
21

CryptoBalanceWidget

Android widget which shows your cryptocurrency wallet balance, optionally converting it to a currency of your choice
Kotlin
1
star
22

userscriptsBackup

userscripts.org backup script
PHP
1
star
23

realkana-reverse-practice

JavaScript
1
star
24

overclockers

overclockers.ru results db scraper, RESTful server and alternative ui
JavaScript
1
star
25

orvar

1
star
26

crash-report

Crash report storage and display component
Kotlin
1
star
27

console-app

A skeleton PHP console app with helpers for logging, running in a single instance, console input parameters
PHP
1
star
28

spotlight-saver

A script which saves Windows Spotlight pictures to an arbitrary folder
PowerShell
1
star
29

clojurecourse.by

Clojure
1
star
30

manga-scraper

PHP
1
star