Download IPA / APK from Crashlytics - android

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.

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&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

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

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 :(

I found an easy way to get APK builds on Android. Follow these steps:
Install "Amaze File Manager" on your device. Free version is enough and it doesn't need your device to be rooted.
Open "App Manager" in the menu on the left
Find your installed build by its name
Press "three dots" and select "backup"
You will find your APK file in the storage/emulated/0/app_backup

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.
Open command prompt or terminal, and run adb devices to ensure your device is recognized
Once recognized, run adb shell, and then type su to enter superuser mode
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
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!

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:
Open Android Device Monitor
Select your device in the "Devices" tab on the left
Click on the "File Explorer" View on the right
Navigate through the path: data/data/io.crash.air/files.
There you should find your .apk file
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.

I am using crashlytics for distributing app to testers, The steps are as
Install crashlytics(add fabric+crashlytics) to your code as described on their site.
Now, make archieve of your application.(Check that provisioning profile and signing identity, the udid of testers are added with provisioning profile).
Now, click on fabric symbol at right-top corner, click on distribute button on that.
Once you click on distribute, this will show textfield and add button to add email addresses of testers.
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.

Related

How do I install an APK file using Android Studio?

I have an APK file and my developer assistant said to use it to install the app onto my phone, question is, how can I do it? Just click run? I think I tried it and it's not working, only the workshop files were editable ones and could run.
if you have ADB (android debugger) installed and set as environment path:
1st option:
i'd use that from cmd line. First you have to setup unknown sources from Settings menu and enable developer mode, and then trust USB Debug Options from your device. Go to system and you have to tap the version number a few times, you can google this. (That's how it used to be).
From Mac/Windows/Linux:
type:
To see if it's in path it should give you help:
adb
To enumerate devices connected via USB
adb devices
To install apk on your local machine to device (force install)
adb install -r ~/Desktop/some.apk
Or in Windows you can put your full path (force install)
adb install -r c:\Users\something\Desktop\some.apk
2nd option:
You can put APK on google drive, or some website you can access, even one drive or via email, then you can save it onto your device. Using ES File Manager, or some files manipulation tool, you can install it directly from there.
3rd option:
Use Google Play Beta or Alpha delivery methods. You can do a closed or open beta, and post it up there. That way all you need is a play.google link and then you will be able to install it, and manage updates via this method. I use this as I test alpha/beta APK Android Game deployment, and am able to distribute a URL (for open beta/alpha), and users can easily test it via this method. Amazon App Store and iTunes App Connect (iOS) has similar type options, too, but I'm just assuming you would distribute this App/Game via Play.
Remember if it's unsigned apk, you need to be able to enable side-loaded apks via your settings, app sources. If it's signed by a trusted developer then this shouldn't be a problem.
If you have an APK file you don’t need android studio.
Copy the file to the device you want to run it on and open it. You’ll be promoted to either enable developer mode or trust the app as a one off occasion.
You’ll then be given the option to install the app.
First you need to turn on "download from other sources" or something(I can not remember the option exactly) from your phone's setting. You can upload the apk file to google drive. And navigate to the directory use you phone, click and download file. And then you should be able to run and install the app to your phone.
Try PdaNet+.
It will easily install android studio application to your android mobile.
Download PdaNet+ for PC.
In mobile open Debugging.For Debugging go to Settings -> About phone -> SoftwareInfo -> Build Number -> Click 7 to 8 times on Build Number.It will open Developer Option.Go back to Setting there you see Developer option.Then in Developer Option search for USB Debugging and open it.Then connect your mobile to PC with USB.
Insatll PdaNet+ it ask to connect mobile,connect it with USB it will download mobile software.
After completing your program,in Android studio click on 'Run App' (Green symbol as Play Button) then it will show your Android Mobile in Connected Device.Then it will install Android Studio application to your mobile.

Recover an Android project from an installed app

Recently I've switched to windows 10 by performing a clean install, which means that I've wiped the whole HDD. Sadly I forgot to backup a project built up in Android Studio but I have it installed and running on my phone.
Is it possible to somehow recover my project from what is installed on my smart device?
If yes, how?
Step 1. Generate an apk from the installed app on your "smart" phone.
Use App Backup & Restore to do this. There are several other apps that allow you to create apk installers from installed apps. Just search on play store for "backup apps".
Step 2. Decompile your app to get the source code:
This is already answered on this SO Post (several options)
(Optional) Step 3. Backup on source control right away
Use free source control services like bitbucket to backup and avoid hassles like these in future.
try this step:
step1 : open this http://www.javadecompilers.com/
step2: upload apk on this site
step3: decompile it
step4: get your project in zip folder.

How can my friends test my Android application?

