• Re: Need help getting Windows to list all files inside every APK and th

    From Johann 'Myrkraverk' Oskarsson@3:633/10 to All on Fri Aug 7 04:52:40 2026
    Subject: Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs

    On 07/08/2026 4:26 AM, Maria Sophia wrote:
    Maria Sophia wrote:
    In desperation, here's a summary of the problem, in a nutshell:
    a. I can't figure out how to turn a thousand lines like this:
    package:/data/app/~~0H1-2NstdUVjAZffiA36og==/com.wemagineai.voila-eUnm7DkWz754o5t0a88gdA==/base.apk=com.wemagineai.voila

    b. Into this (without knowing the name of the package ahead of time)
    /data/app/~~0H1-2NstdUVjAZffiA36og==/com.wemagineai.voila-eUnm7DkWz754o5t0a88gdA==/base.apk

    c. Can you?

    Just for the record, if parsing doesn't work on the command line,
    then it won't work in batch either... (as that's even harder).



    Dear Maria Sophia,

    Do you need to do this in a batch file? For all kinds of scripting
    tasks, my battleground of choice is the Lua programming language.

    If this only needs to run on your own computer, that's a viable
    option, but does necessitate a new battle for you: to learn Lua.

    I tend to build my own Lua interpreter from the sources, and I'm
    sure you can find viable binaries elsewhere, should you seek this
    adventure.

    For the specifics of the batch processing, I have no more to add
    that hasn't already been said by other wizards of the Windows
    arcana.


    Happy victories over syntax errors!
    --
    Johann | email: invalid -> com | http://www.myrkraverk.com/blog/
    I'm not from the Internet, I just work there. | via Easynews.com https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:;

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Paul@3:633/10 to All on Fri Aug 7 00:17:40 2026
    Subject: Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs

    On Thu, 8/6/2026 5:55 PM, Maria Sophia wrote:
    Stefan Ram wrote:
    You can remove the

    @echo off

    to get more context about where this message is coming from.

    Thanks Stefan, as this should run on anyone's Windows box with Android.
    My Android is connected over Wi-Fi via the adb connect script.

    I just saw this, so I'll just post my latest version, but it's still
    saying "The system cannot find the drive specified" for some reason.

    You can use Process Monitor, and watch for ReadFile/Writefile/CreateFile
    and see if any of those are reporting a failure similar to that. The
    failure path may be captured in the event for examination.

    https://learn.microsoft.com/en-us/sysinternals/downloads/procmon

    Paul

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From JJ@3:633/10 to All on Fri Aug 7 22:05:08 2026
    Subject: Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs

    On Thu, 6 Aug 2026 20:02:36 -0000 (UTC), Maria Sophia wrote:
    Yesterday, the chain of events was such that:
    1. Stefan Ram posted a warning that Android APKs can leak location
    Message-ID: <locations-20260805220107@ram.dialup.fu-berlin.de>
    2. I then showed how use Win10 to determine if any apps leaked recently
    Message-ID: <1150g5v$1lsp$1@nnrp.usenet.blueworldhosting.com>
    3. But I then spent hours trying to confirm if any of my APKs "can" leak

    A. Windows can tell you if a device "has" leaked in the past time frame
    B. And, Windows can tell you if a device "can" leak in the future...
    [snip]

    Ideally, the APK's `AndroidManifest.xml` file should be checked. The
    manifest list all app's services, broadcast listeners, activities, and data providers; all in module name format aaa.bbb.ccc[...].
    e.g.: com.google.android.gms.ads.AdActivity

    But that file is in binary XML format instead of plain text XML format, so a binary XML parser tool will be needed to convert it to plain text. Then use
    an XML parser to extract specific part of the manifest.

    Since XML contains `<`, `>`, and `"` characters, it'd be troublesome (or
    even impossible) if handled using batch file. Other scripting tool should be used.

    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Herbert Kleebauer@3:633/10 to All on Fri Aug 7 22:15:52 2026
    Subject: Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs

    On 8/6/2026 10:22 PM, Maria Sophia wrote:

    Specifically, how do we turn this:
    package:/data/app/~~0H1-2NstdUVjAZffiA36og==/com.wemagineai.voila-eUnm7DkWz754o5t0a88gdA==/base.apk=com.wemagineai.voila

    Into this (without knowing the name of the package ahead of time)
    /data/app/~~0H1-2NstdUVjAZffiA36og==/com.wemagineai.voila-eUnm7DkWz754o5t0a88gdA==/base.apk

    That isn't a job for a batch program. Use a scriptable editor, PowerShell
    or even C code. If it has to be done in a batch, process the input file
    byte by byte: the following code skips anything including the first ":".
    Then outputs the following bytes till the 5. "=" and the skips the rest
    of the line. But it is extremely slow.


    @echo off
    setlocal enabledelayedexpansion

    set infile=in.txt
    set outfile=out.txt

    set tmp0=_tmp0.tmp
    if exist %tmp0% del %tmp0%

    call :fopen %infile%
    echo %infile% opened as input file

    :::::::::::::::::::::::::::::::::::::::::::::::::::::

    set n=-1

    :l1
    set /a n=n+1
    call :getc_hex char %n%
    if -1==%char% goto :end
    if not 3a==%char% goto :l1
    set m=0

    :l3
    set /a n=n+1
    call :getc_hex char %n%
    if -1==%char% goto :end
    if 3d==%char% set /a m=m+1
    if %m%==5 goto :l2
    echo %char%>>%tmp0%
    goto :l3

    :l2
    set /a n=n+1
    call :getc_hex char %n%
    if -1==%char% goto :end
    if not 0a==%char% goto :l2
    echo 0d 0a>>%tmp0%
    goto :l1


    :end
    :: convert hexfile tmp1 to binary outfile
    certutil -f -decodehex %tmp0% %outfile% >nul


    if exist %tmp0% del %tmp0%
    call :fclose
    goto :eof


    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    :fopen
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    set tmp1=_tmp1.tmp
    set tmp2=_tmp2.tmp
    set fsize=%~z1
    set cache=-1
    certutil -f -encodehex %1 %tmp1% 4 >nul
    set n=0
    if exist %tmp2% del %tmp2%

    for /f "tokens=1-16" %%a in (%tmp1%) do (
    set /p =%%a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%%m%%n%%o%%p<nul >>%tmp2%
    set /a n=n+1
    if !n!==64 echo.>>%tmp2% & set n=0)

    goto :eof

    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    :fclose
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    del %tmp1%
    del %tmp2%
    goto :eof


    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :getc_hex :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    if %2 GEQ %fsize% set /a %1=-1 & goto :eof
    set /a i=%2/1024 & set /a j=2*(%2%%1024)
    if %i%==%cache% goto :skip
    echo read cache line %i%
    set cache=%i%
    set skip=
    if %i% GEQ 1 set skip="skip=%i%"
    for /f %skip% %%i in (%tmp2%) do (
    set line=%%i & goto :skip)
    :skip
    call set %1=%%line:~%j%,2%%
    goto :eof




    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)