[Tool] WhatsApp ADB Patch

Search This thread

TripCode

Senior Member
Mar 13, 2014
171
162
UPDATE:
This app is now obsolete as there is now a workaround to re-enable ADB using WhatsApp Key/DB Extractor.

SUMMARY:

The purpose of this script is to patch new versions of WhatsApp so the ADB backup method will continue to function.
This will allow apps such as Helium or Crypt Key File Extractors to continue backing up WhatsApp data over the ADB.

PREREQUISITES:

  1. O/S: Windows Vista, Windows 7 or Windows 8/8.1
  2. Java - If not installed: Download Java
  3. Old WhatsApp MUST be removed from your device

INSTRUCTIONS:

  1. Extract WhatsAppADBPatch.zip maintaining the directory structure.
  2. Download latest WhatsApp.apk from: https://www.whatsapp.com/android/
  3. Copy WhatsApp.apk into the same directory as ADBPatch.bat.
  4. Drag WhatsApp.apk onto ADBPatch.bat.
  5. Install the created WhatsApp_Patched.apk on your android device.

AUTHOR: TripCode
THANKS: Brut.all / iBotPeaches (Apktool) and Lionello Lunesu for FART (Find And Replace Text)
 

Attachments

  • WhatsAppADBPatch.zip
    5.5 MB · Views: 18,253
Last edited:

m.a.r.k.i.94

