Download Android APK file from Fabric Beta
Asked Answered
I

4

11

Is it possible to download the Android APK file from Fabric Beta? We have multiple releases uploaded.

Indult answered 19/6, 2017 at 20:29 Comment(0)
M
8

Mike from Fabric here. We currently don't provide a way to download the .APK, they are only provided via the Beta by Crashlytics apps.

Mashie answered 20/6, 2017 at 14:22 Comment(2)
Hi Mike. Now do you provide this kind of option? After Fabric migrated to Firebase there's no way for me to download a crucial build that located in BetaLachman
I'd recommend reaching out to Firebase support to see if there is a way or provide feedback asking for it. I no longer work on the product, so I don't know the latest.Mashie
W
7

Late answer but someone may need this. You can download it in a hacky way from devices that apps install by Beta or any way:

Connect the device to your computer and run the following command, ensure that you have configured the adb correctly:

adb shell pm list packages | grep xyz          # get the package name of the app
adb shell pm path app.xyz.stg                  # get the path of the app
adb pull /data/app/app.xyz.stg/base.apk .      # pull the app to PWD

the name of the app is base.apk, change it to xyz. This can be used for the same device.

Wein answered 12/4, 2019 at 9:42 Comment(0)
S
1

Mesut's answer is correct. Just to make it more clear.

  1. adb shell pm path ${package_name}

  2. adb pull /data/app/${package_name_2}/base.apk

In the second command, the value ${package_name_2}/base.apk is from the first command. Sometimes it's not exactly the package name.

In my case, it's ${package_name}-1/base.apk

Screwworm answered 10/5, 2019 at 14:17 Comment(2)
if you like Mesut's answer, give him an 'up' :)Wein
And here, for anyone else semi-automating this (so we can import the old releases into Firebase App Distribution, because testing updates/migrations is necessary at times): adb pull `adb shell pm path your.base.package.name | sed 's/package://'` & mv base.apk YourApp-1.2.3-staging.apk (or whatever naming scheme you like...)Horseman
A
-1

If you just want to download a specific build, say "1.0(143)" then you can choose that build in the beta app and download it.

If your need is to upload multiple apks from same build (say an apk for each deployment environment such as prevalidation, validation, production) then you need to setup your gradle to define productFlavors for each deployment environment like this:

android {
    ...
    flavorDimensions "deploymentEnvironment"

    productFlavors {
        prevalidation {
            dimension "deploymentEnvironment"
        }
        validation {
            dimension "deploymentEnvironment"
        }
        production {
            dimension "deploymentEnvironment"
        }
    }
    ...
}

Then you publish multiple APKs from the same build (one for each target deployment environment) to the same Fabric project using following gradle tasks as illustrative examples. Actual tasks depend on the variants defined for your project:

./gradlew -s assemblePrevalidationRelease assembleValidationRelease ./gradlew -s crashlyticsUploadDistributionPrevalidationRelease crashlyticsUploadDistributionValidationRelease

The Fabric console beta page does show both apks and you can choose to download and install one or the other. The only missing part is that both variants are listed as exactly the same (since they have the same versionName and versionCode). This could easily be solved if Fabric console shows the actual apk name in addition to the version / build info. I would love for the awesome Fabric team to address this small feature request sometime soon.

Until then a workaround I use is to identify the build based on order in Fabric beta console (risky but works) and put the target deployment info in the release notes for each apk in Fabric for a given build.

Amphitheater answered 29/11, 2017 at 16:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.