Documentation
¶
Index ¶
- Constants
- Variables
- type App
- type AppInfo
- type AuthData
- type DeviceBuildInfo
- type DeviceInfo
- func (i *DeviceInfo) GenerateAndroidCheckInRequest() *gpproto.AndroidCheckinRequest
- func (i *DeviceInfo) GetAuthUserAgent() string
- func (i *DeviceInfo) GetDeviceConfigProto() *gpproto.DeviceConfigurationProto
- func (i *DeviceInfo) GetDeviceFeatures() (ret []*gpproto.DeviceFeature)
- func (i *DeviceInfo) GetUserAgent() string
- type DeviceInfoScreen
- type GooglePlayClient
- func LoadSession(file string) (*GooglePlayClient, error)
- func LoadSessionWithDeviceInfo(file string, deviceInfo *DeviceInfo) (client *GooglePlayClient, err error)
- func NewClient(email, aasToken string) (*GooglePlayClient, error)
- func NewClientWithDeviceInfo(email, aasToken string, deviceInfo *DeviceInfo, country, locale string) (client *GooglePlayClient, err error)
- func (client *GooglePlayClient) GenerateGPToken() (string, error)
- func (client *GooglePlayClient) GenerateGsfID() (gsfID string, err error)
- func (client *GooglePlayClient) GetAppDetails(packageName string) (*App, error)
- func (client *GooglePlayClient) GetBuyResponse(packageName string, version int) (*gpproto.BuyResponse, error)
- func (client *GooglePlayClient) GetDeliveryResponse(packageName string, version int) (*gpproto.DeliveryResponse, error)
- func (client *GooglePlayClient) Purchase(packageName string, version int) (*gpproto.AndroidAppDeliveryData, error)
- func (client *GooglePlayClient) RegenerateGPToken() (err error)
- func (client *GooglePlayClient) SaveSession(file string) error
- type TestingProgram
- type TestingProgramStatus
Constants ¶
View Source
const ( ImageTypeAppScreenshot = iota + 1 ImageTypePlayStorePageBackground ImageTypeYoutubeVideoLink ImageTypeAppIcon ImageTypeCategoryIcon ImageTypeYoutubeVideoThumbnail = 13 UrlBase = "https://android.clients.google.com" UrlFdfe = UrlBase + "/fdfe" UrlAuth = UrlBase + "/auth" UrlCheckIn = UrlBase + "/checkin" UrlDetails = UrlFdfe + "/details" UrlDelivery = UrlFdfe + "/delivery" UrlPurchase = UrlFdfe + "/purchase" UrlToc = UrlFdfe + "/toc" UrlTosAccept = UrlFdfe + "/acceptTos" UrlUploadDeviceConfig = UrlFdfe + "/uploadDeviceConfig" )
Variables ¶
View Source
var ( // Pixel 8 uses arm64 and Android 14 / SDK 34 Pixel8 = &DeviceInfo{ Build: &DeviceBuildInfo{ AndroidBuildProto: &gpproto.AndroidBuildProto{ BuildProduct: shiba, Radio: ptrStr("g1-00021-230921-B-10802161"), Bootloader: ptrStr("cloudripper-1.1-10782352"), Carrier: ptrStr("google"), Device: shiba, Model: ptrStr("Pixel 8"), Manufacturer: ptrStr("Google"), Product: shiba, Id: ptrStr("AP1A.240405.002.B1"), SdkVersion: ptrInt32(34), Client: androidGoogle, GoogleServices: ptrInt32(234515036), OtaInstalled: falsePtr, }, VersionRelease: 14, }, SimOperator: "22201", Platforms: []string{"arm64-v8a", "armeabi-v7a", "armeabi", "x86_64"}, CellOperator: "22201", Roaming: roaming, TimeZone: "Europe/Rome", TouchScreen: 3, Keyboard: 1, Navigation: 1, ScreenLayout: 2, Screen: &DeviceInfoScreen{ Density: 428, Width: 1080, Height: 2400, }, GLVersion: 196610, GLExtensions: glExtensions, SharedLibraries: sharedLibraries, Features: features, Locales: locales, } // Pixel3a is default device which uses arm64 and Android 9 / SDK 28 Pixel3a = &DeviceInfo{ Build: &DeviceBuildInfo{ AndroidBuildProto: &gpproto.AndroidBuildProto{ BuildProduct: sargo, Radio: ptrStr("g670-00011-190411-B-5457439"), Bootloader: ptrStr("b4s4-0.1-5613380"), Carrier: ptrStr("google"), Device: sargo, Model: ptrStr("Pixel 3a"), Manufacturer: ptrStr("google"), Product: sargo, Id: ptrStr("PQ3B.190705.003"), SdkVersion: ptrInt32(28), Client: androidGoogle, GoogleServices: ptrInt32(203615028), OtaInstalled: falsePtr, }, VersionRelease: 9, }, SimOperator: "20815", Platforms: []string{"arm64-v8a", "armeabi-v7a", "armeabi"}, CellOperator: "334050", Roaming: roaming, TimeZone: "America/Mexico_City", TouchScreen: 3, Keyboard: 1, Navigation: 1, ScreenLayout: 2, Screen: &DeviceInfoScreen{ Density: 490, Width: 1080, Height: 2073, }, GLVersion: glVersion, GLExtensions: glExtensions, SharedLibraries: sharedLibraries, Features: features, Locales: locales, } // Redmi4 is device which uses arm and Android 10 / SDK 29 Redmi4 = &DeviceInfo{ Build: &DeviceBuildInfo{ AndroidBuildProto: &gpproto.AndroidBuildProto{ BuildProduct: santoni, Radio: ptrStr("MPSS.TA.2.3.c1-00395-8953_GEN_PACK-1_V048"), Bootloader: unknown, Carrier: ptrStr("Xiaomi"), Device: santoni, Model: ptrStr("Redmi 4"), Manufacturer: ptrStr("Xiaomi"), Product: santoni, Id: ptrStr("QQ3A.200805.001"), SdkVersion: ptrInt32(29), Client: androidGoogle, GoogleServices: ptrInt32(203315024), OtaInstalled: falsePtr, }, VersionRelease: 10, }, SimOperator: "21601", Platforms: []string{"armeabi-v7a", "armeabi"}, CellOperator: "21601", Roaming: roaming, TimeZone: "Europe/Budapest", TouchScreen: 3, Keyboard: 1, Navigation: 1, ScreenLayout: 3, Screen: &DeviceInfoScreen{ Density: 224, Width: 720, Height: 1280, }, GLVersion: glVersion, GLExtensions: glExtensions, SharedLibraries: sharedLibraries, Features: features, Locales: locales, } // Emulator_x86_64 is device which uses x86_64 and Android 11 / SDK 30 Emulator_x86_64 = &DeviceInfo{ Build: &DeviceBuildInfo{ AndroidBuildProto: &gpproto.AndroidBuildProto{ BuildProduct: ptrStr("sdk_phone_x86_64"), Radio: ptrStr("1.0.0.0"), Bootloader: unknown, Carrier: android, Device: ptrStr("generic_x86_64"), Model: ptrStr("Android SDK built for x86_64"), Manufacturer: unknown, Product: ptrStr("sdk_phone_x86_64"), Id: ptrStr("RSR1.210722.012"), SdkVersion: ptrInt32(30), Client: androidGoogle, GoogleServices: ptrInt32(203019037), OtaInstalled: falsePtr, }, VersionRelease: 11, }, SimOperator: "38", Platforms: []string{"x86_64", "x86"}, CellOperator: "310", Roaming: roaming, TimeZone: "UTC-10", TouchScreen: 3, Keyboard: 2, Navigation: 2, ScreenLayout: 2, Screen: &DeviceInfoScreen{ Density: 420, Width: 1080, Height: 1794, }, GLVersion: glVersion, GLExtensions: glExtensionsEmulator, SharedLibraries: sharedLibraries, Features: features, Locales: locales, } // Emulator_x86 is device which uses x86 and Android 11 / SDK 30 Emulator_x86 = &DeviceInfo{ Build: &DeviceBuildInfo{ AndroidBuildProto: &gpproto.AndroidBuildProto{ BuildProduct: ptrStr("sdk_phone_x86"), Radio: ptrStr("1.0.0.0"), Bootloader: unknown, Carrier: android, Device: ptrStr("generic_x86"), Model: ptrStr("Android SDK built for x86"), Manufacturer: unknown, Product: ptrStr("sdk_phone_x86"), Id: ptrStr("RSR1.210722.012"), SdkVersion: ptrInt32(30), Client: androidGoogle, GoogleServices: ptrInt32(203019037), OtaInstalled: falsePtr, }, VersionRelease: 11, }, SimOperator: "38", Platforms: []string{"x86"}, CellOperator: "310", Roaming: roaming, TimeZone: "UTC-10", TouchScreen: 3, Keyboard: 2, Navigation: 2, ScreenLayout: 2, Screen: &DeviceInfoScreen{ Density: 420, Width: 1080, Height: 1794, }, GLVersion: glVersion, GLExtensions: glExtensionsEmulator, SharedLibraries: sharedLibraries, Features: features, Locales: locales, } )
View Source
var ErrMissingAppDeliveryData = errors.New("buy response is missing AppDeliveryData")
View Source
var ErrNilPayload = errors.New("got nil payload from google play")
View Source
var (
GPTokenExpired = errors.New("unauthorized, gp token expired")
)
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
PackageName string
AppInfo *AppInfo
CategoryImage *gpproto.Image
CategoryID int
CategoryName string
Changes string
ContainsAds bool
CoverImage *gpproto.Image
Description string
DeveloperName string
DisplayName string
DownloadString string
EarlyAccess bool
IconImage *gpproto.Image
InstantAppLink string
IsFree bool
IsSystem bool
LiveStreamUrl string
OfferDetails map[string]string
OfferType int32
Price string
PromotionStreamUrl string
Screenshots []*gpproto.Image
ShortDescription string
Size int64
TargetSdk int
TestingProgram *TestingProgram
UpdatedOn string
VersionCode int
VersionName string
Video *gpproto.Image
}
type DeviceBuildInfo ¶
type DeviceBuildInfo struct {
*gpproto.AndroidBuildProto
VersionRelease int
}
type DeviceInfo ¶
type DeviceInfo struct {
Build *DeviceBuildInfo
SimOperator string
Platforms []string
OtaInstalled bool
CellOperator string
Roaming string
TimeZone string
TouchScreen int32
Keyboard int32
ScreenLayout int32
Screen *DeviceInfoScreen
GLVersion int32
GLExtensions []string
Features []string
Locales []string
}
func (*DeviceInfo) GenerateAndroidCheckInRequest ¶
func (i *DeviceInfo) GenerateAndroidCheckInRequest() *gpproto.AndroidCheckinRequest
func (*DeviceInfo) GetAuthUserAgent ¶
func (i *DeviceInfo) GetAuthUserAgent() string
func (*DeviceInfo) GetDeviceConfigProto ¶
func (i *DeviceInfo) GetDeviceConfigProto() *gpproto.DeviceConfigurationProto
func (*DeviceInfo) GetDeviceFeatures ¶
func (i *DeviceInfo) GetDeviceFeatures() (ret []*gpproto.DeviceFeature)
func (*DeviceInfo) GetUserAgent ¶
func (i *DeviceInfo) GetUserAgent() string
type DeviceInfoScreen ¶
type GooglePlayClient ¶
type GooglePlayClient struct {
AuthData *AuthData
DeviceInfo *DeviceInfo
Locale string
LocaleDash string
Country string
// SessionFile if SessionFile is set then session will be saved to it after modification
SessionFile string
}
func LoadSession ¶
func LoadSession(file string) (*GooglePlayClient, error)
func LoadSessionWithDeviceInfo ¶
func LoadSessionWithDeviceInfo(file string, deviceInfo *DeviceInfo) (client *GooglePlayClient, err error)
func NewClient ¶
func NewClient(email, aasToken string) (*GooglePlayClient, error)
NewClient makes new client with Pixel3a config
func NewClientWithDeviceInfo ¶
func NewClientWithDeviceInfo(email, aasToken string, deviceInfo *DeviceInfo, country, locale string) (client *GooglePlayClient, err error)
func (*GooglePlayClient) GenerateGPToken ¶
func (client *GooglePlayClient) GenerateGPToken() (string, error)
func (*GooglePlayClient) GenerateGsfID ¶
func (client *GooglePlayClient) GenerateGsfID() (gsfID string, err error)
func (*GooglePlayClient) GetAppDetails ¶
func (client *GooglePlayClient) GetAppDetails(packageName string) (*App, error)
func (*GooglePlayClient) GetBuyResponse ¶
func (client *GooglePlayClient) GetBuyResponse(packageName string, version int) (*gpproto.BuyResponse, error)
func (*GooglePlayClient) GetDeliveryResponse ¶
func (client *GooglePlayClient) GetDeliveryResponse(packageName string, version int) (*gpproto.DeliveryResponse, error)
func (*GooglePlayClient) Purchase ¶
func (client *GooglePlayClient) Purchase(packageName string, version int) (*gpproto.AndroidAppDeliveryData, error)
func (*GooglePlayClient) RegenerateGPToken ¶
func (client *GooglePlayClient) RegenerateGPToken() (err error)
func (*GooglePlayClient) SaveSession ¶
func (client *GooglePlayClient) SaveSession(file string) error
type TestingProgram ¶
type TestingProgramStatus ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.