Blog/20180506 Backing up WhatsApp on the commandline for Android 7
From Bjoern Hassler's website
< W:Blog
- Blog:20200228 Migrating from OSX to Ubuntu
- 20190328 TVET community report
- 20180803 If you like apps do not get the Nokia 2
- 20180721 Higher accuracy GPS on mobile phones
- 20180506 Backing up WhatsApp on the commandline for Android 7
- 20180401 Google Docs Helper bookmarklet
- 20180325 Digital Moves
- 20180310 Publishing only PDF and not your sources is like voluntary entropy
- 20180305 Which Mobile
- 20180221 Open textbooks for K12
- 20171220 MacBook power supply fixed with heat shrink
- 20171215 ssh tunnels
- 20171205 Help mapping Zambia and Ghana
- 20170927 Roaming in Europe
- 20170725 Saving mobile data
- 20170518 Hands on Missing Maps
- 20170425 Teachers Upfront University of Johannesburg
- 20170328 Can We Afford Free Textbooks
- 20170302 T-TEL TPD Programme
- 20161229 Cost of mobile internet
- 20161228 Using SSHelper to backup your internal Android phone memory
- 20160806 Upgrading Word to 2016
- 20160616 Evidence for digital learning
- 20150525 Equitable access to education
- 20150520 WEF and Open
- 20150429 Open Content encyclopaedia entry
- 20150405 OER4Schools ZIM files
- 20150331 PiJuice
- 20150206 OER Schools Conference video
- 20150129 TES goes Creative Commons
- 20150126 Where Its Needed Most
- 20150120 K12 OER calls
- 20150116 AIMS video 10 years on
- 20141218 Getting started with Android
- 20141201 Raspberry Pi GPIO labels
- 20141113 measuring below zero temperatures with DS18B20
- 20141105 OS X Lion 10.7 Internet Sharing with Raspberry Pi
- 20141028 OER Guidance for Schools
- 20141027 Google calendar world clock and timezone
- 20141020 Accessible PDFs
- 20141006 Annotation breaks searching in OS X Preview.app
- 20140923 OER Guidance for Schools and Share Alike
- 20140918 Tablets in Malawi and Ivory Coast
- 20140917 Roaming call charges in the EU
- 20140811 New Raspberry Pi model B Plus
- 20140811 Chesteron Community College Tablet Learning Scheme
- 20140805 new overnightrider ticket
- 20140625 Zambia update
- 20140608 Android battery life
- 20140601 Open data - open references ... further results
Some older entries are here.
1 Backing up WhatsApp on the commandline for Android 7
This is a write-up of [1]. This recipe works if:
- You're on Android.
- You know how to use the command line and adb
- You get these scripts https://github.com/EliteAndroidApps
- You have a spare pre Android 7 phone, such as an Android 6 phone, or a phone with a lower version than 6 (temporarily).
Why this recipe is needed:
- From Android 7 onwards, WhatsApp cannot be downgraded. The above script 'WhatsApp-Key-DB-Extractor' relies on this, and so script won't work now (and probably never will) under Android 7+.
- This article [2] also suggests that the adb backup functionality is disabled.
However, here's some good news. The whatsapp message store (msgstore.db.crypt12) is kept on internal SD card: It's put there when WhatsApp backs up (to SD card, and optionally to Google Drive). Therefore, once you have the key, you can then decrypt that file using 'WhatsApp-Crypt12-Decrypter' [3].
2 Step I: Getting the key.
- What device do you have?
- If you have an Android 6 device (or lower), the script from [4] will work. You may still want to follow the steps below, so you don't have to keep downgrading WhatsApp every time.
- If you have an Android 7+ device (with WhatsApp) and an Android 6 device, sync your WhatsApp to Google Drive, and then transfer to the Android 6 device.
- You now have your WhatsApp data on the Android 6 device. Use 'WhatsApp-Key-DB-Extractor' to extract the key (and backup up your messages of course).
- Then transfer your WhatsApp back to the Android 7 device.
3 Step II: Using the key.
Whenever you want to do further backups (on your Android 7 device):
- Back up WhatsApp to internal storage (it's in the WhatsApp settings)
- Get the msgstore.db.crypt12 from internal storage
adb pull -a /storage/emulated/0/WhatsApp/Databases
(The correct adb command may depend on your Android version and phone type.) Then use WhatsApp-Crypt12-Decrypter [5] to decrypt your store.
4 Some notes
- One caveat to this is that I don't know whether the WhatsApp key might change as you upgrade, or change devices in the future. Also, I guess WhatsApp may eventually become unavailable for Android 6, blocking this recipe altogether.
- You may need an older version of adb e.g. if your older Android phone is e.g. Android 4 (such as adb 1.0.31).
- Once you have the database, you'll need to work out how to read your messages. There are some scripts around that can convert to the database to HTML.
2018-05-06 | Leave a comment | Back to blog Share on Twitter Share on Facebook