Doesn't work
Crashes on startup with following traceback:
Traceback (most recent call last):
File "get-gdrive-appdata.py", line 372, in <module>
main()
File "get-gdrive-appdata.py", line 278, in main
master_token = get_master_token(args.account, args.password, device_id, target_package)
File "get-gdrive-appdata.py", line 208, in get_master_token
r.raise_for_status()
File "/usr/local/lib/python3.8/dist-packages/requests/models.py", line 960, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://android.clients.google.com/auth
I have submitted correct credentials.
It's been a while, the API might have changed, or that particular endpoint may be deprecated.
I managed to authenticate to my Google Drive account using python PyDrive2 package (https://github.com/iterative/PyDrive2). I used this package to list all folders from my drive but I don't see any hidden folders/files here.
I managed to resolve the main issue that brought me here (I have restored my backup on Android emulator) but still, this package crashes. Maybe it could be fixed.
It seems to be crashing at https://android.clients.google.com/auth endpoint so maybe it's only authentication issue. Maybe it could be fixed.
I have created question in PyDrive2 repository about accessing appdata: https://github.com/iterative/PyDrive2/issues/277
Thanks for the update. I don't really have time to work on this right now, so if you find a way that works, PRs are much appreciated.
IIRC, appdata is special, it's only visible to Android clients, probably because the tokens you get from android.clients have more/different scopes.