new file: .gitattributes

This commit is contained in:
Zombo 2023-02-06 18:32:42 -06:00
commit 736d7fb30d
61 changed files with 13091 additions and 0 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
*.java linguist-vendored

1
.github/funding.yaml vendored Normal file
View File

@ -0,0 +1 @@
custom: https://paypal.com/donate?hosted_button_id=UEJBQQTU3VYDY

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
ignore
ignore.go
ignore.json
ignore.txt

1
.ignore Normal file
View File

@ -0,0 +1 @@
docs/com/google

168
auth.go Normal file
View File

@ -0,0 +1,168 @@
package googleplay
import (
"2a.pages.dev/rosso/crypto"
"2a.pages.dev/rosso/http"
"2a.pages.dev/rosso/protobuf"
"bufio"
"io"
"net/url"
"os"
"strconv"
"strings"
)
var Client = http.Default_Client
type Auth struct {
url.Values
}
type Response struct {
*http.Response
}
// You can also use host "android.clients.google.com", but it also uses
// TLS fingerprinting.
func New_Auth(email, password string) (*Response, error) {
req_body := url.Values{
"Email": {email},
"Passwd": {password},
"client_sig": {""},
"droidguard_results": {"."},
}.Encode()
req, err := http.NewRequest(
"POST", "https://android.googleapis.com/auth",
strings.NewReader(req_body),
)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
hello, err := crypto.Parse_JA3(crypto.Android_API_26)
if err != nil {
return nil, err
}
tr := crypto.Transport(hello)
res, err := Client.Transport(tr).Do(req)
if err != nil {
return nil, err
}
return &Response{res}, nil
}
func (r Response) Create(name string) error {
file, err := os.Create(name)
if err != nil {
return err
}
defer file.Close()
if _, err := file.ReadFrom(r.Body); err != nil {
return err
}
return nil
}
func (a Auth) Get_Auth() string {
return a.Get("Auth")
}
func (a Auth) Get_Token() string {
return a.Get("Token")
}
func (a *Auth) Exchange() error {
// these values take from Android API 28
req_body := url.Values{
"Token": {a.Get_Token()},
"app": {"com.android.vending"},
"client_sig": {"38918a453d07199354f8b19af05ec6562ced5788"},
"service": {"oauth2:https://www.googleapis.com/auth/googleplay"},
}.Encode()
req, err := http.NewRequest(
"POST", "https://android.googleapis.com/auth",
strings.NewReader(req_body),
)
if err != nil {
return err
}
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
res, err := Client.Do(req)
if err != nil {
return err
}
defer res.Body.Close()
a.Values = read_query(res.Body)
return nil
}
func (h Header) Set_Device(head http.Header) error {
id, err := h.Device.ID()
if err != nil {
return err
}
head.Set("X-DFE-Device-ID", strconv.FormatUint(id, 16))
return nil
}
func (h Header) Set_Agent(head http.Header) {
// `sdk` is needed for `/fdfe/delivery`
b := []byte("Android-Finsky (sdk=")
// valid range 0 - 0x7FFF_FFFF
b = strconv.AppendInt(b, 9, 10)
// com.android.vending
b = append(b, ",versionCode="...)
if h.Single {
// valid range 8032_0000 - 8091_9999
b = strconv.AppendInt(b, 8091_9999, 10)
} else {
// valid range 8092_0000 - 0x7FFF_FFFF
b = strconv.AppendInt(b, 9999_9999, 10)
}
b = append(b, ')')
head.Set("User-Agent", string(b))
}
func (h Header) Set_Auth(head http.Header) {
head.Set("Authorization", "Bearer " + h.Auth.Get_Auth())
}
func read_query(read io.Reader) url.Values {
values := make(url.Values)
scan := bufio.NewScanner(read)
for scan.Scan() {
key, value, pass := strings.Cut(scan.Text(), "=")
if pass {
values.Add(key, value)
}
}
return values
}
type Header struct {
Auth Auth // Authorization
Device Device // X-Dfe-Device-Id
Single bool
}
func (h *Header) Open_Auth(name string) error {
file, err := os.Open(name)
if err != nil {
return err
}
defer file.Close()
h.Auth.Values = read_query(file)
return nil
}
func (h *Header) Open_Device(name string) error {
data, err := os.ReadFile(name)
if err != nil {
return err
}
h.Device.Message, err = protobuf.Unmarshal(data)
if err != nil {
return err
}
return nil
}

37
auth_test.go Normal file
View File

@ -0,0 +1,37 @@
package googleplay
import (
"os"
"testing"
"time"
)
func Test_Auth(t *testing.T) {
home, err := os.UserHomeDir()
if err != nil {
t.Fatal(err)
}
res, err := New_Auth(email, password)
if err != nil {
t.Fatal(err)
}
defer res.Body.Close()
if err := res.Create(home + "/googleplay/auth.txt"); err != nil {
t.Fatal(err)
}
}
func Test_Header(t *testing.T) {
home, err := os.UserHomeDir()
if err != nil {
t.Fatal(err)
}
var head Header
head.Open_Auth(home + "/googleplay/auth.txt")
for i := 0; i < 9; i++ {
if head.Auth.Get_Auth() == "" {
t.Fatalf("%+v", head)
}
time.Sleep(time.Second)
}
}

172
checkin.go Normal file
View File

@ -0,0 +1,172 @@
package googleplay
import (
"2a.pages.dev/rosso/protobuf"
"bytes"
"net/http"
"strconv"
"time"
)
const Sleep = 4 * time.Second
// These can use default values, but they must all be included
type Config struct {
GL_ES_Version uint64
GL_Extension []string
Has_Five_Way_Navigation uint64
Has_Hard_Keyboard uint64
Keyboard uint64
Navigation uint64
New_System_Available_Feature []string
Screen_Density uint64
Screen_Layout uint64
System_Shared_Library []string
Touch_Screen uint64
}
var Phone = Config{
New_System_Available_Feature: []string{
// app.source.getcontact
"android.hardware.location.gps",
// br.com.rodrigokolb.realdrum
"android.software.midi",
// com.app.xt
"android.hardware.camera.front",
// com.clearchannel.iheartradio.controller
"android.hardware.microphone",
// com.google.android.apps.walletnfcrel
"android.software.device_admin",
// com.google.android.youtube
"android.hardware.touchscreen",
"android.hardware.wifi",
// com.illumix.fnafar
"android.hardware.sensor.gyroscope",
// com.madhead.tos.zh
"android.hardware.sensor.accelerometer",
// com.miHoYo.GenshinImpact
"android.hardware.opengles.aep",
// com.pinterest
"android.hardware.camera",
"android.hardware.location",
"android.hardware.screen.portrait",
// com.supercell.brawlstars
"android.hardware.touchscreen.multitouch",
// com.sygic.aura
"android.hardware.location.network",
// com.xiaomi.smarthome
"android.hardware.bluetooth",
"android.hardware.bluetooth_le",
"android.hardware.camera.autofocus",
"android.hardware.usb.host",
// kr.sira.metal
"android.hardware.sensor.compass",
// org.thoughtcrime.securesms
"android.hardware.telephony",
// org.videolan.vlc
"android.hardware.screen.landscape",
},
System_Shared_Library: []string{
// com.amctve.amcfullepisodes
"org.apache.http.legacy",
// com.binance.dev
"android.test.runner",
// com.miui.weather2
"global-miui11-empty.jar",
},
GL_Extension: []string{
// com.instagram.android
"GL_OES_compressed_ETC1_RGB8_texture",
// com.kakaogames.twodin
"GL_KHR_texture_compression_astc_ldr",
},
// com.axis.drawingdesk.v3
// valid range 0x3_0001 - 0x7FFF_FFFF
GL_ES_Version: 0xF_FFFF,
}
// A Sleep is needed after this.
func (c Config) Checkin(native_platform string) (*Response, error) {
req_body := protobuf.Message{
4: protobuf.Message{ // checkin
1: protobuf.Message{ // build
// sdkVersion
// multiple APK valid range 14 - 0x7FFF_FFFF
// single APK valid range 14 - 28
10: protobuf.Varint(28),
},
18: protobuf.Varint(1), // voiceCapable
},
// version
// valid range 2 - 3
14: protobuf.Varint(3),
18: protobuf.Message{ // deviceConfiguration
1: protobuf.Varint(c.Touch_Screen),
2: protobuf.Varint(c.Keyboard),
3: protobuf.Varint(c.Navigation),
4: protobuf.Varint(c.Screen_Layout),
5: protobuf.Varint(c.Has_Hard_Keyboard),
6: protobuf.Varint(c.Has_Five_Way_Navigation),
7: protobuf.Varint(c.Screen_Density),
8: protobuf.Varint(c.GL_ES_Version),
11: protobuf.String(native_platform),
},
}
for _, library := range c.System_Shared_Library {
// .deviceConfiguration.systemSharedLibrary
req_body.Get(18).Add_String(9, library)
}
for _, extension := range c.GL_Extension {
// .deviceConfiguration.glExtension
req_body.Get(18).Add_String(15, extension)
}
for _, name := range c.New_System_Available_Feature {
// .deviceConfiguration.newSystemAvailableFeature
req_body.Get(18).Add(26, protobuf.Message{
1: protobuf.String(name),
})
}
req, err := http.NewRequest(
"POST", "https://android.googleapis.com/checkin",
bytes.NewReader(req_body.Marshal()),
)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", "application/x-protobuffer")
res, err := Client.Do(req)
if err != nil {
return nil, err
}
return &Response{res}, nil
}
type Device struct {
protobuf.Message
}
func (d Device) ID() (uint64, error) {
return d.Get_Fixed64(7)
}
type Native_Platform map[int64]string
var Platforms = Native_Platform{
// com.google.android.youtube
0: "x86",
// com.miui.weather2
1: "armeabi-v7a",
// com.kakaogames.twodin
2: "arm64-v8a",
}
func (n Native_Platform) String() string {
b := []byte("nativePlatform")
for key, val := range n {
b = append(b, '\n')
b = strconv.AppendInt(b, key, 10)
b = append(b, ": "...)
b = append(b, val...)
}
return string(b)
}

47
checkin_test.go Normal file
View File

@ -0,0 +1,47 @@
package googleplay
import (
"os"
"testing"
"time"
)
func checkin_create(id int64) error {
platform := Platforms[id]
home, err := os.UserHomeDir()
if err != nil {
return err
}
res, err := Phone.Checkin(platform)
if err != nil {
return err
}
defer res.Body.Close()
platform += ".bin"
if err := res.Create(home + "/googleplay/" + platform); err != nil {
return err
}
time.Sleep(Sleep)
return nil
}
func Test_Checkin_X86(t *testing.T) {
err := checkin_create(0)
if err != nil {
t.Fatal(err)
}
}
func Test_Checkin_ARMEABI(t *testing.T) {
err := checkin_create(1)
if err != nil {
t.Fatal(err)
}
}
func Test_Checkin_ARM64(t *testing.T) {
err := checkin_create(2)
if err != nil {
t.Fatal(err)
}
}

42
cmd/badging/badging.go Normal file
View File

@ -0,0 +1,42 @@
package main
import (
"flag"
"fmt"
"os"
"os/exec"
"strings"
)
func main() {
var f struct {
name string
verbose bool
}
flag.StringVar(&f.name, "f", "", "file")
flag.BoolVar(&f.verbose, "v", false, "verbose")
flag.Parse()
if f.name != "" {
cmd := exec.Command("aapt", "dump", "badging", f.name)
cmd.Stderr = os.Stderr
data, err := cmd.Output()
if err != nil {
panic(err)
}
lines := strings.FieldsFunc(string(data), func(r rune) bool {
return r == '\n'
})
for _, line := range lines {
if f.verbose ||
strings.HasPrefix(line, " uses-feature:") ||
strings.HasPrefix(line, " uses-gl-es:") ||
strings.HasPrefix(line, "native-code:") ||
strings.HasPrefix(line, "supports-gl-texture:") ||
strings.HasPrefix(line, "uses-library:") {
fmt.Println(line)
}
}
} else {
flag.Usage()
}
}

22
cmd/example/example.go Normal file
View File

@ -0,0 +1,22 @@
package main
import (
"2a.pages.dev/googleplay"
"os"
)
func main() {
var head googleplay.Header
head.Open_Device("x86.bin")
head.Open_Auth("auth.txt")
head.Auth.Exchange()
detail, err := head.Details("com.app.xt")
if err != nil {
panic(err)
}
text, err := detail.MarshalText()
if err != nil {
panic(err)
}
os.Stdout.Write(text)
}

View File

@ -0,0 +1,110 @@
package main
import (
"2a.pages.dev/googleplay"
"2a.pages.dev/rosso/http"
"fmt"
"io"
"os"
"time"
)
func (f flags) do_auth(dir string) error {
res, err := googleplay.New_Auth(f.email, f.password)
if err != nil {
return err
}
defer res.Body.Close()
return res.Create(dir + "/auth.txt")
}
func do_device(dir, platform string) error {
res, err := googleplay.Phone.Checkin(platform)
if err != nil {
return err
}
defer res.Body.Close()
fmt.Printf("Sleeping %v for server to process\n", googleplay.Sleep)
time.Sleep(googleplay.Sleep)
return res.Create(dir + "/" + platform + ".bin")
}
func (f flags) do_delivery(head *googleplay.Header) error {
download := func(ref, name string) error {
res, err := googleplay.Client.Redirect(nil).Get(ref)
if err != nil {
return err
}
defer res.Body.Close()
file, err := os.Create(name)
if err != nil {
return err
}
defer file.Close()
pro := http.Progress_Bytes(file, res.ContentLength)
if _, err := io.Copy(pro, res.Body); err != nil {
return err
}
return nil
}
del, err := head.Delivery(f.app, f.version)
if err != nil {
return err
}
file := googleplay.File{f.app, f.version}
for _, split := range del.Split_Data() {
ref, err := split.Download_URL()
if err != nil {
return err
}
id, err := split.ID()
if err != nil {
return err
}
if err := download(ref, file.APK(id)); err != nil {
return err
}
}
for _, add := range del.Additional_File() {
ref, err := add.Download_URL()
if err != nil {
return err
}
typ, err := add.File_Type()
if err != nil {
return err
}
if err := download(ref, file.OBB(typ)); err != nil {
return err
}
}
ref, err := del.Download_URL()
if err != nil {
return err
}
return download(ref, file.APK(""))
}
func (f flags) do_header(dir, platform string) (*googleplay.Header, error) {
var head googleplay.Header
err := head.Open_Auth(dir + "/auth.txt")
if err != nil {
return nil, err
}
if err := head.Auth.Exchange(); err != nil {
return nil, err
}
if err := head.Open_Device(dir + "/" + platform + ".bin"); err != nil {
return nil, err
}
head.Single = f.single
return &head, nil
}
func (f flags) do_details(head *googleplay.Header) ([]byte, error) {
detail, err := head.Details(f.app)
if err != nil {
return nil, err
}
return detail.MarshalText()
}

88
cmd/googleplay/main.go Normal file
View File

@ -0,0 +1,88 @@
package main
import (
"2a.pages.dev/googleplay"
"flag"
"os"
)
type flags struct {
app string
device bool
email string
password string
platform int64
purchase bool
single bool
version uint64
verbose bool
}
func main() {
var f flags
// a
flag.StringVar(&f.app, "a", "", "app")
// device
flag.BoolVar(&f.device, "device", false, "create device")
// email
flag.StringVar(&f.email, "email", "", "your email")
// p
flag.Int64Var(&f.platform, "p", 0, googleplay.Platforms.String())
// password
flag.StringVar(&f.password, "password", "", "your password")
// purchase
flag.BoolVar(&f.purchase, "purchase", false, "purchase app")
// s
flag.BoolVar(&f.single, "s", false, "single APK")
// v
flag.Uint64Var(&f.version, "v", 0, "app version")
flag.BoolVar(&f.verbose, "verbose", false, "verbose")
flag.Parse()
if f.verbose {
googleplay.Client.Log_Level = 2
}
dir, err := os.UserHomeDir()
if err != nil {
panic(err)
}
dir += "/googleplay"
os.Mkdir(dir, os.ModePerm)
if f.password != "" {
err := f.do_auth(dir)
if err != nil {
panic(err)
}
} else {
platform := googleplay.Platforms[f.platform]
if f.device {
err := do_device(dir, platform)
if err != nil {
panic(err)
}
} else if f.app != "" {
head, err := f.do_header(dir, platform)
if err != nil {
panic(err)
}
if f.purchase {
err := head.Purchase(f.app)
if err != nil {
panic(err)
}
} else if f.version >= 1 {
err := f.do_delivery(head)
if err != nil {
panic(err)
}
} else {
detail, err := f.do_details(head)
if err != nil {
panic(err)
}
os.Stdout.Write(detail)
}
} else {
flag.Usage()
}
}
}

5
cmd/googleplay/readme.md Normal file
View File

@ -0,0 +1,5 @@
# GooglePlay
~~~
go run . -a com.sygic.aura
~~~

146
delivery.go Normal file
View File

@ -0,0 +1,146 @@
package googleplay
import (
"2a.pages.dev/rosso/protobuf"
"errors"
"io"
"net/http"
"net/url"
"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
}
func (f File) APK(id string) string {
b := []byte(f.Package_Name)
b = append(b, '-')
if id != "" {
b = append(b, id...)
b = append(b, '-')
}
b = strconv.AppendUint(b, f.Version_Code, 10)
b = append(b, ".apk"...)
return string(b)
}
func (f File) OBB(file_type uint64) string {
var b []byte
if file_type >= 1 {
b = append(b, "patch"...)
} else {
b = append(b, "main"...)
}
b = append(b, '.')
b = strconv.AppendUint(b, f.Version_Code, 10)
b = append(b, '.')
b = append(b, f.Package_Name...)
b = append(b, ".obb"...)
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,
)
if err != nil {
return nil, err
}
h.Set_Agent(req.Header)
h.Set_Auth(req.Header) // needed for single APK
h.Set_Device(req.Header)
req.URL.RawQuery = url.Values{
"doc": {app},
"vc": {strconv.FormatUint(ver, 10)},
}.Encode()
res, err := Client.Do(req)
if err != nil {
return nil, err
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
return nil, err
}
// ResponseWrapper
response_wrapper, err := protobuf.Unmarshal(body)
if err != nil {
return nil, err
}
// .payload.deliveryResponse
delivery_response := response_wrapper.Get(1).Get(21)
// .status
status, err := delivery_response.Get_Varint(1)
if err != nil {
return nil, err
}
switch status {
case 2:
return nil, errors.New("geo-blocking")
case 3:
return nil, errors.New("purchase required")
case 5:
return nil, errors.New("invalid version")
}
var del Delivery
// .appDeliveryData
del.Message = delivery_response.Get(2)
return &del, nil
}
type Split_Data struct {
protobuf.Message
}
// .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)
}

22
delivery_test.go Normal file
View File

@ -0,0 +1,22 @@
package googleplay
import (
"fmt"
"os"
"testing"
)
func Test_Delivery(t *testing.T) {
home, err := os.UserHomeDir()
if err != nil {
t.Fatal(err)
}
var head Header
head.Open_Auth(home + "/googleplay/auth.txt")
head.Open_Device(home + "/googleplay/x86.bin")
del, err := head.Delivery("com.google.android.youtube", 1524221376)
if err != nil {
t.Fatal(err)
}
fmt.Printf("%+v\n", del)
}

192
details.go Normal file
View File

@ -0,0 +1,192 @@
package googleplay
import (
"2a.pages.dev/rosso/protobuf"
"2a.pages.dev/rosso/strconv"
"errors"
"io"
"net/http"
"net/url"
)
var err_device = errors.New("your device isn't compatible with this version")
type Details struct {
protobuf.Message
}
// .creator
func (d Details) Creator() (string, error) {
return d.Get_String(6)
}
// .offer.currencyCode
func (d Details) Currency_Code() (string, error) {
return d.Get(8).Get_String(2)
}
func (d Details) MarshalText() ([]byte, error) {
var b []byte
b = append(b, "Title: "...)
if val, err := d.Title(); err != nil {
return nil, err
} else {
b = append(b, val...)
}
b = append(b, "\nCreator: "...)
if val, err := d.Creator(); err != nil {
return nil, err
} else {
b = append(b, val...)
}
b = append(b, "\nUpload Date: "...)
if val, err := d.Upload_Date(); err != nil {
return nil, err
} else {
b = append(b, val...)
}
b = append(b, "\nVersion: "...)
if val, err := d.Version(); err != nil {
return nil, err
} else {
b = append(b, val...)
}
b = append(b, "\nVersion Code: "...)
if val, err := d.Version_Code(); err != nil {
return nil, err
} else {
b = strconv.AppendUint(b, val, 10)
}
b = append(b, "\nNum Downloads: "...)
if val, err := d.Num_Downloads(); err != nil {
return nil, err
} else {
b = strconv.New_Number(val).Cardinal(b)
}
b = append(b, "\nInstallation Size: "...)
if val, err := d.Installation_Size(); err != nil {
return nil, err
} else {
b = strconv.New_Number(val).Size(b)
}
b = append(b, "\nFile:"...)
for _, file := range d.File() {
if val, err := file.File_Type(); err != nil {
return nil, err
} else if val >= 1 {
b = append(b, " OBB"...)
} else {
b = append(b, " APK"...)
}
}
b = append(b, "\nOffer: "...)
if val, err := d.Micros(); err != nil {
return nil, err
} else {
b = strconv.AppendUint(b, val, 10)
}
b = append(b, ' ')
if val, err := d.Currency_Code(); err != nil {
return nil, err
} else {
b = append(b, val...)
}
return append(b, '\n'), nil
}
// .offer.micros
func (d Details) Micros() (uint64, error) {
return d.Get(8).Get_Varint(1)
}
// .title
func (d Details) Title() (string, error) {
return d.Get_String(5)
}
// .details.appDetails.uploadDate
func (d Details) Upload_Date() (string, error) {
value, err := d.Get(13).Get(1).Get_String(16)
if err != nil {
return "", err_device
}
return value, nil
}
// .details.appDetails.versionString
func (d Details) Version() (string, error) {
value, err := d.Get(13).Get(1).Get_String(4)
if err != nil {
return "", err_device
}
return value, nil
}
// .details.appDetails.versionCode
func (d Details) Version_Code() (uint64, error) {
value, err := d.Get(13).Get(1).Get_Varint(3)
if err != nil {
return 0, err_device
}
return value, nil
}
// .details.appDetails
// I dont know the name of field 70, but the similar field 13 is called
// .numDownloads
func (d Details) Num_Downloads() (uint64, error) {
return d.Get(13).Get(1).Get_Varint(70)
}
func (h Header) Details(app string) (*Details, error) {
req, err := http.NewRequest(
"GET", "https://android.clients.google.com/fdfe/details", nil,
)
if err != nil {
return nil, err
}
// half of the apps I test require User-Agent,
// so just set it for all of them
h.Set_Agent(req.Header)
h.Set_Auth(req.Header)
h.Set_Device(req.Header)
req.URL.RawQuery = "doc=" + url.QueryEscape(app)
res, err := Client.Do(req)
if err != nil {
return nil, err
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
return nil, err
}
// ResponseWrapper
response_wrapper, err := protobuf.Unmarshal(body)
if err != nil {
return nil, err
}
var det Details
// .payload.detailsResponse.docV2
det.Message = response_wrapper.Get(1).Get(2).Get(4)
return &det, nil
}
///////////////
// .details.appDetails.installationSize
func (d Details) Installation_Size() (uint64, error) {
value, err := d.Get(13).Get(1).Get_Varint(9)
if err != nil {
return 0, err_device
}
return value, nil
}
// .details.appDetails.file
func (d Details) File() []File_Metadata {
var files []File_Metadata
for _, file := range d.Get(13).Get(1).Get_Messages(17) {
files = append(files, File_Metadata{file})
}
return files
}

100
details_test.go Normal file
View File

@ -0,0 +1,100 @@
package googleplay
import (
"fmt"
"os"
"strconv"
"testing"
"time"
)
var apps = []app_type{
{"2021-12-08 00:00:00 +0000 UTC",0,"com.amctve.amcfullepisodes"},
{"2022-02-02 00:00:00 +0000 UTC",2,"com.illumix.fnafar"},
{"2022-02-14 00:00:00 +0000 UTC",0,"org.videolan.vlc"},
{"2022-03-17 00:00:00 +0000 UTC",0,"com.google.android.apps.walletnfcrel"},
{"2022-03-24 00:00:00 +0000 UTC",0,"app.source.getcontact"},
{"2022-03-24 00:00:00 +0000 UTC",1,"com.miui.weather2"},
{"2022-04-28 00:00:00 +0000 UTC",2,"com.miHoYo.GenshinImpact"},
{"2022-05-11 00:00:00 +0000 UTC",1,"com.supercell.brawlstars"},
{"2022-05-12 00:00:00 +0000 UTC",0,"com.clearchannel.iheartradio.controller"},
{"2022-05-23 00:00:00 +0000 UTC",0,"kr.sira.metal"},
{"2022-05-23 00:00:00 +0000 UTC",2,"com.kakaogames.twodin"},
{"2022-05-30 00:00:00 +0000 UTC",1,"com.madhead.tos.zh"},
{"2022-05-31 00:00:00 +0000 UTC",1,"com.xiaomi.smarthome"},
{"2022-06-02 00:00:00 +0000 UTC",0,"org.thoughtcrime.securesms"},
{"2022-06-02 00:00:00 +0000 UTC",1,"com.binance.dev"},
{"2022-06-08 00:00:00 +0000 UTC",1,"com.sygic.aura"},
{"2022-06-12 00:00:00 +0000 UTC",0,"br.com.rodrigokolb.realdrum"},
{"2022-06-13 00:00:00 +0000 UTC",0,"com.app.xt"},
{"2022-06-13 00:00:00 +0000 UTC",0,"com.google.android.youtube"},
{"2022-06-13 00:00:00 +0000 UTC",0,"com.instagram.android"},
{"2022-06-13 00:00:00 +0000 UTC",1,"com.axis.drawingdesk.v3"},
{"2022-06-14 00:00:00 +0000 UTC",0,"com.pinterest"},
}
func Test_Details(t *testing.T) {
home, err := os.UserHomeDir()
if err != nil {
t.Fatal(err)
}
var head Header
head.Open_Auth(home + "/googleplay/auth.txt")
head.Auth.Exchange()
for _, app := range apps {
platform := Platforms[app.platform]
head.Open_Device(home + "/googleplay/" + platform + ".bin")
d, err := head.Details(app.id)
if err != nil {
t.Fatal(err)
}
if _, err := d.Version(); err != nil {
t.Fatal(err)
}
if _, err := d.Version_Code(); err != nil {
t.Fatal(err)
}
if _, err := d.Title(); err != nil {
t.Fatal(err)
}
if _, err := d.Installation_Size(); err != nil {
t.Fatal(err)
}
if _, err := d.Num_Downloads(); err != nil {
t.Fatal(err)
}
if _, err := d.Currency_Code(); err != nil {
t.Fatal(err)
}
raw_date, err := d.Upload_Date()
if err != nil {
t.Fatal(err)
}
date, err := time.Parse("Jan 2, 2006", raw_date)
if err != nil {
t.Fatal(err)
}
app.date = date.String()
fmt.Print(app, ",\n")
time.Sleep(99 * time.Millisecond)
}
}
func (a app_type) String() string {
var b []byte
b = append(b, '{')
b = strconv.AppendQuote(b, a.date)
b = append(b, ',')
b = strconv.AppendInt(b, a.platform, 10)
b = append(b, ',')
b = strconv.AppendQuote(b, a.id)
b = append(b, '}')
return string(b)
}
type app_type struct {
date string
platform int64 // X-DFE-Device-ID
id string
}

View File

