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)