How to extract ipa file from jail broken device - testing

I have a jailbroken iPhone 5s, and want to extract the .ipa file of one application that I have installed on that device. Is this possible, and if so, how?
Is it possible to extract the .ipa file from the iPhone without jailbreaking it? My intention is to perform static analysis of the application.

Since you have a jailbroken iOS device, try installing ipainstaller from Cydia and then use ipainstaller to extract the app to an .ipa file.
I use ipainstaller -l to list all the apps installed on my jailbroken device and grab the bundle id of that app you wish to extract. Extract it using ipainstaller -b <app_bundle>.

It appears that IPA Installer from Cydia has not been updated since July 2016. That last version, 3.4.1-1, only supports up to iOS 9.
However, with iMazing, you can get something close. If you have previously "purchased"/downloaded an app from the Appstore, then are using the same Apple ID logged in to the Appstore, you can download it again. It appears that iMazing may be using the same Appstore API, so once you are logged in to the same Apple ID, you can download the ipa again. Except, this time, it would be downloaded to your Mac as an ipa, rather than iOS device. So it is technically not retrieving the ipa from the iOS device (it no longer exists in the device as an ipa anyway), but getting it from the Appstore. Then you can proceed with your static analysis.

Related

ios appium automation queries

Can we perform automation on preinstalled app like Facebook on ios real device using appium without having ipa/app file?
Can we perform automation on real ios device without having developer team id for a ios app for which we have ipa/app file?
Yes, you can specify the app bundleId in the desired capabilities and attach Appium to the pre-installed application.
No. You need to build and sign the appium-webdriveragent app with your developer certificate to be able to install it on the real iOS device.
Yes you can automate pre installed apps in your phone. But make sure following configurations are already done:
"noReset" capability should be set to true. It won't install your app on every run.
You will need apple developer account if you want to automate it on Real Device. If you are running on simulator, developer account is not needed.

Installing iOS apps without Apple Developer Program on iOS 7

I'm trying to install my iOS app on to devices running iOS 7.0. I can install them on my iPhone 4 with iOS 5.1 jailbroken. But currently I'm not able to do so on a friend iPad 4 with iOS 7.0.
For installing them on JB devices I'm using JailCoder .
It works without any problem and I can code and compile my test apps, and put them on JB devices without any effort.
Recently trying to investigate possibilities I found an application named PP25 for Windows, it is a chinese application and it is said to be able to install cracked apps on NON-JB devices.
So i tried to see ig it works somehow, I was able to get my apps converted as ipas from my phone and download them to desktop with it, and i can then upload on other JB devices, thanks to a Cydia application named AppSync, pretty good indeed, but I tried and wasn't able to install them on iOS 7.
That was disappointing, I made additional tests and it appears that the PP Assistant application is able to install cracked apps on iOS 7.0 too, but not my unsigned apps (fails to verify the app rights).
Indeed there is a section in the chinese application where you can download and install commercial apps on iOS 7.0, so there must be a trick they use to re-sign the apps to make it appear as it's a legit app and thus be able to upload to the device even if not jailbroken.
If someone has any idea of what they actually do to make this happen, this would be very useful to know to test apps without JB on every device.
Non-jailbroken devices require valid code-signing to execute binaries. Either wait for a jailbreak to surface for iOS7.X, or find a code-signing service (they are available out there).
Using Xcode 7, you can install your app to your device using a freely available Apple ID.
Free On-Device Development
Now everyone can run and test their own app on a device—for free. You can run and debug your own creations on a Mac, iPhone, iPad, iPod touch, or Apple Watch without any fees, and no programs to join. All you need to do is enter your free Apple ID into Xcode. You can even use the same Apple ID you already use for the App Store or iTunes. Once you’ve perfected your app the Apple Developer Program can help you get it on the App Store.
See Launching Your App on Devices for detailed information about installing and running on devices.
Source

Xcode compile program once and install to multiple devices

When I press Build and Go - my program is being recompiled then send to iOS device - so if I need to install it to 2 or 3 devices - the checksum will vary. I need to have one binary for all the same devices - how could I do that - compile once and install on several devices this binary.
You need to add all your devices to your provisioning profile. Then you can create .ipa file containing your prebuilt app with Xcode and just distribute it to be installed using iTunes.
Do use TestFlight (https://testflightapp.com) or HockeyApp (http://www.hockeyapp.net). This allows you to distribute your app OTA (Over the Air), catch crash logs, symbolicate them, force users to update to specific version, ...
To do this, you have to put all devices into provisioning profile. When you do this, you're not forced to build and install it separately for each device, because the app is already signed for devices in your provisioning profile. Thus you can also simply grab the IPA drop it to iTunes and sync for example.

Can I download my own binaries from iTunes Connect?

The mac where I wrote my app is broken and so I cant access the code any more.
I uploaded it to my iTunes Connect account already. Is there a way to download the binaries from my account again?
Edit
iTunes for Mac version 12.7 removes the option to sync apps between your iOS devices and your Mac, and Apple has further removed the option to download iOS apps altogether from iTunes for Mac.
Consequently, the answer below no longer works... Bummer.
Outdated answer
As far as I know, there isn't a way to download the ipa (which is what's submitted to Apple) via iTunesConnect. However, it is possible to download the .ipa using iTunes.
Note, however, that the ipa will include resources (images, sound assets, etc), but the source code (.h, .m., etc) will be in a compiled format. Unfortunately, AFAIK, there is no way to download the source code in a non-compiled format via either iTunes or iTunesConnect.
Still, the assets alone may be useful in recreating a project. To download the ipa, try this:
Find and download your app using iTunes on your Mac. This will download the .ipa that you uploaded.
Open Finder > Goto Music > iTunes > iTunes Media > Mobile Applications (under Mac OSX 10.8.2, possibly within another directory under different versions of OSX)
Copy and paste your .ipa to another location, such as the Desktop (so it doesn't confuse iTunes)
Unzip the .ipa (Right click on the .ipa > Open With > Archive Utility/The Unarchiver/similar unzip program)
In the unzipped directory, you'll find your app under "Payload" > Your_App_Name.app
Right click on your .app file > Show Package Contents

Install an IPA through USB?

After using the "iPhone Configuration Utility" program to install IPA applications to my iPhone on the go, I wondered how this process worked. Within a few Google searches, I found out about "MobileDevice.framework" and the "MobileDevice Library" connected to it. After reading an article of all the Known Functions in the library, I found one called "AMDeviceInstallApplication". I thought this would work once I saw install, but I'm currently perplexed on how to use it.
TL;DR I have IPA files and I want to make an Xcode program (for Mac) that installs the IPA's application to a connected iOS device when a button is pressed.
Also, don't worry about the application not being signed correctly. It is signed with a provisioning profile installed on devices [the application] will be used with.
If you're still interested in this problem I've written a blog entry on how to install apps on a connected iPad / iPhone without using Xcode or iTunes.
This method allows you to run a Terminal command to install an iPA file.
http://pervasivecode.blogspot.co.uk/2012/06/install-ios-app-ipa-file-without-xcode.html
I suppose you could bundle up the terminal commands in your application and use it that way?
I found a simple way to install iPa file to real iPhone or iPad:
Connect iPhone to Mac via USB and follow the below steps:
Steps to follow:
Open Xcode
Click on Window
Select Devices and Simulators
Drag and drop the IPA files into it
App got installed on the iPad