@ -0,0 +1,337 @@
package com.google.android.finsky.protos;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
/* loaded from: classes.dex */
public final class AndroidAppDeliveryData extends MessageNano {
public long downloadSize = 0;
public boolean hasDownloadSize = false;
public long gzippedDownloadSize = 0;
public boolean hasGzippedDownloadSize = false;
public String signature = "";
public boolean hasSignature = false;
public String downloadUrl = "";
public boolean hasDownloadUrl = false;
public String gzippedDownloadUrl = "";
public boolean hasGzippedDownloadUrl = false;
public EncryptionParams encryptionParams = null;
public AppFileMetadata[] additionalFile = AppFileMetadata.emptyArray();
public HttpCookie[] downloadAuthCookie = HttpCookie.emptyArray();
public boolean forwardLocked = false;
public boolean hasForwardLocked = false;
public long refundTimeout = 0;
public boolean hasRefundTimeout = false;
public long postInstallRefundWindowMillis = 0;
public boolean hasPostInstallRefundWindowMillis = false;
public boolean serverInitiated = true;
public boolean hasServerInitiated = false;
public boolean immediateStartNeeded = false;
public boolean hasImmediateStartNeeded = false;
public AndroidAppPatchData patchData = null;
public SplitDeliveryData[] splitDeliveryData = SplitDeliveryData.emptyArray();
public int installLocation = 0;
public boolean hasInstallLocation = false;
public boolean everExternallyHosted = false;
public boolean hasEverExternallyHosted = false;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int length;
int length2;
int length3;
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 8:
this.downloadSize = x0.readRawVarint64();
this.hasDownloadSize = true;
break;
case 18:
this.signature = x0.readString();
this.hasSignature = true;
break;
case 26:
this.downloadUrl = x0.readString();
this.hasDownloadUrl = true;
break;
case 34:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 34);
if (this.additionalFile == null) {
length3 = 0;
} else {
length3 = this.additionalFile.length;
}
AppFileMetadata[] appFileMetadataArr = new AppFileMetadata[repeatedFieldArrayLength + length3];
if (length3 != 0) {
System.arraycopy(this.additionalFile, 0, appFileMetadataArr, 0, length3);
}
while (length3 < appFileMetadataArr.length - 1) {
appFileMetadataArr[length3] = new AppFileMetadata();
x0.readMessage(appFileMetadataArr[length3]);
x0.readTag();
length3++;
}
appFileMetadataArr[length3] = new AppFileMetadata();
x0.readMessage(appFileMetadataArr[length3]);
this.additionalFile = appFileMetadataArr;
break;
case 42:
int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(x0, 42);
if (this.downloadAuthCookie == null) {
length2 = 0;
} else {
length2 = this.downloadAuthCookie.length;
}
HttpCookie[] httpCookieArr = new HttpCookie[repeatedFieldArrayLength2 + length2];
if (length2 != 0) {
System.arraycopy(this.downloadAuthCookie, 0, httpCookieArr, 0, length2);
}
while (length2 < httpCookieArr.length - 1) {
httpCookieArr[length2] = new HttpCookie();
x0.readMessage(httpCookieArr[length2]);
x0.readTag();
length2++;
}
httpCookieArr[length2] = new HttpCookie();
x0.readMessage(httpCookieArr[length2]);
this.downloadAuthCookie = httpCookieArr;
break;
case 48:
this.forwardLocked = x0.readBool();
this.hasForwardLocked = true;
break;
case 56:
this.refundTimeout = x0.readRawVarint64();
this.hasRefundTimeout = true;
break;
case 64:
this.serverInitiated = x0.readBool();
this.hasServerInitiated = true;
break;
case 72:
this.postInstallRefundWindowMillis = x0.readRawVarint64();
this.hasPostInstallRefundWindowMillis = true;
break;
case 80:
this.immediateStartNeeded = x0.readBool();
this.hasImmediateStartNeeded = true;
break;
case 90:
if (this.patchData == null) {
this.patchData = new AndroidAppPatchData();
}
x0.readMessage(this.patchData);
break;
case 98:
if (this.encryptionParams == null) {
this.encryptionParams = new EncryptionParams();
}
x0.readMessage(this.encryptionParams);
break;
case 106:
this.gzippedDownloadUrl = x0.readString();
this.hasGzippedDownloadUrl = true;
break;
case 112:
this.gzippedDownloadSize = x0.readRawVarint64();
this.hasGzippedDownloadSize = true;
break;
case 122:
int repeatedFieldArrayLength3 = WireFormatNano.getRepeatedFieldArrayLength(x0, 122);
if (this.splitDeliveryData == null) {
length = 0;
} else {
length = this.splitDeliveryData.length;
}
SplitDeliveryData[] splitDeliveryDataArr = new SplitDeliveryData[repeatedFieldArrayLength3 + length];
if (length != 0) {
System.arraycopy(this.splitDeliveryData, 0, splitDeliveryDataArr, 0, length);
}
while (length < splitDeliveryDataArr.length - 1) {
splitDeliveryDataArr[length] = new SplitDeliveryData();
x0.readMessage(splitDeliveryDataArr[length]);
x0.readTag();
length++;
}
splitDeliveryDataArr[length] = new SplitDeliveryData();
x0.readMessage(splitDeliveryDataArr[length]);
this.splitDeliveryData = splitDeliveryDataArr;
break;
case 128:
int readRawVarint32 = x0.readRawVarint32();
switch (readRawVarint32) {
case 0:
case 1:
case 2:
case 3:
this.installLocation = readRawVarint32;
this.hasInstallLocation = true;
continue;
}
case 136:
this.everExternallyHosted = x0.readBool();
this.hasEverExternallyHosted = true;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public AndroidAppDeliveryData() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.hasDownloadSize || this.downloadSize != 0) {
output.writeInt64(1, this.downloadSize);
}
if (this.hasSignature || !this.signature.equals("")) {
output.writeString(2, this.signature);
}
if (this.hasDownloadUrl || !this.downloadUrl.equals("")) {
output.writeString(3, this.downloadUrl);
}
if (this.additionalFile != null && this.additionalFile.length > 0) {
for (int i = 0; i < this.additionalFile.length; i++) {
AppFileMetadata element = this.additionalFile[i];
if (element != null) {
output.writeMessage(4, element);
}
}
}
if (this.downloadAuthCookie != null && this.downloadAuthCookie.length > 0) {
for (int i2 = 0; i2 < this.downloadAuthCookie.length; i2++) {
HttpCookie element2 = this.downloadAuthCookie[i2];
if (element2 != null) {
output.writeMessage(5, element2);
}
}
}
if (this.hasForwardLocked || this.forwardLocked) {
output.writeBool(6, this.forwardLocked);
}
if (this.hasRefundTimeout || this.refundTimeout != 0) {
output.writeInt64(7, this.refundTimeout);
}
if (this.hasServerInitiated || !this.serverInitiated) {
output.writeBool(8, this.serverInitiated);
}
if (this.hasPostInstallRefundWindowMillis || this.postInstallRefundWindowMillis != 0) {
output.writeInt64(9, this.postInstallRefundWindowMillis);
}
if (this.hasImmediateStartNeeded || this.immediateStartNeeded) {
output.writeBool(10, this.immediateStartNeeded);
}
if (this.patchData != null) {
output.writeMessage(11, this.patchData);
}
if (this.encryptionParams != null) {
output.writeMessage(12, this.encryptionParams);
}
if (this.hasGzippedDownloadUrl || !this.gzippedDownloadUrl.equals("")) {
output.writeString(13, this.gzippedDownloadUrl);
}
if (this.hasGzippedDownloadSize || this.gzippedDownloadSize != 0) {
output.writeInt64(14, this.gzippedDownloadSize);
}
if (this.splitDeliveryData != null && this.splitDeliveryData.length > 0) {
for (int i3 = 0; i3 < this.splitDeliveryData.length; i3++) {
SplitDeliveryData element3 = this.splitDeliveryData[i3];
if (element3 != null) {
output.writeMessage(15, element3);
}
}
}
if (this.installLocation != 0 || this.hasInstallLocation) {
output.writeInt32(16, this.installLocation);
}
if (this.hasEverExternallyHosted || this.everExternallyHosted) {
output.writeBool(17, this.everExternallyHosted);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.hasDownloadSize || this.downloadSize != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(1, this.downloadSize);
}
if (this.hasSignature || !this.signature.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(2, this.signature);
}
if (this.hasDownloadUrl || !this.downloadUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(3, this.downloadUrl);
}
if (this.additionalFile != null && this.additionalFile.length > 0) {
for (int i = 0; i < this.additionalFile.length; i++) {
AppFileMetadata element = this.additionalFile[i];
if (element != null) {
size += CodedOutputByteBufferNano.computeMessageSize(4, element);
}
}
}
if (this.downloadAuthCookie != null && this.downloadAuthCookie.length > 0) {
for (int i2 = 0; i2 < this.downloadAuthCookie.length; i2++) {
HttpCookie element2 = this.downloadAuthCookie[i2];
if (element2 != null) {
size += CodedOutputByteBufferNano.computeMessageSize(5, element2);
}
}
}
if (this.hasForwardLocked || this.forwardLocked) {
size += CodedOutputByteBufferNano.computeTagSize(6) + 1;
}
if (this.hasRefundTimeout || this.refundTimeout != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(7, this.refundTimeout);
}
if (this.hasServerInitiated || !this.serverInitiated) {
size += CodedOutputByteBufferNano.computeTagSize(8) + 1;
}
if (this.hasPostInstallRefundWindowMillis || this.postInstallRefundWindowMillis != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(9, this.postInstallRefundWindowMillis);
}
if (this.hasImmediateStartNeeded || this.immediateStartNeeded) {
size += CodedOutputByteBufferNano.computeTagSize(10) + 1;
}
if (this.patchData != null) {
size += CodedOutputByteBufferNano.computeMessageSize(11, this.patchData);
}
if (this.encryptionParams != null) {
size += CodedOutputByteBufferNano.computeMessageSize(12, this.encryptionParams);
}
if (this.hasGzippedDownloadUrl || !this.gzippedDownloadUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(13, this.gzippedDownloadUrl);
}
if (this.hasGzippedDownloadSize || this.gzippedDownloadSize != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(14, this.gzippedDownloadSize);
}
if (this.splitDeliveryData != null && this.splitDeliveryData.length > 0) {
for (int i3 = 0; i3 < this.splitDeliveryData.length; i3++) {
SplitDeliveryData element3 = this.splitDeliveryData[i3];
if (element3 != null) {
size += CodedOutputByteBufferNano.computeMessageSize(15, element3);
}
}
}
if (this.installLocation != 0 || this.hasInstallLocation) {
size += CodedOutputByteBufferNano.computeInt32Size(16, this.installLocation);
}
if (this.hasEverExternallyHosted || this.everExternallyHosted) {
return size + CodedOutputByteBufferNano.computeTagSize(17) + 1;
}
return size;
}
}

View File

@ -0,0 +1,597 @@
package com.google.android.finsky.protos;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
/* loaded from: classes.dex */
public final class AppDetails extends MessageNano {
public String developerName = "";
public boolean hasDeveloperName = false;
public int majorVersionNumber = 0;
public boolean hasMajorVersionNumber = false;
public int versionCode = 0;
public boolean hasVersionCode = false;
public String versionString = "";
public boolean hasVersionString = false;
public String title = "";
public boolean hasTitle = false;
public String[] appCategory = WireFormatNano.EMPTY_STRING_ARRAY;
public int contentRating = 0;
public boolean hasContentRating = false;
public long installationSize = 0;
public boolean hasInstallationSize = false;
public String[] permission = WireFormatNano.EMPTY_STRING_ARRAY;
public String developerEmail = "";
public boolean hasDeveloperEmail = false;
public String developerWebsite = "";
public boolean hasDeveloperWebsite = false;
public String numDownloads = "";
public boolean hasNumDownloads = false;
public String packageName = "";
public boolean hasPackageName = false;
public String recentChangesHtml = "";
public boolean hasRecentChangesHtml = false;
public String uploadDate = "";
public boolean hasUploadDate = false;
public FileMetadata[] file = FileMetadata.emptyArray();
public String appType = "";
public boolean hasAppType = false;
public CertificateSet[] certificateSet = CertificateSet.emptyArray();
public String[] certificateHash = WireFormatNano.EMPTY_STRING_ARRAY;
public boolean variesByAccount = true;
public boolean hasVariesByAccount = false;
public String[] autoAcquireFreeAppIfHigherVersionAvailableTag = WireFormatNano.EMPTY_STRING_ARRAY;
public boolean declaresIab = false;
public boolean hasDeclaresIab = false;
public String[] splitId = WireFormatNano.EMPTY_STRING_ARRAY;
public boolean gamepadRequired = false;
public boolean hasGamepadRequired = false;
public boolean externallyHosted = false;
public boolean hasExternallyHosted = false;
public boolean everExternallyHosted = false;
public boolean hasEverExternallyHosted = false;
public String installNotes = "";
public boolean hasInstallNotes = false;
public int installLocation = 0;
public boolean hasInstallLocation = false;
public int targetSdkVersion = 0;
public boolean hasTargetSdkVersion = false;
public String preregistrationPromoCode = "";
public boolean hasPreregistrationPromoCode = false;
public InstallDetails installDetails = null;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int length;
int length2;
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
this.developerName = x0.readString();
this.hasDeveloperName = true;
break;
case 16:
this.majorVersionNumber = x0.readRawVarint32();
this.hasMajorVersionNumber = true;
break;
case 24:
this.versionCode = x0.readRawVarint32();
this.hasVersionCode = true;
break;
case 34:
this.versionString = x0.readString();
this.hasVersionString = true;
break;
case 42:
this.title = x0.readString();
this.hasTitle = true;
break;
case 58:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 58);
int length3 = this.appCategory == null ? 0 : this.appCategory.length;
String[] strArr = new String[repeatedFieldArrayLength + length3];
if (length3 != 0) {
System.arraycopy(this.appCategory, 0, strArr, 0, length3);
}
while (length3 < strArr.length - 1) {
strArr[length3] = x0.readString();
x0.readTag();
length3++;
}
strArr[length3] = x0.readString();
this.appCategory = strArr;
break;
case 64:
this.contentRating = x0.readRawVarint32();
this.hasContentRating = true;
break;
case 72:
this.installationSize = x0.readRawVarint64();
this.hasInstallationSize = true;
break;
case 82:
int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(x0, 82);
int length4 = this.permission == null ? 0 : this.permission.length;
String[] strArr2 = new String[repeatedFieldArrayLength2 + length4];
if (length4 != 0) {
System.arraycopy(this.permission, 0, strArr2, 0, length4);
}
while (length4 < strArr2.length - 1) {
strArr2[length4] = x0.readString();
x0.readTag();
length4++;
}
strArr2[length4] = x0.readString();
this.permission = strArr2;
break;
case 90:
this.developerEmail = x0.readString();
this.hasDeveloperEmail = true;
break;
case 98:
this.developerWebsite = x0.readString();
this.hasDeveloperWebsite = true;
break;
case 106:
this.numDownloads = x0.readString();
this.hasNumDownloads = true;
break;
case 114:
this.packageName = x0.readString();
this.hasPackageName = true;
break;
case 122:
this.recentChangesHtml = x0.readString();
this.hasRecentChangesHtml = true;
break;
case 130:
this.uploadDate = x0.readString();
this.hasUploadDate = true;
break;
case 138:
int repeatedFieldArrayLength3 = WireFormatNano.getRepeatedFieldArrayLength(x0, 138);
if (this.file == null) {
length2 = 0;
} else {
length2 = this.file.length;
}
FileMetadata[] fileMetadataArr = new FileMetadata[repeatedFieldArrayLength3 + length2];
if (length2 != 0) {
System.arraycopy(this.file, 0, fileMetadataArr, 0, length2);
}
while (length2 < fileMetadataArr.length - 1) {
fileMetadataArr[length2] = new FileMetadata();
x0.readMessage(fileMetadataArr[length2]);
x0.readTag();
length2++;
}
fileMetadataArr[length2] = new FileMetadata();
x0.readMessage(fileMetadataArr[length2]);
this.file = fileMetadataArr;
break;
case 146:
this.appType = x0.readString();
this.hasAppType = true;
break;
case 154:
int repeatedFieldArrayLength4 = WireFormatNano.getRepeatedFieldArrayLength(x0, 154);
int length5 = this.certificateHash == null ? 0 : this.certificateHash.length;
String[] strArr3 = new String[repeatedFieldArrayLength4 + length5];
if (length5 != 0) {
System.arraycopy(this.certificateHash, 0, strArr3, 0, length5);
}
while (length5 < strArr3.length - 1) {
strArr3[length5] = x0.readString();
x0.readTag();
length5++;
}
strArr3[length5] = x0.readString();
this.certificateHash = strArr3;
break;
case 168:
this.variesByAccount = x0.readBool();
this.hasVariesByAccount = true;
break;
case 178:
int repeatedFieldArrayLength5 = WireFormatNano.getRepeatedFieldArrayLength(x0, 178);
if (this.certificateSet == null) {
length = 0;
} else {
length = this.certificateSet.length;
}
CertificateSet[] certificateSetArr = new CertificateSet[repeatedFieldArrayLength5 + length];
if (length != 0) {
System.arraycopy(this.certificateSet, 0, certificateSetArr, 0, length);
}
while (length < certificateSetArr.length - 1) {
certificateSetArr[length] = new CertificateSet();
x0.readMessage(certificateSetArr[length]);
x0.readTag();
length++;
}
certificateSetArr[length] = new CertificateSet();
x0.readMessage(certificateSetArr[length]);
this.certificateSet = certificateSetArr;
break;
case 186:
int repeatedFieldArrayLength6 = WireFormatNano.getRepeatedFieldArrayLength(x0, 186);
int length6 = this.autoAcquireFreeAppIfHigherVersionAvailableTag == null ? 0 : this.autoAcquireFreeAppIfHigherVersionAvailableTag.length;
String[] strArr4 = new String[repeatedFieldArrayLength6 + length6];
if (length6 != 0) {
System.arraycopy(this.autoAcquireFreeAppIfHigherVersionAvailableTag, 0, strArr4, 0, length6);
}
while (length6 < strArr4.length - 1) {
strArr4[length6] = x0.readString();
x0.readTag();
length6++;
}
strArr4[length6] = x0.readString();
this.autoAcquireFreeAppIfHigherVersionAvailableTag = strArr4;
break;
case 192:
this.declaresIab = x0.readBool();
this.hasDeclaresIab = true;
break;
case 202:
int repeatedFieldArrayLength7 = WireFormatNano.getRepeatedFieldArrayLength(x0, 202);
int length7 = this.splitId == null ? 0 : this.splitId.length;
String[] strArr5 = new String[repeatedFieldArrayLength7 + length7];
if (length7 != 0) {
System.arraycopy(this.splitId, 0, strArr5, 0, length7);
}
while (length7 < strArr5.length - 1) {
strArr5[length7] = x0.readString();
x0.readTag();
length7++;
}
strArr5[length7] = x0.readString();
this.splitId = strArr5;
break;
case 208:
this.gamepadRequired = x0.readBool();
this.hasGamepadRequired = true;
break;
case 216:
this.externallyHosted = x0.readBool();
this.hasExternallyHosted = true;
break;
case 224:
this.everExternallyHosted = x0.readBool();
this.hasEverExternallyHosted = true;
break;
case 242:
this.installNotes = x0.readString();
this.hasInstallNotes = true;
break;
case 248:
int readRawVarint32 = x0.readRawVarint32();
switch (readRawVarint32) {
case 0:
case 1:
case 2:
case 3:
this.installLocation = readRawVarint32;
this.hasInstallLocation = true;
continue;
}
case 256:
this.targetSdkVersion = x0.readRawVarint32();
this.hasTargetSdkVersion = true;
break;
case 266:
this.preregistrationPromoCode = x0.readString();
this.hasPreregistrationPromoCode = true;
break;
case 274:
if (this.installDetails == null) {
this.installDetails = new InstallDetails();
}
x0.readMessage(this.installDetails);
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public AppDetails() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.hasDeveloperName || !this.developerName.equals("")) {
output.writeString(1, this.developerName);
}
if (this.hasMajorVersionNumber || this.majorVersionNumber != 0) {
output.writeInt32(2, this.majorVersionNumber);
}
if (this.hasVersionCode || this.versionCode != 0) {
output.writeInt32(3, this.versionCode);
}
if (this.hasVersionString || !this.versionString.equals("")) {
output.writeString(4, this.versionString);
}
if (this.hasTitle || !this.title.equals("")) {
output.writeString(5, this.title);
}
if (this.appCategory != null && this.appCategory.length > 0) {
for (int i = 0; i < this.appCategory.length; i++) {
String element = this.appCategory[i];
if (element != null) {
output.writeString(7, element);
}
}
}
if (this.hasContentRating || this.contentRating != 0) {
output.writeInt32(8, this.contentRating);
}
if (this.hasInstallationSize || this.installationSize != 0) {
output.writeInt64(9, this.installationSize);
}
if (this.permission != null && this.permission.length > 0) {
for (int i2 = 0; i2 < this.permission.length; i2++) {
String element2 = this.permission[i2];
if (element2 != null) {
output.writeString(10, element2);
}
}
}
if (this.hasDeveloperEmail || !this.developerEmail.equals("")) {
output.writeString(11, this.developerEmail);
}
if (this.hasDeveloperWebsite || !this.developerWebsite.equals("")) {
output.writeString(12, this.developerWebsite);
}
if (this.hasNumDownloads || !this.numDownloads.equals("")) {
output.writeString(13, this.numDownloads);
}
if (this.hasPackageName || !this.packageName.equals("")) {
output.writeString(14, this.packageName);
}
if (this.hasRecentChangesHtml || !this.recentChangesHtml.equals("")) {
output.writeString(15, this.recentChangesHtml);
}
if (this.hasUploadDate || !this.uploadDate.equals("")) {
output.writeString(16, this.uploadDate);
}
if (this.file != null && this.file.length > 0) {
for (int i3 = 0; i3 < this.file.length; i3++) {
FileMetadata element3 = this.file[i3];
if (element3 != null) {
output.writeMessage(17, element3);
}
}
}
if (this.hasAppType || !this.appType.equals("")) {
output.writeString(18, this.appType);
}
if (this.certificateHash != null && this.certificateHash.length > 0) {
for (int i4 = 0; i4 < this.certificateHash.length; i4++) {
String element4 = this.certificateHash[i4];
if (element4 != null) {
output.writeString(19, element4);
}
}
}
if (this.hasVariesByAccount || !this.variesByAccount) {
output.writeBool(21, this.variesByAccount);
}
if (this.certificateSet != null && this.certificateSet.length > 0) {
for (int i5 = 0; i5 < this.certificateSet.length; i5++) {
CertificateSet element5 = this.certificateSet[i5];
if (element5 != null) {
output.writeMessage(22, element5);
}
}
}
if (this.autoAcquireFreeAppIfHigherVersionAvailableTag != null && this.autoAcquireFreeAppIfHigherVersionAvailableTag.length > 0) {
for (int i6 = 0; i6 < this.autoAcquireFreeAppIfHigherVersionAvailableTag.length; i6++) {
String element6 = this.autoAcquireFreeAppIfHigherVersionAvailableTag[i6];
if (element6 != null) {
output.writeString(23, element6);
}
}
}
if (this.hasDeclaresIab || this.declaresIab) {
output.writeBool(24, this.declaresIab);
}
if (this.splitId != null && this.splitId.length > 0) {
for (int i7 = 0; i7 < this.splitId.length; i7++) {
String element7 = this.splitId[i7];
if (element7 != null) {
output.writeString(25, element7);
}
}
}
if (this.hasGamepadRequired || this.gamepadRequired) {
output.writeBool(26, this.gamepadRequired);
}
if (this.hasExternallyHosted || this.externallyHosted) {
output.writeBool(27, this.externallyHosted);
}
if (this.hasEverExternallyHosted || this.everExternallyHosted) {
output.writeBool(28, this.everExternallyHosted);
}
if (this.hasInstallNotes || !this.installNotes.equals("")) {
output.writeString(30, this.installNotes);
}
if (this.installLocation != 0 || this.hasInstallLocation) {
output.writeInt32(31, this.installLocation);
}
if (this.hasTargetSdkVersion || this.targetSdkVersion != 0) {
output.writeInt32(32, this.targetSdkVersion);
}
if (this.hasPreregistrationPromoCode || !this.preregistrationPromoCode.equals("")) {
output.writeString(33, this.preregistrationPromoCode);
}
if (this.installDetails != null) {
output.writeMessage(34, this.installDetails);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.hasDeveloperName || !this.developerName.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(1, this.developerName);
}
if (this.hasMajorVersionNumber || this.majorVersionNumber != 0) {
size += CodedOutputByteBufferNano.computeInt32Size(2, this.majorVersionNumber);
}
if (this.hasVersionCode || this.versionCode != 0) {
size += CodedOutputByteBufferNano.computeInt32Size(3, this.versionCode);
}
if (this.hasVersionString || !this.versionString.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(4, this.versionString);
}
if (this.hasTitle || !this.title.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(5, this.title);
}
if (this.appCategory != null && this.appCategory.length > 0) {
int dataCount = 0;
int dataSize = 0;
for (int i = 0; i < this.appCategory.length; i++) {
String element = this.appCategory[i];
if (element != null) {
dataCount++;
dataSize += CodedOutputByteBufferNano.computeStringSizeNoTag(element);
}
}
size = size + dataSize + (dataCount * 1);
}
if (this.hasContentRating || this.contentRating != 0) {
size += CodedOutputByteBufferNano.computeInt32Size(8, this.contentRating);
}
if (this.hasInstallationSize || this.installationSize != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(9, this.installationSize);
}
if (this.permission != null && this.permission.length > 0) {
int dataCount2 = 0;
int dataSize2 = 0;
for (int i2 = 0; i2 < this.permission.length; i2++) {
String element2 = this.permission[i2];
if (element2 != null) {
dataCount2++;
dataSize2 += CodedOutputByteBufferNano.computeStringSizeNoTag(element2);
}
}
size = size + dataSize2 + (dataCount2 * 1);
}
if (this.hasDeveloperEmail || !this.developerEmail.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(11, this.developerEmail);
}
if (this.hasDeveloperWebsite || !this.developerWebsite.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(12, this.developerWebsite);
}
if (this.hasNumDownloads || !this.numDownloads.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(13, this.numDownloads);
}
if (this.hasPackageName || !this.packageName.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(14, this.packageName);
}
if (this.hasRecentChangesHtml || !this.recentChangesHtml.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(15, this.recentChangesHtml);
}
if (this.hasUploadDate || !this.uploadDate.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(16, this.uploadDate);
}
if (this.file != null && this.file.length > 0) {
for (int i3 = 0; i3 < this.file.length; i3++) {
FileMetadata element3 = this.file[i3];
if (element3 != null) {
size += CodedOutputByteBufferNano.computeMessageSize(17, element3);
}
}
}
if (this.hasAppType || !this.appType.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(18, this.appType);
}
if (this.certificateHash != null && this.certificateHash.length > 0) {
int dataCount3 = 0;
int dataSize3 = 0;
for (int i4 = 0; i4 < this.certificateHash.length; i4++) {
String element4 = this.certificateHash[i4];
if (element4 != null) {
dataCount3++;
dataSize3 += CodedOutputByteBufferNano.computeStringSizeNoTag(element4);
}
}
size = size + dataSize3 + (dataCount3 * 2);
}
if (this.hasVariesByAccount || !this.variesByAccount) {
size += CodedOutputByteBufferNano.computeTagSize(21) + 1;
}
if (this.certificateSet != null && this.certificateSet.length > 0) {
for (int i5 = 0; i5 < this.certificateSet.length; i5++) {
CertificateSet element5 = this.certificateSet[i5];
if (element5 != null) {
size += CodedOutputByteBufferNano.computeMessageSize(22, element5);
}
}
}
if (this.autoAcquireFreeAppIfHigherVersionAvailableTag != null && this.autoAcquireFreeAppIfHigherVersionAvailableTag.length > 0) {
int dataCount4 = 0;
int dataSize4 = 0;
for (int i6 = 0; i6 < this.autoAcquireFreeAppIfHigherVersionAvailableTag.length; i6++) {
String element6 = this.autoAcquireFreeAppIfHigherVersionAvailableTag[i6];
if (element6 != null) {
dataCount4++;
dataSize4 += CodedOutputByteBufferNano.computeStringSizeNoTag(element6);
}
}
size = size + dataSize4 + (dataCount4 * 2);
}
if (this.hasDeclaresIab || this.declaresIab) {
size += CodedOutputByteBufferNano.computeTagSize(24) + 1;
}
if (this.splitId != null && this.splitId.length > 0) {
int dataCount5 = 0;
int dataSize5 = 0;
for (int i7 = 0; i7 < this.splitId.length; i7++) {
String element7 = this.splitId[i7];
if (element7 != null) {
dataCount5++;
dataSize5 += CodedOutputByteBufferNano.computeStringSizeNoTag(element7);
}
}
size = size + dataSize5 + (dataCount5 * 2);
}
if (this.hasGamepadRequired || this.gamepadRequired) {
size += CodedOutputByteBufferNano.computeTagSize(26) + 1;
}
if (this.hasExternallyHosted || this.externallyHosted) {
size += CodedOutputByteBufferNano.computeTagSize(27) + 1;
}
if (this.hasEverExternallyHosted || this.everExternallyHosted) {
size += CodedOutputByteBufferNano.computeTagSize(28) + 1;
}
if (this.hasInstallNotes || !this.installNotes.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(30, this.installNotes);
}
if (this.installLocation != 0 || this.hasInstallLocation) {
size += CodedOutputByteBufferNano.computeInt32Size(31, this.installLocation);
}
if (this.hasTargetSdkVersion || this.targetSdkVersion != 0) {
size += CodedOutputByteBufferNano.computeInt32Size(32, this.targetSdkVersion);
}
if (this.hasPreregistrationPromoCode || !this.preregistrationPromoCode.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(33, this.preregistrationPromoCode);
}
if (this.installDetails != null) {
return size + CodedOutputByteBufferNano.computeMessageSize(34, this.installDetails);
}
return size;
}
}

