Refactored Documentation folder

Signed-off-by: Domenico Iezzi <domenico.iezzi.201@gmail.com>
This commit is contained in:
Domenico Iezzi 2017-10-09 17:28:03 +02:00
parent 085db88afe
commit 3cbc2db3ea
12 changed files with 2236 additions and 77 deletions

8
Documentation/README.md Executable file
View File

@ -0,0 +1,8 @@
# Documentation
This is a collection of API requests and response for most of the paths that google play API offers. In general, each requests usually return the following protobuf objects:
- *payload*: contains the response object (see `googleplay.proto` for all types of responses).
- (optional) *preFetch*: if the payload contains an URL to be fetched in order to get results, these results may be pre-fetched by google serversand included in the original response.
Each requests is discussed in the related subfolder.

View File

@ -45,5 +45,4 @@ Token: <hidden>
### Notes ### Notes
Token in the URLEncoded query is the Master Token, not the Auth Token. TODO
Some info on Master Token [here](https://sbktech.blogspot.it/2014/01/inside-android-play-services-magic.html)

Binary file not shown.

View File

@ -33,4 +33,5 @@ Accept-Encoding: gzip
``` ```
### Notes ### Notes
Protobuf response is `download-delivery-byte`
TODO

Binary file not shown.

View File

@ -1,24 +0,0 @@
HTTP/1.1 302 Moved Temporarily
Pragma: no-cache
Cache-control: no-cache
Location: https://r3---sn-8vq54voxpu-hm2l.gvt1.com/market/GetBinary/GetBinary/b/1/AF3DWBexsd0viV96e5U9-SkM_V5zVNyKWwOXDdZAVxdwsioUBJW2xLdB_RdZlZH0qU4GzKXnWe9dNYn6AI-DE2gmgzm8SUOKS06iYDKgVhGYCSiD1z-przE?cpn=RAp-1tzGEsGuuwzf&ctier=L&mm=31&mn=sn-8vq54voxpu-hm2l&ms=au&mt=1504805610&mv=m&pcm2cms=yes&pl=24&usequic=no&expire=1504978519&ip=93.66.116.79&ipbits=0&sparams=expire,ipbits,ip,q:,mm,mn,ms,mv,pcm2cms,pl,usequic,ctier&signature=87A0C3D5725A91F9F00C0BDA7B327EACA377318C.B661674A7B63464754B1F174E939925FB551025A&key=am3
Content-Type: text/html; charset=UTF-8
Date: Thu, 07 Sep 2017 17:35:19 GMT
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alt-Svc: quic=":443"; ma=2592000; v="39,38,37,35"
Accept-Ranges: none
Vary: Accept-Encoding
Connection: close
<HTML>
<HEAD>
<TITLE>Moved Temporarily</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Moved Temporarily</H1>
The document has moved <A HREF="https://r3---sn-8vq54voxpu-hm2l.gvt1.com/market/GetBinary/GetBinary/b/1/AF3DWBexsd0viV96e5U9-SkM_V5zVNyKWwOXDdZAVxdwsioUBJW2xLdB_RdZlZH0qU4GzKXnWe9dNYn6AI-DE2gmgzm8SUOKS06iYDKgVhGYCSiD1z-przE?cpn=RAp-1tzGEsGuuwzf&amp;ctier=L&amp;mm=31&amp;mn=sn-8vq54voxpu-hm2l&amp;ms=au&amp;mt=1504805610&amp;mv=m&amp;pcm2cms=yes&amp;pl=24&amp;usequic=no&amp;expire=1504978519&amp;ip=93.66.116.79&amp;ipbits=0&amp;sparams=expire,ipbits,ip,q:,mm,mn,ms,mv,pcm2cms,pl,usequic,ctier&amp;signature=87A0C3D5725A91F9F00C0BDA7B327EACA377318C.B661674A7B63464754B1F174E939925FB551025A&amp;key=am3">here</A>.
</BODY>
</HTML>

View File

@ -1,24 +0,0 @@
HTTP/1.1 302 Moved Temporarily
Pragma: no-cache
Cache-control: no-cache
Location: https://r3---sn-8vq54voxpu-hm2l.gvt1.com/market/GetBinary/GetBinary/b/1/AF3DWBexsd0viV96e5U9-SkM_V5zVNyKWwOXDdZAVxdwsioUBJW2xLdB_RdZlZH0qU4GzKXnWe9dNYn6AI-DE2gmgzm8SUOKS06iYDKgVhGYCSiD1z-przE?cpn=RAp-1tzGEsGuuwzf&ctier=L&mm=31&mn=sn-8vq54voxpu-hm2l&ms=au&mt=1504805610&mv=m&pcm2cms=yes&pl=24&usequic=no&expire=1504978519&ip=93.66.116.79&ipbits=0&sparams=expire,ipbits,ip,q:,mm,mn,ms,mv,pcm2cms,pl,usequic,ctier&signature=87A0C3D5725A91F9F00C0BDA7B327EACA377318C.B661674A7B63464754B1F174E939925FB551025A&key=am3
Content-Type: text/html; charset=UTF-8
Date: Thu, 07 Sep 2017 17:35:19 GMT
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Alt-Svc: quic=":443"; ma=2592000; v="39,38,37,35"
Accept-Ranges: none
Vary: Accept-Encoding
Connection: close
<HTML>
<HEAD>
<TITLE>Moved Temporarily</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Moved Temporarily</H1>
The document has moved <A HREF="https://r3---sn-8vq54voxpu-hm2l.gvt1.com/market/GetBinary/GetBinary/b/1/AF3DWBexsd0viV96e5U9-SkM_V5zVNyKWwOXDdZAVxdwsioUBJW2xLdB_RdZlZH0qU4GzKXnWe9dNYn6AI-DE2gmgzm8SUOKS06iYDKgVhGYCSiD1z-przE?cpn=RAp-1tzGEsGuuwzf&amp;ctier=L&amp;mm=31&amp;mn=sn-8vq54voxpu-hm2l&amp;ms=au&amp;mt=1504805610&amp;mv=m&amp;pcm2cms=yes&amp;pl=24&amp;usequic=no&amp;expire=1504978519&amp;ip=93.66.116.79&amp;ipbits=0&amp;sparams=expire,ipbits,ip,q:,mm,mn,ms,mv,pcm2cms,pl,usequic,ctier&amp;signature=87A0C3D5725A91F9F00C0BDA7B327EACA377318C.B661674A7B63464754B1F174E939925FB551025A&amp;key=am3">here</A>.
</BODY>
</HTML>

Binary file not shown.

View File

@ -1,31 +1,45 @@
## Search ## Search
### Details ### Details
**URL** **URL**
```
GET https://android.clients.google.com/fdfe/search?c=3&q=termux HTTP/1.1 GET https://android.clients.google.com/fdfe/search?c=3&q=firefox HTTP/1.1
```
**HEADERS** **HEADERS**
```
X-Ad-Id: 70417864-0f86-4451-b5aa-103de27a6af5 Required headers are marked with a '*'
X-DFE-Content-Filters:
X-DFE-Network-Type: 4 [ ] X-Ad-Id: 70417864-0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RBx8eTwUqAgsJCw8HFAYECgoWBFoK0wIWMwY [ ] X-DFE-Content-Filters:
X-DFE-Cookie: <hidden> [ ] X-DFE-Network-Type: 4
User-Agent: Android-Finsky/8.1.72.S-all [6] [PR] 165478484 (api=3,versionCode=80817206,sdk=25,device=A0001,hardware=bacon,product=bacon,platformVersionRelease=7.1.2,model=A0001,buildId=NJH47F,isWideScreen=0,supportedAbis=armeabi-v7a;armeabi) [*] X-DFE-Encoded-Targets: CAESqwGzlYEGDsgF3gTRAkIC2AMCFJIHgAIWjgi1AVhAmQGOA4ICb+kKmAHgAQyGAS9o8gLzAe0BFvsLuAMBAsADjwLDFYUBNS2lCJYStgEBfgegAm2xAgEoAQYo4wvDAtAFqwIB+APWArYDwgHhBf0BjAICU+MGmgGRAZsC0AFMmgPkAuUBKyHOAVIC5QECrwEYAQYBowFLYgGpBYgDhQEBY0o2SqEDggJpYYgDtAMa9gQTAg7OATu1AaABCFoCAwRrN4DTzwKCu7EDAQEDAgQJCAgBAQIIAwEBAgEBAQICAgYBBhQKAQcCAwMEAhABAQHKAQETAwQCDecBfQolAhYFAgEKG3UMMxcBIQoUDwYHIjeEAQ4MFk0JUwV/EREYAQMNfgRfHhQQIwsOcGQEDQ9qowHAAoQBBIQBAgEBfA4ZGDYVARgBCwEoZQICJShzFCehBQYRGg43GBxpjQG0AVnQAR4nCzQmL1vUAWV3CQEK3gF2A30tDAMsZJ4BBIEBdFAfcogBigHMAgUFCc0BBUWgATk4jQIaYDUuzgENcqoBASCLA5IBqAImlwNhrQKEBnbjBfgBXaEBAQ8GAQEChwQEc5YBBlVtAUUB3AUyDnuzAZIBA4YGKxihAQcwASEBBwIgCBIdB6YDOAEaRoQBAfsBQHWnARkiAqMCLBYPvAsDAoABIocBO8kBygG2AQENAyeIAx7bAVKoBIMEqgETKQSLAbIDOhAndFdEOBWjAQGNAfUBGguZAUUMCwgvWwFpGrkBDhEgP3wLuAEhBgIUAb4DFG8TIa4BjgFFBgQCAQECWUKdAmIVBAEUxwESASQLWgoeJQIChAXCAQYjFTISxwFoBSFHEAEBWcsBMU5KkgEW0wGeAQceCDtk6AEGU44CpAHRAZIBC88BegEiTV0HSgQBBLgBDSYIMB0VCwIBed8BLW4DATaWAT0odAwCXztnERRVDSoDCkM/IwfKAgIHXQwCP1Y2bgQM+QICBgcUBREEWCZMAwwUGCRVKlNjHAMGGET/AQwBCwUHBJMBAn8RBx8eTwUqAgsJCw8HFAYECgoWBFoK0wIWMwY
X-DFE-Client-Id: am-android-oneplus [ ] X-DFE-Cookie: <hidden>
X-Limit-Ad-Tracking-Enabled: false [*] User-Agent: Android-Finsky/8.1.72.S-all [6] [PR] 165478484 (api=3,versionCode=80817206,sdk=25,device=A0001,hardware=bacon,product=bacon,platformVersionRelease=7.1.2,model=A0001,buildId=NJH47F,isWideScreen=0,supportedAbis=armeabi-v7a;armeabi)
X-DFE-MCCMNC: 22201 [ ] X-DFE-Client-Id: am-android-oneplus
X-DFE-Device-Id: <hidden> [ ] X-Limit-Ad-Tracking-Enabled: false
X-DFE-Request-Params: timeoutMs=4000 [ ] X-DFE-MCCMNC: 22201
Accept-Language: en-US [*] X-DFE-Device-Id: <hidden>
Authorization: GoogleLogin auth=<hidden> [ ] X-DFE-Request-Params: timeoutMs=4000
Host: android.clients.google.com [*] Accept-Language: en-US
Connection: Keep-Alive [*] Authorization: GoogleLogin auth=<hidden>
Accept-Encoding: gzip [*] Host: android.clients.google.com
``` [ ] Connection: Keep-Alive
[ ] Accept-Encoding: gzip
### Notes ### Notes
Need to investigate `X-DFE-Cookie`. Search results can be divided into two categories:
Protobuf response is `search-response-bytes`
1. Search query is *specific*.
2. Search query is *general*.
In the **(1)** case, the result will contain 4 DocV1 objects
- **doc[0]** contains only one element, which is the specific app (e.g. firefox).
- **doc[1]** corresponds to the `You Might Also Like` section, and contains other less related apps.
- **doc[2]** corresponds to the `Similar Apps` section of the play store, with nearly 20 apps.
- **doc[3]** corresponds to the `More Result` section, with nearly 20 apps related to the search query.
You can verify this behaviour by yourself reading the `search-response-specific.txt`, where the query was `firefox`.
In the **(2)** case, the results contains only 1 DocV1 objects, with at most 21-22 apps. There is also a *containerMetadata* object with the URL for the next page of results.

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,6 @@ a Google Service Framework ID (which, from now on, will be the android ID of a d
For the next logins you **should** save the gsfId and the authSubToken, and provide them as parameters to the login function. If you login again with email and password only, this is the equivalent of re-initalizing your android device with a google account. For the next logins you **should** save the gsfId and the authSubToken, and provide them as parameters to the login function. If you login again with email and password only, this is the equivalent of re-initalizing your android device with a google account.
# API reversing # Documentation
Since I started playing with a more recent version of the GooglePlay API on LineageOS 14.1 (Android 7.1) using [mitmproxy](https://mitmproxy.org/), I gathered some information about new APIs. For some documentation about the google play API check out the relative folder.
Checkout the Documentation folder for more details on single API endpoints.