Member
Nov 22, 2014
9
0
i get this error :(

this error keeps coming :(
 

Attachments

  • Untitlewd.png
    Untitlewd.png
    102.4 KB · Views: 3,189
Last edited:

m.a.r.k.i.94

Member
Nov 22, 2014
9
0
I think you are running WhatsApp Key/DB Extractor and not WhatsApp ADB Patch?

In any case your issue is because the latest version of WhatsApp blocks adb which is why this thread exists.

sir
1.i downloaded latest whatsapp from website
2.patched the apk with the ADB patch
3.removed the existing one i had in my phone and installed the patched apk
4.then i went on to extract the key file using WhatsApp Key/DB extractor. i get the error then :(
 

TripCode

Senior Member
Mar 13, 2014
171
162
sir
1.i downloaded latest whatsapp from website
2.patched the apk with the ADB patch
3.removed the existing one i had in my phone and installed the patched apk
4.then i went on to extract the key file using WhatsApp Key/DB extractor. i get the error then :(
Double check that you have installed the patched apk. If still no joy try using WhatsApp-Key-DB-Extractor which some people have more success with.

Also, remember to take a manual backup of your whatsapp database after you install whatsapp (this process creates the crypt key). Another thing you could try is simply install an older official version of whatsapp that do not block adb and run the key extractor on the older version. Once you have the key you can then upgrade to the new version. Your key will stay the same.
 
  • Like
Reactions: m.a.r.k.i.94

srikanthmalli

New member
Jan 2, 2015
3
0
I am getting error when tried to install whatsapp after the patch.
It seems like client has been updated please install the version from playstore. Whatsapp not letting me to activate.

Thanks,
-Sri
 

Hunkit

New member
Jan 21, 2015
1
1
When trying to patch the newest Whatsapp-Version (2.11.491), I got the following errors. 2.11.481 worked.

Code:
C:\Users\xxx\WhatsAppKeyExtract>ADBPatch.bat WhatsApp.apk

I: Decompiling APK
I: Using Apktool 2.0.0-ec3fbf-SNAPSHOT on WhatsApp.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\xxx\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
testCleaning up unclosed ZipFile for archive C:\Users\xxx\apktool\framework\1.apk
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
I: Patching AndroidManifest.xml
I: Recompiling APK
I: Using Apktool 2.0.0-ec3fbf-SNAPSHOT on WhatsApp
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\activity_corrupt_installation.xml:7: error: No resource identifier found for attribute 'fontFamily' in package 'android'
C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\activity_corrupt_installation.xml:12: error: No resource identifier found for attribute 'fontFamily' in package 'android'
C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\activity_incorrect_app_release_version.xml:8: error: No resource identifier found for attribute 'fontFamily' in package 'android'
C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\activity_insufficient_storage_space.xml:8: error: No resource identifier found for attribute 'fontFamily' in package 'android'
C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\activity_spam_warning.xml:5: error: No resource identifier found for attribute 'fontFamily' in package 'android'
C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\activity_spam_warning.xml:8: error: No resource identifier found for attribute 'fontFamily' in package 'android'
C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\backup_restore.xml:22: error: No resource identifier found for attribute 'fontFamily' in package 'android'
C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\backup_restore.xml:23: error: No resource identifier found for attribute 'fontFamily' in package 'android'
C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\qr_code.xml:5: error: No resource identifier found for attribute 'fontFamily' in package 'android'
C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\qr_code.xml:11: error: No resource identifier found for attribute 'fontFamily' in package 'android'

C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\voip_activity.xml:4: error: No resource identifier found for attribute 'fontFamily' in package 'android'
C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\voip_activity.xml:40: error: No resource identifier found for attribute 'fontFamily' in package 'android'
C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\xml\widget_info.xml:2: error: No resource identifier found for attribute 'initialKeyguardLayout' in package 'android'
C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\xml\widget_info.xml:2: error: No resource identifier found for attribute 'widgetCategory' in package 'android'
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\xxx\AppData\Local\Temp\brut_util_Jar_665076819065385106.tmp, p, --forced-package-id,127, --min-sdk-version, 7, --target-sdk-version, 21, --version-code, 450227, --version-name, 2.11.491, -F, C:\Users\xxx\AppData\Local\Temp\APKTOOL3245343448066818719.tmp, -0, arsc, -I, C:\Users\xxx\apktool\framework\1.apk, -S, C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res, -M,C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\AndroidManifest.xml]
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:437)
        at brut.androlib.Androlib.buildResources(Androlib.java:374)
        at brut.androlib.Androlib.build(Androlib.java:277)
        at brut.androlib.Androlib.build(Androlib.java:250)
        at brut.apktool.Main.cmdBuild(Main.java:225)
        at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\xxx\AppData\Local\Temp\brut_util_Jar_665076819065385106.tmp, p, --forced-package-id, 127, --min-sdk-version, 7, --target-sdk-version,21, --version-code, 450227, --version-name, 2.11.491, -F, C:\Users\xxx\AppData\Local\Temp\APKTOOL3245343448066818719.tmp, -0, arsc, -I, C:\Users\xxx\apktool\framework\1.apk, -S, C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res, -M, C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:488)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:423)
        ... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\xxx\AppData\Local\Temp\brut_util_Jar_665076819065385106.tmp, p, --forced-package-id, 127, --min-sdk-version, 7, --target-sdk-version, 21, --version-code, 450227, --version-name, 2.11.491, -F, C:\Users\xxx\AppData\Local\Temp\APKTOOL3245343448066818719.tmp, -0, arsc, -I,C:\Users\xxx\apktool\framework\1.apk, -S, C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res, -M, C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:89)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:482)
        ... 6 more
I: Signing APK
java.io.FileNotFoundException: C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\dist\WhatsApp.apk (Das System kann den angegebenen Pfad nicht finden)
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.zip.ZipFile.<init>(Unknown Source)
        at java.util.jar.JarFile.<init>(Unknown Source)
        at java.util.jar.JarFile.<init>(Unknown Source)
        at com.android.signapk.SignApk.main(SignApk.java:320)
WhatsApp\smali\com - Das Verzeichnis ist nicht leer.
I: Done!
 
  • Like
Reactions: pathaniya

pathaniya

Senior Member
May 28, 2010
685
73
Would it be possible for the OP to atleast mention a version number. Just writing latest is vague. Being specific would be very kind.

Sent from my D5503 using XDA Free mobile app
 

pathaniya

Senior Member
May 28, 2010
685
73
Would it be possible for the OP to atleast mention a version number. Just writing latest is vague. Being specific would be very kind.

Sent from my D5503 using XDA Free mobile app

Tried on Z1 compact Kitkat 14.4.A.0.157 and whatsapp 2.11.481, also the Version 2.11.514 (latest) patched it didn't work. Mine is not rooted.
Thanks.
 