View File

@ -0,0 +1,159 @@
package com.google.android.finsky.protos;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.InternalNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
/* loaded from: classes.dex */
public final class AppFileMetadata extends MessageNano {
private static volatile AppFileMetadata[] _emptyArray;
public int fileType = 0;
public boolean hasFileType = false;
public int versionCode = 0;
public boolean hasVersionCode = false;
public long size = 0;
public boolean hasSize = false;
public String signature = "";
public boolean hasSignature = false;
public long compressedSize = 0;
public boolean hasCompressedSize = false;
public String downloadUrl = "";
public boolean hasDownloadUrl = false;
public String compressedDownloadUrl = "";
public boolean hasCompressedDownloadUrl = false;
public AndroidAppPatchData patchData = null;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 8:
int readRawVarint32 = x0.readRawVarint32();
switch (readRawVarint32) {
case 0:
case 1:
this.fileType = readRawVarint32;
this.hasFileType = true;
continue;
}
case 16:
this.versionCode = x0.readRawVarint32();
this.hasVersionCode = true;
break;
case 24:
this.size = x0.readRawVarint64();
this.hasSize = true;
break;
case 34:
this.downloadUrl = x0.readString();
this.hasDownloadUrl = true;
break;
case 42:
if (this.patchData == null) {
this.patchData = new AndroidAppPatchData();
}
x0.readMessage(this.patchData);
break;
case 48:
this.compressedSize = x0.readRawVarint64();
this.hasCompressedSize = true;
break;
case 58:
this.compressedDownloadUrl = x0.readString();
this.hasCompressedDownloadUrl = true;
break;
case 66:
this.signature = x0.readString();
this.hasSignature = true;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public static AppFileMetadata[] emptyArray() {
if (_emptyArray == null) {
synchronized (InternalNano.LAZY_INIT_LOCK) {
if (_emptyArray == null) {
_emptyArray = new AppFileMetadata[0];
}
}
}
return _emptyArray;
}
public AppFileMetadata() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.fileType != 0 || this.hasFileType) {
output.writeInt32(1, this.fileType);
}
if (this.hasVersionCode || this.versionCode != 0) {
output.writeInt32(2, this.versionCode);
}
if (this.hasSize || this.size != 0) {
output.writeInt64(3, this.size);
}
if (this.hasDownloadUrl || !this.downloadUrl.equals("")) {
output.writeString(4, this.downloadUrl);
}
if (this.patchData != null) {
output.writeMessage(5, this.patchData);
}
if (this.hasCompressedSize || this.compressedSize != 0) {
output.writeInt64(6, this.compressedSize);
}
if (this.hasCompressedDownloadUrl || !this.compressedDownloadUrl.equals("")) {
output.writeString(7, this.compressedDownloadUrl);
}
if (this.hasSignature || !this.signature.equals("")) {
output.writeString(8, this.signature);
}
super.writeTo(output);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.fileType != 0 || this.hasFileType) {
size += CodedOutputByteBufferNano.computeInt32Size(1, this.fileType);
}
if (this.hasVersionCode || this.versionCode != 0) {
size += CodedOutputByteBufferNano.computeInt32Size(2, this.versionCode);
}
if (this.hasSize || this.size != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(3, this.size);
}
if (this.hasDownloadUrl || !this.downloadUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(4, this.downloadUrl);
}
if (this.patchData != null) {
size += CodedOutputByteBufferNano.computeMessageSize(5, this.patchData);
}
if (this.hasCompressedSize || this.compressedSize != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(6, this.compressedSize);
}
if (this.hasCompressedDownloadUrl || !this.compressedDownloadUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(7, this.compressedDownloadUrl);
}
if (this.hasSignature || !this.signature.equals("")) {
return size + CodedOutputByteBufferNano.computeStringSize(8, this.signature);
}
return size;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,271 @@
package com.google.android.finsky.protos;
import com.google.android.finsky.protos.Common;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.InternalNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
import java.util.Arrays;
/* loaded from: classes.dex */
public interface Containers {
/* loaded from: classes.dex */
public static final class ContainerMetadata extends MessageNano {
public String browseUrl = "";
public boolean hasBrowseUrl = false;
public String nextPageUrl = "";
public boolean hasNextPageUrl = false;
public double relevance = 0.0d;
public boolean hasRelevance = false;
public long estimatedResults = 0;
public boolean hasEstimatedResults = false;
public String analyticsCookie = "";
public boolean hasAnalyticsCookie = false;
public boolean ordered = false;
public boolean hasOrdered = false;
public ContainerView[] containerView = ContainerView.emptyArray();
public Common.Image leftIcon = null;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int length;
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
this.browseUrl = x0.readString();
this.hasBrowseUrl = true;
break;
case 18:
this.nextPageUrl = x0.readString();
this.hasNextPageUrl = true;
break;
case 25:
this.relevance = Double.longBitsToDouble(x0.readRawLittleEndian64());
this.hasRelevance = true;
break;
case 32:
this.estimatedResults = x0.readRawVarint64();
this.hasEstimatedResults = true;
break;
case 42:
this.analyticsCookie = x0.readString();
this.hasAnalyticsCookie = true;
break;
case 48:
this.ordered = x0.readBool();
this.hasOrdered = true;
break;
case 58:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 58);
if (this.containerView == null) {
length = 0;
} else {
length = this.containerView.length;
}
ContainerView[] containerViewArr = new ContainerView[repeatedFieldArrayLength + length];
if (length != 0) {
System.arraycopy(this.containerView, 0, containerViewArr, 0, length);
}
while (length < containerViewArr.length - 1) {
containerViewArr[length] = new ContainerView();
x0.readMessage(containerViewArr[length]);
x0.readTag();
length++;
}
containerViewArr[length] = new ContainerView();
x0.readMessage(containerViewArr[length]);
this.containerView = containerViewArr;
break;
case 66:
if (this.leftIcon == null) {
this.leftIcon = new Common.Image();
}
x0.readMessage(this.leftIcon);
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public ContainerMetadata() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.hasBrowseUrl || !this.browseUrl.equals("")) {
output.writeString(1, this.browseUrl);
}
if (this.hasNextPageUrl || !this.nextPageUrl.equals("")) {
output.writeString(2, this.nextPageUrl);
}
if (this.hasRelevance || Double.doubleToLongBits(this.relevance) != Double.doubleToLongBits(0.0d)) {
output.writeDouble(3, this.relevance);
}
if (this.hasEstimatedResults || this.estimatedResults != 0) {
output.writeInt64(4, this.estimatedResults);
}
if (this.hasAnalyticsCookie || !this.analyticsCookie.equals("")) {
output.writeString(5, this.analyticsCookie);
}
if (this.hasOrdered || this.ordered) {
output.writeBool(6, this.ordered);
}
if (this.containerView != null && this.containerView.length > 0) {
for (int i = 0; i < this.containerView.length; i++) {
ContainerView element = this.containerView[i];
if (element != null) {
output.writeMessage(7, element);
}
}
}
if (this.leftIcon != null) {
output.writeMessage(8, this.leftIcon);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.hasBrowseUrl || !this.browseUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(1, this.browseUrl);
}
if (this.hasNextPageUrl || !this.nextPageUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(2, this.nextPageUrl);
}
if (this.hasRelevance || Double.doubleToLongBits(this.relevance) != Double.doubleToLongBits(0.0d)) {
size += CodedOutputByteBufferNano.computeTagSize(3) + 8;
}
if (this.hasEstimatedResults || this.estimatedResults != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(4, this.estimatedResults);
}
if (this.hasAnalyticsCookie || !this.analyticsCookie.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(5, this.analyticsCookie);
}
if (this.hasOrdered || this.ordered) {
size += CodedOutputByteBufferNano.computeTagSize(6) + 1;
}
if (this.containerView != null && this.containerView.length > 0) {
for (int i = 0; i < this.containerView.length; i++) {
ContainerView element = this.containerView[i];
if (element != null) {
size += CodedOutputByteBufferNano.computeMessageSize(7, element);
}
}
}
if (this.leftIcon != null) {
return size + CodedOutputByteBufferNano.computeMessageSize(8, this.leftIcon);
}
return size;
}
}
/* loaded from: classes.dex */
public static final class ContainerView extends MessageNano {
private static volatile ContainerView[] _emptyArray;
public boolean selected = false;
public boolean hasSelected = false;
public String title = "";
public boolean hasTitle = false;
public String listUrl = "";
public boolean hasListUrl = false;
public byte[] serverLogsCookie = WireFormatNano.EMPTY_BYTES;
public boolean hasServerLogsCookie = false;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 8:
this.selected = x0.readBool();
this.hasSelected = true;
break;
case 18:
this.title = x0.readString();
this.hasTitle = true;
break;
case 26:
this.listUrl = x0.readString();
this.hasListUrl = true;
break;
case 34:
this.serverLogsCookie = x0.readBytes();
this.hasServerLogsCookie = true;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public static ContainerView[] emptyArray() {
if (_emptyArray == null) {
synchronized (InternalNano.LAZY_INIT_LOCK) {
if (_emptyArray == null) {
_emptyArray = new ContainerView[0];
}
}
}
return _emptyArray;
}
public ContainerView() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.hasSelected || this.selected) {
output.writeBool(1, this.selected);
}
if (this.hasTitle || !this.title.equals("")) {
output.writeString(2, this.title);
}
if (this.hasListUrl || !this.listUrl.equals("")) {
output.writeString(3, this.listUrl);
}
if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) {
output.writeBytes(4, this.serverLogsCookie);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.hasSelected || this.selected) {
size += CodedOutputByteBufferNano.computeTagSize(1) + 1;
}
if (this.hasTitle || !this.title.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(2, this.title);
}
if (this.hasListUrl || !this.listUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(3, this.listUrl);
}
if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) {
return size + CodedOutputByteBufferNano.computeBytesSize(4, this.serverLogsCookie);
}
return size;
}
}
}

View File

@ -0,0 +1,78 @@
package com.google.android.finsky.protos;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
/* loaded from: classes.dex */
public final class DeliveryResponse extends MessageNano {
public int status = 1;
public boolean hasStatus = false;
public AndroidAppDeliveryData appDeliveryData = null;
public DeliveryResponse() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.status != 1 || this.hasStatus) {
output.writeInt32(1, this.status);
}
if (this.appDeliveryData != null) {
output.writeMessage(2, this.appDeliveryData);
}
super.writeTo(output);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.status != 1 || this.hasStatus) {
size += CodedOutputByteBufferNano.computeInt32Size(1, this.status);
}
if (this.appDeliveryData != null) {
return size + CodedOutputByteBufferNano.computeMessageSize(2, this.appDeliveryData);
}
return size;
}
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 8:
int readRawVarint32 = x0.readRawVarint32();
switch (readRawVarint32) {
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
this.status = readRawVarint32;
this.hasStatus = true;
continue;
}
case 18:
if (this.appDeliveryData == null) {
this.appDeliveryData = new AndroidAppDeliveryData();
}
x0.readMessage(this.appDeliveryData);
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
}

View File

@ -0,0 +1,851 @@
package com.google.android.finsky.protos;
import com.google.android.finsky.protos.Common;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.InternalNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
import java.util.Arrays;
/* loaded from: classes.dex */
public interface Details {
/* loaded from: classes.dex */
public static final class DetailsResponse extends MessageNano {
public DocV1 docV1 = null;
public DocV2 docV2 = null;
public Review userReview = null;
public String footerHtml = "";
public boolean hasFooterHtml = false;
public byte[] serverLogsCookie = WireFormatNano.EMPTY_BYTES;
public boolean hasServerLogsCookie = false;
public DiscoveryBadge[] discoveryBadge = DiscoveryBadge.emptyArray();
public boolean enableReviews = true;
public boolean hasEnableReviews = false;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int length;
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
if (this.docV1 == null) {
this.docV1 = new DocV1();
}
x0.readMessage(this.docV1);
break;
case 26:
if (this.userReview == null) {
this.userReview = new Review();
}
x0.readMessage(this.userReview);
break;
case 34:
if (this.docV2 == null) {
this.docV2 = new DocV2();
}
x0.readMessage(this.docV2);
break;
case 42:
this.footerHtml = x0.readString();
this.hasFooterHtml = true;
break;
case 50:
this.serverLogsCookie = x0.readBytes();
this.hasServerLogsCookie = true;
break;
case 58:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 58);
if (this.discoveryBadge == null) {
length = 0;
} else {
length = this.discoveryBadge.length;
}
DiscoveryBadge[] discoveryBadgeArr = new DiscoveryBadge[repeatedFieldArrayLength + length];
if (length != 0) {
System.arraycopy(this.discoveryBadge, 0, discoveryBadgeArr, 0, length);
}
while (length < discoveryBadgeArr.length - 1) {
discoveryBadgeArr[length] = new DiscoveryBadge();
x0.readMessage(discoveryBadgeArr[length]);
x0.readTag();
length++;
}
discoveryBadgeArr[length] = new DiscoveryBadge();
x0.readMessage(discoveryBadgeArr[length]);
this.discoveryBadge = discoveryBadgeArr;
break;
case 64:
this.enableReviews = x0.readBool();
this.hasEnableReviews = true;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public DetailsResponse() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.docV1 != null) {
output.writeMessage(1, this.docV1);
}
if (this.userReview != null) {
output.writeMessage(3, this.userReview);
}
if (this.docV2 != null) {
output.writeMessage(4, this.docV2);
}
if (this.hasFooterHtml || !this.footerHtml.equals("")) {
output.writeString(5, this.footerHtml);
}
if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) {
output.writeBytes(6, this.serverLogsCookie);
}
if (this.discoveryBadge != null && this.discoveryBadge.length > 0) {
for (int i = 0; i < this.discoveryBadge.length; i++) {
DiscoveryBadge element = this.discoveryBadge[i];
if (element != null) {
output.writeMessage(7, element);
}
}
}
if (this.hasEnableReviews || !this.enableReviews) {
output.writeBool(8, this.enableReviews);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.docV1 != null) {
size += CodedOutputByteBufferNano.computeMessageSize(1, this.docV1);
}
if (this.userReview != null) {
size += CodedOutputByteBufferNano.computeMessageSize(3, this.userReview);
}
if (this.docV2 != null) {
size += CodedOutputByteBufferNano.computeMessageSize(4, this.docV2);
}
if (this.hasFooterHtml || !this.footerHtml.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(5, this.footerHtml);
}
if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) {
size += CodedOutputByteBufferNano.computeBytesSize(6, this.serverLogsCookie);
}
if (this.discoveryBadge != null && this.discoveryBadge.length > 0) {
for (int i = 0; i < this.discoveryBadge.length; i++) {
DiscoveryBadge element = this.discoveryBadge[i];
if (element != null) {
size += CodedOutputByteBufferNano.computeMessageSize(7, element);
}
}
}
if (this.hasEnableReviews || !this.enableReviews) {
return size + CodedOutputByteBufferNano.computeTagSize(8) + 1;
}
return size;
}
}
/* loaded from: classes.dex */
public static final class BulkDetailsRequest extends MessageNano {
public String[] docid = WireFormatNano.EMPTY_STRING_ARRAY;
public int[] installedVersionCode = WireFormatNano.EMPTY_INT_ARRAY;
public boolean includeChildDocs = true;
public boolean hasIncludeChildDocs = false;
public boolean includeDetails = false;
public boolean hasIncludeDetails = false;
public String sourcePackageName = "";
public boolean hasSourcePackageName = false;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int length;
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 10);
int length2 = this.docid == null ? 0 : this.docid.length;
String[] strArr = new String[repeatedFieldArrayLength + length2];
if (length2 != 0) {
System.arraycopy(this.docid, 0, strArr, 0, length2);
}
while (length2 < strArr.length - 1) {
strArr[length2] = x0.readString();
x0.readTag();
length2++;
}
strArr[length2] = x0.readString();
this.docid = strArr;
break;
case 16:
this.includeChildDocs = x0.readBool();
this.hasIncludeChildDocs = true;
break;
case 24:
this.includeDetails = x0.readBool();
this.hasIncludeDetails = true;
break;
case 34:
this.sourcePackageName = x0.readString();
this.hasSourcePackageName = true;
break;
case 56:
int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(x0, 56);
if (this.installedVersionCode == null) {
length = 0;
} else {
length = this.installedVersionCode.length;
}
int[] iArr = new int[repeatedFieldArrayLength2 + length];
if (length != 0) {
System.arraycopy(this.installedVersionCode, 0, iArr, 0, length);
}
while (length < iArr.length - 1) {
iArr[length] = x0.readRawVarint32();
x0.readTag();
length++;
}
iArr[length] = x0.readRawVarint32();
this.installedVersionCode = iArr;
break;
case 58:
int pushLimit = x0.pushLimit(x0.readRawVarint32());
int position = x0.getPosition();
int i = 0;
while (x0.getBytesUntilLimit() > 0) {
x0.readRawVarint32();
i++;
}
x0.rewindToPosition(position);
int length3 = this.installedVersionCode == null ? 0 : this.installedVersionCode.length;
int[] iArr2 = new int[i + length3];
if (length3 != 0) {
System.arraycopy(this.installedVersionCode, 0, iArr2, 0, length3);
}
while (length3 < iArr2.length) {
iArr2[length3] = x0.readRawVarint32();
length3++;
}
this.installedVersionCode = iArr2;
x0.popLimit(pushLimit);
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public BulkDetailsRequest() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.docid != null && this.docid.length > 0) {
for (int i = 0; i < this.docid.length; i++) {
String element = this.docid[i];
if (element != null) {
output.writeString(1, element);
}
}
}
if (this.hasIncludeChildDocs || !this.includeChildDocs) {
output.writeBool(2, this.includeChildDocs);
}
if (this.hasIncludeDetails || this.includeDetails) {
output.writeBool(3, this.includeDetails);
}
if (this.hasSourcePackageName || !this.sourcePackageName.equals("")) {
output.writeString(4, this.sourcePackageName);
}
if (this.installedVersionCode != null && this.installedVersionCode.length > 0) {
for (int i2 = 0; i2 < this.installedVersionCode.length; i2++) {
output.writeInt32(7, this.installedVersionCode[i2]);
}
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.docid != null && this.docid.length > 0) {
int dataCount = 0;
int dataSize = 0;
for (int i = 0; i < this.docid.length; i++) {
String element = this.docid[i];
if (element != null) {
dataCount++;
dataSize += CodedOutputByteBufferNano.computeStringSizeNoTag(element);
}
}
size = size + dataSize + (dataCount * 1);
}
if (this.hasIncludeChildDocs || !this.includeChildDocs) {
size += CodedOutputByteBufferNano.computeTagSize(2) + 1;
}
if (this.hasIncludeDetails || this.includeDetails) {
size += CodedOutputByteBufferNano.computeTagSize(3) + 1;
}
if (this.hasSourcePackageName || !this.sourcePackageName.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(4, this.sourcePackageName);
}
if (this.installedVersionCode == null || this.installedVersionCode.length <= 0) {
return size;
}
int dataSize2 = 0;
for (int i2 = 0; i2 < this.installedVersionCode.length; i2++) {
dataSize2 += CodedOutputByteBufferNano.computeInt32SizeNoTag(this.installedVersionCode[i2]);
}
return size + dataSize2 + (this.installedVersionCode.length * 1);
}
}
/* loaded from: classes.dex */
public static final class BulkDetailsResponse extends MessageNano {
public BulkDetailsEntry[] entry = BulkDetailsEntry.emptyArray();
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int length;
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 10);
if (this.entry == null) {
length = 0;
} else {
length = this.entry.length;
}
BulkDetailsEntry[] bulkDetailsEntryArr = new BulkDetailsEntry[repeatedFieldArrayLength + length];
if (length != 0) {
System.arraycopy(this.entry, 0, bulkDetailsEntryArr, 0, length);
}
while (length < bulkDetailsEntryArr.length - 1) {
bulkDetailsEntryArr[length] = new BulkDetailsEntry();
x0.readMessage(bulkDetailsEntryArr[length]);
x0.readTag();
length++;
}
bulkDetailsEntryArr[length] = new BulkDetailsEntry();
x0.readMessage(bulkDetailsEntryArr[length]);
this.entry = bulkDetailsEntryArr;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public BulkDetailsResponse() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.entry != null && this.entry.length > 0) {
for (int i = 0; i < this.entry.length; i++) {
BulkDetailsEntry element = this.entry[i];
if (element != null) {
output.writeMessage(1, element);
}
}
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.entry != null && this.entry.length > 0) {
for (int i = 0; i < this.entry.length; i++) {
BulkDetailsEntry element = this.entry[i];
if (element != null) {
size += CodedOutputByteBufferNano.computeMessageSize(1, element);
}
}
}
return size;
}
}
/* loaded from: classes.dex */
public static final class BulkDetailsEntry extends MessageNano {
private static volatile BulkDetailsEntry[] _emptyArray;
public DocV2 doc = null;
public static BulkDetailsEntry[] emptyArray() {
if (_emptyArray == null) {
synchronized (InternalNano.LAZY_INIT_LOCK) {
if (_emptyArray == null) {
_emptyArray = new BulkDetailsEntry[0];
}
}
}
return _emptyArray;
}
public BulkDetailsEntry() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.doc != null) {
output.writeMessage(1, this.doc);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.doc != null) {
return size + CodedOutputByteBufferNano.computeMessageSize(1, this.doc);
}
return size;
}
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
if (this.doc == null) {
this.doc = new DocV2();
}
x0.readMessage(this.doc);
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
}
/* loaded from: classes.dex */
public static final class DiscoveryBadge extends MessageNano {
private static volatile DiscoveryBadge[] _emptyArray;
public String title = "";
public boolean hasTitle = false;
public String contentDescription = "";
public boolean hasContentDescription = false;
public Common.Image image = null;
public int backgroundColor = 0;
public boolean hasBackgroundColor = false;
public DiscoveryBadgeLink discoveryBadgeLink = null;
public byte[] serverLogsCookie = WireFormatNano.EMPTY_BYTES;
public boolean hasServerLogsCookie = false;
public boolean isPlusOne = false;
public boolean hasIsPlusOne = false;
public float aggregateRating = 0.0f;
public boolean hasAggregateRating = false;
public int userStarRating = 0;
public boolean hasUserStarRating = false;
public String downloadCount = "";
public boolean hasDownloadCount = false;
public String downloadUnits = "";
public boolean hasDownloadUnits = false;
public PlayerBadge playerBadge = null;
public FamilyAgeRangeBadge familyAgeRangeBadge = null;
public FamilyCategoryBadge familyCategoryBadge = null;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
this.title = x0.readString();
this.hasTitle = true;
break;
case 18:
if (this.image == null) {
this.image = new Common.Image();
}
x0.readMessage(this.image);
break;
case 24:
this.backgroundColor = x0.readRawVarint32();
this.hasBackgroundColor = true;
break;
case 34:
if (this.discoveryBadgeLink == null) {
this.discoveryBadgeLink = new DiscoveryBadgeLink();
}
x0.readMessage(this.discoveryBadgeLink);
break;
case 42:
this.serverLogsCookie = x0.readBytes();
this.hasServerLogsCookie = true;
break;
case 48:
this.isPlusOne = x0.readBool();
this.hasIsPlusOne = true;
break;
case 61:
this.aggregateRating = Float.intBitsToFloat(x0.readRawLittleEndian32());
this.hasAggregateRating = true;
break;
case 64:
this.userStarRating = x0.readRawVarint32();
this.hasUserStarRating = true;
break;
case 74:
this.downloadCount = x0.readString();
this.hasDownloadCount = true;
break;
case 82:
this.downloadUnits = x0.readString();
this.hasDownloadUnits = true;
break;
case 90:
this.contentDescription = x0.readString();
this.hasContentDescription = true;
break;
case 98:
if (this.playerBadge == null) {
this.playerBadge = new PlayerBadge();
}
x0.readMessage(this.playerBadge);
break;
case 106:
if (this.familyAgeRangeBadge == null) {
this.familyAgeRangeBadge = new FamilyAgeRangeBadge();
}
x0.readMessage(this.familyAgeRangeBadge);
break;
case 114:
if (this.familyCategoryBadge == null) {
this.familyCategoryBadge = new FamilyCategoryBadge();
}
x0.readMessage(this.familyCategoryBadge);
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public static DiscoveryBadge[] emptyArray() {
if (_emptyArray == null) {
synchronized (InternalNano.LAZY_INIT_LOCK) {
if (_emptyArray == null) {
_emptyArray = new DiscoveryBadge[0];
}
}
}
return _emptyArray;
}
public DiscoveryBadge() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.hasTitle || !this.title.equals("")) {
output.writeString(1, this.title);
}
if (this.image != null) {
output.writeMessage(2, this.image);
}
if (this.hasBackgroundColor || this.backgroundColor != 0) {
output.writeInt32(3, this.backgroundColor);
}
if (this.discoveryBadgeLink != null) {
output.writeMessage(4, this.discoveryBadgeLink);
}
if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) {
output.writeBytes(5, this.serverLogsCookie);
}
if (this.hasIsPlusOne || this.isPlusOne) {
output.writeBool(6, this.isPlusOne);
}
if (this.hasAggregateRating || Float.floatToIntBits(this.aggregateRating) != Float.floatToIntBits(0.0f)) {
output.writeFloat(7, this.aggregateRating);
}
if (this.hasUserStarRating || this.userStarRating != 0) {
output.writeInt32(8, this.userStarRating);
}
if (this.hasDownloadCount || !this.downloadCount.equals("")) {
output.writeString(9, this.downloadCount);
}
if (this.hasDownloadUnits || !this.downloadUnits.equals("")) {
output.writeString(10, this.downloadUnits);
}
if (this.hasContentDescription || !this.contentDescription.equals("")) {
output.writeString(11, this.contentDescription);
}
if (this.playerBadge != null) {
output.writeMessage(12, this.playerBadge);
}
if (this.familyAgeRangeBadge != null) {
output.writeMessage(13, this.familyAgeRangeBadge);
}
if (this.familyCategoryBadge != null) {
output.writeMessage(14, this.familyCategoryBadge);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.hasTitle || !this.title.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(1, this.title);
}
if (this.image != null) {
size += CodedOutputByteBufferNano.computeMessageSize(2, this.image);
}
if (this.hasBackgroundColor || this.backgroundColor != 0) {
size += CodedOutputByteBufferNano.computeInt32Size(3, this.backgroundColor);
}
if (this.discoveryBadgeLink != null) {
size += CodedOutputByteBufferNano.computeMessageSize(4, this.discoveryBadgeLink);
}
if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) {
size += CodedOutputByteBufferNano.computeBytesSize(5, this.serverLogsCookie);
}
if (this.hasIsPlusOne || this.isPlusOne) {
size += CodedOutputByteBufferNano.computeTagSize(6) + 1;
}
if (this.hasAggregateRating || Float.floatToIntBits(this.aggregateRating) != Float.floatToIntBits(0.0f)) {
size += CodedOutputByteBufferNano.computeTagSize(7) + 4;
}
if (this.hasUserStarRating || this.userStarRating != 0) {
size += CodedOutputByteBufferNano.computeInt32Size(8, this.userStarRating);
}
if (this.hasDownloadCount || !this.downloadCount.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(9, this.downloadCount);
}
if (this.hasDownloadUnits || !this.downloadUnits.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(10, this.downloadUnits);
}
if (this.hasContentDescription || !this.contentDescription.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(11, this.contentDescription);
}
if (this.playerBadge != null) {
size += CodedOutputByteBufferNano.computeMessageSize(12, this.playerBadge);
}
if (this.familyAgeRangeBadge != null) {
size += CodedOutputByteBufferNano.computeMessageSize(13, this.familyAgeRangeBadge);
}
if (this.familyCategoryBadge != null) {
return size + CodedOutputByteBufferNano.computeMessageSize(14, this.familyCategoryBadge);
}
return size;
}
}
/* loaded from: classes.dex */
public static final class PlayerBadge extends MessageNano {
public Common.Image overlayIcon = null;
public PlayerBadge() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.overlayIcon != null) {
output.writeMessage(1, this.overlayIcon);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.overlayIcon != null) {
return size + CodedOutputByteBufferNano.computeMessageSize(1, this.overlayIcon);
}
return size;
}
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
if (this.overlayIcon == null) {
this.overlayIcon = new Common.Image();
}
x0.readMessage(this.overlayIcon);
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
}
/* loaded from: classes.dex */
public static final class FamilyAgeRangeBadge extends MessageNano {
public FamilyAgeRangeBadge() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int readTag;
do {
readTag = x0.readTag();
switch (readTag) {
case 0:
return this;
}
} while (WireFormatNano.parseUnknownField(x0, readTag));
return this;
}
}
/* loaded from: classes.dex */
public static final class FamilyCategoryBadge extends MessageNano {
public FamilyCategoryBadge() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int readTag;
do {
readTag = x0.readTag();
switch (readTag) {
case 0:
return this;
}
} while (WireFormatNano.parseUnknownField(x0, readTag));
return this;
}
}
/* loaded from: classes.dex */
public static final class DiscoveryBadgeLink extends MessageNano {
public Link link = null;
public String userReviewsUrl = "";
public boolean hasUserReviewsUrl = false;
public String criticReviewsUrl = "";
public boolean hasCriticReviewsUrl = false;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
if (this.link == null) {
this.link = new Link();
}
x0.readMessage(this.link);
break;
case 18:
this.userReviewsUrl = x0.readString();
this.hasUserReviewsUrl = true;
break;
case 26:
this.criticReviewsUrl = x0.readString();
this.hasCriticReviewsUrl = true;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public DiscoveryBadgeLink() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.link != null) {
output.writeMessage(1, this.link);
}
if (this.hasUserReviewsUrl || !this.userReviewsUrl.equals("")) {
output.writeString(2, this.userReviewsUrl);
}
if (this.hasCriticReviewsUrl || !this.criticReviewsUrl.equals("")) {
output.writeString(3, this.criticReviewsUrl);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.link != null) {
size += CodedOutputByteBufferNano.computeMessageSize(1, this.link);
}
if (this.hasUserReviewsUrl || !this.userReviewsUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(2, this.userReviewsUrl);
}
if (this.hasCriticReviewsUrl || !this.criticReviewsUrl.equals("")) {
return size + CodedOutputByteBufferNano.computeStringSize(3, this.criticReviewsUrl);
}
return size;
}
}
}

