install WhatsApp, then boot in TWRP and look from adb shell
example output:
mint@debian ~ $ adb shell
/ # ls -dln /data/data/com.whatsapp
drwx------ 13 10104 10104 4096 Jan 15 04:15 /data/data/com.whatsapp
next, restore the backup (or part of it)
download open-gapps-pico.zip for your platform (ARM) to PC
extract the tar binary (tar-arm for ARM) and push it to phone (in TWRP)
adb push C:\adb\tar-arm /tmp/
open adb shell and make the binary executable (TWRP)
chmod 0750 /tmp/tar-arm
example output:
mint@debian ~/Downloads $ adb push tar-arm /tmp/
387 KB/s (427448 bytes in 1.075s)
mint@debian ~/Downloads $ adb shell
/ # chmod 0750 /tmp/tar-arm
example output:
/ # df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 1010636 44 1010592 0% /dev
tmpfs 1010636 28 1010608 0% /tmp
/dev/block/mmcblk0p19 253920 2380 246300 1% /cache
/dev/block/mmcblk0p20 11608792 9847780 1728244 85% /data
/dev/block/mmcblk0p20 11608792 9847780 1728244 85% /sdcard
/dev/block/mmcblk1p1 31150720 22588512 8562208 73% /external_sd
- find the backup folder with the
ls
and cd
commands
example output for cd
change directory:
/ # cd /external_sd
/external_sd # cd TWRP
/external_sd/TWRP # cd BACKUPS/CUBOT_KING_KONG
example output for ls
list files and folders:
/external_sd/TWRP/BACKUPS/CUBOT_KING_KONG # ls
2019-03-20--03-44-24_CUBOT_KING_KONG_7081C_V16_20180517
2019-04-16--08-03-32_CUBOT_KING_KONG_7081C_V16_20180517
2019-04-21--07-15-28_CUBOT_KING_KONG_7081C_V22_20181228
2019-06-18--20-30-44_CUBOT_KING_KONG_7081C_V16_20180517
2019-06-23--05-37-30_CUBOT_KING_KONG_7081C_V16_20180517
2019-06-26--08-30-17_du_s3ve3g-userdebug_712_NZH54D_engroot20180
enter the latest backup folder (you can also use *
as wildcard)
/external_sd/TWRP/BACKUPS/CUBOT_KING_KONG # cd 2019-06-26*
list ls
the backup file names inside. the interesting is the data.ext4.win* backup
/external_sd/TWRP/BACKUPS/CUBOT_KING_KONG/2019-06-26--08-30-17_du_s3ve3g-userdebug_712_NZH54D_engroot20180 # ls
boot.emmc.win data.ext4.win002 recovery.emmc.win.md5
boot.emmc.win.md5 data.ext4.win002.md5 recovery.log
data.ext4.win000 data.ext4.win003 system.ext4.win
data.ext4.win000.md5 data.ext4.win003.md5 system.ext4.win.md5
data.ext4.win001 data.info system.info
data.ext4.win001.md5 recovery.emmc.win
Before unpacking, find the required file name(s) which contains your whatsapp files. use the tar-arm
binary with parameters -t
(test) and look into each file -f data.ext4.win*
, while the error output is filtered out with 2> /dev/null
and the the file list is filtered for folder name /data/data/com.whatsapp
with the grep
command
/tmp/tar-arm -tf data.ext4.win000 2> /dev/null | grep /data/data/com.whatsapp
example output: (no result for data.ext4.win000
data.ext4.win001
data.ext4.win002
)
/external_sd/TWRP/BACKUPS/CUBOT_KING_KONG/2019-06-26--08-30-17_du_s3ve3g-userdebug_712_NZH54D_engroot20180 # /tmp/tar-arm -tf data.ext4.win000 2> /dev/null | grep /data/data/com.whatsapp
/external_sd/TWRP/BACKUPS/CUBOT_KING_KONG/2019-06-26--08-30-17_du_s3ve3g-userdebug_712_NZH54D_engroot20180 # /tmp/tar-arm -tf data.ext4.win001 2> /dev/null | grep /data/data/com.whatsapp
/external_sd/TWRP/BACKUPS/CUBOT_KING_KONG/2019-06-26--08-30-17_du_s3ve3g-userdebug_712_NZH54D_engroot20180 # /tmp/tar-arm -tf data.ext4.win002 2> /dev/null | grep /data/data/com.whatsapp
/external_sd/TWRP/BACKUPS/CUBOT_KING_KONG/2019-06-26--08-30-17_du_s3ve3g-userdebug_712_NZH54D_engroot20180 # /tmp/tar-arm -tf data.ext4.win003 2> /dev/null | grep /data/data/com.whatsapp
/data/data/com.whatsapp/
/data/data/com.whatsapp/cache/
/data/data/com.whatsapp/code_cache/
/data/data/com.whatsapp/lib
/data/data/com.whatsapp/app_minidumps/
^C
now you can extract the folder /data/data/com.whatsapp
(as last argument) from the file(s) -f data.ext4.win003
with the tar-arm
binary with -x
and additional parameters --selinux
--xattrs
-p
for file attributes, while -P
will keep the leading /
which will restore everything to /data
and -v
make the whole thing more visible for you. handle each data.ext4.win* file for its own:
/tmp/tar-arm --selinux --xattrs -vxpPf data.ext4.win003 /data/data/com.whatsapp
example output:
/external_sd/TWRP/BACKUPS/CUBOT_KING_KONG/2019-06-26--08-30-17_du_s3ve3g-userdebug_712_NZH54D_engroot20180 # /tmp/tar-arm --selinux --xattrs -vxpPf data.ext4.win003 /data/data/com.whatsapp
/data/data/com.whatsapp/
/data/data/com.whatsapp/cache/
/data/data/com.whatsapp/code_cache/
/data/data/com.whatsapp/lib
/data/data/com.whatsapp/app_minidumps/
^C
finally, change the owner and group
/ # chown -Rh 10104.10104 /data/data/com.whatsapp
Tab key
to autocomplete long names of directories and files while in the command line (you can also use*
as wildcard)