I am developing an Android application and it is not finished. I would like to test it on multiple devices, locations with various users that are not near me. How can I achieve this? Is there an APK I can send them? Is there a way that is as simple as plugging my phone in and then running the application from Eclipse? Or would I have to make an installer of some sort (I don't know)?
Obviously you can plug your phone(s) into the machine you are developing on and run it from eclipse. This will allow you to test and debug on the devices you have access to.
You can also export an apk from eclipse (see the android pages for instructions). You could put this up on a file sharing site and make it available to your friends. They could then install it, as long as they have authorised "unsigned" apks to be installed in their phone settings.
Assuming you have deployed the app at least once from within Eclipse to debug and test yourself, you will most likely have an APK under the bin directory in your Eclipse project. The file should be .apk. This APK will have been signed automatically by Eclipse with your debug key. This is obviously not the key you use for publishing but for testing among friends I think it's fine.
What I often do is just e-mail that APK file as an attachment to my friends to an e-mail account they have setup on their phone. Then all they need to do on their phone is make sure they have the system setting to allow installation of non-market apps (i.e. not from Google Play), which maybe named something slightly different like "allow 3rd party apps". Then they can simply click on the app attachment in their e-mail, download it and run it and they should automatically be prompted with instructions to install it.
I just used MyAppSharer. (I believe there are other similar apps out there - this is just the one I've used and is very simple/easy:
...you can share by market link or directly share APK (App's full
package)
I just used that, and sent my app via apk file to my coworkers. Can't get much simpler.
Just install the app on your phone via Eclipse, then run this AppSharer, and voila - share it w/ anyone!
You can can easily export your project as an APK in eclipse
File -> Export -> Export Android Project

How to run an Android app which will run in any system without using Eclipse

I have created an Android Calculator app in Eclipse. If I want to run my app I need run it through Eclipse. But I want to run my app without Eclipse in any system as normal apps run, just download it and run.
If any one knows how to do this, please help me.
You probably want to take the .apk file in your bin folder. This file is your entire app packaged together.
You can run & install this on other Android phones, but they will have to have enabled "unknown sources" in application settings.
Otherwise, you'll have to publish to the app store, from where the entire world that owns an Android device can download it directly.
app run without eclipse in any system as a normal apps run
may I know how the normal apps run?
it need any emulator or device.
you can run the .apk file without eclipse also!.
download the Android SDk and create an emulator thru avd command and install any app.
the other way you can do by 3rd party software called BlueStacks App Player
this software is only for mac and Windows download here
Inside bin folder of your Calculator app project located on Hard disk there will be .apk file which you can transfer to your device then open file browser whichever you have that will allow you to install and run your application cheers.
Do you mean you want to install it on any device from your system, without the need to run Eclipse?
The command would be something like "adb install bin/MyCalculator.apk". Once you do that, your app is installed just like any other.
Do you mean you want anybody to install your app on their device? Your best bet is to just put it on the Android Market. Don't forget to generate a real signing key (don't use the Eclipse debug key) and sign your app properly before uploading it to the market.
If you don't want to use the market, then you can put the apk file on any web page, and have people download it with their browser. Then they go to their device settings and enable "Unknown sources". After that, they can run their browser, go to "Menu > Download" and select the apk they just downloaded.
Or, you can send the apk file to someone directly, and have them attach their device to their computer, enable USB, and copy the apk to their /sdcard directory somewhere. Then they launch a file browser (they'll have to install that first) and navigate to the apk file. I think that will allow them to install the apk on their device.
I think that should cover it.
You should generate the .apk file, and install it on any device you want..
http://www.technobitez.com/how-to/create-apk-files-for-android-phone
How to build an APK file in Eclipse?

why won't apk file update

I'm developing an android app using Eclipse. I export the app using the Export Android App function. I sign and align the resulting apk file. I then copy this apk to a webserver and try to install it on my phone. It goes though the installation steps, and when I test the app it does not contain my latest changes. It seems to install one of my previous builds.
Is the problem in:
- the way I create the apk?
- a cache on the phone that has not been cleared?
How do I get Eclispe to make a current apk, and how do I get my phone to install it?
How can I verify which version of my code is in a particular apk file?
Thanks,
Gerry
It could be that Eclipse isn't building the new .apk properly, though it sounds like you're exporting correctly. Are you giving the new .apk a different name from the old one? If not, then you could be downloading or installing the old one by accident.
You should be able to go into Settings -> Applications -> Manage Applications on your phone, then find your app and open its info page. The version string should be listed near the top, so you can verify that the latest version is installed.
Try running "adb logcat | tee logfile" (or adb logcat > logfile) before you begin the install attempt, then ctrl-C it and go over the file with a fine tooth comb - there's likely some hints of the problem buried within the noise.

Categories

Resources