View File

@ -0,0 +1,438 @@
package com.google.android.finsky.protos;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
/* loaded from: classes.dex */
public interface DeviceConfiguration {
/* loaded from: classes.dex */
public static final class DeviceConfigurationProto extends MessageNano {
public int touchScreen = 0;
public boolean hasTouchScreen = false;
public int keyboard = 0;
public boolean hasKeyboard = false;
public int navigation = 0;
public boolean hasNavigation = false;
public int screenLayout = 0;
public boolean hasScreenLayout = false;
public boolean hasHardKeyboard = false;
public boolean hasHasHardKeyboard = false;
public boolean hasFiveWayNavigation = false;
public boolean hasHasFiveWayNavigation = false;
public int screenDensity = 0;
public boolean hasScreenDensity = false;
public int screenWidth = 0;
public boolean hasScreenWidth = false;
public int screenHeight = 0;
public boolean hasScreenHeight = false;
public int glEsVersion = 0;
public boolean hasGlEsVersion = false;
public String[] systemSharedLibrary = WireFormatNano.EMPTY_STRING_ARRAY;
public String[] systemAvailableFeature = WireFormatNano.EMPTY_STRING_ARRAY;
public String[] nativePlatform = WireFormatNano.EMPTY_STRING_ARRAY;
public String[] systemSupportedLocale = WireFormatNano.EMPTY_STRING_ARRAY;
public String[] glExtension = WireFormatNano.EMPTY_STRING_ARRAY;
public int maxApkDownloadSizeMb = 50;
public boolean hasMaxApkDownloadSizeMb = false;
public int smallestScreenWidthDp = 0;
public boolean hasSmallestScreenWidthDp = false;
public boolean lowRamDevice = false;
public boolean hasLowRamDevice = false;
public long totalMemoryBytes = 0;
public boolean hasTotalMemoryBytes = false;
public int maxNumOfCpuCores = 0;
public boolean hasMaxNumOfCpuCores = false;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 8:
int readRawVarint32 = x0.readRawVarint32();
switch (readRawVarint32) {
case 0:
case 1:
case 2:
case 3:
this.touchScreen = readRawVarint32;
this.hasTouchScreen = true;
continue;
}
case 16:
int readRawVarint322 = x0.readRawVarint32();
switch (readRawVarint322) {
case 0:
case 1:
case 2:
case 3:
this.keyboard = readRawVarint322;
this.hasKeyboard = true;
continue;
}
case 24:
int readRawVarint323 = x0.readRawVarint32();
switch (readRawVarint323) {
case 0:
case 1:
case 2:
case 3:
case 4:
this.navigation = readRawVarint323;
this.hasNavigation = true;
continue;
}
case 32:
int readRawVarint324 = x0.readRawVarint32();
switch (readRawVarint324) {
case 0:
case 1:
case 2:
case 3:
case 4:
this.screenLayout = readRawVarint324;
this.hasScreenLayout = true;
continue;
}
case 40:
this.hasHardKeyboard = x0.readBool();
this.hasHasHardKeyboard = true;
break;
case 48:
this.hasFiveWayNavigation = x0.readBool();
this.hasHasFiveWayNavigation = true;
break;
case 56:
this.screenDensity = x0.readRawVarint32();
this.hasScreenDensity = true;
break;
case 64:
this.glEsVersion = x0.readRawVarint32();
this.hasGlEsVersion = true;
break;
case 74:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 74);
int length = this.systemSharedLibrary == null ? 0 : this.systemSharedLibrary.length;
String[] strArr = new String[repeatedFieldArrayLength + length];
if (length != 0) {
System.arraycopy(this.systemSharedLibrary, 0, strArr, 0, length);
}
while (length < strArr.length - 1) {
strArr[length] = x0.readString();
x0.readTag();
length++;
}
strArr[length] = x0.readString();
this.systemSharedLibrary = strArr;
break;
case 82:
int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(x0, 82);
int length2 = this.systemAvailableFeature == null ? 0 : this.systemAvailableFeature.length;
String[] strArr2 = new String[repeatedFieldArrayLength2 + length2];
if (length2 != 0) {
System.arraycopy(this.systemAvailableFeature, 0, strArr2, 0, length2);
}
while (length2 < strArr2.length - 1) {
strArr2[length2] = x0.readString();
x0.readTag();
length2++;
}
strArr2[length2] = x0.readString();
this.systemAvailableFeature = strArr2;
break;
case 90:
int repeatedFieldArrayLength3 = WireFormatNano.getRepeatedFieldArrayLength(x0, 90);
int length3 = this.nativePlatform == null ? 0 : this.nativePlatform.length;
String[] strArr3 = new String[repeatedFieldArrayLength3 + length3];
if (length3 != 0) {
System.arraycopy(this.nativePlatform, 0, strArr3, 0, length3);
}
while (length3 < strArr3.length - 1) {
strArr3[length3] = x0.readString();
x0.readTag();
length3++;
}
strArr3[length3] = x0.readString();
this.nativePlatform = strArr3;
break;
case 96:
this.screenWidth = x0.readRawVarint32();
this.hasScreenWidth = true;
break;
case 104:
this.screenHeight = x0.readRawVarint32();
this.hasScreenHeight = true;
break;
case 114:
int repeatedFieldArrayLength4 = WireFormatNano.getRepeatedFieldArrayLength(x0, 114);
int length4 = this.systemSupportedLocale == null ? 0 : this.systemSupportedLocale.length;
String[] strArr4 = new String[repeatedFieldArrayLength4 + length4];
if (length4 != 0) {
System.arraycopy(this.systemSupportedLocale, 0, strArr4, 0, length4);
}
while (length4 < strArr4.length - 1) {
strArr4[length4] = x0.readString();
x0.readTag();
length4++;
}
strArr4[length4] = x0.readString();
this.systemSupportedLocale = strArr4;
break;
case 122:
int repeatedFieldArrayLength5 = WireFormatNano.getRepeatedFieldArrayLength(x0, 122);
int length5 = this.glExtension == null ? 0 : this.glExtension.length;
String[] strArr5 = new String[repeatedFieldArrayLength5 + length5];
if (length5 != 0) {
System.arraycopy(this.glExtension, 0, strArr5, 0, length5);
}
while (length5 < strArr5.length - 1) {
strArr5[length5] = x0.readString();
x0.readTag();
length5++;
}
strArr5[length5] = x0.readString();
this.glExtension = strArr5;
break;
case 136:
this.maxApkDownloadSizeMb = x0.readRawVarint32();
this.hasMaxApkDownloadSizeMb = true;
break;
case 144:
this.smallestScreenWidthDp = x0.readRawVarint32();
this.hasSmallestScreenWidthDp = true;
break;
case 152:
this.lowRamDevice = x0.readBool();
this.hasLowRamDevice = true;
break;
case 160:
this.totalMemoryBytes = x0.readRawVarint64();
this.hasTotalMemoryBytes = true;
break;
case 168:
this.maxNumOfCpuCores = x0.readRawVarint32();
this.hasMaxNumOfCpuCores = true;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public DeviceConfigurationProto() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.touchScreen != 0 || this.hasTouchScreen) {
output.writeInt32(1, this.touchScreen);
}
if (this.keyboard != 0 || this.hasKeyboard) {
output.writeInt32(2, this.keyboard);
}
if (this.navigation != 0 || this.hasNavigation) {
output.writeInt32(3, this.navigation);
}
if (this.screenLayout != 0 || this.hasScreenLayout) {
output.writeInt32(4, this.screenLayout);
}
if (this.hasHasHardKeyboard || this.hasHardKeyboard) {
output.writeBool(5, this.hasHardKeyboard);
}
if (this.hasHasFiveWayNavigation || this.hasFiveWayNavigation) {
output.writeBool(6, this.hasFiveWayNavigation);
}
if (this.hasScreenDensity || this.screenDensity != 0) {
output.writeInt32(7, this.screenDensity);
}
if (this.hasGlEsVersion || this.glEsVersion != 0) {
output.writeInt32(8, this.glEsVersion);
}
if (this.systemSharedLibrary != null && this.systemSharedLibrary.length > 0) {
for (int i = 0; i < this.systemSharedLibrary.length; i++) {
String element = this.systemSharedLibrary[i];
if (element != null) {
output.writeString(9, element);
}
}
}
if (this.systemAvailableFeature != null && this.systemAvailableFeature.length > 0) {
for (int i2 = 0; i2 < this.systemAvailableFeature.length; i2++) {
String element2 = this.systemAvailableFeature[i2];
if (element2 != null) {
output.writeString(10, element2);
}
}
}
if (this.nativePlatform != null && this.nativePlatform.length > 0) {
for (int i3 = 0; i3 < this.nativePlatform.length; i3++) {
String element3 = this.nativePlatform[i3];
if (element3 != null) {
output.writeString(11, element3);
}
}
}
if (this.hasScreenWidth || this.screenWidth != 0) {
output.writeInt32(12, this.screenWidth);
}
if (this.hasScreenHeight || this.screenHeight != 0) {
output.writeInt32(13, this.screenHeight);
}
if (this.systemSupportedLocale != null && this.systemSupportedLocale.length > 0) {
for (int i4 = 0; i4 < this.systemSupportedLocale.length; i4++) {
String element4 = this.systemSupportedLocale[i4];
if (element4 != null) {
output.writeString(14, element4);
}
}
}
if (this.glExtension != null && this.glExtension.length > 0) {
for (int i5 = 0; i5 < this.glExtension.length; i5++) {
String element5 = this.glExtension[i5];
if (element5 != null) {
output.writeString(15, element5);
}
}
}
if (this.hasMaxApkDownloadSizeMb || this.maxApkDownloadSizeMb != 50) {
output.writeInt32(17, this.maxApkDownloadSizeMb);
}
if (this.hasSmallestScreenWidthDp || this.smallestScreenWidthDp != 0) {
output.writeInt32(18, this.smallestScreenWidthDp);
}
if (this.hasLowRamDevice || this.lowRamDevice) {
output.writeBool(19, this.lowRamDevice);
}
if (this.hasTotalMemoryBytes || this.totalMemoryBytes != 0) {
output.writeInt64(20, this.totalMemoryBytes);
}
if (this.hasMaxNumOfCpuCores || this.maxNumOfCpuCores != 0) {
output.writeInt32(21, this.maxNumOfCpuCores);
}
super.writeTo(output);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.touchScreen != 0 || this.hasTouchScreen) {
size += CodedOutputByteBufferNano.computeInt32Size(1, this.touchScreen);
}
if (this.keyboard != 0 || this.hasKeyboard) {
size += CodedOutputByteBufferNano.computeInt32Size(2, this.keyboard);
}
if (this.navigation != 0 || this.hasNavigation) {
size += CodedOutputByteBufferNano.computeInt32Size(3, this.navigation);
}
if (this.screenLayout != 0 || this.hasScreenLayout) {
size += CodedOutputByteBufferNano.computeInt32Size(4, this.screenLayout);
}
if (this.hasHasHardKeyboard || this.hasHardKeyboard) {
size += CodedOutputByteBufferNano.computeTagSize(5) + 1;
}
if (this.hasHasFiveWayNavigation || this.hasFiveWayNavigation) {
size += CodedOutputByteBufferNano.computeTagSize(6) + 1;
}
if (this.hasScreenDensity || this.screenDensity != 0) {
size += CodedOutputByteBufferNano.computeInt32Size(7, this.screenDensity);
}
if (this.hasGlEsVersion || this.glEsVersion != 0) {
size += CodedOutputByteBufferNano.computeInt32Size(8, this.glEsVersion);
}
if (this.systemSharedLibrary != null && this.systemSharedLibrary.length > 0) {
int dataCount = 0;
int dataSize = 0;
for (int i = 0; i < this.systemSharedLibrary.length; i++) {
String element = this.systemSharedLibrary[i];
if (element != null) {
dataCount++;
dataSize += CodedOutputByteBufferNano.computeStringSizeNoTag(element);
}
}
size = size + dataSize + (dataCount * 1);
}
if (this.systemAvailableFeature != null && this.systemAvailableFeature.length > 0) {
int dataCount2 = 0;
int dataSize2 = 0;
for (int i2 = 0; i2 < this.systemAvailableFeature.length; i2++) {
String element2 = this.systemAvailableFeature[i2];
if (element2 != null) {
dataCount2++;
dataSize2 += CodedOutputByteBufferNano.computeStringSizeNoTag(element2);
}
}
size = size + dataSize2 + (dataCount2 * 1);
}
if (this.nativePlatform != null && this.nativePlatform.length > 0) {
int dataCount3 = 0;
int dataSize3 = 0;
for (int i3 = 0; i3 < this.nativePlatform.length; i3++) {
String element3 = this.nativePlatform[i3];
if (element3 != null) {
dataCount3++;
dataSize3 += CodedOutputByteBufferNano.computeStringSizeNoTag(element3);
}
}
size = size + dataSize3 + (dataCount3 * 1);
}
if (this.hasScreenWidth || this.screenWidth != 0) {
size += CodedOutputByteBufferNano.computeInt32Size(12, this.screenWidth);
}
if (this.hasScreenHeight || this.screenHeight != 0) {
size += CodedOutputByteBufferNano.computeInt32Size(13, this.screenHeight);
}
if (this.systemSupportedLocale != null && this.systemSupportedLocale.length > 0) {
int dataCount4 = 0;
int dataSize4 = 0;
for (int i4 = 0; i4 < this.systemSupportedLocale.length; i4++) {
String element4 = this.systemSupportedLocale[i4];
if (element4 != null) {
dataCount4++;
dataSize4 += CodedOutputByteBufferNano.computeStringSizeNoTag(element4);
}
}
size = size + dataSize4 + (dataCount4 * 1);
}
if (this.glExtension != null && this.glExtension.length > 0) {
int dataCount5 = 0;
int dataSize5 = 0;
for (int i5 = 0; i5 < this.glExtension.length; i5++) {
String element5 = this.glExtension[i5];
if (element5 != null) {
dataCount5++;
dataSize5 += CodedOutputByteBufferNano.computeStringSizeNoTag(element5);
}
}
size = size + dataSize5 + (dataCount5 * 1);
}
if (this.hasMaxApkDownloadSizeMb || this.maxApkDownloadSizeMb != 50) {
size += CodedOutputByteBufferNano.computeInt32Size(17, this.maxApkDownloadSizeMb);
}
if (this.hasSmallestScreenWidthDp || this.smallestScreenWidthDp != 0) {
size += CodedOutputByteBufferNano.computeInt32Size(18, this.smallestScreenWidthDp);
}
if (this.hasLowRamDevice || this.lowRamDevice) {
size += CodedOutputByteBufferNano.computeTagSize(19) + 1;
}
if (this.hasTotalMemoryBytes || this.totalMemoryBytes != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(20, this.totalMemoryBytes);
}
if (this.hasMaxNumOfCpuCores || this.maxNumOfCpuCores != 0) {
return size + CodedOutputByteBufferNano.computeInt32Size(21, this.maxNumOfCpuCores);
}
return size;
}
}
}

View File

@ -0,0 +1,741 @@
package com.google.android.finsky.protos;
import com.google.android.finsky.protos.Common;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.InternalNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
/* loaded from: classes.dex */
public interface DocDetails {
/* loaded from: classes.dex */
public static final class DocumentDetails extends MessageNano {
public AppDetails appDetails = null;
public AlbumDetails albumDetails = null;
public ArtistDetails artistDetails = null;
public SongDetails songDetails = null;
public BookDetails bookDetails = null;
public VideoDetails videoDetails = null;
public SubscriptionDetails subscriptionDetails = null;
public MagazineDetails magazineDetails = null;
public TvShowDetails tvShowDetails = null;
public TvSeasonDetails tvSeasonDetails = null;
public TvEpisodeDetails tvEpisodeDetails = null;
public PersonDetails personDetails = null;
public TalentDetails talentDetails = null;
public DeveloperDetails developerDetails = null;
public BookSeriesDetails bookSeriesDetails = null;
public DocumentDetails() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.appDetails != null) {
output.writeMessage(1, this.appDetails);
}
if (this.albumDetails != null) {
output.writeMessage(2, this.albumDetails);
}
if (this.artistDetails != null) {
output.writeMessage(3, this.artistDetails);
}
if (this.songDetails != null) {
output.writeMessage(4, this.songDetails);
}
if (this.bookDetails != null) {
output.writeMessage(5, this.bookDetails);
}
if (this.videoDetails != null) {
output.writeMessage(6, this.videoDetails);
}
if (this.subscriptionDetails != null) {
output.writeMessage(7, this.subscriptionDetails);
}
if (this.magazineDetails != null) {
output.writeMessage(8, this.magazineDetails);
}
if (this.tvShowDetails != null) {
output.writeMessage(9, this.tvShowDetails);
}
if (this.tvSeasonDetails != null) {
output.writeMessage(10, this.tvSeasonDetails);
}
if (this.tvEpisodeDetails != null) {
output.writeMessage(11, this.tvEpisodeDetails);
}
if (this.personDetails != null) {
output.writeMessage(12, this.personDetails);
}
if (this.talentDetails != null) {
output.writeMessage(13, this.talentDetails);
}
if (this.developerDetails != null) {
output.writeMessage(14, this.developerDetails);
}
if (this.bookSeriesDetails != null) {
output.writeMessage(15, this.bookSeriesDetails);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.appDetails != null) {
size += CodedOutputByteBufferNano.computeMessageSize(1, this.appDetails);
}
if (this.albumDetails != null) {
size += CodedOutputByteBufferNano.computeMessageSize(2, this.albumDetails);
}
if (this.artistDetails != null) {
size += CodedOutputByteBufferNano.computeMessageSize(3, this.artistDetails);
}
if (this.songDetails != null) {
size += CodedOutputByteBufferNano.computeMessageSize(4, this.songDetails);
}
if (this.bookDetails != null) {
size += CodedOutputByteBufferNano.computeMessageSize(5, this.bookDetails);
}
if (this.videoDetails != null) {
size += CodedOutputByteBufferNano.computeMessageSize(6, this.videoDetails);
}
if (this.subscriptionDetails != null) {
size += CodedOutputByteBufferNano.computeMessageSize(7, this.subscriptionDetails);
}
if (this.magazineDetails != null) {
size += CodedOutputByteBufferNano.computeMessageSize(8, this.magazineDetails);
}
if (this.tvShowDetails != null) {
size += CodedOutputByteBufferNano.computeMessageSize(9, this.tvShowDetails);
}
if (this.tvSeasonDetails != null) {
size += CodedOutputByteBufferNano.computeMessageSize(10, this.tvSeasonDetails);
}
if (this.tvEpisodeDetails != null) {
size += CodedOutputByteBufferNano.computeMessageSize(11, this.tvEpisodeDetails);
}
if (this.personDetails != null) {
size += CodedOutputByteBufferNano.computeMessageSize(12, this.personDetails);
}
if (this.talentDetails != null) {
size += CodedOutputByteBufferNano.computeMessageSize(13, this.talentDetails);
}
if (this.developerDetails != null) {
size += CodedOutputByteBufferNano.computeMessageSize(14, this.developerDetails);
}
if (this.bookSeriesDetails != null) {
return size + CodedOutputByteBufferNano.computeMessageSize(15, this.bookSeriesDetails);
}
return size;
}
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
if (this.appDetails == null) {
this.appDetails = new AppDetails();
}
x0.readMessage(this.appDetails);
break;
case 18:
if (this.albumDetails == null) {
this.albumDetails = new AlbumDetails();
}
x0.readMessage(this.albumDetails);
break;
case 26:
if (this.artistDetails == null) {
this.artistDetails = new ArtistDetails();
}
x0.readMessage(this.artistDetails);
break;
case 34:
if (this.songDetails == null) {
this.songDetails = new SongDetails();
}
x0.readMessage(this.songDetails);
break;
case 42:
if (this.bookDetails == null) {
this.bookDetails = new BookDetails();
}
x0.readMessage(this.bookDetails);
break;
case 50:
if (this.videoDetails == null) {
this.videoDetails = new VideoDetails();
}
x0.readMessage(this.videoDetails);
break;
case 58:
if (this.subscriptionDetails == null) {
this.subscriptionDetails = new SubscriptionDetails();
}
x0.readMessage(this.subscriptionDetails);
break;
case 66:
if (this.magazineDetails == null) {
this.magazineDetails = new MagazineDetails();
}
x0.readMessage(this.magazineDetails);
break;
case 74:
if (this.tvShowDetails == null) {
this.tvShowDetails = new TvShowDetails();
}
x0.readMessage(this.tvShowDetails);
break;
case 82:
if (this.tvSeasonDetails == null) {
this.tvSeasonDetails = new TvSeasonDetails();
}
x0.readMessage(this.tvSeasonDetails);
break;
case 90:
if (this.tvEpisodeDetails == null) {
this.tvEpisodeDetails = new TvEpisodeDetails();
}
x0.readMessage(this.tvEpisodeDetails);
break;
case 98:
if (this.personDetails == null) {
this.personDetails = new PersonDetails();
}
x0.readMessage(this.personDetails);
break;
case 106:
if (this.talentDetails == null) {
this.talentDetails = new TalentDetails();
}
x0.readMessage(this.talentDetails);
break;
case 114:
if (this.developerDetails == null) {
this.developerDetails = new DeveloperDetails();
}
x0.readMessage(this.developerDetails);
break;
case 122:
if (this.bookSeriesDetails == null) {
this.bookSeriesDetails = new BookSeriesDetails();
}
x0.readMessage(this.bookSeriesDetails);
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
}
/* loaded from: classes.dex */
public static final class ProductDetails extends MessageNano {
public String title = "";
public boolean hasTitle = false;
public ProductDetailsSection[] section = ProductDetailsSection.emptyArray();
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int length;
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
this.title = x0.readString();
this.hasTitle = true;
break;
case 18:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 18);
if (this.section == null) {
length = 0;
} else {
length = this.section.length;
}
ProductDetailsSection[] productDetailsSectionArr = new ProductDetailsSection[repeatedFieldArrayLength + length];
if (length != 0) {
System.arraycopy(this.section, 0, productDetailsSectionArr, 0, length);
}
while (length < productDetailsSectionArr.length - 1) {
productDetailsSectionArr[length] = new ProductDetailsSection();
x0.readMessage(productDetailsSectionArr[length]);
x0.readTag();
length++;
}
productDetailsSectionArr[length] = new ProductDetailsSection();
x0.readMessage(productDetailsSectionArr[length]);
this.section = productDetailsSectionArr;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public ProductDetails() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.hasTitle || !this.title.equals("")) {
output.writeString(1, this.title);
}
if (this.section != null && this.section.length > 0) {
for (int i = 0; i < this.section.length; i++) {
ProductDetailsSection element = this.section[i];
if (element != null) {
output.writeMessage(2, element);
}
}
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.hasTitle || !this.title.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(1, this.title);
}
if (this.section != null && this.section.length > 0) {
for (int i = 0; i < this.section.length; i++) {
ProductDetailsSection element = this.section[i];
if (element != null) {
size += CodedOutputByteBufferNano.computeMessageSize(2, element);
}
}
}
return size;
}
}
/* loaded from: classes.dex */
public static final class ProductDetailsSection extends MessageNano {
private static volatile ProductDetailsSection[] _emptyArray;
public String title = "";
public boolean hasTitle = false;
public ProductDetailsDescription[] description = ProductDetailsDescription.emptyArray();
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int length;
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
this.title = x0.readString();
this.hasTitle = true;
break;
case 26:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 26);
if (this.description == null) {
length = 0;
} else {
length = this.description.length;
}
ProductDetailsDescription[] productDetailsDescriptionArr = new ProductDetailsDescription[repeatedFieldArrayLength + length];
if (length != 0) {
System.arraycopy(this.description, 0, productDetailsDescriptionArr, 0, length);
}
while (length < productDetailsDescriptionArr.length - 1) {
productDetailsDescriptionArr[length] = new ProductDetailsDescription();
x0.readMessage(productDetailsDescriptionArr[length]);
x0.readTag();
length++;
}
productDetailsDescriptionArr[length] = new ProductDetailsDescription();
x0.readMessage(productDetailsDescriptionArr[length]);
this.description = productDetailsDescriptionArr;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public static ProductDetailsSection[] emptyArray() {
if (_emptyArray == null) {
synchronized (InternalNano.LAZY_INIT_LOCK) {
if (_emptyArray == null) {
_emptyArray = new ProductDetailsSection[0];
}
}
}
return _emptyArray;
}
public ProductDetailsSection() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.hasTitle || !this.title.equals("")) {
output.writeString(1, this.title);
}
if (this.description != null && this.description.length > 0) {
for (int i = 0; i < this.description.length; i++) {
ProductDetailsDescription element = this.description[i];
if (element != null) {
output.writeMessage(3, element);
}
}
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.hasTitle || !this.title.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(1, this.title);
}
if (this.description != null && this.description.length > 0) {
for (int i = 0; i < this.description.length; i++) {
ProductDetailsDescription element = this.description[i];
if (element != null) {
size += CodedOutputByteBufferNano.computeMessageSize(3, element);
}
}
}
return size;
}
}
/* loaded from: classes.dex */
public static final class ProductDetailsDescription extends MessageNano {
private static volatile ProductDetailsDescription[] _emptyArray;
public Common.Image image = null;
public String description = "";
public boolean hasDescription = false;
public static ProductDetailsDescription[] emptyArray() {
if (_emptyArray == null) {
synchronized (InternalNano.LAZY_INIT_LOCK) {
if (_emptyArray == null) {
_emptyArray = new ProductDetailsDescription[0];
}
}
}
return _emptyArray;
}
public ProductDetailsDescription() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.image != null) {
output.writeMessage(1, this.image);
}
if (this.hasDescription || !this.description.equals("")) {
output.writeString(2, this.description);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.image != null) {
size += CodedOutputByteBufferNano.computeMessageSize(1, this.image);
}
if (this.hasDescription || !this.description.equals("")) {
return size + CodedOutputByteBufferNano.computeStringSize(2, this.description);
}
return size;
}
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
if (this.image == null) {
this.image = new Common.Image();
}
x0.readMessage(this.image);
break;
case 18:
this.description = x0.readString();
this.hasDescription = true;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
}
/* loaded from: classes.dex */
public static final class PersonDetails extends MessageNano {
public boolean personIsRequester = false;
public boolean hasPersonIsRequester = false;
public boolean isGplusUser = true;
public boolean hasIsGplusUser = false;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 8:
this.personIsRequester = x0.readBool();
this.hasPersonIsRequester = true;
break;
case 16:
this.isGplusUser = x0.readBool();
this.hasIsGplusUser = true;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public PersonDetails() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.hasPersonIsRequester || this.personIsRequester) {
output.writeBool(1, this.personIsRequester);
}
if (this.hasIsGplusUser || !this.isGplusUser) {
output.writeBool(2, this.isGplusUser);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.hasPersonIsRequester || this.personIsRequester) {
size += CodedOutputByteBufferNano.computeTagSize(1) + 1;
}
if (this.hasIsGplusUser || !this.isGplusUser) {
return size + CodedOutputByteBufferNano.computeTagSize(2) + 1;
}
return size;
}
}
/* loaded from: classes.dex */
public static final class TalentDetails extends MessageNano {
public TalentExternalLinks externalLinks = null;
public int primaryRoleId = 0;
public boolean hasPrimaryRoleId = false;
public TalentDetails() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.externalLinks != null) {
output.writeMessage(1, this.externalLinks);
}
if (this.primaryRoleId != 0 || this.hasPrimaryRoleId) {
output.writeInt32(2, this.primaryRoleId);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.externalLinks != null) {
size += CodedOutputByteBufferNano.computeMessageSize(1, this.externalLinks);
}
if (this.primaryRoleId != 0 || this.hasPrimaryRoleId) {
return size + CodedOutputByteBufferNano.computeInt32Size(2, this.primaryRoleId);
}
return size;
}
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
if (this.externalLinks == null) {
this.externalLinks = new TalentExternalLinks();
}
x0.readMessage(this.externalLinks);
break;
case 16:
int readRawVarint32 = x0.readRawVarint32();
switch (readRawVarint32) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
this.primaryRoleId = readRawVarint32;
this.hasPrimaryRoleId = true;
continue;
}
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
}
/* loaded from: classes.dex */
public static final class TalentExternalLinks extends MessageNano {
public Link[] websiteUrl = Link.emptyArray();
public Link googlePlusProfileUrl = null;
public Link youtubeChannelUrl = null;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int length;
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 10);
if (this.websiteUrl == null) {
length = 0;
} else {
length = this.websiteUrl.length;
}
Link[] linkArr = new Link[repeatedFieldArrayLength + length];
if (length != 0) {
System.arraycopy(this.websiteUrl, 0, linkArr, 0, length);
}
while (length < linkArr.length - 1) {
linkArr[length] = new Link();
x0.readMessage(linkArr[length]);
x0.readTag();
length++;
}
linkArr[length] = new Link();
x0.readMessage(linkArr[length]);
this.websiteUrl = linkArr;
break;
case 18:
if (this.googlePlusProfileUrl == null) {
this.googlePlusProfileUrl = new Link();
}
x0.readMessage(this.googlePlusProfileUrl);
break;
case 26:
if (this.youtubeChannelUrl == null) {
this.youtubeChannelUrl = new Link();
}
x0.readMessage(this.youtubeChannelUrl);
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public TalentExternalLinks() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.websiteUrl != null && this.websiteUrl.length > 0) {
for (int i = 0; i < this.websiteUrl.length; i++) {
Link element = this.websiteUrl[i];
if (element != null) {
output.writeMessage(1, element);
}
}
}
if (this.googlePlusProfileUrl != null) {
output.writeMessage(2, this.googlePlusProfileUrl);
}
if (this.youtubeChannelUrl != null) {
output.writeMessage(3, this.youtubeChannelUrl);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.websiteUrl != null && this.websiteUrl.length > 0) {
for (int i = 0; i < this.websiteUrl.length; i++) {
Link element = this.websiteUrl[i];
if (element != null) {
size += CodedOutputByteBufferNano.computeMessageSize(1, element);
}
}
}
if (this.googlePlusProfileUrl != null) {
size += CodedOutputByteBufferNano.computeMessageSize(2, this.googlePlusProfileUrl);
}
if (this.youtubeChannelUrl != null) {
return size + CodedOutputByteBufferNano.computeMessageSize(3, this.youtubeChannelUrl);
}
return size;
}
}
}

