• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Tool] WhatsApp Google Drive Extractor | UPDATED OCTOBER 2016

Search This thread

TripCode

Senior Member
Mar 13, 2014
171
158
** Version 1.1 UPDATED October 2016 **

SUMMARY:
Allows WhatsApp users on Android to extract their backed up WhatsApp data from Google Drive.
UPDATE: This tool was last updated on October 20th 2016.
IMPORTANT: If you wish to extract crypt keys or WhatsApp databases from non-rooted Android devices then you need: WhatsApp Key/DB Extractor instead.

QUESTION:
Why would I even need this?
Us mere mortals have absolutely no access to any application data stored on Google Drive, even though it's our data. :eek:

Google said:
What is the Application Data folder?

The 'Application Data folder' is a special folder that is only accessible by your application. Its content is hidden from the user, and from other apps. Despite being hidden from the user, the Application Data folder is stored on the user's Drive and therefore uses the user's Drive storage quota. The Application Data folder can be used to store configuration files, saved games data, or any other types of files that the user should not directly interact with.

BRANCH UPDATES:
v1.0 - Initial release.
v1.1 - Added Python 3 support.

PREREQUISITES:

  1. O/S: Windows Vista, Windows 7, Windows 8, Windows 10, Mac OS X or Linux
  2. Python 2.x - If not installed: https://www.python.org/downloads/
  3. Android device with WhatsApp installed and the Google Drive backup feature enabled
  4. Google services device id (if you want to reduce the risk of being logged out of Google)
    Search Google Play for "device id" for plenty of apps that can reveal this information
  5. Google account login credentials (username and password)

INSTRUCTIONS:

  1. Extract "WhatsApp-GD-Extractor-master.zip".
  2. Edit the [auth] section in "settings.cfg".
  3. Run python WhatsAppGDExtract.py from your command console.
  4. Read the usage examples that are displayed.
  5. Run any of the examples.

TROUBLESHOOTING:

  1. Check you have the required imports installed (configparser and requests).
    I.E.: pip install configparser requests

DOWNLOAD: WhatsApp-GD-Extractor-master.zip


AUTHOR: TripCode
 
Last edited:

dav_reb

New member
Dec 4, 2008
1
0
I can list all files from all my backups (I have four backups with ID from 0 to 3) but I can download files from "Backup 0" only.
I debugged the script and when I try to download a file from backupID 3 I obtain a 404 error.
Can you help me? Thanks.
 

okunova

New member
Apr 22, 2015
2
0
** Version 1.1 UPDATED October 2016 **

SUMMARY:
Allows WhatsApp users on Android to extract their backed up WhatsApp data from Google Drive.
UPDATE: This tool was last updated on October 20th 2016.
IMPORTANT: If you wish to extract crypt keys or WhatsApp databases from non-rooted Android devices then you need: WhatsApp Key/DB Extractor instead.

QUESTION:
Why would I even need this?
Us mere mortals have absolutely no access to any application data stored on Google Drive, even though it's our data. :eek:



BRANCH UPDATES:
v1.0 - Initial release.
v1.1 - Added Python 3 support.

PREREQUISITES:

  1. O/S: Windows Vista, Windows 7, Windows 8, Windows 10, Mac OS X or Linux
  2. Python 2.x - If not installed: https://www.python.org/downloads/
  3. Android device with WhatsApp installed and the Google Drive backup feature enabled
  4. Google services device id (if you want to reduce the risk of being logged out of Google)
    Search Google Play for "device id" for plenty of apps that can reveal this information
  5. Google account login credentials (username and password)

INSTRUCTIONS:

  1. Extract "WhatsApp-GD-Extractor-master.zip".
  2. Edit the [auth] section in "settings.cfg".
  3. Run python WhatsAppGDExtract.py from your command console.
  4. Read the usage examples that are displayed.
  5. Run any of the examples.

TROUBLESHOOTING:

  1. Check you have the required imports installed (configparser and requests).
    I.E.: pip install configparser requests

DOWNLOAD: WhatsApp-GD-Extractor-master.zip


AUTHOR: TripCode


Hello, you could explain how to run the script on windows I have problems with "pip install configparser requests"
 

codeuser

New member
Jan 27, 2017
1
0
Good Work but i have a problem!
When i want to execute it says only:
Unable to locate google drive file map for: com.whatsapp

What can i do or what i make wrong?
 

john.morton

New member
Feb 7, 2017
2
1
"Unable to locate google drive file map for: com.whatsapp"

I too am receiving the same error message:

"Unable to locate google drive file map for: com.whatsapp".

Could this be related to a lack of API credentials for traversing the hidden AppData folder structure?

I'm running this via Ubuntu 16.10 x64; Linux desktop 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux and have installed the necessary prerequisite packages as detailed above).