nozaky

New member
Feb 11, 2015
1
0
Hello everyone. first of all apologize for my English, I speak very little English ^^'. I'm a new user in XDA developers.
I used the patch and it has worked perfectly.

I have also installed and working without error. Thanks for your post ^^
I have android 4.2.1 Jelly bean and I'm root.
 

Attachments

  • imagen.png
    imagen.png
    30.9 KB · Views: 521

iceiceicex

New member
Feb 21, 2015
1
0
Thanks

Hey, I just came across an interesting issue when trying to install the patched apk - when verifying my number whatsapp gave me an error message saying that the version of whatsapp I was trying to install had been modified. Is there a work-around for this?

So annoying, why do they make it so hard for us to read our whatsapp messages on our PCs?!
 

lkl831

New member
Sep 19, 2009
2
0
Same as iceiceicex here.

Moreover, when I installed the older version, should I need to initialize/activate/register it first?
If I don't initialize/activate/register it first, the key extract replied that something like the path not found....
If I try to initialize/activate/register it first, it requires me to update to the latest version first....
As a result, I can't get the key in any ways....
 

insigniared

Member
Jun 30, 2010
47
2
install apk from pc to phone

Hi,
How could I install the patched apk to the phone via pc?
what kind of program should I use?
thank you
 

TripCode

Senior Member
Mar 13, 2014
171
162
When trying to patch the newest Whatsapp-Version (2.11.491), I got the following errors. 2.11.481 worked.

Most likely as needed the latest version of apktool. I have updated the zip file.

Would it be possible for the OP to atleast mention a version number. Just writing latest is vague. Being specific would be very kind.

The patch is a wrapper for apktool so is therefore independent of any WhatsApp version numbers (the version is irrelevant). If it breaks then you will need to replace apktool.jar with the latest version. I have just updated the zip file in the first post.
 
  • Like
Reactions: pathaniya

alexei432

New member
Apr 10, 2015
1
0
OnePlus Nord 2 5G
Patch Whatsapp

Hello guys,

I’m tryin’ to patch the latest Whatsapp version (2.12.30) using WhatsAppADBPatch.zip (which was updated a few hours ago by TripCode).

However an error is displayed during the patching process:
Building resources... :\Users\alex\Downloads\WhatsAppADBPatch\WhatsApp\res\layout-v16\activity_corr tpt_installation.xml:7: error: No resource identifier found for attribute 'fontF mily' in package

I should mention that I have installed the latest Java version and tried this procedure on 2 different PCs (with W7 & W8).
Is there someone who has successfully patched this Whatsapp version?
If the answer is no then I will be very grateful if anyone of you can attach a patched Whatsapp version higher than 2.11.481 (this version will be outdated in a few days).


Thank you in advance!
 

rdxravi

New member
Oct 2, 2015
3
0
Thanks for the useful pos

UPDATE:
This app is now obsolete as there is now a workaround to re-enable ADB using WhatsApp Key/DB Extractor.

SUMMARY:

The purpose of this script is to patch new versions of WhatsApp so the ADB backup method will continue to function.
This will allow apps such as Helium or Crypt Key File Extractors to continue backing up WhatsApp data over the ADB.

PREREQUISITES:

  1. O/S: Windows Vista, Windows 7 or Windows 8/8.1
  2. Java - If not installed: Download Java
  3. Old WhatsApp MUST be removed from your device

INSTRUCTIONS:

  1. Extract WhatsAppADBPatch.zip maintaining the directory structure.
  2. Download latest WhatsApp.apk from: https://www.whatsapp.com/android/
  3. Copy WhatsApp.apk into the same directory as ADBPatch.bat.
  4. Drag WhatsApp.apk onto ADBPatch.bat.
  5. Install the created WhatsApp_Patched.apk on your android device.