View File

@ -0,0 +1,628 @@
package com.google.android.finsky.protos;
import com.google.android.finsky.protos.Common;
import com.google.android.finsky.protos.Containers;
import com.google.android.finsky.protos.DocDetails;
import com.google.android.finsky.protos.FilterRules;
import com.google.android.finsky.protos.Rating;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.InternalNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
import java.util.Arrays;
/* loaded from: classes.dex */
public final class DocV2 extends MessageNano {
private static volatile DocV2[] _emptyArray;
public String docid = "";
public boolean hasDocid = false;
public String backendDocid = "";
public boolean hasBackendDocid = false;
public int docType = 1;
public boolean hasDocType = false;
public int backendId = 0;
public boolean hasBackendId = false;
public String title = "";
public boolean hasTitle = false;
public String subtitle = "";
public boolean hasSubtitle = false;
public String creator = "";
public boolean hasCreator = false;
public String descriptionHtml = "";
public boolean hasDescriptionHtml = false;
public String translatedDescriptionHtml = "";
public boolean hasTranslatedDescriptionHtml = false;
public String promotionalDescription = "";
public boolean hasPromotionalDescription = false;
public Common.Offer[] offer = Common.Offer.emptyArray();
public FilterRules.Availability availability = null;
public Common.Image[] image = Common.Image.emptyArray();
public DocV2[] child = emptyArray();
public Containers.ContainerMetadata containerMetadata = null;
public DocDetails.DocumentDetails details = null;
public DocDetails.ProductDetails productDetails = null;
public Rating.AggregateRating aggregateRating = null;
public Annotations annotations = null;
public String detailsUrl = "";
public boolean hasDetailsUrl = false;
public String shareUrl = "";
public boolean hasShareUrl = false;
public String reviewsUrl = "";
public boolean hasReviewsUrl = false;
public String snippetsUrl = "";
public boolean hasSnippetsUrl = false;
public String backendUrl = "";
public boolean hasBackendUrl = false;
public String purchaseDetailsUrl = "";
public boolean hasPurchaseDetailsUrl = false;
public boolean detailsReusable = false;
public boolean hasDetailsReusable = false;
public byte[] serverLogsCookie = WireFormatNano.EMPTY_BYTES;
public boolean hasServerLogsCookie = false;
public boolean mature = false;
public boolean hasMature = false;
public boolean availableForPreregistration = false;
public boolean hasAvailableForPreregistration = false;
public ReviewTip[] tip = ReviewTip.emptyArray();
public boolean forceShareability = false;
public boolean hasForceShareability = false;
public boolean useWishlistAsPrimaryAction = false;
public boolean hasUseWishlistAsPrimaryAction = false;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int length;
int length2;
int length3;
int length4;
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
this.docid = x0.readString();
this.hasDocid = true;
break;
case 18:
this.backendDocid = x0.readString();
this.hasBackendDocid = true;
break;
case 24:
int readRawVarint32 = x0.readRawVarint32();
switch (readRawVarint32) {
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
case 19:
case 20:
case 21:
case 22:
case 23:
case 24:
case 25:
case 26:
case 27:
case 28:
case 29:
case 30:
case 31:
case 32:
case 33:
case 34:
case 35:
case 36:
case 37:
case 38:
case 39:
case 40:
case 41:
case 42:
case 43:
case 44:
case 45:
case 46:
case 47:
case 48:
case 49:
this.docType = readRawVarint32;
this.hasDocType = true;
continue;
}
case 32:
int readRawVarint322 = x0.readRawVarint32();
switch (readRawVarint322) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 9:
case 10:
case 11:
case 12:
case 13:
this.backendId = readRawVarint322;
this.hasBackendId = true;
continue;
}
case 42:
this.title = x0.readString();
this.hasTitle = true;
break;
case 50:
this.creator = x0.readString();
this.hasCreator = true;
break;
case 58:
this.descriptionHtml = x0.readString();
this.hasDescriptionHtml = true;
break;
case 66:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 66);
if (this.offer == null) {
length4 = 0;
} else {
length4 = this.offer.length;
}
Common.Offer[] offerArr = new Common.Offer[repeatedFieldArrayLength + length4];
if (length4 != 0) {
System.arraycopy(this.offer, 0, offerArr, 0, length4);
}
while (length4 < offerArr.length - 1) {
offerArr[length4] = new Common.Offer();
x0.readMessage(offerArr[length4]);
x0.readTag();
length4++;
}
offerArr[length4] = new Common.Offer();
x0.readMessage(offerArr[length4]);
this.offer = offerArr;
break;
case 74:
if (this.availability == null) {
this.availability = new FilterRules.Availability();
}
x0.readMessage(this.availability);
break;
case 82:
int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(x0, 82);
if (this.image == null) {
length3 = 0;
} else {
length3 = this.image.length;
}
Common.Image[] imageArr = new Common.Image[repeatedFieldArrayLength2 + length3];
if (length3 != 0) {
System.arraycopy(this.image, 0, imageArr, 0, length3);
}
while (length3 < imageArr.length - 1) {
imageArr[length3] = new Common.Image();
x0.readMessage(imageArr[length3]);
x0.readTag();
length3++;
}
imageArr[length3] = new Common.Image();
x0.readMessage(imageArr[length3]);
this.image = imageArr;
break;
case 90:
int repeatedFieldArrayLength3 = WireFormatNano.getRepeatedFieldArrayLength(x0, 90);
if (this.child == null) {
length2 = 0;
} else {
length2 = this.child.length;
}
DocV2[] docV2Arr = new DocV2[repeatedFieldArrayLength3 + length2];
if (length2 != 0) {
System.arraycopy(this.child, 0, docV2Arr, 0, length2);
}
while (length2 < docV2Arr.length - 1) {
docV2Arr[length2] = new DocV2();
x0.readMessage(docV2Arr[length2]);
x0.readTag();
length2++;
}
docV2Arr[length2] = new DocV2();
x0.readMessage(docV2Arr[length2]);
this.child = docV2Arr;
break;
case 98:
if (this.containerMetadata == null) {
this.containerMetadata = new Containers.ContainerMetadata();
}
x0.readMessage(this.containerMetadata);
break;
case 106:
if (this.details == null) {
this.details = new DocDetails.DocumentDetails();
}
x0.readMessage(this.details);
break;
case 114:
if (this.aggregateRating == null) {
this.aggregateRating = new Rating.AggregateRating();
}
x0.readMessage(this.aggregateRating);
break;
case 122:
if (this.annotations == null) {
this.annotations = new Annotations();
}
x0.readMessage(this.annotations);
break;
case 130:
this.detailsUrl = x0.readString();
this.hasDetailsUrl = true;
break;
case 138:
this.shareUrl = x0.readString();
this.hasShareUrl = true;
break;
case 146:
this.reviewsUrl = x0.readString();
this.hasReviewsUrl = true;
break;
case 154:
this.backendUrl = x0.readString();
this.hasBackendUrl = true;
break;
case 162:
this.purchaseDetailsUrl = x0.readString();
this.hasPurchaseDetailsUrl = true;
break;
case 168:
this.detailsReusable = x0.readBool();
this.hasDetailsReusable = true;
break;
case 178:
this.subtitle = x0.readString();
this.hasSubtitle = true;
break;
case 186:
this.translatedDescriptionHtml = x0.readString();
this.hasTranslatedDescriptionHtml = true;
break;
case 194:
this.serverLogsCookie = x0.readBytes();
this.hasServerLogsCookie = true;
break;
case 202:
if (this.productDetails == null) {
this.productDetails = new DocDetails.ProductDetails();
}
x0.readMessage(this.productDetails);
break;
case 208:
this.mature = x0.readBool();
this.hasMature = true;
break;
case 218:
this.promotionalDescription = x0.readString();
this.hasPromotionalDescription = true;
break;
case 232:
this.availableForPreregistration = x0.readBool();
this.hasAvailableForPreregistration = true;
break;
case 242:
int repeatedFieldArrayLength4 = WireFormatNano.getRepeatedFieldArrayLength(x0, 242);
if (this.tip == null) {
length = 0;
} else {
length = this.tip.length;
}
ReviewTip[] reviewTipArr = new ReviewTip[repeatedFieldArrayLength4 + length];
if (length != 0) {
System.arraycopy(this.tip, 0, reviewTipArr, 0, length);
}
while (length < reviewTipArr.length - 1) {
reviewTipArr[length] = new ReviewTip();
x0.readMessage(reviewTipArr[length]);
x0.readTag();
length++;
}
reviewTipArr[length] = new ReviewTip();
x0.readMessage(reviewTipArr[length]);
this.tip = reviewTipArr;
break;
case 250:
this.snippetsUrl = x0.readString();
this.hasSnippetsUrl = true;
break;
case 256:
this.forceShareability = x0.readBool();
this.hasForceShareability = true;
break;
case 264:
this.useWishlistAsPrimaryAction = x0.readBool();
this.hasUseWishlistAsPrimaryAction = true;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public static DocV2[] emptyArray() {
if (_emptyArray == null) {
synchronized (InternalNano.LAZY_INIT_LOCK) {
if (_emptyArray == null) {
_emptyArray = new DocV2[0];
}
}
}
return _emptyArray;
}
public DocV2() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.hasDocid || !this.docid.equals("")) {
output.writeString(1, this.docid);
}
if (this.hasBackendDocid || !this.backendDocid.equals("")) {
output.writeString(2, this.backendDocid);
}
if (this.docType != 1 || this.hasDocType) {
output.writeInt32(3, this.docType);
}
if (this.backendId != 0 || this.hasBackendId) {
output.writeInt32(4, this.backendId);
}
if (this.hasTitle || !this.title.equals("")) {
output.writeString(5, this.title);
}
if (this.hasCreator || !this.creator.equals("")) {
output.writeString(6, this.creator);
}
if (this.hasDescriptionHtml || !this.descriptionHtml.equals("")) {
output.writeString(7, this.descriptionHtml);
}
if (this.offer != null && this.offer.length > 0) {
for (int i = 0; i < this.offer.length; i++) {
Common.Offer element = this.offer[i];
if (element != null) {
output.writeMessage(8, element);
}
}
}
if (this.availability != null) {
output.writeMessage(9, this.availability);
}
if (this.image != null && this.image.length > 0) {
for (int i2 = 0; i2 < this.image.length; i2++) {
Common.Image element2 = this.image[i2];
if (element2 != null) {
output.writeMessage(10, element2);
}
}
}
if (this.child != null && this.child.length > 0) {
for (int i3 = 0; i3 < this.child.length; i3++) {
DocV2 element3 = this.child[i3];
if (element3 != null) {
output.writeMessage(11, element3);
}
}
}
if (this.containerMetadata != null) {
output.writeMessage(12, this.containerMetadata);
}
if (this.details != null) {
output.writeMessage(13, this.details);
}
if (this.aggregateRating != null) {
output.writeMessage(14, this.aggregateRating);
}
if (this.annotations != null) {
output.writeMessage(15, this.annotations);
}
if (this.hasDetailsUrl || !this.detailsUrl.equals("")) {
output.writeString(16, this.detailsUrl);
}
if (this.hasShareUrl || !this.shareUrl.equals("")) {
output.writeString(17, this.shareUrl);
}
if (this.hasReviewsUrl || !this.reviewsUrl.equals("")) {
output.writeString(18, this.reviewsUrl);
}
if (this.hasBackendUrl || !this.backendUrl.equals("")) {
output.writeString(19, this.backendUrl);
}
if (this.hasPurchaseDetailsUrl || !this.purchaseDetailsUrl.equals("")) {
output.writeString(20, this.purchaseDetailsUrl);
}
if (this.hasDetailsReusable || this.detailsReusable) {
output.writeBool(21, this.detailsReusable);
}
if (this.hasSubtitle || !this.subtitle.equals("")) {
output.writeString(22, this.subtitle);
}
if (this.hasTranslatedDescriptionHtml || !this.translatedDescriptionHtml.equals("")) {
output.writeString(23, this.translatedDescriptionHtml);
}
if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) {
output.writeBytes(24, this.serverLogsCookie);
}
if (this.productDetails != null) {
output.writeMessage(25, this.productDetails);
}
if (this.hasMature || this.mature) {
output.writeBool(26, this.mature);
}
if (this.hasPromotionalDescription || !this.promotionalDescription.equals("")) {
output.writeString(27, this.promotionalDescription);
}
if (this.hasAvailableForPreregistration || this.availableForPreregistration) {
output.writeBool(29, this.availableForPreregistration);
}
if (this.tip != null && this.tip.length > 0) {
for (int i4 = 0; i4 < this.tip.length; i4++) {
ReviewTip element4 = this.tip[i4];
if (element4 != null) {
output.writeMessage(30, element4);
}
}
}
if (this.hasSnippetsUrl || !this.snippetsUrl.equals("")) {
output.writeString(31, this.snippetsUrl);
}
if (this.hasForceShareability || this.forceShareability) {
output.writeBool(32, this.forceShareability);
}
if (this.hasUseWishlistAsPrimaryAction || this.useWishlistAsPrimaryAction) {
output.writeBool(33, this.useWishlistAsPrimaryAction);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.hasDocid || !this.docid.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(1, this.docid);
}
if (this.hasBackendDocid || !this.backendDocid.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(2, this.backendDocid);
}
if (this.docType != 1 || this.hasDocType) {
size += CodedOutputByteBufferNano.computeInt32Size(3, this.docType);
}
if (this.backendId != 0 || this.hasBackendId) {
size += CodedOutputByteBufferNano.computeInt32Size(4, this.backendId);
}
if (this.hasTitle || !this.title.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(5, this.title);
}
if (this.hasCreator || !this.creator.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(6, this.creator);
}
if (this.hasDescriptionHtml || !this.descriptionHtml.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(7, this.descriptionHtml);
}
if (this.offer != null && this.offer.length > 0) {
for (int i = 0; i < this.offer.length; i++) {
Common.Offer element = this.offer[i];
if (element != null) {
size += CodedOutputByteBufferNano.computeMessageSize(8, element);
}
}
}
if (this.availability != null) {
size += CodedOutputByteBufferNano.computeMessageSize(9, this.availability);
}
if (this.image != null && this.image.length > 0) {
for (int i2 = 0; i2 < this.image.length; i2++) {
Common.Image element2 = this.image[i2];
if (element2 != null) {
size += CodedOutputByteBufferNano.computeMessageSize(10, element2);
}
}
}
if (this.child != null && this.child.length > 0) {
for (int i3 = 0; i3 < this.child.length; i3++) {
DocV2 element3 = this.child[i3];
if (element3 != null) {
size += CodedOutputByteBufferNano.computeMessageSize(11, element3);
}
}
}
if (this.containerMetadata != null) {
size += CodedOutputByteBufferNano.computeMessageSize(12, this.containerMetadata);
}
if (this.details != null) {
size += CodedOutputByteBufferNano.computeMessageSize(13, this.details);
}
if (this.aggregateRating != null) {
size += CodedOutputByteBufferNano.computeMessageSize(14, this.aggregateRating);
}
if (this.annotations != null) {
size += CodedOutputByteBufferNano.computeMessageSize(15, this.annotations);
}
if (this.hasDetailsUrl || !this.detailsUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(16, this.detailsUrl);
}
if (this.hasShareUrl || !this.shareUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(17, this.shareUrl);
}
if (this.hasReviewsUrl || !this.reviewsUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(18, this.reviewsUrl);
}
if (this.hasBackendUrl || !this.backendUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(19, this.backendUrl);
}
if (this.hasPurchaseDetailsUrl || !this.purchaseDetailsUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(20, this.purchaseDetailsUrl);
}
if (this.hasDetailsReusable || this.detailsReusable) {
size += CodedOutputByteBufferNano.computeTagSize(21) + 1;
}
if (this.hasSubtitle || !this.subtitle.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(22, this.subtitle);
}
if (this.hasTranslatedDescriptionHtml || !this.translatedDescriptionHtml.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(23, this.translatedDescriptionHtml);
}
if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) {
size += CodedOutputByteBufferNano.computeBytesSize(24, this.serverLogsCookie);
}
if (this.productDetails != null) {
size += CodedOutputByteBufferNano.computeMessageSize(25, this.productDetails);
}
if (this.hasMature || this.mature) {
size += CodedOutputByteBufferNano.computeTagSize(26) + 1;
}
if (this.hasPromotionalDescription || !this.promotionalDescription.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(27, this.promotionalDescription);
}
if (this.hasAvailableForPreregistration || this.availableForPreregistration) {
size += CodedOutputByteBufferNano.computeTagSize(29) + 1;
}
if (this.tip != null && this.tip.length > 0) {
for (int i4 = 0; i4 < this.tip.length; i4++) {
ReviewTip element4 = this.tip[i4];
if (element4 != null) {
size += CodedOutputByteBufferNano.computeMessageSize(30, element4);
}
}
}
if (this.hasSnippetsUrl || !this.snippetsUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(31, this.snippetsUrl);
}
if (this.hasForceShareability || this.forceShareability) {
size += CodedOutputByteBufferNano.computeTagSize(32) + 1;
}
if (this.hasUseWishlistAsPrimaryAction || this.useWishlistAsPrimaryAction) {
return size + CodedOutputByteBufferNano.computeTagSize(33) + 1;
}
return size;
}
}

View File

@ -0,0 +1,162 @@
package com.google.android.finsky.protos;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.InternalNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
/* loaded from: classes.dex */
public final class FileMetadata extends MessageNano {
private static volatile FileMetadata[] _emptyArray;
public int fileType = 0;
public boolean hasFileType = false;
public int versionCode = 0;
public boolean hasVersionCode = false;
public long size = 0;
public boolean hasSize = false;
public long compressedSize = 0;
public boolean hasCompressedSize = false;
public PatchDetails[] patchDetails = PatchDetails.emptyArray();
public String splitId = "";
public boolean hasSplitId = false;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int length;
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 8:
int readRawVarint32 = x0.readRawVarint32();
switch (readRawVarint32) {
case 0:
case 1:
case 2:
this.fileType = readRawVarint32;
this.hasFileType = true;
continue;
}
case 16:
this.versionCode = x0.readRawVarint32();
this.hasVersionCode = true;
break;
case 24:
this.size = x0.readRawVarint64();
this.hasSize = true;
break;
case 34:
this.splitId = x0.readString();
this.hasSplitId = true;
break;
case 40:
this.compressedSize = x0.readRawVarint64();
this.hasCompressedSize = true;
break;
case 50:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 50);
if (this.patchDetails == null) {
length = 0;
} else {
length = this.patchDetails.length;
}
PatchDetails[] patchDetailsArr = new PatchDetails[repeatedFieldArrayLength + length];
if (length != 0) {
System.arraycopy(this.patchDetails, 0, patchDetailsArr, 0, length);
}
while (length < patchDetailsArr.length - 1) {
patchDetailsArr[length] = new PatchDetails();
x0.readMessage(patchDetailsArr[length]);
x0.readTag();
length++;
}
patchDetailsArr[length] = new PatchDetails();
x0.readMessage(patchDetailsArr[length]);
this.patchDetails = patchDetailsArr;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public static FileMetadata[] emptyArray() {
if (_emptyArray == null) {
synchronized (InternalNano.LAZY_INIT_LOCK) {
if (_emptyArray == null) {
_emptyArray = new FileMetadata[0];
}
}
}
return _emptyArray;
}
public FileMetadata() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.fileType != 0 || this.hasFileType) {
output.writeInt32(1, this.fileType);
}
if (this.hasVersionCode || this.versionCode != 0) {
output.writeInt32(2, this.versionCode);
}
if (this.hasSize || this.size != 0) {
output.writeInt64(3, this.size);
}
if (this.hasSplitId || !this.splitId.equals("")) {
output.writeString(4, this.splitId);
}
if (this.hasCompressedSize || this.compressedSize != 0) {
output.writeInt64(5, this.compressedSize);
}
if (this.patchDetails != null && this.patchDetails.length > 0) {
for (int i = 0; i < this.patchDetails.length; i++) {
PatchDetails element = this.patchDetails[i];
if (element != null) {
output.writeMessage(6, element);
}
}
}
super.writeTo(output);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.fileType != 0 || this.hasFileType) {
size += CodedOutputByteBufferNano.computeInt32Size(1, this.fileType);
}
if (this.hasVersionCode || this.versionCode != 0) {
size += CodedOutputByteBufferNano.computeInt32Size(2, this.versionCode);
}
if (this.hasSize || this.size != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(3, this.size);
}
if (this.hasSplitId || !this.splitId.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(4, this.splitId);
}
if (this.hasCompressedSize || this.compressedSize != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(5, this.compressedSize);
}
if (this.patchDetails != null && this.patchDetails.length > 0) {
for (int i = 0; i < this.patchDetails.length; i++) {
PatchDetails element = this.patchDetails[i];
if (element != null) {
size += CodedOutputByteBufferNano.computeMessageSize(6, element);
}
}
}
return size;
}
}

View File

@ -0,0 +1,108 @@
package com.google.android.finsky.protos;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
/* loaded from: classes.dex */
public final class GetReviewsResponse extends MessageNano {
public Review[] review = Review.emptyArray();
public ReviewTip tip = null;
public long matchingCount = 0;
public boolean hasMatchingCount = false;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int length;
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 10);
if (this.review == null) {
length = 0;
} else {
length = this.review.length;
}
Review[] reviewArr = new Review[repeatedFieldArrayLength + length];
if (length != 0) {
System.arraycopy(this.review, 0, reviewArr, 0, length);
}
while (length < reviewArr.length - 1) {
reviewArr[length] = new Review();
x0.readMessage(reviewArr[length]);
x0.readTag();
length++;
}
reviewArr[length] = new Review();
x0.readMessage(reviewArr[length]);
this.review = reviewArr;
break;
case 16:
this.matchingCount = x0.readRawVarint64();
this.hasMatchingCount = true;
break;
case 26:
if (this.tip == null) {
this.tip = new ReviewTip();
}
x0.readMessage(this.tip);
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public GetReviewsResponse() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.review != null && this.review.length > 0) {
for (int i = 0; i < this.review.length; i++) {
Review element = this.review[i];
if (element != null) {
output.writeMessage(1, element);
}
}
}
if (this.hasMatchingCount || this.matchingCount != 0) {
output.writeInt64(2, this.matchingCount);
}
if (this.tip != null) {
output.writeMessage(3, this.tip);
}
super.writeTo(output);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.review != null && this.review.length > 0) {
for (int i = 0; i < this.review.length; i++) {
Review element = this.review[i];
if (element != null) {
size += CodedOutputByteBufferNano.computeMessageSize(1, element);
}
}
}
if (this.hasMatchingCount || this.matchingCount != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(2, this.matchingCount);
}
if (this.tip != null) {
return size + CodedOutputByteBufferNano.computeMessageSize(3, this.tip);
}
return size;
}
}