Can someone please assist us (I'm more than happy to provide debugging information etc)?

Kind regards,

John

---------- Post added at 03:41 AM ---------- Previous post was at 03:29 AM ----------

I too am receiving the same error message:

"Unable to locate google drive file map for: com.whatsapp".

Could this be related to a lack of API credentials for traversing the hidden AppData folder structure?

I'm running this via Ubuntu 16.10 x64; Linux desktop 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux and have installed the necessary prerequisite packages as detailed above).

Can someone please assist us (I'm more than happy to provide debugging information etc)?

Kind regards,

John

On further inspection of the Python code and having reviewed drive.google.com it appeared that I hadn't actually run an initial backup and there was no data to present. I believe things are now working correctly (at least in terms of the info and list functions - I'll try the remainder shortly).
 
Last edited:

john.morton

New member
Feb 7, 2017
2
1
What a fantastic script! :)

I too am receiving the same error message:

"Unable to locate google drive file map for: com.whatsapp".

Could this be related to a lack of API credentials for traversing the hidden AppData folder structure?

I'm running this via Ubuntu 16.10 x64; Linux desktop 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux and have installed the necessary prerequisite packages as detailed above).

Can someone please assist us (I'm more than happy to provide debugging information etc)?

Kind regards,

John

---------- Post added at 03:41 AM ---------- Previous post was at 03:29 AM ----------



On further inspection of the Python code and having reviewed drive.google.com it appeared that I hadn't actually run an initial backup and there was no data to present. I believe things are now working correctly (at least in terms of the info and list functions - I'll try the remainder shortly).

Just a quick note to confirm the script still works and I've successfully downloaded the database and images/photos.
I'd like to acknowledge the hard work of the developer and convey my gratitude.

