Shake before serving, Refrigerate after opening...
Benjamin Lee
  • Blog
  • About
  • Contact

IOS TESTING TOOL: LIBIMOBILEDEVICE

11/15/2016

1 Comment

 
EDIT: updated instruction for "idevicepair" 
What is Libimobile? It's a library to communicate with services of Apple iOS devices using native protocols. I find this tool especially helpful in QA to help hunt for bugs and allows me to pull crashlogs and device info quickly.  If you have used ADB logcat for tailing Android logs then this will look very familiar. Below are my installation instructions on how to install and run on Mac. 

All source and credits are here: https://github.com/libimobiledevice/libimobiledevice

Install Instructions
1. Launch the terminal and enter the following commands to install:
xcode-select --install

2. Install Homebrew to help you install the necessary tools and libraries:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"​
  - You should start seeing the 🍺 during the installation

3. Install ideviceinstaller to interact with iOS devices like install, uninstall, archive, restore, etc.
brew install ideviceinstaller

4. Install these tools if you do not have them already
brew install automake
brew install libtool


5. Install libimobiledevice. This is the main tool we will be using for testing iOS. 
brew install libimobiledevice --HEAD
  
- If you get an error such as "Error: You must `brew link libusb` before libimobiledevice can be installed" Please run:
    brew link --overwrite libsub
  - Then re-enter brew install libimobiledevice --HEAD


Verify Tool is Working
1. Continue working in the terminal or launch a new session

2. Plug your iOS device to your computer

3. Enter the following in the terminal:
idevicepair pair
  - Your device will request confirmation to Trust your Mac. - Select Trust
  - Run idevicepair pair again
  - You should see something like this: 
blee@blee-m01:~$ idevicepair pair SUCCESS: Paired with device 
b72bf3e9d4df528c31db6b356a6d6fd5557222bb

4. Check that you can pull your device information
ideviceinfo
  
- You should see something like below:
blee@blee-m01:~$ ideviceinfo
ActivationState: Activated
ActivationStateAcknowledged: true
BasebandActivationTicketVersion: V2
BasebandCertId: 3840149528
BasebandChipID: 8343777
BasebandKeyHashInformation:
AKeyStatus: 2
SKeyHash: u+/tcCwvaQ+1Y9t40I4yegCEmB28mALlaROhaIVGBWo=
SKeyStatus: 0 


Start Tailing!
1. The main command you will use is idevicesyslog which will print out the device logs. You can also grep for keywords like "yourAppName".
idevicesyslog
**OR**
idevicesyslog | grep "yourAppName"

2. To stop press CTRL+C

3. List of commands can be found here: https://github.com/libimobiledevice/libimobiledevice/tree/master/tools
  - List of commands you may use more frequently. See Help for the necessary flags
idevicesyslog
idevicecrashreport
ideviceinfo
idevice_id
idevicerepair


Let me know what you think about this tool or if you have any hiccups on the installation process. Thanks!
1 Comment

    Author

    Hey there - my name is Ben and these are the snapshots of my memory dump.

    Archives

    February 2019
    November 2018
    October 2018
    November 2016
    March 2016
    October 2015
    July 2015
    June 2015
    May 2015
    December 2014

    Categories

    All
    Android
    Career
    Ios
    Programming
    Qa
    Ramen
    Random Update

    RSS Feed