Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.mobile.android > #154727
| From | Maria Sophia <mariasophia@comprehension.com> |
|---|---|
| Newsgroups | comp.mobile.android, alt.msdos.batch, alt.comp.os.windows-10 |
| Subject | Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs |
| Date | 2026-08-06 12:22 -0800 |
| Organization | BWH Usenet Archive (https://usenet.blueworldhosting.com) |
| Message-ID | <1152qds$amb$1@nnrp.usenet.blueworldhosting.com> (permalink) |
| References | <1152p8r$eh8$1@nnrp.usenet.blueworldhosting.com> |
Cross-posted to 3 groups.
Maria Sophia wrote:
> #1: We will have a thousand lines, like this one:
> package:/data/app/~~0H1-2NstdUVjAZffiA36og==/com.wemagineai.voila-eUnm7DkWz754o5t0a88gdA==/base.apk=com.wemagineai.voila
>
> What we need to do is get Windows batch to be able to give us:
> /data/app/~~0H1-2NstdUVjAZffiA36og==/com.wemagineai.voila-eUnm7DkWz754o5t0a88gdA==/base.apk
>
> How?
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
To be clear, the Windows batch problem I'm running into is:
a. Windows CMD cannot seem to split on multi-character delimiters.
b. So Windows CMD cannot therefore split on /base.apk.
c. Windows CMD cannot seem to split on slash (/) either.
d. Windows CMD cannot split on the package name (because it's unknown).
e. Windows CMD cannot split on any character that appears inside the path.
f. Including the equal sign (=) which appears in sequence sometimes (==).
For example, this doesn't work, even from the command line o/s of batch.
1. Spit out all packages (but testing with one)
adb shell pm list packages -f | findstr /i com.wemagineai.voila > voila_1packages_raw.txt
Inspect results
type voila_1packages_raw.txt
Actual Output = Expected Output
package:/data/app/~~0H1-2NstdUVjAZffiA36og==/com.wemagineai.voila-eUnm7DkWz754o5t0a88gdA==/base.apk=com.wemagineai.voila
2. Remove the 'package:' prefix, but keep the rest
for /f "tokens=2 delims=:" %A in (voila_1packages_raw.txt) do echo %A > voila_after_package.txt
Inspect results
type voila_after_package.txt
Actual Output = Expected Output
/data/app/~~0H1-2NstdUVjAZffiA36og==/com.wemagineai.voila-eUnm7DkWz754o5t0a88gdA==/base.apk=com.wemagineai.voila
3. Extract everything up to /base.apk (the step I am stuck on!)
for /f "tokens=1 delims==" %A in (voila_after_package.txt) do echo %A > voila_apkpath.txt
Inspect results
type voila_apkpath.txt
Actual Output does not = Expected Output
This is the desired output:
/data/app/~~0H1-2NstdUVjAZffiA36og==/com.wemagineai.voila-eUnm7DkWz754o5t0a88gdA==/base.apk
This is the actual output:
/data/app/~~0H1-2NstdUVjAZffiA36og
That's just one of (oh, I can't count how many) parsing attempts I made.
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?
Back to comp.mobile.android | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Need help getting Windows to list all files inside every APK and then look for advertising SDKs Maria Sophia <mariasophia@comprehension.com> - 2026-08-06 20:02 +0000
Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs Maria Sophia <mariasophia@comprehension.com> - 2026-08-06 12:22 -0800
Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs Maria Sophia <mariasophia@comprehension.com> - 2026-08-06 12:26 -0800
Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> - 2026-08-07 04:52 +0800
Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs ram@zedat.fu-berlin.de (Stefan Ram) - 2026-08-06 20:28 +0000
Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs Maria Sophia <mariasophia@comprehension.com> - 2026-08-06 12:40 -0800
Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs Maria Sophia <mariasophia@comprehension.com> - 2026-08-06 13:07 -0800
Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs Maria Sophia <mariasophia@comprehension.com> - 2026-08-06 13:27 -0800
Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs ram@zedat.fu-berlin.de (Stefan Ram) - 2026-08-06 21:32 +0000
Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs Maria Sophia <mariasophia@comprehension.com> - 2026-08-06 13:55 -0800
Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs Paul <nospam@needed.invalid> - 2026-08-07 00:17 -0400
Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs ram@zedat.fu-berlin.de (Stefan Ram) - 2026-08-07 11:08 +0000
Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs Maria Sophia <mariasophia@comprehension.com> - 2026-08-07 06:50 -0800
Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs ram@zedat.fu-berlin.de (Stefan Ram) - 2026-08-07 14:57 +0000
Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs Herbert Kleebauer <klee@unibwm.de> - 2026-08-07 22:15 +0200
Re: Need help getting Windows to list all files inside every APK and then look for advertising SDKs JJ <jj4public@gmail.com> - 2026-08-07 22:05 +0700
csiph-web