PS: any chance you can provide a slightly modified version to dump EVERY single hidden file from Google Drive (as I'm trying to discover potential chat and images that may be obfuscated by Google but potentially still present etc)?
 
  • Like
Reactions: ariaspa

vsur

New member
Oct 10, 2013
1
0
Just a quick note to confirm the script still works and I've successfully downloaded the database and images/photos.
I'd like to acknowledge the hard work of the developer and convey my gratitude.

PS: any chance you can provide a slightly modified version to dump EVERY single hidden file from Google Drive (as I'm trying to discover potential chat and images that may be obfuscated by Google but potentially still present etc)?

May I know what to write after pull to get the key file i am only able to get the crypt file
 

Avelarius

Member
Dec 4, 2011
13
2
Google Pixel 5
May I know what to write after pull to get the key file i am only able to get the crypt file

The keyfile isnt necessary to get all your texts back. simply copy the crypt file in the given folder structure.
as far as i know the keyfile isnt stored online nor offline, online in the data partition or smth like there
XXX\Mi-4c\Internal shared storage\WhatsApp\Databases\msgstore.db.crypt12
And install Whatsapp. Then it should find the data by itself and if you are using the same number it should be decrypted correctly.
But if you changed your number i think there is no way to decrypt now :(
 

python-learner

New member
Mar 4, 2017
2
1
Error= BadAuthentication

I've done everything correctly, but when i try any of the examples it just says "Error= BadAuthentication " even though I am sure of my credentials. please advise.
 
  • Like
Reactions: ariaspa

howzaa

New member
Apr 1, 2016
3
1
Great work freeing out info, bitta help needed...

I can download all 3 of my backups but I can't find them anywhere locally.

python WhatsAppGDExtract.py -pull "Databases/msgstore.db.crypt12" 1
Downloaded: "WhatsApp/Databases/msgstore.db.crypt12".

Anyone know?

Edit - Got it to work with WhatsAppGDExtract.py -pull "Databases/msgstore.db.crypt12" 0 1 2
 
Last edited:
  • Like
Reactions: bb16

obrobrio2000

Senior Member
Jun 13, 2013
107
28
Hi! Thank you for this extractor! For everyone who's getting "Error=BadAuthentication", go to https://security.google.com/settings/security/apppasswords , set up an app password and use that for the settings.cfg file. If the website says that you can't set up app passwords, it means that you don't have 2stepverification enabled for your google account. Search it in your google account settings (it should be under "security" or something... it's in the same place you can edit your password), enable it and then set up the app password. Then, if you want, you can re-disable 2stepverification (and obviously that'll re-disable the possibility to add and use app passwords).
 
  • Like
Reactions: shnks and filip011

python-learner

New member
Mar 4, 2017
2
1
Same problem for me. I tried 2 different google accounts with sure passwords

Open first the folder where the file is at using comand prompt then run the .py file, rather than running it using its full directory. This allows the file with the credentials that you entered to be read, otherwise if you run it directly, your credentials are not considered. Hope this helps as this was what I did wrong
 

Rothtism

New member
Jun 3, 2017
1
0
Help, did everything and tried launching from cmd but it just opens and closes in a split second. No error or anything. Same result when I ran it from the folder.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    ** Version 1.1 UPDATED October 2016 **

    SUMMARY:
    Allows WhatsApp users on Android to extract their backed up WhatsApp data from Google Drive.
    UPDATE: This tool was last updated on October 20th 2016.
    IMPORTANT: If you wish to extract crypt keys or WhatsApp databases from non-rooted Android devices then you need: WhatsApp Key/DB Extractor instead.

    QUESTION:
    Why would I even need this?
    Us mere mortals have absolutely no access to any application data stored on Google Drive, even though it's our data. :eek:

    Google said:
    What is the Application Data folder?

    The 'Application Data folder' is a special folder that is only accessible by your application. Its content is hidden from the user, and from other apps. Despite being hidden from the user, the Application Data folder is stored on the user's Drive and therefore uses the user's Drive storage quota. The Application Data folder can be used to store configuration files, saved games data, or any other types of files that the user should not directly interact with.

    BRANCH UPDATES:
    v1.0 - Initial release.
    v1.1 - Added Python 3 support.

    PREREQUISITES:

    1. O/S: Windows Vista, Windows 7, Windows 8, Windows 10, Mac OS X or Linux
    2. Python 2.x - If not installed: https://www.python.org/downloads/
    3. Android device with WhatsApp installed and the Google Drive backup feature enabled
    4. Google services device id (if you want to reduce the risk of being logged out of Google)
      Search Google Play for "device id" for plenty of apps that can reveal this information
    5. Google account login credentials (username and password)

    INSTRUCTIONS:

    1. Extract "WhatsApp-GD-Extractor-master.zip".
    2. Edit the [auth] section in "settings.cfg".
    3. Run python WhatsAppGDExtract.py from your command console.
    4. Read the usage examples that are displayed.
    5. Run any of the examples.

    TROUBLESHOOTING:

    1. Check you have the required imports installed (configparser and requests).
      I.E.: pip install configparser requests

    DOWNLOAD: WhatsApp-GD-Extractor-master.zip


    AUTHOR: TripCode
    6
    Did a clean up (I'm not a dev so it's not the perfect cleanup), call it v1.1.1 as a fork, Zipped and attached here.
    Use it the same way as the original one from TripCode.
    All credits to TripCode and rckclmbr
    3
    I'm working on this for the past hour and requests objects are being converted to string, and those to jason left and right. No wonder some load functions are not working after some changes in the api. I'll try to fix this today.

    EDIT: got it working again, it now can download from old and new backups formats.
    Changes:
    -downloadUrl is deprecated so it was removed from code.

    I've grown very fond of this project, maybe in the future I will be working on expanding it to refresh tokens and store them in some file so we can resume downloads as long as we do it in the time frame before the token expires.
    Maybe some UI too but later on.

    https://mega.nz/#!sxAVQSRJ!d5Q7-e1MJ6ra_zTGQUmXTxDUagNsKujhJWp-Yb3JCm0
    3
    Hi, I have tested this tool just now and it is working, just follow the instructions in readme file:
    1- Install python 3
    2- Download the tools from github and unzip it: github dot com/B16f00t/whapa
    3- Install required files: in "whapa-master" folder hold shift button and press mouse right click and select "Open PowerShell window here", enter this line and hit enter:
    pip3 install -r ./doc/requirements.txt
    4-Edit only the values of the "./cfg/settings.cfg" :



    gmail = [email protected]
    passw = yourpassword
    devid = Device ID (optional, if specified get more information)
    celnumbr = BackupPhoneNumber (ex. 3466666666666)

    5- Make sure of: Disable 2FA in your Google Account.
    6- In "whapa-master" folder just open the "whapa-gui.bat" file, the GUI program will open and command prompt (cmd) window.
    7- Click on tab "whagodri" and select what you want and the output folder and press the download button, the result will appear on CMD window and the files will be saved to your output folder that you specified.

    Hope this can help you.
    2
    In my opinion doesn't makes sense to use Client ID and Secret. Since they would be external to the current G account would mean it needs appropriate permissions and i don't see whatsapp doing that.

    I also tried to get into the app folder by using .net api and i cannot read the whatsapp backup(it doesnt show any file) but i can write a file in this special folder

    I think you cant view the whatsapp backup because it is from anather app (Client ID)

    Anyway, i modified the script and got it working =D
    I want to note that my knowledge in python is almost zero, so i copied code found on github.
    basically, from my understanding google stopped accepting plain text passwords in the auth URL, but encrypted pass still work.
    so I tryed to find how to encrypt the password and got lucky finding a project that do this.
    https://github.com/rckclmbr/pyportify
    all credits to the author rckclmbr

    Like i said, my python knowledge is almost null so i copyed the entire project to use just one function.
    I Need someone to polish the thing and use only the parts that is needed.

    So, here how to get it to work again :
    - I used python 3 (probably irrelevant).
    - download https://github.com/rckclmbr/pyportify ("Clone or download" button) credits to rckclmbr
    - copy the folder "pyportify" to the same folder "WhatsAppGDExtract.py" from TripCode is.
    - Use my modified WhatsAppGDExtract.py -> https://pastebin.com/TbWuDcGp