dogsgod
dogsgod

Reputation: 6387

Download IPA / APK from Crashlytics

I'm using Crashlytics to distribute an app for Beta testing.

While it is easy and convenient to install the app on devices from the Crashlytics app, I have not been able to figure out how I could download only the IPA from the Crashlytics server.

Background: I need to get the IPA / APK for automated testing. My test environment will re-sign the IPA to be able to install it to test devices, so going the Crashlytics app way doesn't work.

What I need would be a download link for the IPA / APK as it used to be available in TestFlight or Hockeyapp.

Upvotes: 23

Views: 24498

Answers (7)

chenware
chenware

Reputation: 869

After poking around myself, it doesn't look like there is any way to pull an ipa or apk from Crashlytics Beta.

I would suggest using something like Jenkins or Fastlane to automate your build process and have it a) upload to Dropbox or somewhere you can easily refer to and b) upload automatically to Crashlytics for distribution.

The gradle crashlytics plugin provides a handy method to do this:

gradlew assembleDebug crashlyticsUploadDistributionDebug

Upvotes: 17

user255758
user255758

Reputation: 71

I found an easy way to get APK builds on Android. Follow these steps:

  1. Install "Amaze File Manager" on your device. Free version is enough and it doesn't need your device to be rooted.
  2. Open "App Manager" in the menu on the left
  3. Find your installed build by its name
  4. Press "three dots" and select "backup"
  5. You will find your APK file in the storage/emulated/0/app_backup

Upvotes: 7

chopsuei3
chopsuei3

Reputation: 240

This answer is probably too late, and is only specific to the APK file, but I did manage to identify where Crashlytics stores the APK before installation.

After installing Beta/Crashlytics on your device, go ahead and download your application, but don't install it - just leave it at the screen asking if you want to install (just in case Beta/Crashlytics deletes the APK after installation, not sure if they do though)

Then, using adb via another computer, identify the file name of your application by opening up a shell and finding all APK files.

  1. Open command prompt or terminal, and run adb devices to ensure your device is recognized
  2. Once recognized, run adb shell, and then type su to enter superuser mode
  3. There are 2 ways - you can search for all APK files and look for a file name similar to what you would expect using "find / -iname *.apk" OR you can try listing the files sorted by modified date to look for a recently modified APK using the following command "ls -nl [directory] | sort -k 8,8n -k 6,6M" where [directory] is the directory you want to list
  4. Note the location, and then exit adb, and grab the file using adb pull - in my case it was "adb pull /data/app/myapplication.apk"

TL;DR - Beta/Crashlytics downloads the APK file for your application to /data/app/ before installing. You may need root privileges to access this folder.

Hope this helps!

Upvotes: 4

w3bshark
w3bshark

Reputation: 2749

This may specifically help those who are trying to retrieve the APK file.

If you're using Android, you can use Android Monitor to extract the file downloaded from the Crashlytics Beta app. In order for this to work, you must have already installed the Crashlytics Beta app and have downloaded your app from within the Beta app. Then, follow these steps:

  1. Open Android Device Monitor
  2. Select your device in the "Devices" tab on the left
  3. Click on the "File Explorer" View on the right
  4. Navigate through the path: data/data/io.crash.air/files. There you should find your .apk file
  5. Click on the "Pull a file from the device" button in the top right.

Very complicated, but probably one of the few ways to extract it.

Another thought would be to use Wireshark to sniff the traffic when the device tries to download the APK/IPA file. This can be done while using an emulator.

Upvotes: 0

CommaToast
CommaToast

Reputation: 12188

If you're using it with iOS, you can enable Settings > Safari > Advanced > Web Console, then look in the web inspector of the download link from the install page on iOS. It will look like this (I swapped in gobbledegook text for some parts):

<a class="primary-button js-install-button" href="itms-services://?action=download-manifest&amp;url=https%3A%2F%2Fapps.crashlytics.com%2Fprojects%2F2F2F2F2F2FF2F2F2%2Freleases%2F2200806%2Fdownload.plist%3Fdevice_id%2F2F2F2F%26device_token%234JH23L4KH234LK2J34H2LK34H2LK3J4H2LK3JH42L3K4JH23LK4JH2L3K4JH2L3K4JH2LKJ3H4%253D--2KJ3H4LK2J3H4L2KJ3H4LK2J3H4LK23JH4LK2J3H4L%26payload_token%2KL34JH2LK3JH4L2K3J4HL23KJ4HL23JK4" id="most-recent-install">Install</a> 

Then just copy out the URL-encoded URL:

https%3A%2F%2Fapps.crashlytics.com%2Fprojects%2F2F2F2F2F2FF2F2F2%2Freleases%2F2200806%2Fdownload.plist%3Fdevice_id%2F2F2F2F%26device_token%234JH23L4KH234LK2J34H2LK34H2LK3J4H2LK3JH42L3K4JH23LK4JH2L3K4JH2L3K4JH2LKJ3H4%253D--2KJ3H4LK2J3H4L2KJ3H4LK2J3H4LK23JH4LK2J3H4L%26payload_token%2KL34JH2LK3JH4L2K3J4HL23KJ4HL23JK4

Then urldecode that on your command line using PHP:

php -r "echo urldecode('{PASTE THE ABOVE URL HERE}');"

(Make sure that you use double quotes around the PHP line, and single quotes around the URL.)

Then paste the URL-decoded result into Safari on your Mac. You'll see an XML file; copy the download link and paste into your browser. This will download the IPA to your Mac :D

Upvotes: 18

dogsgod
dogsgod

Reputation: 6387

As far as I can see there is no straight forward way to download an IPA from Crashlytics. However, if you really need to get the file it can be done.

  • Copy the link target of the Install button in the Crashlytics mail (alternatively view source and copy from there, this is what I did)
  • Paste to Safari in the Simulator. This will install the Crashlytics app in the simulator
  • Open install page in the Crashlytics app in simulator
  • inspect simulator with your Macs Safari (Develop > Simulator)
  • Copy button link and open in Safari on Mac - there you go

Of course this is nothing you want to do as a standard procedure :)
And sorry this is iOS only, so no bounty for me :(

Upvotes: 11

Mehul Thakkar
Mehul Thakkar

Reputation: 12594

I am using crashlytics for distributing app to testers, The steps are as

  1. Install crashlytics(add fabric+crashlytics) to your code as described on their site.

  2. Now, make archieve of your application.(Check that provisioning profile and signing identity, the udid of testers are added with provisioning profile).

  3. Now, click on fabric symbol at right-top corner, click on distribute button on that.

  4. Once you click on distribute, this will show textfield and add button to add email addresses of testers.

  5. After adding testers email addresses click on next button and continue.

This will send email of ipa files to testers and show buttons to install it. This is working fine will latest versions of iOS.

Upvotes: -1

Related Questions