googleplay

package module
v1.9.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2022 License: OSL-3.0 Imports: 12 Imported by: 2

README

GooglePlay

Fear plays an interesting role in our lives. How dare we let it motivate us? How dare we let it into our decision-making, into our livelihoods, into our relationships?

It's funny, isn't it, we take a day a year to dress up in costume and celebrate fear?

Spooked (The Office) (2011)

Download APK from Google Play or send API requests

How to install?

This module works with Windows, macOS or Linux. First, download Go and extract archive. Then download GooglePlay and extract archive. Then navigate to googleplay-master/cmd/googleplay, and enter:

go build

Tool examples

Before trying these examples, make sure the Google account you are using has logged into the Play Store at least once before. Also you need to have accepted the Google Play terms and conditions. Create a file containing token (aas_et) for future requests:

googleplay -email EMAIL -password PASSWORD

Create a file containing Android_ID (GSF ID) for future requests:

googleplay -device

Get app details:

PS C:\> googleplay -a com.google.android.youtube
Title: YouTube
Creator: Google LLC
UploadDate: 2022-05-12
VersionString: 17.19.34
VersionCode: 1529337280
NumDownloads: 11.822 B
Size: 46.727 MB
File: APK APK APK APK
Offer: 0 USD

Purchase app. Only needs to be done once per Google account:

googleplay -a com.google.android.youtube -purchase

Download APK. You need to specify any valid version code. The latest code is provided by the previous details command. If APK is split, all pieces will be downloaded:

googleplay -a com.google.android.youtube -v 1529337280

Sponsor

I really need help financially, so if you are able, please donate using the sponsor link. If you cannot use PayPal, let me know, and I can see about adding other methods. Thank you!

API

https://github.com/89z/googleplay

Documentation

Index

Constants

View Source
const Sleep = 4 * time.Second

Variables

View Source
var LogLevel format.LogLevel
View Source
var Phone = Config{
	DeviceFeature: []string{

		"android.hardware.location.gps",

		"android.software.midi",

		"android.hardware.camera.front",

		"android.hardware.microphone",

		"android.software.device_admin",

		"android.hardware.touchscreen",
		"android.hardware.wifi",

		"android.hardware.sensor.gyroscope",

		"android.hardware.sensor.accelerometer",

		"android.hardware.opengles.aep",

		"android.hardware.camera",
		"android.hardware.location",
		"android.hardware.screen.portrait",

		"android.hardware.location.network",

		"android.hardware.bluetooth",
		"android.hardware.bluetooth_le",
		"android.hardware.camera.autofocus",
		"android.hardware.usb.host",

		"android.hardware.sensor.compass",

		"android.hardware.telephony",

		"android.hardware.screen.landscape",
	},
	SystemSharedLibrary: []string{

		"org.apache.http.legacy",

		"android.test.runner",

		"global-miui11-empty.jar",
	},

	GlEsVersion: 0x9_9999,
	GlExtension: []string{

		"GL_OES_compressed_ETC1_RGB8_texture",

		"GL_KHR_texture_compression_astc_ldr",
	},

	TouchScreen: 3,
}
View Source
var Platforms = NativePlatform{

	0: "x86",

	1: "armeabi-v7a",

	2: "arm64-v8a",
}

Functions

This section is empty.

Types

type AppFileMetadata added in v1.9.4

type AppFileMetadata struct {
	FileType    uint64
	DownloadURL string
}

type Config added in v1.2.1

type Config struct {
	DeviceFeature        []string
	GlEsVersion          uint64
	GlExtension          []string
	HasFiveWayNavigation uint64
	HasHardKeyboard      uint64
	Keyboard             uint64
	Navigation           uint64
	ScreenDensity        uint64
	ScreenLayout         uint64
	SystemSharedLibrary  []string
	TouchScreen          uint64
}

These can use default values, but they must all be included

func (Config) Checkin added in v1.7.7

func (c Config) Checkin(platform string) (*Device, error)

A Sleep is needed after this.

type Delivery added in v1.1.9

type Delivery struct {
	DownloadURL       string
	PackageName       string
	SplitDeliveryData []SplitDeliveryData
	VersionCode       uint64
	AdditionalFile    []AppFileMetadata
}

func (Delivery) Additional added in v1.9.4

func (d Delivery) Additional(typ uint64) string

func (Delivery) Download added in v1.9.4

func (d Delivery) Download() string

func (Delivery) Split added in v1.9.4

func (d Delivery) Split(id string) string

type Details added in v1.0.1

type Details struct {
	Title         string
	Creator       string
	UploadDate    string // Jun 1, 2021
	VersionString string
	VersionCode   uint64
	NumDownloads  uint64
	Size          uint64
	File          []uint64
	Micros        uint64
	CurrencyCode  string
}

func (Details) String added in v1.5.0

func (d Details) String() string

func (Details) Time added in v1.9.6

func (d Details) Time() (time.Time, error)

This only works with English. You can force English with: Accept-Language: en

type Device added in v1.0.6

type Device struct {
	AndroidID uint64
}

func OpenDevice added in v1.5.6

func OpenDevice(elem ...string) (*Device, error)

func (Device) Create added in v1.5.6

func (d Device) Create(elem ...string) error
type Header struct {
	Auth        string // Authorization
	SDK         int64  // User-Agent
	VersionCode int64  // User-Agent
	AndroidID   uint64 // X-DFE-Device-ID
}

func (Header) Delivery added in v1.6.8

func (h Header) Delivery(app string, ver uint64) (*Delivery, error)

func (Header) Details added in v1.6.8

func (h Header) Details(app string) (*Details, error)

func (Header) Purchase added in v1.6.8

func (h Header) Purchase(app string) error

Purchase app. Only needs to be done once per Google account.

func (Header) SetAgent added in v1.9.5

func (h Header) SetAgent(head http.Header)

func (Header) SetAuth added in v1.9.5

func (h Header) SetAuth(head http.Header)

func (Header) SetDevice added in v1.9.5

func (h Header) SetDevice(head http.Header)

type NativePlatform added in v1.9.4

type NativePlatform map[int64]string

func (NativePlatform) String added in v1.9.4

func (n NativePlatform) String() string

type SplitDeliveryData added in v1.3.0

type SplitDeliveryData struct {
	ID          string
	DownloadURL string
}

type Token added in v1.0.1

type Token struct {
	Services string
	Token    string
}

func NewToken added in v1.0.4

func NewToken(email, password string) (*Token, error)

You can also use host "android.clients.google.com", but it also uses TLS fingerprinting.

func OpenToken added in v1.5.6

func OpenToken(elem ...string) (*Token, error)

func (Token) Create added in v1.5.6

func (t Token) Create(elem ...string) error

func (Token) Header added in v1.7.6

func (t Token) Header(androidID uint64, single bool) (*Header, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL