mirror of https://github.com/i1v/googleplay
Compare commits
2 Commits
Author | SHA1 | Date |
---|---|---|
Steven Penny | 4cba406557 | |
Steven Penny | 3c3a29d42f |
|
@ -0,0 +1,3 @@
|
|||
module blog
|
||||
|
||||
go 1.20
|
|
@ -17,7 +17,7 @@ versionCode | 25
|
|||
versionName | 7.1.2
|
||||
|
||||
- https://apkmirror.com/apk/google-inc/google-play-store
|
||||
- https://github.com/MCMrARM/Google-Play-API/blob/master/proto/gsf.proto
|
||||
- https://apkmirror.com/apk/google-inc/google-services-framework
|
||||
|
||||
## How to install Android App Bundle?
|
||||
|
||||
|
|
20
checkin.go
20
checkin.go
|
@ -143,16 +143,6 @@ func (c Config) Checkin(native_platform string) (*Response, error) {
|
|||
return &Response{res}, nil
|
||||
}
|
||||
|
||||
// Checkin$AndroidCheckinResponse
|
||||
type Device struct {
|
||||
protobuf.Message
|
||||
}
|
||||
|
||||
// AndroidId
|
||||
func (d Device) ID() (uint64, error) {
|
||||
return d.Get_Fixed64(7)
|
||||
}
|
||||
|
||||
type Native_Platform map[int64]string
|
||||
|
||||
var Platforms = Native_Platform{
|
||||
|
@ -174,3 +164,13 @@ func (n Native_Platform) String() string {
|
|||
}
|
||||
return string(b)
|
||||
}
|
||||
|
||||
// Checkin$AndroidCheckinResponse
|
||||
type Device struct {
|
||||
protobuf.Message
|
||||
}
|
||||
|
||||
// AndroidId
|
||||
func (d Device) ID() (uint64, error) {
|
||||
return d.Get_Fixed64(7)
|
||||
}
|
||||
|
|
91
delivery.go
91
delivery.go
|
@ -9,33 +9,6 @@ import (
|
|||
"strconv"
|
||||
)
|
||||
|
||||
type Delivery struct {
|
||||
protobuf.Message
|
||||
}
|
||||
|
||||
func (d Delivery) Additional_File() []File_Metadata {
|
||||
var files []File_Metadata
|
||||
// .additionalFile
|
||||
for _, file := range d.Get_Messages(4) {
|
||||
files = append(files, File_Metadata{file})
|
||||
}
|
||||
return files
|
||||
}
|
||||
|
||||
// .downloadUrl
|
||||
func (d Delivery) Download_URL() (string, error) {
|
||||
return d.Get_String(3)
|
||||
}
|
||||
|
||||
func (d Delivery) Split_Data() []Split_Data {
|
||||
var splits []Split_Data
|
||||
// .splitDeliveryData
|
||||
for _, split := range d.Get_Messages(15) {
|
||||
splits = append(splits, Split_Data{split})
|
||||
}
|
||||
return splits
|
||||
}
|
||||
|
||||
type File struct {
|
||||
Package_Name string
|
||||
Version_Code uint64
|
||||
|
@ -68,20 +41,6 @@ func (f File) OBB(file_type uint64) string {
|
|||
return string(b)
|
||||
}
|
||||
|
||||
type File_Metadata struct {
|
||||
protobuf.Message
|
||||
}
|
||||
|
||||
// .downloadUrl
|
||||
func (f File_Metadata) Download_URL() (string, error) {
|
||||
return f.Get_String(4)
|
||||
}
|
||||
|
||||
// .fileType
|
||||
func (f File_Metadata) File_Type() (uint64, error) {
|
||||
return f.Get_Varint(1)
|
||||
}
|
||||
|
||||
func (h Header) Delivery(app string, ver uint64) (*Delivery, error) {
|
||||
req, err := http.NewRequest(
|
||||
"GET", "https://play-fe.googleapis.com/fdfe/delivery", nil,
|
||||
|
@ -131,16 +90,60 @@ func (h Header) Delivery(app string, ver uint64) (*Delivery, error) {
|
|||
return &del, nil
|
||||
}
|
||||
|
||||
// .downloadUrl
|
||||
func (d Delivery) Download_URL() (string, error) {
|
||||
return d.Get_String(3)
|
||||
}
|
||||
|
||||
func (d Delivery) Split_Data() []Split_Data {
|
||||
var splits []Split_Data
|
||||
// .splitDeliveryData
|
||||
for _, split := range d.Get_Messages(15) {
|
||||
splits = append(splits, Split_Data{split})
|
||||
}
|
||||
return splits
|
||||
}
|
||||
|
||||
// AndroidAppDeliveryData
|
||||
type Delivery struct {
|
||||
protobuf.Message
|
||||
}
|
||||
|
||||
func (d Delivery) Additional_File() []App_File_Metadata {
|
||||
var files []App_File_Metadata
|
||||
// .additionalFile
|
||||
for _, file := range d.Get_Messages(4) {
|
||||
files = append(files, App_File_Metadata{file})
|
||||
}
|
||||
return files
|
||||
}
|
||||
|
||||
// SplitDeliveryData
|
||||
type Split_Data struct {
|
||||
protobuf.Message
|
||||
}
|
||||
|
||||
// .id
|
||||
func (s Split_Data) ID() (string, error) {
|
||||
return s.Get_String(1)
|
||||
}
|
||||
|
||||
// .downloadUrl
|
||||
func (s Split_Data) Download_URL() (string, error) {
|
||||
return s.Get_String(5)
|
||||
}
|
||||
|
||||
// .id
|
||||
func (s Split_Data) ID() (string, error) {
|
||||
return s.Get_String(1)
|
||||
// AppFileMetadata
|
||||
type App_File_Metadata struct {
|
||||
protobuf.Message
|
||||
}
|
||||
|
||||
// .fileType
|
||||
func (a App_File_Metadata) File_Type() (uint64, error) {
|
||||
return a.Get_Varint(1)
|
||||
}
|
||||
|
||||
// .downloadUrl
|
||||
func (a App_File_Metadata) Download_URL() (string, error) {
|
||||
return a.Get_String(4)
|
||||
}
|
||||
|
|
13
details.go
13
details.go
|
@ -171,8 +171,6 @@ func (h Header) Details(app string) (*Details, error) {
|
|||
return &det, nil
|
||||
}
|
||||
|
||||
///////////////
|
||||
|
||||
// .details.appDetails.installationSize
|
||||
func (d Details) Installation_Size() (uint64, error) {
|
||||
value, err := d.Get(13).Get(1).Get_Varint(9)
|
||||
|
@ -190,3 +188,14 @@ func (d Details) File() []File_Metadata {
|
|||
}
|
||||
return files
|
||||
}
|
||||
|
||||
// FileMetadata
|
||||
// This is similar to AppFileMetadata, but notably field 4 is different.
|
||||
type File_Metadata struct {
|
||||
protobuf.Message
|
||||
}
|
||||
|
||||
// .fileType
|
||||
func (f File_Metadata) File_Type() (uint64, error) {
|
||||
return f.Get_Varint(1)
|
||||
}
|
||||
|
|
2
go.mod
2
go.mod
|
@ -2,7 +2,7 @@ module 2a.pages.dev/googleplay
|
|||
|
||||
go 1.19
|
||||
|
||||
require 2a.pages.dev/rosso v1.1.1
|
||||
require 2a.pages.dev/rosso v1.1.3
|
||||
|
||||
require (
|
||||
github.com/andybalholm/brotli v1.0.5 // indirect
|
||||
|
|
4
go.sum
4
go.sum
|
@ -1,5 +1,5 @@
|
|||
2a.pages.dev/rosso v1.1.1 h1:NM4FFub3PEqwU4FfCD+BPfbsR3GpDbcYkQio+x3AfA0=
|
||||
2a.pages.dev/rosso v1.1.1/go.mod h1:BdsjSTjdUXzcr3IdZ/LdA/NqWVMI+AesF6Nq24eyowY=
|
||||
2a.pages.dev/rosso v1.1.3 h1:4KdQHiA50d9h60Nvdll6itHl4isQudeQpZm1UgJ+vuY=
|
||||
2a.pages.dev/rosso v1.1.3/go.mod h1:8tU5iC2Wccy1N475SYju8lQQOni4w1Ijd3NbpqMwXaI=
|
||||
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
|
||||
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
|
||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||
|
|
Loading…
Reference in New Issue