Skip to content

Instantly share code, notes, and snippets.

@shyd
Last active November 3, 2020 07:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shyd/970506c52667d70ba7798b97dd3bb79e to your computer and use it in GitHub Desktop.
Save shyd/970506c52667d70ba7798b97dd3bb79e to your computer and use it in GitHub Desktop.
Get root access and gapps in AVD emulator to extract WhatsApp Messages

Get root access and gapps in AVD emulator to extract WhatsApp Messages

setup AVD

what worked Nov. 2020

  • Nexus 5X API 23 Android 6.0 x86_64 without Google Play
  • Internal Storage 10G depending on media size

https://medium.com/@banmarkovic/updating-google-play-services-on-emulator-android-4-1-x-api-16-404f696830b8

gain root access

https://github.com/0xFireball/root_avd

Started with /Users/dennis/Library/Android/sdk/emulator/emulator -avd Nexus_5X_API_23_2 -writable-system -selinux permissive -qemu

Gapps in emu

As the opengapps App did not work for me just download the package on the computer from https://opengapps.org/

  • x86_64
  • 6.0
  • stock

then this is how to push them into the emu:

https://gist.github.com/cunneen/1c0d9717f8ce5ea76900ba32fa037047

just ran the commands manually not via script

unzip open_gapps-x86_64-6.0-stock-20201031.zip 'Core/*' -d tmp

cd tmp

rm Core/setup*

lzip -d Core/*.lz

for f in $(ls Core/*.tar); do 
  tar -x --strip-components 2 -f $f
done

#if emu reboots and does not start su
adb shell su --daemon&

adb root
adb remount
adb push etc /system
adb push framework /system
adb push app /system
adb push priv-app /system

prepare WhatApp

Sign in to Play Store, install WhatsApp and walk through setup. Restore Drive Backup as usual.

Acquire WhatsApp data and media

Wait to get everything downloaded. Sync google contacts and presence in WA for later convenience.

adb pull /data/data/com.whatsapp .
adb pull /storage/emulated/0/WhatsApp .

Browse data

https://github.com/andreas-mausch/whatsapp-viewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment