🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.microsoft.windows
Article #16

Re: A quick look at the WhatsApp Meta Services Framework server-side 7 day update

#16
From: Maria Sophia
Date: Thu, 22 Oct 2026 22:21
100 lines
7006 bytes
Maria Sophia wrote:
> RELATED WINDOWS SOFTWARE REFERENCES: (needed for the software run above)
>  <https://developer.android.com/tools/aapt2>
>  <https://zxtech.wordpress.com/2021/12/11/install-android-sdk-tools-without-android-studio-via-command-line-tools/>
>  <https://helpcenter.appviewx.com/frontend/web/Published%20Guides/2025.0.0.0/SIGN/SIGN%20Guides/webhelp-responsive/installation_of_apksigner.html>

Below is the latest version of apkanalyzer.bat as a result of this effort.

I posted the before:after scripts to the Windows 11, Linux and macOS 
newsgroups in a separate set of posts, but for this thread, all we need is 
the final version, provided below, of the working apkanalyzer.bat script.

Had I known how much work it turned out to be to port the Linux/macOS 
script to Windows, I likely wouldn't even have tried, since apksigner.bat 
tells us the cryptography when comparing APKs, and aapt/aapt2 tells us 
about the version differences, although certainly apkanalyzer does more.

These are the fundamental APK debugging commands used in this process:
 C:\> apksigner.bat verify --print-certs base.apk
 C:\> aapt2.exe dump badging base.apk | findstr /C:"package:"
 C:\> apkanalyzer.bat manifest application-id base.apk
 C:\> apkanalyzer.bat manifest version-code base.apk

  :: --------------------------------------------------------------------
  :: apkanalyzer.bat
  ::  Conversion of Android sdk Linux/macOS apkanalyzer script to Windows
  :: --------------------------------------------------------------------
  :: v2p1 20261022 Added aapt/aapt2 and apksigner.bat debugging examples
  :: v2p0 20261022 Made APP_HOME portable using dynamic-script-path resolution
  :: v1p9 20261022 Shortened CLASSPATH using wildcard and multiline execution
  :: v1p8 20261022 Split CLASSPATH to overcome 1K-characters-per-line limits
  :: v1p7 20261022 Added and tested example help command syntax above
  :: v1p6 20261022 Added and tested example command syntax above
  :: v1p5 20261022 Added jakarta.activation-api.jar to Windows and classpath
  :: v1p4 20261022 Added istack-commons-runtime.jar to Windows and classpath
  :: v1p3 20261022 Added jaxb-api-2.3.1.jar to Windows and classpath
  :: v1p2 20261022 Added jaxb-runtime-2.3.5.jar to Windows and classpath
  :: v1p1 20261022 Added variables to set custom paths to dependencies
  :: v1p0 20261022 Convert C:\app\editor\android\sdk\tools\bin\apkanalyzer 
  :: --------------------------------------------------------------------
  :: Tested on the base apk installed 20261022 using the commands below:
  ::  C:\> curl.exe -L "https://www.whatsapp.com/android/current/WhatsApp.apk" 
  ::  C:\> adb -r WhatsApp.apk
  ::  C:\> adb shell pm path com.whatsapp
  ::  C:\> adb pull "... that path ... app-SuTfaV-YTnPJBe_GGlwL0w==/base.apk"
  :: --------------------------------------------------------------------
  :: To use: 
  ::  C:\> apkanalyzer.bat manifest application-id base.apk
  ::  C:\> apkanalyzer.bat manifest version-code base.apk
  ::  C:\> apkanalyzer.bat manifest version-name base.apk
  ::  C:\> apkanalyzer.bat manifest min-sdk base.apk
  ::  C:\> apkanalyzer.bat manifest target-sdk base.apk
  ::  C:\> apkanalyzer.bat manifest permissions base.apk
  ::  C:\> apkanalyzer.bat manifest debuggable base.apk
  ::  C:\> apkanalyzer.bat apk summary base.apk
  ::  C:\> apkanalyzer.bat apk file-size base.apk
  ::  C:\> apkanalyzer.bat apk download-size base.apk
  ::  C:\> apkanalyzer.bat files list base.apk
  ::  C:\> apkanalyzer.bat manifest print base.apk
  ::  C:\> apkanalyzer.bat dex list base.apk
  ::  C:\> apkanalyzer.bat dex references base.apk
  ::  C:\> apkanalyzer.bat apk features base.apk
  ::  C:\> apkanalyzer.bat files cat --file "AndroidManifest.xml" base.apk
  ::  C:\> apkanalyzer.bat dex packages base.apk
  ::  C:\> apkanalyzer.bat resources packages base.apk
  ::  C:\> apkanalyzer.bat resources names --config default --type string base.apk
  ::  C:\> apkanalyzer.bat files list base.apk | findstr /i "\.xml"
  ::  C:\> apkanalyzer.bat resources xml --file "res/xml/splits0.xml" base.apk
  ::  C:\> apkanalyzer.bat --help 
  ::  C:\> apkanalyzer.bat apk --help 
  ::  C:\> apkanalyzer.bat dex --help 
  ::  C:\> apkanalyzer.bat resources --help
  :: See also:
  ::  C:\> apkanalyzer.bat files list base.apk
  ::  C:\> apksigner.bat verify --print-certs base.apk
  ::  C:\> apksigner.bat verify --verbose --print-certs base.apk
  ::  C:\> aapt2.exe dump badging base.apk | findstr /C:"package:"
  ::  C:\> aapt2.exe dump permissions base.apk
  ::  C:\> aapt2.exe dump xmltree base.apk --file AndroidManifest.xml
  :: --------------------------------------------------------------------
  @ECHO OFF
  setlocal
  
  REM Dynamically resolve Android SDK Tools Root Path from script location (\tools\bin\ -> \tools\)
  for %%I in ("%~dp0..") do set "APP_HOME=%%~fI"
  
  REM Custom OpenJDK 17 Path (Adjust if your Java path changes)
  set "JAVA_EXE=C:\Program Files\Microsoft\jdk-17.0.18.8-hotspot\bin\java.exe"
  
  REM All JARs in the SDK lib directory via wildcard
  set "CLASSPATH=%APP_HOME%\lib\*"
  
  "%JAVA_EXE%" "-Dcom.android.sdklib.toolsdir=%APP_HOME%" ^
    -classpath "%CLASSPATH%" ^
    com.android.tools.apk.analyzer.ApkAnalyzerCli %*
  
  endlocal
  :: end of apkanalyzer.bat
-- 
We learned a lot about how to debug and compare similar APKs.
Technical Details
Message-ID: <11be29d$2l98$1@nnrp.usenet.blueworldhosting.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED.public-nat-13.vpngate.v4.open.ad.jp!not-for-mail
References: <11b08kc$20fv$1@nnrp.usenet.blueworldhosting.com> <11bb80i$1fp2$1@nnrp.usenet.blueworldhosting.com> <11bdrjl$1367$1@nnrp.usenet.blueworldhosting.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED.public-nat-13.vpngate.v4.open.ad.jp!not-for-mail
From: Maria Sophia <mariasophia@comprehension.com>
Newsgroups: comp.mobile.android,alt.comp.os.windows-10,alt.comp.microsoft.windows
Subject: Re: A quick look at the WhatsApp Meta Services Framework server-side 7 day update
Date: Thu, 22 Oct 2026 18:21:33 -0400
Organization: BWH Usenet Archive (https://usenet.blueworldhosting.com)
Message-ID: <11be29d$2l98$1@nnrp.usenet.blueworldhosting.com>
References: <11b08kc$20fv$1@nnrp.usenet.blueworldhosting.com> <11bb80i$1fp2$1@nnrp.usenet.blueworldhosting.com> <11bdrjl$1367$1@nnrp.usenet.blueworldhosting.com>
Reply-To: pusvul@getTjewytR4so+mqe2.invalid
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Oct 2026 22:21:33 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com; posting-account="l//KxG3Ge2LojWvwJg0Igv8F0ChK8RUC9RtOxMPUo3U"; posting-host="th7EnTmaYbtJfECRly3w6PBVyFuCT/fi/bituBlj6lY";
	logging-data="87336"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Mojibake 1p3
Cancel-Lock: sha1:jFAScrR2qF6M8OtMj72o23JcFDA= sha256:f5s0WNJ0UDMPAsIIvte8ijmYBcXJ8qvqQKWKZdYbJqs=
	sha1:vHv9SZCln9g49K9cbJOf5HE6wF4= sha256:PZ3xYLHpmPn+dh07v4sec0b9zgqxi2zb3E/1waSLTGA=
Content-Language: en-GB