View File

@ -0,0 +1,125 @@
package com.google.android.finsky.protos;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
/* loaded from: classes.dex */
public final class InstallDetails extends MessageNano {
public int installLocation = 0;
public boolean hasInstallLocation = false;
public long size = 0;
public boolean hasSize = false;
public Dependency[] dependency = Dependency.emptyArray();
public int targetSdkVersion = 0;
public boolean hasTargetSdkVersion = false;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int length;
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 8:
int readRawVarint32 = x0.readRawVarint32();
switch (readRawVarint32) {
case 0:
case 1:
case 2:
case 3:
this.installLocation = readRawVarint32;
this.hasInstallLocation = true;
continue;
}
case 16:
this.size = x0.readRawVarint64();
this.hasSize = true;
break;
case 26:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 26);
if (this.dependency == null) {
length = 0;
} else {
length = this.dependency.length;
}
Dependency[] dependencyArr = new Dependency[repeatedFieldArrayLength + length];
if (length != 0) {
System.arraycopy(this.dependency, 0, dependencyArr, 0, length);
}
while (length < dependencyArr.length - 1) {
dependencyArr[length] = new Dependency();
x0.readMessage(dependencyArr[length]);
x0.readTag();
length++;
}
dependencyArr[length] = new Dependency();
x0.readMessage(dependencyArr[length]);
this.dependency = dependencyArr;
break;
case 32:
this.targetSdkVersion = x0.readRawVarint32();
this.hasTargetSdkVersion = true;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public InstallDetails() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.installLocation != 0 || this.hasInstallLocation) {
output.writeInt32(1, this.installLocation);
}
if (this.hasSize || this.size != 0) {
output.writeInt64(2, this.size);
}
if (this.dependency != null && this.dependency.length > 0) {
for (int i = 0; i < this.dependency.length; i++) {
Dependency element = this.dependency[i];
if (element != null) {
output.writeMessage(3, element);
}
}
}
if (this.hasTargetSdkVersion || this.targetSdkVersion != 0) {
output.writeInt32(4, this.targetSdkVersion);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.installLocation != 0 || this.hasInstallLocation) {
size += CodedOutputByteBufferNano.computeInt32Size(1, this.installLocation);
}
if (this.hasSize || this.size != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(2, this.size);
}
if (this.dependency != null && this.dependency.length > 0) {
for (int i = 0; i < this.dependency.length; i++) {
Dependency element = this.dependency[i];
if (element != null) {
size += CodedOutputByteBufferNano.computeMessageSize(3, element);
}
}
}
if (this.hasTargetSdkVersion || this.targetSdkVersion != 0) {
return size + CodedOutputByteBufferNano.computeInt32Size(4, this.targetSdkVersion);
}
return size;
}
}

View File

@ -0,0 +1,122 @@
package com.google.android.finsky.protos;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
/* loaded from: classes.dex */
public final class ListResponse extends MessageNano {
public Bucket[] bucket = Bucket.emptyArray();
public DocV2[] doc = DocV2.emptyArray();
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int length;
int length2;
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 10);
if (this.bucket == null) {
length2 = 0;
} else {
length2 = this.bucket.length;
}
Bucket[] bucketArr = new Bucket[repeatedFieldArrayLength + length2];
if (length2 != 0) {
System.arraycopy(this.bucket, 0, bucketArr, 0, length2);
}
while (length2 < bucketArr.length - 1) {
bucketArr[length2] = new Bucket();
x0.readMessage(bucketArr[length2]);
x0.readTag();
length2++;
}
bucketArr[length2] = new Bucket();
x0.readMessage(bucketArr[length2]);
this.bucket = bucketArr;
break;
case 18:
int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(x0, 18);
if (this.doc == null) {
length = 0;
} else {
length = this.doc.length;
}
DocV2[] docV2Arr = new DocV2[repeatedFieldArrayLength2 + length];
if (length != 0) {
System.arraycopy(this.doc, 0, docV2Arr, 0, length);
}
while (length < docV2Arr.length - 1) {
docV2Arr[length] = new DocV2();
x0.readMessage(docV2Arr[length]);
x0.readTag();
length++;
}
docV2Arr[length] = new DocV2();
x0.readMessage(docV2Arr[length]);
this.doc = docV2Arr;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public ListResponse() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.bucket != null && this.bucket.length > 0) {
for (int i = 0; i < this.bucket.length; i++) {
Bucket element = this.bucket[i];
if (element != null) {
output.writeMessage(1, element);
}
}
}
if (this.doc != null && this.doc.length > 0) {
for (int i2 = 0; i2 < this.doc.length; i2++) {
DocV2 element2 = this.doc[i2];
if (element2 != null) {
output.writeMessage(2, element2);
}
}
}
super.writeTo(output);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.bucket != null && this.bucket.length > 0) {
for (int i = 0; i < this.bucket.length; i++) {
Bucket element = this.bucket[i];
if (element != null) {
size += CodedOutputByteBufferNano.computeMessageSize(1, element);
}
}
}
if (this.doc != null && this.doc.length > 0) {
for (int i2 = 0; i2 < this.doc.length; i2++) {
DocV2 element2 = this.doc[i2];
if (element2 != null) {
size += CodedOutputByteBufferNano.computeMessageSize(2, element2);
}
}
}
return size;
}
}

View File

@ -0,0 +1,118 @@
package com.google.android.finsky.protos;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.InternalNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
import java.util.Arrays;
/* loaded from: classes.dex */
public final class PreFetch extends MessageNano {
private static volatile PreFetch[] _emptyArray;
public String url = "";
public boolean hasUrl = false;
public byte[] response = WireFormatNano.EMPTY_BYTES;
public boolean hasResponse = false;
public String etag = "";
public boolean hasEtag = false;
public long ttl = 0;
public boolean hasTtl = false;
public long softTtl = 0;
public boolean hasSoftTtl = false;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
this.url = x0.readString();
this.hasUrl = true;
break;
case 18:
this.response = x0.readBytes();
this.hasResponse = true;
break;
case 26:
this.etag = x0.readString();
this.hasEtag = true;
break;
case 32:
this.ttl = x0.readRawVarint64();
this.hasTtl = true;
break;
case 40:
this.softTtl = x0.readRawVarint64();
this.hasSoftTtl = true;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public static PreFetch[] emptyArray() {
if (_emptyArray == null) {
synchronized (InternalNano.LAZY_INIT_LOCK) {
if (_emptyArray == null) {
_emptyArray = new PreFetch[0];
}
}
}
return _emptyArray;
}
public PreFetch() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.hasUrl || !this.url.equals("")) {
output.writeString(1, this.url);
}
if (this.hasResponse || !Arrays.equals(this.response, WireFormatNano.EMPTY_BYTES)) {
output.writeBytes(2, this.response);
}
if (this.hasEtag || !this.etag.equals("")) {
output.writeString(3, this.etag);
}
if (this.hasTtl || this.ttl != 0) {
output.writeInt64(4, this.ttl);
}
if (this.hasSoftTtl || this.softTtl != 0) {
output.writeInt64(5, this.softTtl);
}
super.writeTo(output);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.hasUrl || !this.url.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(1, this.url);
}
if (this.hasResponse || !Arrays.equals(this.response, WireFormatNano.EMPTY_BYTES)) {
size += CodedOutputByteBufferNano.computeBytesSize(2, this.response);
}
if (this.hasEtag || !this.etag.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(3, this.etag);
}
if (this.hasTtl || this.ttl != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(4, this.ttl);
}
if (this.hasSoftTtl || this.softTtl != 0) {
return size + CodedOutputByteBufferNano.computeInt64Size(5, this.softTtl);
}
return size;
}
}

View File

@ -0,0 +1,390 @@
package com.google.android.finsky.protos;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.InternalNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
/* loaded from: classes.dex */
public interface Rating {
/* loaded from: classes.dex */
public static final class AggregateRating extends MessageNano {
public int type = 1;
public boolean hasType = false;
public float starRating = 0.0f;
public boolean hasStarRating = false;
public long ratingsCount = 0;
public boolean hasRatingsCount = false;
public long commentCount = 0;
public boolean hasCommentCount = false;
public long oneStarRatings = 0;
public boolean hasOneStarRatings = false;
public long twoStarRatings = 0;
public boolean hasTwoStarRatings = false;
public long threeStarRatings = 0;
public boolean hasThreeStarRatings = false;
public long fourStarRatings = 0;
public boolean hasFourStarRatings = false;
public long fiveStarRatings = 0;
public boolean hasFiveStarRatings = false;
public double bayesianMeanRating = 0.0d;
public boolean hasBayesianMeanRating = false;
public long thumbsUpCount = 0;
public boolean hasThumbsUpCount = false;
public long thumbsDownCount = 0;
public boolean hasThumbsDownCount = false;
public Tip[] tip = Tip.emptyArray();
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int length;
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 8:
int readRawVarint32 = x0.readRawVarint32();
switch (readRawVarint32) {
case 1:
case 2:
case 3:
this.type = readRawVarint32;
this.hasType = true;
continue;
}
case 21:
this.starRating = Float.intBitsToFloat(x0.readRawLittleEndian32());
this.hasStarRating = true;
break;
case 24:
this.ratingsCount = x0.readRawVarint64();
this.hasRatingsCount = true;
break;
case 32:
this.oneStarRatings = x0.readRawVarint64();
this.hasOneStarRatings = true;
break;
case 40:
this.twoStarRatings = x0.readRawVarint64();
this.hasTwoStarRatings = true;
break;
case 48:
this.threeStarRatings = x0.readRawVarint64();
this.hasThreeStarRatings = true;
break;
case 56:
this.fourStarRatings = x0.readRawVarint64();
this.hasFourStarRatings = true;
break;
case 64:
this.fiveStarRatings = x0.readRawVarint64();
this.hasFiveStarRatings = true;
break;
case 72:
this.thumbsUpCount = x0.readRawVarint64();
this.hasThumbsUpCount = true;
break;
case 80:
this.thumbsDownCount = x0.readRawVarint64();
this.hasThumbsDownCount = true;
break;
case 88:
this.commentCount = x0.readRawVarint64();
this.hasCommentCount = true;
break;
case 97:
this.bayesianMeanRating = Double.longBitsToDouble(x0.readRawLittleEndian64());
this.hasBayesianMeanRating = true;
break;
case 106:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 106);
if (this.tip == null) {
length = 0;
} else {
length = this.tip.length;
}
Tip[] tipArr = new Tip[repeatedFieldArrayLength + length];
if (length != 0) {
System.arraycopy(this.tip, 0, tipArr, 0, length);
}
while (length < tipArr.length - 1) {
tipArr[length] = new Tip();
x0.readMessage(tipArr[length]);
x0.readTag();
length++;
}
tipArr[length] = new Tip();
x0.readMessage(tipArr[length]);
this.tip = tipArr;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public AggregateRating() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.type != 1 || this.hasType) {
output.writeInt32(1, this.type);
}
if (this.hasStarRating || Float.floatToIntBits(this.starRating) != Float.floatToIntBits(0.0f)) {
output.writeFloat(2, this.starRating);
}
if (this.hasRatingsCount || this.ratingsCount != 0) {
output.writeUInt64(3, this.ratingsCount);
}
if (this.hasOneStarRatings || this.oneStarRatings != 0) {
output.writeUInt64(4, this.oneStarRatings);
}
if (this.hasTwoStarRatings || this.twoStarRatings != 0) {
output.writeUInt64(5, this.twoStarRatings);
}
if (this.hasThreeStarRatings || this.threeStarRatings != 0) {
output.writeUInt64(6, this.threeStarRatings);
}
if (this.hasFourStarRatings || this.fourStarRatings != 0) {
output.writeUInt64(7, this.fourStarRatings);
}
if (this.hasFiveStarRatings || this.fiveStarRatings != 0) {
output.writeUInt64(8, this.fiveStarRatings);
}
if (this.hasThumbsUpCount || this.thumbsUpCount != 0) {
output.writeUInt64(9, this.thumbsUpCount);
}
if (this.hasThumbsDownCount || this.thumbsDownCount != 0) {
output.writeUInt64(10, this.thumbsDownCount);
}
if (this.hasCommentCount || this.commentCount != 0) {
output.writeUInt64(11, this.commentCount);
}
if (this.hasBayesianMeanRating || Double.doubleToLongBits(this.bayesianMeanRating) != Double.doubleToLongBits(0.0d)) {
output.writeDouble(12, this.bayesianMeanRating);
}
if (this.tip != null && this.tip.length > 0) {
for (int i = 0; i < this.tip.length; i++) {
Tip element = this.tip[i];
if (element != null) {
output.writeMessage(13, element);
}
}
}
super.writeTo(output);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.type != 1 || this.hasType) {
size += CodedOutputByteBufferNano.computeInt32Size(1, this.type);
}
if (this.hasStarRating || Float.floatToIntBits(this.starRating) != Float.floatToIntBits(0.0f)) {
size += CodedOutputByteBufferNano.computeTagSize(2) + 4;
}
if (this.hasRatingsCount || this.ratingsCount != 0) {
size += CodedOutputByteBufferNano.computeUInt64Size(3, this.ratingsCount);
}
if (this.hasOneStarRatings || this.oneStarRatings != 0) {
size += CodedOutputByteBufferNano.computeUInt64Size(4, this.oneStarRatings);
}
if (this.hasTwoStarRatings || this.twoStarRatings != 0) {
size += CodedOutputByteBufferNano.computeUInt64Size(5, this.twoStarRatings);
}
if (this.hasThreeStarRatings || this.threeStarRatings != 0) {
size += CodedOutputByteBufferNano.computeUInt64Size(6, this.threeStarRatings);
}
if (this.hasFourStarRatings || this.fourStarRatings != 0) {
size += CodedOutputByteBufferNano.computeUInt64Size(7, this.fourStarRatings);
}
if (this.hasFiveStarRatings || this.fiveStarRatings != 0) {
size += CodedOutputByteBufferNano.computeUInt64Size(8, this.fiveStarRatings);
}
if (this.hasThumbsUpCount || this.thumbsUpCount != 0) {
size += CodedOutputByteBufferNano.computeUInt64Size(9, this.thumbsUpCount);
}
if (this.hasThumbsDownCount || this.thumbsDownCount != 0) {
size += CodedOutputByteBufferNano.computeUInt64Size(10, this.thumbsDownCount);
}
if (this.hasCommentCount || this.commentCount != 0) {
size += CodedOutputByteBufferNano.computeUInt64Size(11, this.commentCount);
}
if (this.hasBayesianMeanRating || Double.doubleToLongBits(this.bayesianMeanRating) != Double.doubleToLongBits(0.0d)) {
size += CodedOutputByteBufferNano.computeTagSize(12) + 8;
}
if (this.tip != null && this.tip.length > 0) {
for (int i = 0; i < this.tip.length; i++) {
Tip element = this.tip[i];
if (element != null) {
size += CodedOutputByteBufferNano.computeMessageSize(13, element);
}
}
}
return size;
}
}
/* loaded from: classes.dex */
public static final class Tip extends MessageNano {
private static volatile Tip[] _emptyArray;
public String tipId = "";
public boolean hasTipId = false;
public String text = "";
public boolean hasText = false;
public int polarity = 0;
public boolean hasPolarity = false;
public long reviewCount = 0;
public boolean hasReviewCount = false;
public String language = "";
public boolean hasLanguage = false;
public String[] snippetReviewId = WireFormatNano.EMPTY_STRING_ARRAY;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
this.tipId = x0.readString();
this.hasTipId = true;
break;
case 18:
this.text = x0.readString();
this.hasText = true;
break;
case 24:
int readRawVarint32 = x0.readRawVarint32();
switch (readRawVarint32) {
case 0:
case 1:
case 2:
this.polarity = readRawVarint32;
this.hasPolarity = true;
continue;
}
case 32:
this.reviewCount = x0.readRawVarint64();
this.hasReviewCount = true;
break;
case 42:
this.language = x0.readString();
this.hasLanguage = true;
break;
case 50:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 50);
int length = this.snippetReviewId == null ? 0 : this.snippetReviewId.length;
String[] strArr = new String[repeatedFieldArrayLength + length];
if (length != 0) {
System.arraycopy(this.snippetReviewId, 0, strArr, 0, length);
}
while (length < strArr.length - 1) {
strArr[length] = x0.readString();
x0.readTag();
length++;
}
strArr[length] = x0.readString();
this.snippetReviewId = strArr;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public static Tip[] emptyArray() {
if (_emptyArray == null) {
synchronized (InternalNano.LAZY_INIT_LOCK) {
if (_emptyArray == null) {
_emptyArray = new Tip[0];
}
}
}
return _emptyArray;
}
public Tip() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.hasTipId || !this.tipId.equals("")) {
output.writeString(1, this.tipId);
}
if (this.hasText || !this.text.equals("")) {
output.writeString(2, this.text);
}
if (this.polarity != 0 || this.hasPolarity) {
output.writeInt32(3, this.polarity);
}
if (this.hasReviewCount || this.reviewCount != 0) {
output.writeInt64(4, this.reviewCount);
}
if (this.hasLanguage || !this.language.equals("")) {
output.writeString(5, this.language);
}
if (this.snippetReviewId != null && this.snippetReviewId.length > 0) {
for (int i = 0; i < this.snippetReviewId.length; i++) {
String element = this.snippetReviewId[i];
if (element != null) {
output.writeString(6, element);
}
}
}
super.writeTo(output);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.hasTipId || !this.tipId.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(1, this.tipId);
}
if (this.hasText || !this.text.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(2, this.text);
}
if (this.polarity != 0 || this.hasPolarity) {
size += CodedOutputByteBufferNano.computeInt32Size(3, this.polarity);
}
if (this.hasReviewCount || this.reviewCount != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(4, this.reviewCount);
}
if (this.hasLanguage || !this.language.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(5, this.language);
}
if (this.snippetReviewId == null || this.snippetReviewId.length <= 0) {
return size;
}
int dataCount = 0;
int dataSize = 0;
for (int i = 0; i < this.snippetReviewId.length; i++) {
String element = this.snippetReviewId[i];
if (element != null) {
dataCount++;
dataSize += CodedOutputByteBufferNano.computeStringSizeNoTag(element);
}
}
return size + dataSize + (dataCount * 1);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,264 @@
package com.google.android.finsky.protos;
import com.google.android.finsky.protos.Common;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.InternalNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
/* loaded from: classes.dex */
public final class Review extends MessageNano {
private static volatile Review[] _emptyArray;
public String commentId = "";
public boolean hasCommentId = false;
public DocV2 author = null;
public int starRating = 0;
public boolean hasStarRating = false;
public Common.Image sentiment = null;
public String title = "";
public boolean hasTitle = false;
public String comment = "";
public boolean hasComment = false;
public String url = "";
public boolean hasUrl = false;
public String source = "";
public boolean hasSource = false;
public String documentVersion = "";
public boolean hasDocumentVersion = false;
public long timestampMsec = 0;
public boolean hasTimestampMsec = false;
public String deviceName = "";
public boolean hasDeviceName = false;
public String replyText = "";
public boolean hasReplyText = false;
public long replyTimestampMsec = 0;
public boolean hasReplyTimestampMsec = false;
public int helpfulCount = 0;
public boolean hasHelpfulCount = false;
public long thumbsUpCount = 0;
public boolean hasThumbsUpCount = false;
public OBSOLETE_PlusProfile oBSOLETEPlusProfile = null;
public String authorName = "";
public boolean hasAuthorName = false;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
this.authorName = x0.readString();
this.hasAuthorName = true;
break;
case 18:
this.url = x0.readString();
this.hasUrl = true;
break;
case 26:
this.source = x0.readString();
this.hasSource = true;
break;
case 34:
this.documentVersion = x0.readString();
this.hasDocumentVersion = true;
break;
case 40:
this.timestampMsec = x0.readRawVarint64();
this.hasTimestampMsec = true;
break;
case 48:
this.starRating = x0.readRawVarint32();
this.hasStarRating = true;
break;
case 58:
this.title = x0.readString();
this.hasTitle = true;
break;
case 66:
this.comment = x0.readString();
this.hasComment = true;
break;
case 74:
this.commentId = x0.readString();
this.hasCommentId = true;
break;
case 154:
this.deviceName = x0.readString();
this.hasDeviceName = true;
break;
case 234:
this.replyText = x0.readString();
this.hasReplyText = true;
break;
case 240:
this.replyTimestampMsec = x0.readRawVarint64();
this.hasReplyTimestampMsec = true;
break;
case 250:
if (this.oBSOLETEPlusProfile == null) {
this.oBSOLETEPlusProfile = new OBSOLETE_PlusProfile();
}
x0.readMessage(this.oBSOLETEPlusProfile);
break;
case 266:
if (this.author == null) {
this.author = new DocV2();
}
x0.readMessage(this.author);
break;
case 274:
if (this.sentiment == null) {
this.sentiment = new Common.Image();
}
x0.readMessage(this.sentiment);
break;
case 280:
this.helpfulCount = x0.readRawVarint32();
this.hasHelpfulCount = true;
break;
case 304:
this.thumbsUpCount = x0.readRawVarint64();
this.hasThumbsUpCount = true;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public static Review[] emptyArray() {
if (_emptyArray == null) {
synchronized (InternalNano.LAZY_INIT_LOCK) {
if (_emptyArray == null) {
_emptyArray = new Review[0];
}
}
}
return _emptyArray;
}
public Review() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.hasAuthorName || !this.authorName.equals("")) {
output.writeString(1, this.authorName);
}
if (this.hasUrl || !this.url.equals("")) {
output.writeString(2, this.url);
}
if (this.hasSource || !this.source.equals("")) {
output.writeString(3, this.source);
}
if (this.hasDocumentVersion || !this.documentVersion.equals("")) {
output.writeString(4, this.documentVersion);
}
if (this.hasTimestampMsec || this.timestampMsec != 0) {
output.writeInt64(5, this.timestampMsec);
}
if (this.hasStarRating || this.starRating != 0) {
output.writeInt32(6, this.starRating);
}
if (this.hasTitle || !this.title.equals("")) {
output.writeString(7, this.title);
}
if (this.hasComment || !this.comment.equals("")) {
output.writeString(8, this.comment);
}
if (this.hasCommentId || !this.commentId.equals("")) {
output.writeString(9, this.commentId);
}
if (this.hasDeviceName || !this.deviceName.equals("")) {
output.writeString(19, this.deviceName);
}
if (this.hasReplyText || !this.replyText.equals("")) {
output.writeString(29, this.replyText);
}
if (this.hasReplyTimestampMsec || this.replyTimestampMsec != 0) {
output.writeInt64(30, this.replyTimestampMsec);
}
if (this.oBSOLETEPlusProfile != null) {
output.writeMessage(31, this.oBSOLETEPlusProfile);
}
if (this.author != null) {
output.writeMessage(33, this.author);
}
if (this.sentiment != null) {
output.writeMessage(34, this.sentiment);
}
if (this.hasHelpfulCount || this.helpfulCount != 0) {
output.writeInt32(35, this.helpfulCount);
}
if (this.hasThumbsUpCount || this.thumbsUpCount != 0) {
output.writeUInt64(38, this.thumbsUpCount);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.hasAuthorName || !this.authorName.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(1, this.authorName);
}
if (this.hasUrl || !this.url.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(2, this.url);
}
if (this.hasSource || !this.source.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(3, this.source);
}
if (this.hasDocumentVersion || !this.documentVersion.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(4, this.documentVersion);
}
if (this.hasTimestampMsec || this.timestampMsec != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(5, this.timestampMsec);
}
if (this.hasStarRating || this.starRating != 0) {
size += CodedOutputByteBufferNano.computeInt32Size(6, this.starRating);
}
if (this.hasTitle || !this.title.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(7, this.title);
}
if (this.hasComment || !this.comment.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(8, this.comment);
}
if (this.hasCommentId || !this.commentId.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(9, this.commentId);
}
if (this.hasDeviceName || !this.deviceName.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(19, this.deviceName);
}
if (this.hasReplyText || !this.replyText.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(29, this.replyText);
}
if (this.hasReplyTimestampMsec || this.replyTimestampMsec != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(30, this.replyTimestampMsec);
}
if (this.oBSOLETEPlusProfile != null) {
size += CodedOutputByteBufferNano.computeMessageSize(31, this.oBSOLETEPlusProfile);
}
if (this.author != null) {
size += CodedOutputByteBufferNano.computeMessageSize(33, this.author);
}
if (this.sentiment != null) {
size += CodedOutputByteBufferNano.computeMessageSize(34, this.sentiment);
}
if (this.hasHelpfulCount || this.helpfulCount != 0) {
size += CodedOutputByteBufferNano.computeInt32Size(35, this.helpfulCount);
}
if (this.hasThumbsUpCount || this.thumbsUpCount != 0) {
return size + CodedOutputByteBufferNano.computeUInt64Size(38, this.thumbsUpCount);
}
return size;
}
}

View File

@ -0,0 +1,106 @@
package com.google.android.finsky.protos;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
/* loaded from: classes.dex */
public final class ReviewResponse extends MessageNano {
public GetReviewsResponse getResponse = null;
public CriticReviewsResponse criticReviewsResponse = null;
public String nextPageUrl = "";
public boolean hasNextPageUrl = false;
public Review updatedReview = null;
public String suggestionsListUrl = "";
public boolean hasSuggestionsListUrl = false;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
if (this.getResponse == null) {
this.getResponse = new GetReviewsResponse();
}
x0.readMessage(this.getResponse);
break;
case 18:
this.nextPageUrl = x0.readString();
this.hasNextPageUrl = true;
break;
case 26:
if (this.updatedReview == null) {
this.updatedReview = new Review();
}
x0.readMessage(this.updatedReview);
break;
case 34:
this.suggestionsListUrl = x0.readString();
this.hasSuggestionsListUrl = true;
break;
case 42:
if (this.criticReviewsResponse == null) {
this.criticReviewsResponse = new CriticReviewsResponse();
}
x0.readMessage(this.criticReviewsResponse);
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public ReviewResponse() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.getResponse != null) {
output.writeMessage(1, this.getResponse);
}
if (this.hasNextPageUrl || !this.nextPageUrl.equals("")) {
output.writeString(2, this.nextPageUrl);
}
if (this.updatedReview != null) {
output.writeMessage(3, this.updatedReview);
}
if (this.hasSuggestionsListUrl || !this.suggestionsListUrl.equals("")) {
output.writeString(4, this.suggestionsListUrl);
}
if (this.criticReviewsResponse != null) {
output.writeMessage(5, this.criticReviewsResponse);
}
super.writeTo(output);
}
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.getResponse != null) {
size += CodedOutputByteBufferNano.computeMessageSize(1, this.getResponse);
}
if (this.hasNextPageUrl || !this.nextPageUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(2, this.nextPageUrl);
}
if (this.updatedReview != null) {
size += CodedOutputByteBufferNano.computeMessageSize(3, this.updatedReview);
}
if (this.hasSuggestionsListUrl || !this.suggestionsListUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(4, this.suggestionsListUrl);
}
if (this.criticReviewsResponse != null) {
return size + CodedOutputByteBufferNano.computeMessageSize(5, this.criticReviewsResponse);
}
return size;
}
}

View File

