3

I'm migrating from a standard Google-enabled smartphone to a Huawei one, that does not have the Google Services installed. Anyway, I was able to successfully download and install WhatsApp from the official website.

Of course it didn't find the Google Drive backup because there is no such a Google account. Looking at the documentation, I copied the files inside WhatsApp/Databases from the old phone to the new one and reinstalled WhatsApp.

But it still says it cannot find a backup, and leave me with a blank chat history! I also tried to copy the content of WhatsApp/Backup too, without success.

Why it does not work? According to the documentation, copying a local database should work!

Of course I'm using the same phone number.

UPDATE

I tried the procedure suggested by the first link posted by alecsx. But it didn't work. Here the output:

Please connect your Android device with USB Debugging enabled:

cannot connect to daemon at tcp:5037: Connection refused
* daemon not running; starting now at tcp:5037
* daemon started successfully

Found legacy WhatsApp 2.11.431 in local folder

WhatsApp 2.20.206.24 installed

Backing up WhatsApp 2.20.206.24
/data/app/com.whatsapp-jYkcwEVhvHkOnFYgxsrM9g==/base.apk: 1 file pulled. 24.8 MB/s (31188619 bytes in 1.202s)
Backup complete

Removing WhatsApp 2.20.206.24 skipping data
Success
Removal complete

Installing legacy WhatsApp 2.11.431
adb: failed to install tmp/LegacyWhatsApp.apk: Failure [INSTALL_PARSE_FAILED_NOT_APK: Failed to parse /data/app/vmdl1329425107.tmp/base.apk]
Install complete

Now unlock your device and confirm the backup operation...

Please enter your backup password (leave blank for none) and press Enter: 

Exception in thread "main" java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Don't know how to process version 5
    at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:420)
    at org.nick.abe.Main.main(Main.java:128)
    ... 5 more
Caused by: java.lang.IllegalArgumentException: Don't know how to process version 5
    at org.nick.abe.AndroidBackup.extractAsTar(AndroidBackup.java:282)
    ... 6 more
tar: tmp/whatsapp.tar: funzione "open" non riuscita: File o directory non esistente
tar: Error is not recoverable: exiting now
tar: tmp/whatsapp.tar: funzione "open" non riuscita: File o directory non esistente
tar: Error is not recoverable: exiting now
tar: tmp/whatsapp.tar: funzione "open" non riuscita: File o directory non esistente
tar: Error is not recoverable: exiting now
tar: tmp/whatsapp.tar: funzione "open" non riuscita: File o directory non esistente
tar: Error is not recoverable: exiting now
tar: tmp/whatsapp.tar: funzione "open" non riuscita: File o directory non esistente
tar: Error is not recoverable: exiting now

Saving whatsapp.cryptkey ...
cp: impossibile eseguire stat di 'tmp/apps/com.whatsapp/f/key': File o directory non esistente
Saving msgstore.db ...
cp: impossibile eseguire stat di 'tmp/apps/com.whatsapp/db/msgstore.db': File o directory non esistente
Saving wa.db ...
cp: impossibile eseguire stat di 'tmp/apps/com.whatsapp/db/wa.db': File o directory non esistente
Saving axolotl.db ...
cp: impossibile eseguire stat di 'tmp/apps/com.whatsapp/db/axolotl.db': File o directory non esistente
Saving chatsettings.db ...
cp: impossibile eseguire stat di 'tmp/apps/com.whatsapp/db/chatsettings.db': File o directory non esistente

Pushing cipher key to: /sdcard/WhatsApp/Databases/.nomedia
adb: error: cannot stat 'tmp/apps/com.whatsapp/f/key': No such file or directory

Restoring WhatsApp 2.20.206.24
adb: failed to install tmp/base.apk: Failure [INSTALL_FAILED_USER_RESTRICTED: Install canceled by user]
Restore complete

Cleaning up temporary files ...
rm: impossibile rimuovere 'tmp/whatsapp.tar': File o directory non esistente
Done

Operation complete

Please press Enter to quit...

Nothing has copied inside the extracted folder and on my device WhatsApp was removed.

I see a lot of error, but it's not clear to me the root cause of the problems.

9
  • forum.xda-developers.com/t/…
    – alecxs
    Dec 7 '20 at 20:00
  • Which official website are you talking about? The official website forwards to goole play's website.. Delete that whatsapp and download this.. apkpure.com/whatsapp-messenger/com.whatsapp
    – Aayush
    Dec 8 '20 at 3:18
  • @Aayush, I was talking about whatsapp.com/android - the official WhatsApp website.I tried your link but it refuses to install (Huawei MatePad T8) saying something like: "the package being installed contains native code, but no compatibility is found with the CPU_ABI of the device. Please install the official version of the app" (the message was in Italian)
    – Mark
    Dec 8 '20 at 9:12
  • @alecxs, I apologize but I don't get the point in your links. The first tool extract the chiper key and database (I guess I have to do this on the old phone) but then how to restore in the new one? Instead I don't understand what they are saying in the second link, and how this might help me to restore the WhatsApp local database.
    – Mark
    Dec 8 '20 at 9:22
0

Initial setup of usb-debugging and adb shell is mandatory on both devices

  • you can install old WhatsApp from adb shell

    adb shell cmd package uninstall -k com.whatsapp
    adb push WhatsApp-2.11.431.apk /data/local/tmp
    adb shell cmd package install -f /data/local/tmp/WhatsApp-2.11.431.apk
    
  • open WhatsApp once (it ill will claim outdated version/date)

  • start adb backup, leave password blank and confirm

     adb backup -f whatsapp.ab -apk com.whatsapp
    
  • restore the whatsapp.ab to other device

     adb restore whatsapp.ab
    
  • update Whatsapp like in first step (devices without Google Play)

    adb shell cmd package uninstall -k com.whatsapp
    adb push WhatsApp.apk /data/local/tmp
    adb shell cmd package install -f /data/local/tmp/WhatsApp.apk
    

Done. Note i haven't tested as i don't use WhatsApp

1
  • sorry did fail on huawei "Error: APK content must be streamed" and with adb install "Failure [INSTALL_FAILED_VERSION_DOWNGRADE]"
    – alecxs
    Dec 26 '20 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.