Tuesday 5 February 2013

ADB Commands

ADB stands for Android Debug bridge. it's a command line tool that lets you communicate with an emulator instance or connected Android-powered device. You can find the adb tool in <sdk>/platform-tools/. Following are some of the useful adb commands.

adb devices  - lists all the connected devices / emulators
adb help - lists the adb commands
adb version - prints the adb version

Instaling / Uninstalling Apps & Uploading / Removing Files:

adb install <apk path>
adb uninstall <apk path>
adb pull <remote destination> <local destination>
adb push <location path> <remote /destination path>

Starting/Stopping adb server:

adb start -server - starts the adb server if it's not running already
adb kill -server  - stops the adb server

For collecting logs:

adb logcat –v time > <path/filename.txt>
adb logcat  <path\'filename.txt'>
adb shell logcat -v time > filename.txt

To remove files:

adb shell rm <destination/filename>
Ex: adb shell rm /sdcard/.Example/example.txt


Sunday 13 January 2013

Installing Android SDK (ADT Bundle)


Steps to install Android ADT Bundle:


1. Go to the Android Developer site http://developer.android.com/sdk/index.html, to download the latest SDK




2. Download the SDK file by clicking  the 'Download the SDK ADT Bundle for Windows' button to the Right Hand side

3. You will be presented with the 'Terms and Conditions' screen. Accept the Terms & Conditions, Select whether the OS is 32 bit or 64 bit and download the SDK.

Android SDK is downloaded. Unzip the downlaoded SDK file


To use / execute the ‘adb’ and ‘ddms’ from anywhere, it would be good if their paths are set to the ‘%PATH%’ Environment Variable


Setting up the path for 'adb' and 'ddms' to the Path Variable:



Now that the Android SDK is installed, let's set the path of 'adb' and 'ddms' to the Environment variable %PATH%, so we can execute/run  adb commands and ddms from anywhere in the command prompt

adb: adb is generally located at 'platform-tools'. Adb lets the user to communicate with the Emulator, the connected device , Platform Tools are generally used to develop and debug the applications

  Assumptions:

1. Let’s assume that we are using 'Windows 7' Operating System
2. 'adb' is installed at the path - 'G:\Software\android_sdk_ADT_bundle\adt-bundle-windows-x86_64\sdk\platform-tools'

Steps:

1. Go to 'My Computer'
2. Right click and select 'Properties'
3. Select the 'Advanced System Settings' option from the left hand side tab
4. Click 'Environment Variables' button from the 'Advanced' tab
5. Click the 'New' button under the System Variables 
6. Give the Variable Name as ADB_HOME and the Variable Value as      G:\Software\android_sdk_ADT_bundle\adt-bundle-windows-x86_64\sdk\platform-tools 
7. Click the 'OK' button
8. Now select the 'Path' variable from the System Variables, and click the Edit button
9. Go to the end of the Variable Value and  type ;%ADB_HOME%;
10. Click 'OK' button thrice 

Steps to check if the Path Variable is updated with the variable ADB_HOME or not:
If the command prompt is already open, close it and re-open it.

1. Type echo %PATH% and press the Enter key, the Path value will be returned, find that the last value of the Path is the value (i.e. G:\Software\android_sdk_ADT_bundle\adt-bundle-windows-x86_64\sdk\platform-tools ) of the System Variable ADB_HOME

Now you can run the adb commands from anywhere



Similarly create a variable for setting the path for ddms which generally resides under tools' folder of Android SDK
G:\Software\android_sdk_ADT_bundle\adt-bundle-windows-x86_64\sdk\tools 

Tuesday 8 January 2013

Taking logs of iPhone using IPCU


In this post, we will see how to collect logs for an iPhone using IPCU (iPhone Configuration Utility)

Pre-Requisites:

1. IPCU must have been installed on the PC/Mac system being used
2. iPhone device on which logs are required
3. PC / Mac System

Steps for using IPCU:

1. Start / open IPCU, there will not be any devices listed under the Devices option of LIBRARY (LHS)



2. Connect iPhone to the System, the connected iPhone will be listed under the DEVICES entry (at Left Hand Side)



3. The connected device's Name, Serial Number, Identifier, Phone Number, Owner Name will be listed in the grid on the Right Hand Side].
The connected device's info will also be listed under Summary tab of Device



4. Select the connected device by clicking the listed device on the Left Hand Side grid (as shown in the above picture)

5. Click the 'Console' tab, all the logs (both device and crash related) will be displayed here



6. Click the 'Save Console As...' option

7. Save Log Entries Dialog will be displayed, name the file (by default, the file will be named as devicelog.txt) and click the Save button, the log file will be saved in the selected destination in text format



Monday 7 January 2013

Steps to install IPCU