@ -0,0 +1,373 @@
package com.google.android.finsky.protos;
import com.google.android.finsky.protos.Common;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.InternalNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
import java.util.Arrays;
/* loaded from: classes.dex */
public interface SearchSuggest {
/* loaded from: classes.dex */
public static final class Suggestion extends MessageNano {
private static volatile Suggestion[] _emptyArray;
public int type = 1;
public boolean hasType = false;
public String displayText = "";
public boolean hasDisplayText = false;
public Common.Image image = null;
public Link link = null;
public byte[] serverLogsCookie = WireFormatNano.EMPTY_BYTES;
public boolean hasServerLogsCookie = false;
public DocV2 document = null;
public int searchBackend = 0;
public boolean hasSearchBackend = false;
public String suggestedQuery = "";
public boolean hasSuggestedQuery = false;
public NavSuggestion navSuggestion = null;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 8:
int readRawVarint32 = x0.readRawVarint32();
switch (readRawVarint32) {
case 1:
case 2:
case 3:
this.type = readRawVarint32;
this.hasType = true;
continue;
}
case 18:
this.suggestedQuery = x0.readString();
this.hasSuggestedQuery = true;
break;
case 26:
if (this.navSuggestion == null) {
this.navSuggestion = new NavSuggestion();
}
x0.readMessage(this.navSuggestion);
break;
case 34:
this.serverLogsCookie = x0.readBytes();
this.hasServerLogsCookie = true;
break;
case 42:
if (this.image == null) {
this.image = new Common.Image();
}
x0.readMessage(this.image);
break;
case 50:
this.displayText = x0.readString();
this.hasDisplayText = true;
break;
case 58:
if (this.link == null) {
this.link = new Link();
}
x0.readMessage(this.link);
break;
case 66:
if (this.document == null) {
this.document = new DocV2();
}
x0.readMessage(this.document);
break;
case 72:
int readRawVarint322 = x0.readRawVarint32();
switch (readRawVarint322) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 9:
case 10:
case 11:
case 12:
case 13:
this.searchBackend = readRawVarint322;
this.hasSearchBackend = true;
continue;
}
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public static Suggestion[] emptyArray() {
if (_emptyArray == null) {
synchronized (InternalNano.LAZY_INIT_LOCK) {
if (_emptyArray == null) {
_emptyArray = new Suggestion[0];
}
}
}
return _emptyArray;
}
public Suggestion() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.type != 1 || this.hasType) {
output.writeInt32(1, this.type);
}
if (this.hasSuggestedQuery || !this.suggestedQuery.equals("")) {
output.writeString(2, this.suggestedQuery);
}
if (this.navSuggestion != null) {
output.writeMessage(3, this.navSuggestion);
}
if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) {
output.writeBytes(4, this.serverLogsCookie);
}
if (this.image != null) {
output.writeMessage(5, this.image);
}
if (this.hasDisplayText || !this.displayText.equals("")) {
output.writeString(6, this.displayText);
}
if (this.link != null) {
output.writeMessage(7, this.link);
}
if (this.document != null) {
output.writeMessage(8, this.document);
}
if (this.searchBackend != 0 || this.hasSearchBackend) {
output.writeInt32(9, this.searchBackend);
}
super.writeTo(output);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.type != 1 || this.hasType) {
size += CodedOutputByteBufferNano.computeInt32Size(1, this.type);
}
if (this.hasSuggestedQuery || !this.suggestedQuery.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(2, this.suggestedQuery);
}
if (this.navSuggestion != null) {
size += CodedOutputByteBufferNano.computeMessageSize(3, this.navSuggestion);
}
if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) {
size += CodedOutputByteBufferNano.computeBytesSize(4, this.serverLogsCookie);
}
if (this.image != null) {
size += CodedOutputByteBufferNano.computeMessageSize(5, this.image);
}
if (this.hasDisplayText || !this.displayText.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(6, this.displayText);
}
if (this.link != null) {
size += CodedOutputByteBufferNano.computeMessageSize(7, this.link);
}
if (this.document != null) {
size += CodedOutputByteBufferNano.computeMessageSize(8, this.document);
}
if (this.searchBackend != 0 || this.hasSearchBackend) {
return size + CodedOutputByteBufferNano.computeInt32Size(9, this.searchBackend);
}
return size;
}
}
/* loaded from: classes.dex */
public static final class SearchSuggestResponse extends MessageNano {
public Suggestion[] suggestion = Suggestion.emptyArray();
public byte[] serverLogsCookie = WireFormatNano.EMPTY_BYTES;
public boolean hasServerLogsCookie = false;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int length;
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 10);
if (this.suggestion == null) {
length = 0;
} else {
length = this.suggestion.length;
}
Suggestion[] suggestionArr = new Suggestion[repeatedFieldArrayLength + length];
if (length != 0) {
System.arraycopy(this.suggestion, 0, suggestionArr, 0, length);
}
while (length < suggestionArr.length - 1) {
suggestionArr[length] = new Suggestion();
x0.readMessage(suggestionArr[length]);
x0.readTag();
length++;
}
suggestionArr[length] = new Suggestion();
x0.readMessage(suggestionArr[length]);
this.suggestion = suggestionArr;
break;
case 18:
this.serverLogsCookie = x0.readBytes();
this.hasServerLogsCookie = true;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public SearchSuggestResponse() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.suggestion != null && this.suggestion.length > 0) {
for (int i = 0; i < this.suggestion.length; i++) {
Suggestion element = this.suggestion[i];
if (element != null) {
output.writeMessage(1, element);
}
}
}
if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) {
output.writeBytes(2, this.serverLogsCookie);
}
super.writeTo(output);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.suggestion != null && this.suggestion.length > 0) {
for (int i = 0; i < this.suggestion.length; i++) {
Suggestion element = this.suggestion[i];
if (element != null) {
size += CodedOutputByteBufferNano.computeMessageSize(1, element);
}
}
}
if (this.hasServerLogsCookie || !Arrays.equals(this.serverLogsCookie, WireFormatNano.EMPTY_BYTES)) {
return size + CodedOutputByteBufferNano.computeBytesSize(2, this.serverLogsCookie);
}
return size;
}
}
/* loaded from: classes.dex */
public static final class NavSuggestion extends MessageNano {
public String docId = "";
public boolean hasDocId = false;
public String description = "";
public boolean hasDescription = false;
public byte[] imageBlob = WireFormatNano.EMPTY_BYTES;
public boolean hasImageBlob = false;
public Common.Image image = null;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
this.docId = x0.readString();
this.hasDocId = true;
break;
case 18:
this.imageBlob = x0.readBytes();
this.hasImageBlob = true;
break;
case 26:
if (this.image == null) {
this.image = new Common.Image();
}
x0.readMessage(this.image);
break;
case 34:
this.description = x0.readString();
this.hasDescription = true;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public NavSuggestion() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.hasDocId || !this.docId.equals("")) {
output.writeString(1, this.docId);
}
if (this.hasImageBlob || !Arrays.equals(this.imageBlob, WireFormatNano.EMPTY_BYTES)) {
output.writeBytes(2, this.imageBlob);
}
if (this.image != null) {
output.writeMessage(3, this.image);
}
if (this.hasDescription || !this.description.equals("")) {
output.writeString(4, this.description);
}
super.writeTo(output);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.hasDocId || !this.docId.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(1, this.docId);
}
if (this.hasImageBlob || !Arrays.equals(this.imageBlob, WireFormatNano.EMPTY_BYTES)) {
size += CodedOutputByteBufferNano.computeBytesSize(2, this.imageBlob);
}
if (this.image != null) {
size += CodedOutputByteBufferNano.computeMessageSize(3, this.image);
}
if (this.hasDescription || !this.description.equals("")) {
return size + CodedOutputByteBufferNano.computeStringSize(4, this.description);
}
return size;
}
}
}

View File

@ -0,0 +1,119 @@
package com.google.android.finsky.protos;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
/* loaded from: classes.dex */
public final class ServerCommands extends MessageNano {
public boolean clearCache = false;
public boolean hasClearCache = false;
public String displayErrorMessage = "";
public boolean hasDisplayErrorMessage = false;
public String logErrorStacktrace = "";
public boolean hasLogErrorStacktrace = false;
public UserSettingDirtyData[] userSettingDirtyData = UserSettingDirtyData.emptyArray();
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
int length;
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 8:
this.clearCache = x0.readBool();
this.hasClearCache = true;
break;
case 18:
this.displayErrorMessage = x0.readString();
this.hasDisplayErrorMessage = true;
break;
case 26:
this.logErrorStacktrace = x0.readString();
this.hasLogErrorStacktrace = true;
break;
case 34:
int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(x0, 34);
if (this.userSettingDirtyData == null) {
length = 0;
} else {
length = this.userSettingDirtyData.length;
}
UserSettingDirtyData[] userSettingDirtyDataArr = new UserSettingDirtyData[repeatedFieldArrayLength + length];
if (length != 0) {
System.arraycopy(this.userSettingDirtyData, 0, userSettingDirtyDataArr, 0, length);
}
while (length < userSettingDirtyDataArr.length - 1) {
userSettingDirtyDataArr[length] = new UserSettingDirtyData();
x0.readMessage(userSettingDirtyDataArr[length]);
x0.readTag();
length++;
}
userSettingDirtyDataArr[length] = new UserSettingDirtyData();
x0.readMessage(userSettingDirtyDataArr[length]);
this.userSettingDirtyData = userSettingDirtyDataArr;
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public ServerCommands() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.hasClearCache || this.clearCache) {
output.writeBool(1, this.clearCache);
}
if (this.hasDisplayErrorMessage || !this.displayErrorMessage.equals("")) {
output.writeString(2, this.displayErrorMessage);
}
if (this.hasLogErrorStacktrace || !this.logErrorStacktrace.equals("")) {
output.writeString(3, this.logErrorStacktrace);
}
if (this.userSettingDirtyData != null && this.userSettingDirtyData.length > 0) {
for (int i = 0; i < this.userSettingDirtyData.length; i++) {
UserSettingDirtyData element = this.userSettingDirtyData[i];
if (element != null) {
output.writeMessage(4, element);
}
}
}
super.writeTo(output);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.hasClearCache || this.clearCache) {
size += CodedOutputByteBufferNano.computeTagSize(1) + 1;
}
if (this.hasDisplayErrorMessage || !this.displayErrorMessage.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(2, this.displayErrorMessage);
}
if (this.hasLogErrorStacktrace || !this.logErrorStacktrace.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(3, this.logErrorStacktrace);
}
if (this.userSettingDirtyData != null && this.userSettingDirtyData.length > 0) {
for (int i = 0; i < this.userSettingDirtyData.length; i++) {
UserSettingDirtyData element = this.userSettingDirtyData[i];
if (element != null) {
size += CodedOutputByteBufferNano.computeMessageSize(4, element);
}
}
}
return size;
}
}

View File