AUTHOR: TripCode
THANKS: Brut.all / iBotPeaches (Apktool) and Lionello Lunesu for FART (Find And Replace Text)
thanxx a lot brofor this help
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    UPDATE:
    This app is now obsolete as there is now a workaround to re-enable ADB using WhatsApp Key/DB Extractor.

    SUMMARY:

    The purpose of this script is to patch new versions of WhatsApp so the ADB backup method will continue to function.
    This will allow apps such as Helium or Crypt Key File Extractors to continue backing up WhatsApp data over the ADB.

    PREREQUISITES:

    1. O/S: Windows Vista, Windows 7 or Windows 8/8.1
    2. Java - If not installed: Download Java
    3. Old WhatsApp MUST be removed from your device

    INSTRUCTIONS:

    1. Extract WhatsAppADBPatch.zip maintaining the directory structure.
    2. Download latest WhatsApp.apk from: https://www.whatsapp.com/android/
    3. Copy WhatsApp.apk into the same directory as ADBPatch.bat.
    4. Drag WhatsApp.apk onto ADBPatch.bat.
    5. Install the created WhatsApp_Patched.apk on your android device.

    AUTHOR: TripCode
    THANKS: Brut.all / iBotPeaches (Apktool) and Lionello Lunesu for FART (Find And Replace Text)
    1
    this error keeps coming :(

    I think you are running WhatsApp Key/DB Extractor and not WhatsApp ADB Patch?

    In any case your issue is because the latest version of WhatsApp blocks adb which is why this thread exists.
    1
    sir
    1.i downloaded latest whatsapp from website
    2.patched the apk with the ADB patch
    3.removed the existing one i had in my phone and installed the patched apk
    4.then i went on to extract the key file using WhatsApp Key/DB extractor. i get the error then :(
    Double check that you have installed the patched apk. If still no joy try using WhatsApp-Key-DB-Extractor which some people have more success with.

    Also, remember to take a manual backup of your whatsapp database after you install whatsapp (this process creates the crypt key). Another thing you could try is simply install an older official version of whatsapp that do not block adb and run the key extractor on the older version. Once you have the key you can then upgrade to the new version. Your key will stay the same.
    1
    When trying to patch the newest Whatsapp-Version (2.11.491), I got the following errors. 2.11.481 worked.

    Code:
    C:\Users\xxx\WhatsAppKeyExtract>ADBPatch.bat WhatsApp.apk
    
    I: Decompiling APK
    I: Using Apktool 2.0.0-ec3fbf-SNAPSHOT on WhatsApp.apk
    I: Loading resource table...
    I: Decoding AndroidManifest.xml with resources...
    I: Loading resource table from file: C:\Users\xxx\apktool\framework\1.apk
    I: Regular manifest package...
    I: Decoding file-resources...
    I: Decoding values */* XMLs...
    I: Baksmaling classes.dex...
    testCleaning up unclosed ZipFile for archive C:\Users\xxx\apktool\framework\1.apk
    I: Copying assets and libs...
    I: Copying unknown files...
    I: Copying original files...
    I: Patching AndroidManifest.xml
    I: Recompiling APK
    I: Using Apktool 2.0.0-ec3fbf-SNAPSHOT on WhatsApp
    I: Checking whether sources has changed...
    I: Smaling smali folder into classes.dex...
    I: Checking whether resources has changed...
    I: Building resources...
    C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\activity_corrupt_installation.xml:7: error: No resource identifier found for attribute 'fontFamily' in package 'android'
    C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\activity_corrupt_installation.xml:12: error: No resource identifier found for attribute 'fontFamily' in package 'android'
    C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\activity_incorrect_app_release_version.xml:8: error: No resource identifier found for attribute 'fontFamily' in package 'android'
    C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\activity_insufficient_storage_space.xml:8: error: No resource identifier found for attribute 'fontFamily' in package 'android'
    C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\activity_spam_warning.xml:5: error: No resource identifier found for attribute 'fontFamily' in package 'android'
    C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\activity_spam_warning.xml:8: error: No resource identifier found for attribute 'fontFamily' in package 'android'
    C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\backup_restore.xml:22: error: No resource identifier found for attribute 'fontFamily' in package 'android'
    C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\backup_restore.xml:23: error: No resource identifier found for attribute 'fontFamily' in package 'android'
    C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\qr_code.xml:5: error: No resource identifier found for attribute 'fontFamily' in package 'android'
    C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\qr_code.xml:11: error: No resource identifier found for attribute 'fontFamily' in package 'android'
    
    C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\voip_activity.xml:4: error: No resource identifier found for attribute 'fontFamily' in package 'android'
    C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\layout\voip_activity.xml:40: error: No resource identifier found for attribute 'fontFamily' in package 'android'
    C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\xml\widget_info.xml:2: error: No resource identifier found for attribute 'initialKeyguardLayout' in package 'android'
    C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res\xml\widget_info.xml:2: error: No resource identifier found for attribute 'widgetCategory' in package 'android'
    Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\xxx\AppData\Local\Temp\brut_util_Jar_665076819065385106.tmp, p, --forced-package-id,127, --min-sdk-version, 7, --target-sdk-version, 21, --version-code, 450227, --version-name, 2.11.491, -F, C:\Users\xxx\AppData\Local\Temp\APKTOOL3245343448066818719.tmp, -0, arsc, -I, C:\Users\xxx\apktool\framework\1.apk, -S, C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res, -M,C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\AndroidManifest.xml]
            at brut.androlib.Androlib.buildResourcesFull(Androlib.java:437)
            at brut.androlib.Androlib.buildResources(Androlib.java:374)
            at brut.androlib.Androlib.build(Androlib.java:277)
            at brut.androlib.Androlib.build(Androlib.java:250)
            at brut.apktool.Main.cmdBuild(Main.java:225)
            at brut.apktool.Main.main(Main.java:84)
    Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\Users\xxx\AppData\Local\Temp\brut_util_Jar_665076819065385106.tmp, p, --forced-package-id, 127, --min-sdk-version, 7, --target-sdk-version,21, --version-code, 450227, --version-name, 2.11.491, -F, C:\Users\xxx\AppData\Local\Temp\APKTOOL3245343448066818719.tmp, -0, arsc, -I, C:\Users\xxx\apktool\framework\1.apk, -S, C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res, -M, C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\AndroidManifest.xml]
            at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:488)
            at brut.androlib.Androlib.buildResourcesFull(Androlib.java:423)
            ... 5 more
    Caused by: brut.common.BrutException: could not exec command: [C:\Users\xxx\AppData\Local\Temp\brut_util_Jar_665076819065385106.tmp, p, --forced-package-id, 127, --min-sdk-version, 7, --target-sdk-version, 21, --version-code, 450227, --version-name, 2.11.491, -F, C:\Users\xxx\AppData\Local\Temp\APKTOOL3245343448066818719.tmp, -0, arsc, -I,C:\Users\xxx\apktool\framework\1.apk, -S, C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\res, -M, C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\AndroidManifest.xml]
            at brut.util.OS.exec(OS.java:89)
            at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:482)
            ... 6 more
    I: Signing APK
    java.io.FileNotFoundException: C:\Users\xxx\WhatsAppKeyExtract\WhatsApp\dist\WhatsApp.apk (Das System kann den angegebenen Pfad nicht finden)
            at java.util.zip.ZipFile.open(Native Method)
            at java.util.zip.ZipFile.<init>(Unknown Source)
            at java.util.zip.ZipFile.<init>(Unknown Source)
            at java.util.jar.JarFile.<init>(Unknown Source)
            at java.util.jar.JarFile.<init>(Unknown Source)
            at com.android.signapk.SignApk.main(SignApk.java:320)
    WhatsApp\smali\com - Das Verzeichnis ist nicht leer.
    I: Done!
    1
    When trying to patch the newest Whatsapp-Version (2.11.491), I got the following errors. 2.11.481 worked.

    Most likely as needed the latest version of apktool. I have updated the zip file.

    Would it be possible for the OP to atleast mention a version number. Just writing latest is vague. Being specific would be very kind.

    The patch is a wrapper for apktool so is therefore independent of any WhatsApp version numbers (the version is irrelevant). If it breaks then you will need to replace apktool.jar with the latest version. I have just updated the zip file in the first post.