WhatsApp-Key-DB-Extractor
WhatsApp-Key-DB-Extractor copied to clipboard
Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
I tried to get the script to run with a LegacyWhatsApp.apk from APKMirror. First I forgot to enable Installing via USB so the program failed. After figuring this out, I tried running again, and the only things what appeared to not working was an error Failure [INSTALL_FAILED_VERSION_DOWNGRADE] while installing the LegacyWhatsApp.apk I think it has something to do with the adb install command and after some research I found this: https://stackoverflow.com/questions/13400499/is-there-any-way-to-ignore-install-failed-version-downgrade-on-application-insta/13772620#13772620
It is worth mentioning that the error might be caused by having a dual app for WhatsApp installed, but I'm not quite sure.
Below there is the terminal output
What is the Android version you are working on?
Possibly the script detected a wrong API version.
I also got the same error:
=========================================================================
= This script will extract the WhatsApp Key file and DB on Android 4.0+ =
= You DO NOT need root for this to work but you DO need Java installed. =
= If your WhatsApp version is greater than 2.11.431 (most likely), then =
= a legacy version will be installed temporarily in order to get backup =
= permissions. You will NOT lose ANY data and your current version will =
= be restored at the end of the extraction process so try not to panic. =
= Script by: TripCode (Greets to all who visit: XDA Developers Forums). =
= Thanks to: dragomerlin for ABE and to Abinash Bishoyi for being cool. =
= ### Version: v5.1 (22/02/2022) ### =
=========================================================================
Please connect your Android device with USB Debugging enabled:
* daemon not running; starting now at tcp:5037
* daemon started successfully
Found legacy WhatsApp 2.11.431 in local folder
WhatsApp 2.23.25.83 installed
Backing up WhatsApp 2.23.25.83
/data/app/~~R3Wp_IumaBes56BwnlAlQQ==/com.whatsapp-La0oBEG0XmBIZ_smr6ZUEQ==/base.apk: 1 file pulled, 0 skipped. 36.8 MB/s (52976124 bytes in 1.371s)
Backup complete
Removing WhatsApp 2.23.25.83 skipping data
Success
Removal complete
Installing legacy WhatsApp 2.11.431
Performing Streamed Install
adb: failed to install tmp/LegacyWhatsApp.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE: Downgrade detected: Update version code 450146 is older than current 232583004]
Install complete! Open Whatsapp, allow the permissions request, if any. Then, press Enter to continue.
Iv'e ended up uninstalling it manually from phone which solved the original problem. However I bumped into another error:
➜ WhatsApp-Key-DB-Extractor-master adb install -r -d tmp/LegacyWhatsApp.apk
Performing Streamed Install
adb: failed to install tmp/LegacyWhatsApp.apk: Failure [INSTALL_FAILED_DEPRECATED_SDK_VERSION: App package must target at least SDK version 23, but found 19]
which IIUC implies my android is too advanced to install that apk. Here is my version:
➜ WhatsApp-Key-DB-Extractor-master adb shell getprop ro.build.version.sdk
34
@chezihp The issue Deprecated SDK Version is due to the behavioural changes in SDK 34 (Android 14) Reference : https://developer.android.com/about/versions/14/behavior-changes-all#minimum-target-api-level
To solve this you can try this command : adb install --bypass-low-target-sdk-block tmp/LegacyWhatsApp.apk
@chezihp The issue Deprecated SDK Version is due to the behavioural changes in SDK 34 (Android 14) Reference : https://developer.android.com/about/versions/14/behavior-changes-all#minimum-target-api-level
To solve this you can try this command : adb install --bypass-low-target-sdk-block tmp/LegacyWhatsApp.apk
@chezihp can you explain how you bypassed adb: failed to install tmp/LegacyWhatsApp.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE: Downgrade detected: Update version code 450146 is older than current 232583004] im struggling with it
@chezihp The issue Deprecated SDK Version is due to the behavioural changes in SDK 34 (Android 14) Reference : https://developer.android.com/about/versions/14/behavior-changes-all#minimum-target-api-level To solve this you can try this command : adb install --bypass-low-target-sdk-block tmp/LegacyWhatsApp.apk
@chezihp can you explain how you bypassed adb: failed to install tmp/LegacyWhatsApp.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE: Downgrade detected: Update version code 450146 is older than current 232583004] im struggling with it
I can't remember but in my post from back then I mentioned that I had to uninstall it manually
@chezihp The issue Deprecated SDK Version is due to the behavioural changes in SDK 34 (Android 14) Reference : https://developer.android.com/about/versions/14/behavior-changes-all#minimum-target-api-level To solve this you can try this command : adb install --bypass-low-target-sdk-block tmp/LegacyWhatsApp.apk
@chezihp can you explain how you bypassed adb: failed to install tmp/LegacyWhatsApp.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE: Downgrade detected: Update version code 450146 is older than current 232583004] im struggling with it
I can't remember but in my post from back then I mentioned that I had to uninstall it manually
You uninstalled with using -k flag? Because manually uninstalling actually deletes app data too that is com.whatsapp
Just a reminder, ALWAYS do backup before you execute the scripts.
Hi,
unfortunately this issue seems not solved.
I have been able to backup wa chats two months ago, but now I receive this message:
Installing legacy WhatsApp 2.11.431
Performing Streamed Install
adb: failed to install tmp/LegacyWhatsApp.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
Install complete! Open Whatsapp, allow the permissions request, if any. Then, press Enter to continue.
and also adding the flag '--bypass-low-target-sdk-block' doesn't work because such flag is not recognized:
Exception occurred while executing:
java.lang.IllegalArgumentException: Unknown option --bypass-low-target-sdk-block
at com.android.server.pm.PackageManagerShellCommand.makeInstallParams(PackageManagerShellCommand.java:2245)
at com.android.server.pm.PackageManagerShellCommand.runInstall(PackageManagerShellCommand.java:903)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:158)
at android.os.ShellCommand.exec(ShellCommand.java:103)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21815)
at android.os.Binder.shellCommand(Binder.java:638)
at android.os.Binder.onTransact(Binder.java:536)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2845)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4046)
at android.os.Binder.execTransact(Binder.java:735)
bin\adb.exe : 4398 KB/s (58654423 bytes in 13.022s)
At line:1 char:1
+ bin\adb.exe install --bypass-low-target-sdk-block -r -d tmp\base.apk
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (4398 KB/s (58654423 bytes in 13.022s):String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Any idea of how this could be solved or of any way to workaround this issues or should I give up on a proper whatsapp chats backup/export to html?
Forgot to say, both with Windows and Linux and using Android 9 on moto g(6) play. I tried with Pixel 2XL with Android 11 but this last one connects to a PC once every 100 trials no matter which cable I use.
Hi,
unfortunately this issue seems not solved.
I have been able to backup wa chats two months ago, but now I receive this message:
Installing legacy WhatsApp 2.11.431 Performing Streamed Install adb: failed to install tmp/LegacyWhatsApp.apk: Failure [INSTALL_FAILED_VERSION_DOWNGRADE] Install complete! Open Whatsapp, allow the permissions request, if any. Then, press Enter to continue.
and also adding the flag '--bypass-low-target-sdk-block' doesn't work because such flag is not recognized:
Exception occurred while executing: java.lang.IllegalArgumentException: Unknown option --bypass-low-target-sdk-block at com.android.server.pm.PackageManagerShellCommand.makeInstallParams(PackageManagerShellCommand.java:2245) at com.android.server.pm.PackageManagerShellCommand.runInstall(PackageManagerShellCommand.java:903) at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:158) at android.os.ShellCommand.exec(ShellCommand.java:103) at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:21815) at android.os.Binder.shellCommand(Binder.java:638) at android.os.Binder.onTransact(Binder.java:536) at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2845) at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4046) at android.os.Binder.execTransact(Binder.java:735) bin\adb.exe : 4398 KB/s (58654423 bytes in 13.022s) At line:1 char:1 + bin\adb.exe install --bypass-low-target-sdk-block -r -d tmp\base.apk + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (4398 KB/s (58654423 bytes in 13.022s):String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError
Any idea of how this could be solved or of any way to workaround this issues or should I give up on a proper whatsapp chats backup/export to html?
Hi. Can you show the full logs?
Hello, thank you for replying me and sorry for getting back so late... I have really very very little time.
How to I generate a file log? is there an option for it? but I kept on a file the output on the console, would that suffice?
To try again is hard because I would have to transfer again all whatsup data from my cell (a Pixel2 XL) to the one that is normally able to connect with a cable to my laptop, and that would cost me many hours which are very hard to find.
At the same time, I happened few days ago to be able to connect my cell (the Pixel2 XL) directly to my PC (I couldn't for months even trying with different good quality cables)... and it worked on Windows 10.
In other words it seems like that the legacy apk is today allowed to run on the 'Pixel2 XL', but not on the Motorola 'moto g(6)'
Cheers, M
Any proper solutions to backing up on android 14?
I do have the same issue.
In the meantime, if anyone encounters this issue, I recommend attempting the extraction manually, as it might offer more insight into the problem.