@ -0,0 +1,142 @@
package com.google.android.finsky.protos;
import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.InternalNano;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
/* loaded from: classes.dex */
public final class SplitDeliveryData extends MessageNano {
private static volatile SplitDeliveryData[] _emptyArray;
public String id = "";
public boolean hasId = false;
public long downloadSize = 0;
public boolean hasDownloadSize = false;
public long gzippedDownloadSize = 0;
public boolean hasGzippedDownloadSize = false;
public String signature = "";
public boolean hasSignature = false;
public String downloadUrl = "";
public boolean hasDownloadUrl = false;
public String gzippedDownloadUrl = "";
public boolean hasGzippedDownloadUrl = false;
public AndroidAppPatchData patchData = null;
@Override // com.google.protobuf.nano.MessageNano
public final /* bridge */ /* synthetic */ MessageNano mergeFrom(CodedInputByteBufferNano x0) throws IOException {
while (true) {
int readTag = x0.readTag();
switch (readTag) {
case 0:
break;
case 10:
this.id = x0.readString();
this.hasId = true;
break;
case 16:
this.downloadSize = x0.readRawVarint64();
this.hasDownloadSize = true;
break;
case 24:
this.gzippedDownloadSize = x0.readRawVarint64();
this.hasGzippedDownloadSize = true;
break;
case 34:
this.signature = x0.readString();
this.hasSignature = true;
break;
case 42:
this.downloadUrl = x0.readString();
this.hasDownloadUrl = true;
break;
case 50:
this.gzippedDownloadUrl = x0.readString();
this.hasGzippedDownloadUrl = true;
break;
case 58:
if (this.patchData == null) {
this.patchData = new AndroidAppPatchData();
}
x0.readMessage(this.patchData);
break;
default:
if (WireFormatNano.parseUnknownField(x0, readTag)) {
break;
} else {
break;
}
}
}
return this;
}
public static SplitDeliveryData[] emptyArray() {
if (_emptyArray == null) {
synchronized (InternalNano.LAZY_INIT_LOCK) {
if (_emptyArray == null) {
_emptyArray = new SplitDeliveryData[0];
}
}
}
return _emptyArray;
}
public SplitDeliveryData() {
this.cachedSize = -1;
}
@Override // com.google.protobuf.nano.MessageNano
public final void writeTo(CodedOutputByteBufferNano output) throws IOException {
if (this.hasId || !this.id.equals("")) {
output.writeString(1, this.id);
}
if (this.hasDownloadSize || this.downloadSize != 0) {
output.writeInt64(2, this.downloadSize);
}
if (this.hasGzippedDownloadSize || this.gzippedDownloadSize != 0) {
output.writeInt64(3, this.gzippedDownloadSize);
}
if (this.hasSignature || !this.signature.equals("")) {
output.writeString(4, this.signature);
}
if (this.hasDownloadUrl || !this.downloadUrl.equals("")) {
output.writeString(5, this.downloadUrl);
}
if (this.hasGzippedDownloadUrl || !this.gzippedDownloadUrl.equals("")) {
output.writeString(6, this.gzippedDownloadUrl);
}
if (this.patchData != null) {
output.writeMessage(7, this.patchData);
}
super.writeTo(output);
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.protobuf.nano.MessageNano
public final int computeSerializedSize() {
int size = super.computeSerializedSize();
if (this.hasId || !this.id.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(1, this.id);
}
if (this.hasDownloadSize || this.downloadSize != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(2, this.downloadSize);
}
if (this.hasGzippedDownloadSize || this.gzippedDownloadSize != 0) {
size += CodedOutputByteBufferNano.computeInt64Size(3, this.gzippedDownloadSize);
}
if (this.hasSignature || !this.signature.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(4, this.signature);
}
if (this.hasDownloadUrl || !this.downloadUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(5, this.downloadUrl);
}
if (this.hasGzippedDownloadUrl || !this.gzippedDownloadUrl.equals("")) {
size += CodedOutputByteBufferNano.computeStringSize(6, this.gzippedDownloadUrl);
}
if (this.patchData != null) {
return size + CodedOutputByteBufferNano.computeMessageSize(7, this.patchData);
}
return size;
}
}

145
docs/readme.md Normal file
View File

@ -0,0 +1,145 @@
# Docs
## Geo-blocking
Some apps are specific to region. For example, `air.ITVMobilePlayer` is specifc
to GB. If you try it from US, details will work, but delivery will fail:
~~~
> googleplay -a air.ITVMobilePlayer
Title: ITV Hub: Your TV Player - Watch Live & On Demand
UploadDate: Dec 9, 2021
VersionString: 9.19.0
VersionCode: 901900000
NumDownloads: 17.429 M
Size: 35.625 MB
Offer: 0.00 USD
> googleplay -a air.ITVMobilePlayer -v 901900000
panic: Geo-blocking
~~~
It seems headers are ignored as well:
~~~
Accept-Language: es
Accept-Language: es-AR
Accept-Language: es-ES
~~~
You can change the country [1], and then you get expected result:
~~~
> googleplay -a air.ITVMobilePlayer
Title: ITV Hub: Your TV Player - Watch Live & On Demand
UploadDate: Dec 9, 2021
VersionString: 9.19.0
VersionCode: 901900000
NumDownloads: 17.429 M
Size: 35.625 MB
Offer: 0.00 GBP
> googleplay -a air.ITVMobilePlayer -v 901900000
GET https://play.googleapis.com/download/by-token/download?token=AOTCm0TiBZQdp...
~~~
1. https://support.google.com/googleplay/answer/7431675
## How to determine required features?
Use a command like this:
~~~
aapt dump badging file.apk
~~~
or check the `cmd/badging` folder.
## How to get device info?
1. https://play.google.com/store/apps/details?id=ru.andr7e.deviceinfohw
2. https://play.google.com/store/apps/details?id=flar2.devcheck
## How to get Protocol Buffer fields?
Check Google Play Store (`com.android.vending`) with JADX, with the last
working version (2016):
~~~
versionCode='80441400' versionName='6.1.14'
~~~
- https://apkmirror.com/apk/google-inc/google-play-store
- https://github.com/MCMrARM/Google-Play-API/blob/master/proto/gsf.proto
## How to install Android App Bundle?
Bash:
~~~
adb install-multiple *.apk
~~~
PowerShell:
~~~
adb install-multiple (Get-ChildItem *.apk)
~~~
https://developer.android.com/guide/app-bundle/app-bundle-format
## How to install expansion file?
~~~
adb shell mkdir -p /sdcard/Android/obb/com.PirateBayGames.ZombieDefense2
adb push main.41.com.PirateBayGames.ZombieDefense2.obb `
/sdcard/Android/obb/com.PirateBayGames.ZombieDefense2/
~~~
https://developer.android.com/google/play/expansion-files
## INSTALL\_FAILED\_NO\_MATCHING\_ABIS
This can happen when trying to install ARM app on `x86`. If the APK is
`armeabi-v7a`, then Android 9 (API 28) will work. Also the emulator should be
`x86`. If the APK is `arm64-v8a`, then Android 11 (API 30) will work. Also the
emulator should be `x86_64`.
- https://android.stackexchange.com/questions/222094/install-failed
- https://stackoverflow.com/questions/36414219/install-failed-no-matching-abis
However note that this will still fail in some cases:
https://issuetracker.google.com/issues/253778985
## System Image
API Level | Target
----------|-----------------
33 | Android Tiramisu
32 | Android 12L
31 | Android 12
30 | Android 11
29 | Android 10
28 | Android 9
27 | Android 8.1
26 | Android 8
25 | Android 7.1
24 | Android 7
23 | Android 6
22 | Android 5.1
## Version history
If you know the `versionCode`, you can get older APK [1]. Here is one from 2014:
~~~
googleplay -a com.google.android.youtube -v 5110
~~~
but I dont know how to get the old version codes, other than looking at
websites [2] that host the APKs.
1. https://android.stackexchange.com/questions/163181/how-to-download-old-app
2. https://apkmirror.com/uploads?appcategory=youtube

91
get_items.go Normal file
View File

@ -0,0 +1,91 @@
package googleplay
import (
"2a.pages.dev/rosso/protobuf"
"bytes"
"encoding/base64"
"net/http"
"os"
)
func (h Header) Get_Items(app string) (*Response, error) {
body := protobuf.Message{
2: protobuf.Message{
1: protobuf.Message{
1: protobuf.Message{
1: protobuf.String(app),
},
},
},
}.Marshal()
req, err := http.NewRequest(
"POST", "https://play-fe.googleapis.com/fdfe/getItems",
bytes.NewReader(body),
)
if err != nil {
return nil, err
}
h.Set_Device(req.Header)
field := protobuf.Message{
// valid range 0xC0 - 0xFFFFFFFF
3: protobuf.Bytes{0xFF, 0xFF, 0xFF, 0xFF},
// valid range 0xC0 - 0xFFFFFFFF
4: protobuf.Bytes{0xFF, 0xFF, 0xFF, 0xFF},
}.Marshal()
mask := base64.StdEncoding.EncodeToString(field)
req.Header.Set("X-Dfe-Item-Field-Mask", mask)
res, err := Client.Do(req)
if err != nil {
return nil, err
}
return &Response{res}, nil
}
type Items struct {
protobuf.Message
}
func Open_Items(name string) (*Items, error) {
data, err := os.ReadFile(name)
if err != nil {
return nil, err
}
message, err := protobuf.Unmarshal(data)
if err != nil {
return nil, err
}
message = message.Get(11).Get(2)
return &Items{message}, nil
}
func (i Items) Num_Downloads() (uint64, error) {
return i.Get(3).Get(8).Get_Varint(3)
}
func (i Items) Version_Code() (uint64, error) {
return i.Get(3).Get(2).Get_Varint(1)
}
func (i Items) Version() (string, error) {
return i.Get(3).Get(2).Get_String(2)
}
func (i Items) Upload_Date() (string, error) {
return i.Get(3).Get(9).Get_String(2)
}
func (i Items) Title() (string, error) {
return i.Get(2).Get(1).Get_String(1)
}
func (i Items) Category() (string, error) {
return i.Get(2).Get(30).Get_String(1)
}
func (i Items) Creator() (string, error) {
return i.Get(3).Get(14).Get_String(1)
}
func (i Items) Offer() (string, error) {
return i.Get(2).Get(10).Get(1).Get(1).Get(2).Get(1).Get_String(2)
}

69
get_items_test.go Normal file
View File

@ -0,0 +1,69 @@
package googleplay
import (
"os"
"testing"
)
func Test_Get_Items(t *testing.T) {
home, err := os.UserHomeDir()
if err != nil {
t.Fatal(err)
}
var head Header
if err := head.Open_Device(home + "/googleplay/x86.bin"); err != nil {
t.Fatal(err)
}
res, err := head.Get_Items("com.watchfacestudio.md307digital")
if err != nil {
t.Fatal(err)
}
defer res.Body.Close()
if err := res.Create("ignore.txt"); err != nil {
t.Fatal(err)
}
item, err := Open_Items("ignore.txt")
if err != nil {
t.Fatal(err)
}
if v, err := item.Category(); err != nil {
t.Fatal(err)
} else if v != "Personalization" {
t.Fatal(v)
}
if v, err := item.Creator(); err != nil {
t.Fatal(err)
} else if v != "Matteo Dini MD ®" {
t.Fatal(v)
}
if v, err := item.Offer(); err != nil {
t.Fatal(err)
} else if v != "$0.99" {
t.Fatal(v)
}
if v, err := item.Title(); err != nil {
t.Fatal(err)
} else if v != "MD307 Digital watch face" {
t.Fatal(v)
}
if v, err := item.Upload_Date(); err != nil {
t.Fatal(err)
} else if v != "Nov 3, 2022" {
t.Fatal(v)
}
if v, err := item.Version(); err != nil {
t.Fatal(err)
} else if v != "3.0.0" {
t.Fatal(v)
}
if v, err := item.Version_Code(); err != nil {
t.Fatal(err)
} else if v != 7 {
t.Fatal(v)
}
if v, err := item.Num_Downloads(); err != nil {
t.Fatal(err)
} else if v < 5023 {
t.Fatal(v)
}
}

14
go.mod Normal file
View File

@ -0,0 +1,14 @@
module 2a.pages.dev/googleplay
go 1.19
require 2a.pages.dev/rosso v1.0.4
require (
github.com/andybalholm/brotli v1.0.4 // indirect
github.com/klauspost/compress v1.15.15 // indirect
github.com/refraction-networking/utls v1.2.0 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/sys v0.4.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)

18
go.sum Normal file
View File

@ -0,0 +1,18 @@
2a.pages.dev/rosso v1.0.4 h1:uoC+r9bXq+HaN0azso5dS2oc0MvsZ00lbeXH4dObD20=
2a.pages.dev/rosso v1.0.4/go.mod h1:twDYItUP96cqhHbqoNNoIQHW+h4qIyU6eTCANscMsLw=
github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY=
github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw=
github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4=
github.com/refraction-networking/utls v1.2.0 h1:U5f8wkij2NVinfLuJdFP3gCMwIHs+EzvhxmYdXgiapo=
github.com/refraction-networking/utls v1.2.0/go.mod h1:NPq+cVqzH7D1BeOkmOcb5O/8iVewAsiVt2x1/eO0hgQ=
golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=

131
license.md Normal file
View File

@ -0,0 +1,131 @@
# PolyForm Noncommercial License 1.0.0
<https://polyformproject.org/licenses/noncommercial/1.0.0>
## Acceptance
In order to get any license under these terms, you must agree
to them as both strict obligations and conditions to all
your licenses.
## Copyright License
The licensor grants you a copyright license for the
software to do everything you might do with the software
that would otherwise infringe the licensor's copyright
in it for any permitted purpose. However, you may
only distribute the software according to [Distribution
License](#distribution-license) and make changes or new works
based on the software according to [Changes and New Works
License](#changes-and-new-works-license).
## Distribution License
The licensor grants you an additional copyright license
to distribute copies of the software. Your license
to distribute covers distributing the software with
changes and new works permitted by [Changes and New Works
License](#changes-and-new-works-license).
## Notices
You must ensure that anyone who gets a copy of any part of
the software from you also gets a copy of these terms or the
URL for them above, as well as copies of any plain-text lines
beginning with `Required Notice:` that the licensor provided
with the software. For example:
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
## Changes and New Works License
The licensor grants you an additional copyright license to
make changes and new works based on the software for any
permitted purpose.
## Patent License
The licensor grants you a patent license for the software that
covers patent claims the licensor can license, or becomes able
to license, that you would infringe by using the software.
## Noncommercial Purposes
Any noncommercial purpose is a permitted purpose.
## Personal Uses
Personal use for research, experiment, and testing for
the benefit of public knowledge, personal study, private
entertainment, hobby projects, amateur pursuits, or religious
observance, without any anticipated commercial application,
is use for a permitted purpose.
## Noncommercial Organizations
Use by any charitable organization, educational institution,
public research organization, public safety or health
organization, environmental protection organization,
or government institution is use for a permitted purpose
regardless of the source of funding or obligations resulting
from the funding.
## Fair Use
You may have "fair use" rights for the software under the
law. These terms do not limit them.
## No Other Rights
These terms do not allow you to sublicense or transfer any of
your licenses to anyone else, or prevent the licensor from
granting licenses to anyone else. These terms do not imply
any other licenses.
## Patent Defense
If you make any written claim that the software infringes or
contributes to infringement of any patent, your patent license
for the software granted under these terms ends immediately. If
your company makes such a claim, your patent license ends
immediately for work on behalf of your company.
## Violations
The first time you are notified in writing that you have
violated any of these terms, or done anything with the software
not covered by your licenses, your licenses can nonetheless
continue if you come into full compliance with these terms,
and take practical steps to correct past violations, within
32 days of receiving notice. Otherwise, all your licenses
end immediately.
## No Liability
***As far as the law allows, the software comes as is, without
any warranty or condition, and the licensor will not be liable
to you for any damages arising out of these terms or the use
or nature of the software, under any kind of legal claim.***
## Definitions
The **licensor** is the individual or entity offering these
terms, and the **software** is the software the licensor makes
available under these terms.
**You** refers to the individual or entity agreeing to these
terms.
**Your company** is any legal entity, sole proprietorship,
or other kind of organization that you work for, plus all
organizations that have control over, are under the control of,
or are under common control with that organization. **Control**
means ownership of substantially all the assets of an entity,
or the power to direct its management and policies by vote,
contract, or otherwise. Control can be direct or indirect.
**Your licenses** are all the licenses granted to you for the
software under these terms.
**Use** means anything you do with the software requiring one
of your licenses.

28
purchase.go Normal file
View File

@ -0,0 +1,28 @@
package googleplay
import (
"net/http"
"net/url"
"strings"
)
// Purchase app. Only needs to be done once per Google account.
func (h Header) Purchase(app string) error {
body := make(url.Values)
body.Set("doc", app)
req, err := http.NewRequest(
"POST", "https://android.clients.google.com/fdfe/purchase",
strings.NewReader(body.Encode()),
)
if err != nil {
return err
}
h.Set_Auth(req.Header)
h.Set_Device(req.Header)
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
res, err := Client.Do(req)
if err != nil {
return err
}
return res.Body.Close()
}

99
readme.md Normal file
View File

@ -0,0 +1,99 @@
# GooglePlay
> Im not really sure what the point of this video is, but I guess just be
> generous. Be kind to people, because you never know how much they might need
> it, or how far itll go.
>
> [NakeyJakey (2018)](//youtube.com/watch?v=Cr0UYNKmrUs)
Download APK from Google Play or send API requests
## How to install?
This module works with Windows, macOS or Linux. First, [download Go][2] and
extract archive. Then download GooglePlay Zip and extract archive. Then
navigate to:
~~~
googleplay-main/cmd/googleplay
~~~
and enter:
~~~
go build
~~~
[2]://go.dev/dl
## Tool examples
Before trying to Sign in, make sure your location is correct, to avoid
geo-blocking. You can test by logging into your Google account with a web
browser. Also, make sure the Google account you are using has logged into the
Play Store at least once before, using a physical or virtual Android device.
Create a file containing token (`aas_et`) for future requests:
~~~
googleplay -email EMAIL -password PASSWORD
~~~
Create a file containing `X-DFE-Device-ID` (GSF ID) for future requests:
~~~
googleplay -device
~~~
Get app details:
~~~
> googleplay -a com.google.android.youtube
Title: YouTube
Creator: Google LLC
Upload Date: Jan 9, 2023
Version: 18.01.36
Version Code: 1535370688
Num Downloads: 13.27 billion
Installation Size: 47.42 megabyte
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 1535370688
~~~
## Contact
<dl>
<dt>
email
</dt>
<dd>
srpen6@gmail.com
</dd>
<dt>
Discord
</dt>
<dd>
srpen6#6983
</dd>
<dd>
https://discord.com/invite/WWq6rFb8Rf
</dd>
</dl>
## Money
Software is not licensed for commercial use. If you wish to purchase a
commercial license, or for other business questions, contact me.

View File

@ -0,0 +1,178 @@
# Research
Google Play Store:
com.android.vending
Google Play services:
com.google.android.gms
Google Services Framework:
com.google.android.gsf
pull:
~~~
adb pull `
/system/priv-app/GoogleServicesFramework/GoogleServicesFramework.apk `
GoogleServicesFramework.apk
adb pull `
/system/priv-app/PrebuiltGmsCore/PrebuiltGmsCore.apk `
PrebuiltGmsCore.apk
adb pull `
/system/priv-app/Phonesky/Phonesky.apk `
Phonesky.apk
~~~
push:
~~~
adb remount
adb push GoogleServicesFramework.apk /system/priv-app
adb push Phonesky.apk /system/priv-app
adb push PrebuiltGmsCore.apk /system/priv-app
adb reboot
~~~
## API 24
~~~
> adb shell dumpsys package com.google.android.gsf | rg versionName
versionName=7.0
> adb shell dumpsys package com.google.android.gms | rg versionName
versionName=11.7.43 (470-172403884)
> adb shell dumpsys package com.android.vending | rg versionName
versionName=6.7.15.E-all [0] 2987020
> adb shell dumpsys package com.android.vending | rg versionCode
versionCode=80671500 minSdk=14 targetSdk=23
~~~
## API 25
~~~
> adb shell dumpsys package com.google.android.gsf | rg versionName
versionName=7.1.1
> adb shell dumpsys package com.google.android.gms | rg versionName
versionName=10.2.98 (470-146496160)
> adb shell dumpsys package com.android.vending | rg versionName
versionName=6.9.43.G-all [0] 3363388
~~~
## API 26
~~~
> adb shell dumpsys package com.google.android.gsf | rg versionName
versionName=8.0.0
> adb shell dumpsys package com.google.android.gms | rg versionName
versionName=11.7.43 (470-172403884)
> adb shell dumpsys package com.android.vending | rg versionName
versionName=7.9.66.Q-all [0] [PR] 163928463
> adb shell dumpsys package com.android.vending | rg versionCode
versionCode=80796600 minSdk=14 targetSdk=25
~~~
## API 27
~~~
> adb shell dumpsys package com.google.android.gsf | rg versionName
versionName=8.1.0
> adb shell dumpsys package com.google.android.gms | rg versionName
versionName=11.5.80 (470-175107017)
> adb shell dumpsys package com.android.vending | rg versionName
versionName=8.0.62.R-all [0] [PR] 172052298
~~~
## API 28
~~~
> adb shell dumpsys package com.google.android.gsf | rg versionName
versionName=9
> adb shell dumpsys package com.google.android.gms | rg versionName
versionName=16.0.89 (040700-239467275)
> adb shell dumpsys package com.android.vending | rg versionName
versionName=10.1.41-all [0] [PR] 197615634
~~~
## API 29
~~~
> adb shell dumpsys package com.google.android.gsf | rg versionName
versionName=10
> adb shell dumpsys package com.google.android.gms | rg versionName
versionName=17.7.86 (040700-256199907)
> adb shell dumpsys package com.android.vending | rg versionName
versionName=15.2.67-all [0] [PR] 256058878
~~~
## API 30
~~~
> adb shell dumpsys package com.google.android.gsf | rg versionName
versionName=11
> adb shell dumpsys package com.google.android.gms | rg versionName
versionName=20.18.17 (040700-311416286)
> adb shell dumpsys package com.android.vending | rg versionName
versionName=20.4.33-all [0] [PR] 319051143
~~~
## API 31
~~~
> adb shell dumpsys package com.google.android.gsf | rg versionName
versionName=12
> adb shell dumpsys package com.google.android.gms | rg versionName
versionName=21.24.23 (190800-396046673)
> adb shell dumpsys package com.android.vending | rg versionName
versionName=25.9.49-21 [0] [PR] 386309911
~~~
## API 32
~~~
> adb shell dumpsys package com.google.android.gsf | rg versionName
versionName=12
> adb shell dumpsys package com.google.android.gms | rg versionName
versionName=21.24.23 (190800-396046673)
> adb shell dumpsys package com.android.vending | rg versionName
versionName=25.9.50-21 [0] [PR] 400852117
> adb shell dumpsys package com.android.vending | rg versionCode
versionCode=82595010 minSdk=21 targetSdk=30
~~~
For some reason, these will not download:
~~~
8_25_9_50_00
8_25_9_50_10
~~~
but these work fine:
~~~
8_25_9_19_00
8_25_9_19_10
8_25_9_29_00
8_25_9_29_10
~~~
## API 33
~~~
> adb shell dumpsys package com.google.android.gsf | rg versionName
versionName=13
> adb shell dumpsys package com.google.android.gms | rg versionName
versionName=22.18.21 (190800-453244992)
> adb shell dumpsys package com.android.vending | rg versionName
versionName=30.4.17-21 [0] [PR] 445549118
> adb shell dumpsys package com.android.vending | rg versionCode
versionCode=83041710 minSdk=21 targetSdk=31
~~~

View File

@ -0,0 +1,74 @@
# November 16 2022
https://xda-developers.com/download-google-apps-gapps
## BiT GApps
Only ARM is offered:
https://github.com/BiTGApps/BiTGApps/issues/4
## Flame GApps
Only ARM is offered:
https://pling.com/p/1341681
## Lite GApps
all the Lite GApps use this Play Store:
~~~
name='com.android.vending' versionCode='83032110'
versionName='30.3.21-21 [0] [PR] 445437866' platformBuildVersionName='Tiramisu'
~~~
closest match with Android Studio is API 33:
~~~
> adb shell dumpsys package com.android.vending | rg versionName
versionName=30.4.17-21 [0] [PR] 445549118
> adb shell dumpsys package com.android.vending | rg versionCode
versionCode=83041710 minSdk=21 targetSdk=31
~~~
but Lite GApps does not offer API 33:
https://github.com/litegapps1/litegapps1.github.io/issues/1
## Mind The GApps
Only ARM is offered:
http://downloads.codefi.re/jdcteam/javelinanddart/gapps
## Nik GApps
Only ARM is offered:
https://sourceforge.net/projects/nikgapps/files/Releases
## Open GApps
all the Open GApps use this Play Store:
~~~
name='com.android.vending' versionCode='83032100'
versionName='30.3.21-19 [0] [PR] 445437866' platformBuildVersionName='Tiramisu'
~~~
closest match with Android Studio is API 33:
~~~
> adb shell dumpsys package com.google.android.gsf | rg versionName
versionName=13
> adb shell dumpsys package com.android.vending | rg versionName
versionName=30.4.17-21 [0] [PR] 445549118
> adb shell dumpsys package com.android.vending | rg versionCode
versionCode=83041710 minSdk=21 targetSdk=31
~~~
but Open GApps does not offer Android 13:
https://github.com/opengapps/opengapps/issues/973

View File

View File

View File

View File

@ -0,0 +1,102 @@
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"net/url"
"os"
"time"
)
type version struct {
major int
minor int
patch int
}
func (v version) String() string {
b := []byte{'8'}
b = fmt.Appendf(b, "%02v", v.major)
b = fmt.Append(b, v.minor)
b = fmt.Appendf(b, "%02v", v.patch)
b = append(b, "00"...)
if len(b) > 8 {
panic(b)
}
return string(b)
}
func main() {
var req http.Request
req.Header = make(http.Header)
req.URL = new(url.URL)
req.URL.Host = "play-fe.googleapis.com"
req.URL.Path = "/fdfe/delivery"
val := make(url.Values)
val["doc"] = []string{"com.android.vending"}
req.URL.Scheme = "https"
req.Header["User-Agent"] = []string{"Android-Finsky (sdk=9,versionCode=99999999)"}
req.Header["X-Dfe-Device-Id"] = []string{device}
// done
// v := version{major: 4}
// v := version{major: 5}
// v := version{major: 6}
// v := version{major: 7}
// v := version{major: 8}
// to do
v := version{major: 9}
// v := version{major: 10}
// v := version{major: 11}
// v := version{major: 12}
// v := version{major: 13}
// v := version{major: 14}
// v := version{major: 15}
// v := version{major: 16}
// v := version{major: 17}
// v := version{major: 18}
// v := version{major: 19}
// v := version{major: 20}
// v := version{major: 21}
// v := version{major: 22}
// v := version{major: 23}
// v := version{major: 24}
// v := version{major: 25}
// v := version{major: 26}
// v := version{major: 27}
// v := version{major: 28}
// v := version{major: 29}
// v := version{major: 30}
for v.minor = 0; v.minor <= 9; v.minor++ {
for v.patch = 0; v.patch <= 99; v.patch++ {
val["vc"] = []string{v.String()}
req.URL.RawQuery = val.Encode()
res, err := new(http.Transport).RoundTrip(&req)
if err != nil {
panic(err)
}
body, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
if bytes.Contains(body, []byte("/by-token/")) {
fmt.Println(res.Status, "pass", v.String())
file, err := os.Create(v.String())
if err != nil {
panic(err)
}
if err := file.Close(); err != nil {
panic(err)
}
} else {
fmt.Println(res.Status, "fail", v.String())
}
if err := res.Body.Close(); err != nil {
panic(err)
}
time.Sleep(199 * time.Millisecond)
}
}
}

View File

@ -0,0 +1,24 @@
# November 17 2022
We want to match the Android Studio pull with something. We need to pull direct
from Google Play. Since we cant get version history, we need to brute force it.
Whats the oldest version we care about? This:
~~~
> adb shell dumpsys package com.android.vending | rg versionName
versionName=6.7.15.E-all [0] 2987020
> adb shell dumpsys package com.android.vending | rg versionCode
versionCode=80671500 minSdk=14 targetSdk=23
~~~
whats the newest version we care about? This:
~~~
> adb shell dumpsys package com.android.vending | rg versionName
versionName=30.4.17-21 [0] [PR] 445549118
> adb shell dumpsys package com.android.vending | rg versionCode
versionCode=83041710 minSdk=21 targetSdk=31
~~~
We cannot use `/fdfe/details` for this, as it fails even with `vc`. So we need
to use `/fdfe/delivery`.

View File

@ -0,0 +1,29 @@
# 2022-11-19
## GenyMotion
Create Virtual device using Android version 6.0.0. Install Open GApps. Then
click Restart now. If you have trouble at this point, you might need to End
task:
~~~
C:\Program Files\Genymobile\Genymotion\tools\adb.exe
~~~
Then install system certificate. Then start proxy:
~~~
mitmproxy
~~~
then set proxy:
~~~
adb shell settings put global http_proxy 192.168.56.1:8080
~~~
Note if you restart the device, you need to install system certificate again.
Make sure you do the above quickly, as the `/checkin` request happens upon
boot, before Play Store app is even launched.
https://support.genymotion.com/hc/articles/360002778137-How-to-connect

View File

@ -0,0 +1,273 @@
package main
import (
"2a.pages.dev/rosso/http"
"2a.pages.dev/rosso/protobuf"
"bytes"
"encoding/base64"
"fmt"
"io"
"net/url"
"strconv"
"time"
)
var checkin_body = protobuf.Message{
4: protobuf.Message{ // checkin
1: protobuf.Message{ // build
10: protobuf.Varint(28),
},
18: protobuf.Varint(1), // voiceCapable
},
14: protobuf.Varint(3),
18: protobuf.Message{ // deviceConfiguration
1: protobuf.Varint(0),
2: protobuf.Varint(0),
3: protobuf.Varint(0),
4: protobuf.Varint(0),
5: protobuf.Varint(0),
6: protobuf.Varint(0),
7: protobuf.Varint(0),
8: protobuf.Varint(0xF_FFFF),
9: protobuf.Slice[protobuf.String]{
"android.test.runner",
"global-miui11-empty.jar",
"org.apache.http.legacy",
},
11: protobuf.String("x86"),
15: protobuf.Slice[protobuf.String]{
"GL_OES_compressed_ETC1_RGB8_texture",
"GL_KHR_texture_compression_astc_ldr",
},
26: protobuf.Slice[protobuf.Message]{
protobuf.Message{
1: protobuf.String("android.hardware.camera.autofocus"),
},
protobuf.Message{
1: protobuf.String("android.hardware.camera.front"),
},
protobuf.Message{
1: protobuf.String("android.hardware.camera"),
},
protobuf.Message{
1: protobuf.String("android.hardware.location.network"),
},
protobuf.Message{
1: protobuf.String("android.hardware.location.gps"),
},
protobuf.Message{
1: protobuf.String("android.hardware.location"),
},
protobuf.Message{
1: protobuf.String("android.hardware.microphone"),
},
protobuf.Message{
1: protobuf.String("android.hardware.screen.landscape"),
},
protobuf.Message{
1: protobuf.String("android.hardware.screen.portrait"),
},
protobuf.Message{
1: protobuf.String("android.hardware.sensor.accelerometer"),
},
protobuf.Message{
1: protobuf.String("android.hardware.telephony"),
},
protobuf.Message{
1: protobuf.String("android.hardware.touchscreen"),
},
protobuf.Message{
1: protobuf.String("android.hardware.touchscreen.multitouch"),
},
protobuf.Message{
1: protobuf.String("android.hardware.usb.host"),
},
protobuf.Message{
1: protobuf.String("android.hardware.wifi"),
},
protobuf.Message{
1: protobuf.String("android.software.device_admin"),
},
},
},
}
func checkin() (string, error) {
req, err := http.NewRequest(
"POST", "https://android.googleapis.com/checkin",
bytes.NewReader(checkin_body.Marshal()),
)
if err != nil {
return "", err
}
req.Header.Set("Content-Type", "application/x-protobuffer")
res, err := client.Do(req)
if err != nil {
return "", err
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
return "", err
}
message, err := protobuf.Unmarshal(body)
if err != nil {
return "", err
}
id, err := message.Get_Fixed64(7)
if err != nil {
return "", err
}
return strconv.FormatUint(id, 16), nil
}
func sync(device string) error {
req := new(http.Request)
req.Body = io.NopCloser(bytes.NewReader(sync_body.Marshal()))
req.Header = make(http.Header)
req.Method = "POST"
req.URL = new(url.URL)
req.URL.Host = "play-fe.googleapis.com"
req.URL.Path = "/fdfe/sync"
req.URL.Scheme = "https"
req.Header["X-Dfe-Device-Id"] = []string{device}
if _, err := client.Do(req); err != nil {
return err
}
return nil
}
func main() {
device, err := checkin()
if err != nil {
panic(err)
}
if err := sync(device); err != nil {
panic(err)
}
fmt.Println("Sleep", sleep)
time.Sleep(sleep)
req := new(http.Request)
req_body := protobuf.Message{
2: protobuf.Message{
1: protobuf.Message{
1: protobuf.Message{
1: protobuf.String("com.watchfacestudio.md307digital"),
},
},
},
}.Marshal()
req.Body = io.NopCloser(bytes.NewReader(req_body))
req.Header = make(http.Header)
req.Method = "POST"
req.URL = new(url.URL)
req.URL.Host = "play-fe.googleapis.com"
req.URL.Path = "/fdfe/getItems"
req.URL.Scheme = "https"
req.Header["X-Dfe-Device-Id"] = []string{device}
field := protobuf.Message{
4: protobuf.Bytes{0xFF, 0xFF, 0xFF, 0xFF},
}.Marshal()
mask := base64.StdEncoding.EncodeToString(field)
req.Header.Set("X-Dfe-Item-Field-Mask", mask)
fmt.Println(device)
res, err := client.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
res_body, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
if bytes.Contains(res_body, []byte("config.xhdpi")) {
fmt.Println("pass")
} else {
fmt.Println("fail")
}
}
const sleep = 16 * time.Second
var client = http.Default_Client
var sync_body = protobuf.Message{
1: protobuf.Slice[protobuf.Message]{
protobuf.Message{
10: protobuf.Message{
1: protobuf.Slice[protobuf.Message]{
protobuf.Message{
1: protobuf.String("android.hardware.camera.autofocus"),
},
protobuf.Message{
1: protobuf.String("android.hardware.camera.front"),
},
protobuf.Message{
1: protobuf.String("android.hardware.camera"),
},
protobuf.Message{
1: protobuf.String("android.hardware.location.network"),
},
protobuf.Message{
1: protobuf.String("android.hardware.location.gps"),
},
protobuf.Message{
1: protobuf.String("android.hardware.location"),
},
protobuf.Message{
1: protobuf.String("android.hardware.microphone"),
},
protobuf.Message{
1: protobuf.String("android.hardware.screen.landscape"),
},
protobuf.Message{
1: protobuf.String("android.hardware.screen.portrait"),
},
protobuf.Message{
1: protobuf.String("android.hardware.sensor.accelerometer"),
},
protobuf.Message{
1: protobuf.String("android.hardware.telephony"),
},
protobuf.Message{
1: protobuf.String("android.hardware.touchscreen"),
},
protobuf.Message{
1: protobuf.String("android.hardware.touchscreen.multitouch"),
},
protobuf.Message{
1: protobuf.String("android.hardware.usb.host"),
},
protobuf.Message{
1: protobuf.String("android.hardware.wifi"),
},
protobuf.Message{
1: protobuf.String("android.software.device_admin"),
},
},
2: protobuf.Slice[protobuf.String]{
"org.apache.http.legacy",
"android.test.runner",
},
4: protobuf.Slice[protobuf.String]{
"GL_OES_compressed_ETC1_RGB8_texture",
"GL_KHR_texture_compression_astc_ldr",
},
},
},
protobuf.Message{
19: protobuf.Message{
2: protobuf.Varint(83032110),
},
},
protobuf.Message{
20: protobuf.Message{
2: protobuf.Varint(768),
3: protobuf.Varint(1280),
4: protobuf.Varint(2),
5: protobuf.Varint(320),
1: protobuf.Varint(3),
},
},
},
}

View File

@ -0,0 +1,52 @@
package main
import (
"io"
"net/http"
"net/http/httputil"
"net/url"
"os"
)
func main() {
var req http.Request
req.Header = make(http.Header)
req.Header["Accept-Encoding"] = []string{"gzip"}
req.Header["Accept-Language"] = []string{"en-US"}
req.Header["Connection"] = []string{"Keep-Alive"}
req.Header["Content-Length"] = []string{"11026"}
req.Header["Content-Type"] = []string{"application/x-protobuf"}
req.Header["Host"] = []string{"play-fe.googleapis.com"}
req.Header["User-Agent"] = []string{"Android-Finsky/33.2.12-21%20%5B0%5D%20%5BPR%5D%20487986790 (api=3,versionCode=83321210,sdk=24,device=vbox86p,hardware=vbox86,product=vbox86p,platformVersionRelease=7.0,model=Nexus%204,buildId=NBD92Y,isWideScreen=0,supportedAbis=x86)"}
req.Header["X-Dfe-Build-Fingerprint"] = []string{"google/vbox86p/vbox86p:7.0/NBD92Y/433:userdebug/test-keys"}
req.Header["X-Dfe-Client-Id"] = []string{"am-unknown"}
req.Header["X-Dfe-Device-Checkin-Consistency-Token"] = []string{"ABFEt1VnT2UviOAHydPMSmM3NrW_RLHtLIqNrxYrNRPX_5Uhto1QyU3jjlYVOfYBRtjKjh_lJMOST_zB_BmFhykXJwCz7ScpErsPnJ90V6-khkwCS_b58dWE5FGhnqv4CEY4blReAIQi07WOi4hiJRTyg-p2mGsQ1_7jhVOK_5o7HLbalunP81QZZ6FlAWn75pM_VoJ33xSq0mI9GCVJZFhhzkGgtr6klVxVwRYI7A_G8F1OtOywP3DEin0psoPrmoXMv6eAoZ_LUkIyyknDPyDzSZh6QNCOGqUrtjLUv1BJfunZ2oHcQPe0G2zQPLy1pb7RNDsLb9UMs0CSileEk-P1482HCC1_jCJtjJ3yrE4R3y1s7ex66lPJajm5sQ-LgkWQZASHF8DM_vYjlV0odgZYX_UqTGsH870brPBmmBV-Zz1EW1h7cug"}
req.Header["X-Dfe-Device-Id"] = []string{device}
req.Header["X-Dfe-Encoded-Targets"] = []string{"CAEaCoqYgQayBZkJ2Qs"}
req.Header["X-Dfe-Mccmnc"] = []string{"310270"}
req.Header["X-Dfe-Network-Type"] = []string{"4"}
req.Header["X-Dfe-Phenotype"] = []string{"H4sIAAAAAAAAABXQO5KbMAAA0EzKlClzh52BCDBbbIEAIVbmzy5YDcNHxgYbm7VARpMiR8_kHeH9-PvdttxsSVzLvHH_CFe59PNg1WzZK9apZEjn0jKsrKmvwaTynUndjoY170TJiDfc0_1nt81syoF9dlwfgPo6ZRp1yZIcH0_kdylurAdw9Kig0Ivs0d88CUa4XPhLKYo42mGRYa7zWSSEHSsDTzD1AyEvYrjkcwvzEN_YmuwlusPCvDhEgndxq0K6BXz8yAyjAtWuVtFat48OroufD0-76xW1MVLRGGGgbpHckuzUZj0yx9accYV1CLzDmWFdvL39_PN_oEic7ayczGtWHqI4zmEIh94o4YemxE8leOWBRr78ilGVnZ-kxabTr1_FC6Gpi0Zald3tOPx2ACdoi5RXKbX7IW1pqileAKocDfb07hKUqDFfGuuzUDbP6HanSf769g8RwBEYgwEAAA"}
req.Header["X-Dfe-Request-Params"] = []string{"timeoutMs=30000"}
req.Header["X-Dfe-Userlanguages"] = []string{"en_US"}
req.Header["X-Ps-Rh"] = []string{"H4sIAAAAAAAAAONqZuRqYPQwKfZ0hIJ4U99KkwpPo5Isx0q_Kv8qXx9fgxIXxwrfqlBj3xDXStconzzXLEcDX3Nfg2IXR6OSkMAK36xQ98r0nIpk0wqzeHdXo1wLZ_ckU6OwoDyv5DS3cgsPxzInxwzf8HhLc2cfzxBnx3In3SAnM7NwsI22tgCrOwMMhgAAAA"}
req.Method = "POST"
req.URL = new(url.URL)
req.URL.Host = "play-fe.googleapis.com"
req.URL.Path = "/fdfe/autoUpdate"
req.URL.RawPath = ""
val := make(url.Values)
val["nocache_qos"] = []string{"lt"}
req.URL.RawQuery = val.Encode()
req.URL.Scheme = "https"
req.Body = io.NopCloser(req_body)
res, err := new(http.Transport).RoundTrip(&req)
if err != nil {
panic(err)
}
defer res.Body.Close()
res_body, err := httputil.DumpResponse(res, true)
if err != nil {
panic(err)
}
os.Stdout.Write(res_body)
}

View File

@ -0,0 +1,7 @@
# November 21 2022
~~~
fdfe "com.google.android.trichromelibrary"
~~~
https://gitlab.com/AuroraOSS/AuroraStore/-/issues/346

View File

@ -0,0 +1,176 @@
# November 22 2022
## Android 10.0 (Google APIs)
then start the Google APIs device:
~~~
emulator -avd Pixel_3a_XL_API_29 -writable-system
~~~
and push:
~~~
adb root
adb remount
~~~
Result:
~~~
W Disabling verity for /system
E Skipping /system
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
W DM_DEV_STATUS failed for scratch: No such device or address
E [liblp]No device named scratch
[liblp]Partition scratch will resize from 0 bytes to 536870912 bytes
[liblp]Updated logical partition table at slot 0 on device /dev/block/by-name/super
[libfs_mgr]Created logical partition scratch on device /dev/block/dm-3
[libfs_mgr]__mount(source=/dev/block/dm-3,target=/mnt/scratch,type=f2fs)=0: Success
Skip mounting partition: /product
Skip mounting partition: /product_services
Using overlayfs for /vendor
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
Skip mounting partition: /product
Skip mounting partition: /product_services
[libfs_mgr]__mount(source=overlay,target=/vendor,type=overlay,upperdir=/mnt/scratch/overlay/vendor/upper)=0
Skip mounting partition: /product
Skip mounting partition: /product_services
/system/bin/remount exited with status 7
~~~
- https://android.stackexchange.com/questions/232234/why-adb-remount
- https://android.stackexchange.com/questions/52443/the-command-adb-root-works
- https://github.com/topjohnwu/Magisk/issues/2252
- https://issuetracker.google.com/issues/260204230
- https://stackoverflow.com/questions/58010655/is-adb-remount-broken-on-android
- https://stackoverflow.com/questions/60052458/adb-amulator-running-sdk-29
- https://stackoverflow.com/questions/60867956/android-emulator-sdk-10-api-29
- https://stackoverflow.com/questions/65627342/why-does-adb-remount-fail
## Android 11.0 (Google APIs)
then start the Google APIs device:
~~~
emulator -avd Pixel_3a_XL_API_30 -writable-system
~~~
and push:
~~~
adb root
adb remount
adb reboot
~~~
After two minutes, the device has not rebooted. Same result with `x86` or
`x86_64`:
https://issuetracker.google.com/issues/260134707
## Android 12.0 (Google APIs)
Start the Google Play device and pull:
~~~
adb pull /product/priv-app/Phonesky/Phonesky.apk Phonesky-31.apk
~~~
then start the Google APIs device:
~~~
emulator -avd Pixel_3a_XL_API_31 -writable-system
~~~
and push:
~~~
adb root
adb remount
adb reboot
adb root
adb remount
adb push Phonesky-31.apk /product/priv-app
adb reboot
~~~
## Android 12L (Google APIs)
Start the Google Play device and pull:
~~~
adb pull /product/priv-app/Phonesky/Phonesky.apk Phonesky-32.apk
~~~
then start the Google APIs device:
~~~
emulator -avd Pixel_3a_XL_API_32 -writable-system
~~~
and push:
~~~
adb root
adb remount
adb reboot
adb root
adb remount
adb push Phonesky-32.apk /product/priv-app
adb reboot
~~~
## Android Tiramisu (Google APIs)
Start the Google Play device and pull:
~~~
adb pull /product/priv-app/Phonesky/Phonesky.apk Phonesky-33.apk
~~~
then start the Google APIs device:
~~~
emulator -avd Pixel_3a_XL_API_33 -writable-system
~~~
and push:
~~~
adb root
adb remount
adb reboot
adb root
adb remount
adb push Phonesky-33.apk /product/priv-app
adb reboot
~~~
## Android Tiramisu (Google Play)
we cannot run as root:
~~~
> adb root
adbd cannot run as root in production builds
~~~

View File

@ -0,0 +1,15 @@
# December 9 2022
## use without authentication?
need to finish `get_items.go`
plus look into `/fdfe/delivery`
## youtube OAuth?
just change scope to `googleplay`?
## manual OAuth entry?
as workaround for login issues

3
research/go.mod Normal file
View File

@ -0,0 +1,3 @@
module research
go 1.19