• What are "config", "xhdpi" & split" extracted Android apk files?

    From Enrico Papaloma@21:1/5 to All on Thu Jan 25 07:18:19 2024
    What are "config", "xhdpi" & split" extracted Android apk files?
    dir /b com.pas.webcam
    base.apk
    split_config.arm64_v8a.apk
    split_config.en.apk
    split_config.xhdpi.apk

    com.pas.webcam.apk
    config.arm64_v8a.apk
    config.en.apk
    config.xhdpi.apk

    The question is really all about how to make good decisions by
    understanding why those 4 different files are important to Android.

    But here's how to reproduce exactly what I'm seeing, on your device.

    1. I picked up three old Android phones & an even older Android 4.4.2
    tablet from the local thrift shop for about fifteen bucks total.

    2. They're going to be set up as Wi-Fi critter cams in three windows with
    the old tablet used as a LAN "monitor" displaying what the phones see.

    3. They're all reset to factory defaults and I don't want to add
    anything except the one crittercam application called "IP Webcam".
    https://play.google.com/store/apps/details?id=com.pas.webcam

    4. I tested this "IP Webcam" app on my modern phone and while I'd like
    an app without ads, it won't matter much on these dedicated devices
    because nobody is going to be looking at the phone - just the tablet.

    5. To get "IP Webcam" off my phone was as simple as extracting with this.
    https://f-droid.org/packages/com.apk.editor/

    6. That way I can save the installer onto the Windows drive so that
    I can copy the APK over to each of the phones over USB or the LAN.

    7. Four files were extracted by that specific APK utility application.
    https://apk-editor.github.io/general/
    Internal storage\Android\data\com.apk.editor\files\com.pas.webcam\

    Name: base.apk
    Size: 4373916 bytes (4271 KiB)
    SHA256: 109317D240D38748EB681C396105A96C266E1A927CF44B42FD24AABAA9379B28
    Name: split_config.arm64_v8a.apk
    Size: 28792920 bytes (27 MiB)
    SHA256: 7C37EFF55966BD72626150ED07F02B2B964C29890DF060B8DEFBC4714A913644
    Name: split_config.en.apk
    Size: 49561 bytes (48 KiB)
    SHA256: 3A32EDBC414AE28580596A948959FFC06F99D9232ED1645BF4A7201B0E58A185
    Name: split_config.xhdpi.apk
    Size: 135440 bytes (132 KiB)
    SHA256: 11ABBAC9D7CFCEDD186FFB60797BB799363CB9EAF2176AF512505F12FD2FA5E4

    8. Another APK extractor created the same files, slightly different names.
    https://play.google.com/store/search?q=apk%20extractor&c=apps

    Name: com.pas.webcam.apk
    Size: 4373916 bytes (4271 KiB)
    SHA256: 109317D240D38748EB681C396105A96C266E1A927CF44B42FD24AABAA9379B28
    Name: config.arm64_v8a.apk
    Size: 28792920 bytes (27 MiB)
    SHA256: 7C37EFF55966BD72626150ED07F02B2B964C29890DF060B8DEFBC4714A913644
    Name: config.en.apk
    Size: 49561 bytes (48 KiB)
    SHA256: 3A32EDBC414AE28580596A948959FFC06F99D9232ED1645BF4A7201B0E58A185
    Name: config.xhdpi.apk
    Size: 135440 bytes (132 KiB)
    SHA256: 11ABBAC9D7CFCEDD186FFB60797BB799363CB9EAF2176AF512505F12FD2FA5E4

    My question is what is the difference between those four file types?

    I realize there are many ways to install apps on Android from Windows,
    so this question has nothing to do with all of those ways to install apps.

    I am also aware there are a variety of Android versions involved, where
    one phone is on Android 7, another 8.1.0 & the third on Android 10.

    They're all different makes & models too, so I'm aware that different architectures are involved, so I will run the adb getprop command.
    adb -d shell getprop ro.product.cpu.abi
    Which for my daily drive phone, shows as "arm64-v8a" but the old phones
    being used for the window cameras are likely different architectures.

    The reason for asking the question is simply that I'd like to be
    quite sure exactly how to make the decision of which APK to use.

    I could just guess which will work for sure but just seeing those
    strangely named "config", "xhdpi", split" file names begs the question.

    The question here is only what information can you impart that helps me
    decide which APK to install as each of the phones will be on older Android.

    Specifically, how do these four files differ & which should I use when?
    base.apk & com.pas.webcam.apk
    split_config.arm64_v8a.apk & config.arm64_v8a.apk
    split_config.en.apk & config.en.apk
    split_config.xhdpi.apk & config.xhdpi.apk

    The question is really all about how to make good decisions by
    understanding why those 4 different files are important to Android.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Burns@21:1/5 to Enrico Papaloma on Thu Jan 25 07:51:45 2024
    Enrico Papaloma wrote:

    What are "config", "xhdpi" & split" extracted Android apk files?

    I think it's a way that combinations of screen density, user language
    and cpu type end up generating multiple smaller APKs, rather than one
    huge APK containing lots of stuff that a given user doesn't require.

    <https://developer.android.com/build/configure-apk-splits>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Enrico Papaloma@21:1/5 to Andy Burns on Thu Jan 25 17:41:24 2024
    On 1/25/2024 1:51 AM, Andy Burns wrote:
    I think it's a way that combinations of screen density, user language
    and cpu type end up generating multiple smaller APKs, rather than one
    huge APK containing lots of stuff that a given user doesn't require.

    <https://developer.android.com/build/configure-apk-splits>

    Thank you for that reference and assumption of what these are.
    base.apk & com.pas.webcam.apk
    split_config.arm64_v8a.apk & config.arm64_v8a.apk
    split_config.en.apk & config.en.apk
    split_config.xhdpi.apk & config.xhdpi.apk

    The reference you cited seems to indicate, as you suggested, there are
    build switches for ldpi, mdpi, hdpi, xhdpi, xxhdpi & xxxhdpi, which seem to specify the densities to generate APKs at (low, medium, high, extra high).

    I'm lucky that the largest file (config.arm64_v8a.apk) probably contains
    all the architectures, but in the future, we probably won't be so lucky.

    With these smaller APKs, porting apps to other devices will be harder for
    the user who saves all their installers because the reference you provided
    says they'll only have *one architecture* on the device in the future.

    That's bad. In terms of re-using the app installer anyway.

    If the user wants to copy their saved APK onto another device, a specific "split APK" might not work if that other device has a different screen
    density, user language, or CPU architecture from the initial device.

    Here's what it says at that reference about that problem set which Google presents as a "good thing" but it's really a "bad thing" for each user.

    https://developer.android.com/build/configure-apk-splits
    Caution: Since August 2021, all new apps must be published as App Bundles.
    If you publish your app to Google Play, build and upload an Android App
    Bundle. When you do so, Google Play automatically generates and serves optimized APKs for each user's device configuration, so they download only
    the code and resources they need to run your app. Publishing multiple APKs
    is useful if you are publishing to a store that doesn't support the AAB
    format. In that case, you must build, sign, and manage each APK yourself.

    Although it is better to build a single APK to support all your target
    devices whenever possible, that might result in a very large APK due to
    files supporting multiple screen densities or Application Binary Interfaces (ABIs). One way to reduce the size of your APK is to create multiple APKs
    that contain files for specific screen densities or ABIs.

    Gradle can create separate APKs that contain only code and resources
    specific to each density or ABI. This page describes how to configure your build to generate multiple APKs. If you need to create different versions
    of your app that are not based on screen density or ABI, use build variants instead.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From VanguardLH@21:1/5 to Enrico Papaloma on Thu Jan 25 10:25:57 2024
    Enrico Papaloma <enrico@papaloma.net> wrote:

    What are "config", "xhdpi" & split" extracted Android apk files?
    dir /b com.pas.webcam
    base.apk
    split_config.arm64_v8a.apk
    split_config.en.apk
    split_config.xhdpi.apk

    com.pas.webcam.apk
    config.arm64_v8a.apk
    config.en.apk
    config.xhdpi.apk

    https://developer.android.com/training/multiscreen/screendensities
    See Table 1.

    http://richmediacs.com/rmcs_apps/Android_XML_Concepts/screen_size_and_density.html
    Shops an image comparing the different screen densities.

    The ARM64 files are for your particular hardware architecture
    (processor); see https://en.wikipedia.org/wiki/AArch64. The Android OS
    is available on more than smartphones. X86 and X86-64 architectures are
    also supported.

    The "en" files are probably the language resources for English. The app
    might install other language resource files based on the language
    configured for your phone.

    You copying the APK files onto Windows and then onto the smartphones
    seems more work than just installing the app on each phone, and which
    can be done concurrently on all phones.

    "Lite version is supported with unobtrusive ads. It's fully functional,
    but lacks Tasker integration, customizable user interface (only editor
    is present) and has a watermark over recorded videos."

    I take it you won't be saving any videos of what your phones see, or
    watermarks atop the videos are okay despite they might obliterate see
    some portion of the video.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)