How to Collect Logs on iPhone:

We can collect the logs of iPhone using IPCU (iPhone Configuration Utility). In the current post we will see the Installation steps for IPCU

Steps to install IPCU:

  1. Go to google and search for 'IPCU for Windows'
  2. Click the first link http://support.apple.com/kb/DL1466

    3.   Click the 'Download' button, the IPCU Setup files would be dowloaded
    4.   Double click the Setup file to install IPCU


5.   Now, click the 'Run' button
6.   IPCU Installer wizard is displayed

7.   Click the 'Next' button, accept the License Agreement and click 'Next' button,
8.   Select the Destination Folder and click the Install button
9.    Allow the program to install, the setup will complete installing the IPCU and displays the Finish button. IPCU is now installed on the system. 



In the Next post, we will see how to collect logs...


Saturday 5 January 2013

Installing Apps on iPhone


In this post, we will see the different methods of installing the applications on iPhone

Following are the diferent ways using which we can install Apps on iPhone
  1. Apple App Store
  2. Ad Hoc distribution  (Test Flight)
  3. Continuous Integration with the Build Server (Jenkins)
  4. Installing Apps (.IPA files) on the device using ‘iTunes’

We as App testers install the Apps on iPhone using the 2ndand 3rd (4th method is occasionally used) (mentioned above).

Let's explore these methods one by one ...



1. Apple App Store:


Pre-Requisites:

  1. Apple ID and Password
  2. User should have been logged in using the Apple credentials

Steps:

  1. Navigate to Apple App Store on your device
  2. Go to the App page of your choice, App details page would be displayed
  3. Tap the Install button
  4. App gets installed on the device
Note: The above procedure is for installing the Free App from the Apple Store.



2. Ad Hoc Distribution:

These are the means of distributing OTA (Over The Air) Beta builds. Ex: Test Flight, Hockey. We used Test Flight for distributing the Beta Apps.


Pre-Requisites:

  1. Test Flight App should be installed on the device
  2. User should be registered with ‘Test Flight’ site i.e. our test mail id should be registered with Test Flight

Procedure:

The Dev Team uploads the application to Test Flight and mails us. We login to Test Flight using our credentials and then install the App.

Steps:

  1. When you login to Test Flight, you are displayed with the Application page where you have the version info, uploaded date, release notes, etc along with the ‘Install’ button 
  2. Tap the ‘Install’ button, the application gets installed on the device  


3. Build Server (Jenkins)

The Build Server can be scheduled to create builds as required thus continuously integrating the code developed
You can install the App by following the link provided

Methods of installing Apps from Jenkins

  1. Following the Daily Builds Mail 
  2. Login to Jenkins and installing the required build  

Note: User has to ‘install’ the App but not ‘download’ it.


4. Installing Apps (.IPA files) on the device using ‘iTunes’ 

Pre-Requisites: 

  1. '.IPA' file
  2. 'iTunes ' should  be installed on the PC/Mac system being used
Steps to be updated ....

Environment Variables

Environment Variables:


Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer. (source: wiki)


Steps to create JAVA_HOME variable and settings its path
1. Go to Control Panel by selecting the Computer Properties



2. Control Panel would be displayed, Now select the Advance System Settings from the left menu bar (as shown in the below figure)


3. System Properties is displayed with the 'Advanced'  as the current active tab

Click on the Environment Variables button under' Startup and Recovery'


4. Environment Variables dialog is displayed. Environment Variables consists of 'User Variables' and 'System Variables' sections.
Now, we will have to create a new User Variable. So, click the 'New' button under 'User Variables' section


Give the variable name as 'JAVA_HOME' and the variable value as the path of java jdk and click the 'OK' button


6. Observe that the variable 'JAVA_HOME' is created and listed under the User Variables. Now select the 'Path' variable from the System Variables and click the 'Edit' button


7. 'Edit System Variable' dialog is displayed. Path Variable is displayed in Edit mode. Select the Value of the Path Variable and go to end


8. Type ';%JAVA_HOME%\bin and click the 'OK' button.

Monday 24 September 2012

Steps to Install Java

1. Go to 'Google.com' and Search for 'Download Java'


2. Go to second option 'http://www.oracle.com/technetwork/java/javase/downloads/index.html


3. Click the 'Download' option under 'JDK', JDK Downloads Screen will be displayed


4. Select the 'Accept License Agreement' option, A thank you message for accepting the license is displayed along with the different options for software download


5. Select the software based on the OS on your system. Once downloaded, click the sdk file and follow the installation instructions








6. Once java is installed, go to Command Prompt and type the command 'java -version' to see the version of the java installed / present on the system


Next Post Update:
Creating and setting the System Variable 'JAVA_HOME' and adding it to the Environment Variable