YuvrajRaghuvanshiS / WhatsApp-Key-Database-Extractor

The most advanced and complete solution for extracting WhatsApp key/DB from package directory (/data/data/com.whatsapp) without root access.
MIT License
447 stars 57 forks source link

Install of Legacy Whatsapp version fails. #44

Closed jinucompute closed 3 years ago

jinucompute commented 3 years ago

Describe the bug When it tries to install the Legacy Whatsapp version. It does not install. It fails. The python script does not give an error but when you check the device there is no whatapp installed. Then I tried to execute the command manually and it fails giving the error Failure [-26: Package com.whatsapp new target SDK 19 doesn't support runtime permissions but the old target SDK 23 does.]

To Reproduce Steps to reproduce the behavior:

  1. adb install -r -d helpers/LegacyWhatsApp.apk

Expected behavior The old version whatsapp should be installed

Screenshots If applicable, add screenshots to help explain your problem.

Terminal output

Performing Streamed Install
adb: failed to install helpers/LegacyWhatsApp1.apk: Failure [-26: Package com.whatsapp new target SDK 19 doesn't support runtime permissions but the old target SDK 23 does.]

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

YuvrajRaghuvanshiS commented 3 years ago
> https://www.b4x.com/android/forum/threads/failed-to-install-app-apk-failure-26.80288/
Uninstall the previously installed app and it will work.

This error happens when you install an app with targetSdkVersion >= 23 and then try to reinstall it with targetSdkVersion < 23.

Try with python wa_kdbe.py --allow-reboot

YuvrajRaghuvanshiS commented 3 years ago

It is most likely happening because of the way original whatsapp is being uninstalled adb uninstall -k com.whatsapp which keeps all the data inside it's dedicated directory. And legacy whatsapp can not be installed over that data.

jinucompute commented 3 years ago

--allow-reboot

I tried with allow-reboot. It reboots the device after uninstall but then again same issue

YuvrajRaghuvanshiS commented 3 years ago

I need some time to look into that.

jinucompute commented 3 years ago

I think i figured out why this error is coming. This is because Samsung S7 Edge (the version i have) came with Whatsapp as part of the System apps. So there is no way to uninstall it. I can only disable it .

YuvrajRaghuvanshiS commented 3 years ago

This could be it. I never tested this tool that way.

jinucompute commented 3 years ago

I tried on another device. Here it installs the legacy Whatsapp but when i start the legacy version it just gives error "Your phone Date is inaccurate". There is no option to move forward. What do i do next ?

YuvrajRaghuvanshiS commented 3 years ago

Ignore this warning. There should be a yellow text saying that..

jinucompute commented 3 years ago

I get a full screen with this error and a button to Adjust time. How do i proceed beyond this screen ? If i click on the button to Adjust Time, it takes me to the device clock settings.

YuvrajRaghuvanshiS commented 3 years ago

You don't need to do anything with whatsapp at this point in time. Press enter key on terminal where it says "press any key after running whatsapp for a while. Ignore incorrect time warning." and it will automatically open a backup activity on your android.

YuvrajRaghuvanshiS commented 3 years ago

You should run whatsapp for a second or two before pressing enter tho. Just do random swipes or something.

jinucompute commented 3 years ago

Thanks this worked.