Allows WhatsApp users on Android to extract their backed up WhatsApp data from Google Drive.
- Python 3
- Android device with WhatsApp installed and the Google Drive backup feature enabled.
- The device's Android ID (if you want to reduce the risk of being logged
out of Google). Run
adb shell settings get secure android_idor Search Google Play for "device id" for plenty of apps that can reveal this information. - Google account credentials. Password login (an App password if you use
2-factor authentication: https://myaccount.google.com/apppasswords) often
fails with
BadAuthentication, so a master token is recommended instead.
- Extract
WhatsApp-GD-Extractor-master.zip. - Install dependencies: Run
python3 -m pip install -r requirements.txtfrom your command console. Make sure gpsoauth is the latest version. - Copy
settings.cfg.exampletosettings.cfgand edit the[auth]section. - Authenticate with a master token (recommended, see below), or leave
master_tokenempty to log in with the password. - Run
python3 WhatsAppGDExtract.pyfrom your command console. - Read the usage examples that are displayed.
- Run any of the examples.
- Open https://accounts.google.com/EmbeddedSetup in a browser and sign in.
- Click "I agree", then copy the value of the
oauth_tokencookie (it starts withoauth2_4/) from your browser's developer tools. - Run
python3 get_master_token.pyand paste the cookie at the hidden prompt. Alternatively, set it in theOAUTH_TOKENenvironment variable. - Put the printed
aas_et/...value aftermaster_token =insettings.cfg.
The cookie is short-lived and single use. Treat the master token like a
password: it grants broad access to your Google account, and settings.cfg
is git-ignored so that it is not committed.
If downloading is interrupted, the files that were received successfully
won't be re-downloaded when running the tool one more time. After
downloading, you may verify the integrity of the downloaded files using
md5sum --check md5sum.txt on Linux or md5summer on Windows.
- Check that you have the required imports installed:
python3 -m pip install gpsoauth BadAuthenticationwhen using a password: use a master token instead.- If you have
Error:Need Browser, go to this url to solve the issue: https://accounts.google.com/b/0/DisplayUnlockCaptcha
Author: TripCode
Contributors: DrDeath1122 from XDA for the multi-threading backbone part, YuriCosta for reverse engineering the new restore system