Instructions/Training Material for Android: ODK
How to INSTALL an Emulator
Installing and Using SDK Emulator
How to INSTALL an Emulator
Installing and Using SDK Emulator
- Installation url: http://developer.android.com/sdk/index.html
- Choose the installation package relevant for your operating system
- Simply unpack the zip file in a location of your choice: if you want to avoid using long paths, do not place in a subdirectory of a subdirectory.
- Depending on how you are going to use your Android emulator, it makes sense to add its directory to your Environment variables.
- On Windows, right-click on My Computer and select Properties. Under the Advanced tab, hit the Environment Variables button, and in the dialog that comes up, double-click on Path (under System Variables). Add the full path to the tools/ directory to the path.
- See graph below.
- Example for path added: C:\Program Files\android-sdk-windows\tools;
- (For Linux or Mac Users, please refer to instructions here: http://developer.android.com/sdk/installing.html)

- Open SDK Setup.exe for execution on windows.
- Select Available Packages in the left panel. This will reveal all of the components that are currently available for download from the SDK repository.
- Select the component(s) you'd like to install and click Install Selected. If you have enough space and if you will end up working with devices with different Android API levels, install all. If you are pressed for space, only choose the SDK platform and API version relevant and matching your device you want to deploy your forms on.
- Verify and accept the components you want and click Install Accepted. The components will now be installed into your existing Android SDK directories.
For more detailed information on available packages etc, please refer to:
http://developer.android.com/sdk/installing.html#components
They also host a troubleshoot section containing the most common reasons why your installation might not work.


- Next step is to create your virtual device. Click on Virtual Devices and New.
- You need to enter a name and specify the API level you want to test. It should be the same level or lower than the API level your smart phone is running on.
- Click on Start to test your virtual device
- To test ODK, you first need to install ODK Collect.
Generally, there are two ways to install applications; if you are on a wireless network which allows connecting to places like Android Marketplace you can directly connect through the internet: Start the Browser on the home page and enter the url or your search words. For ODK start with http://code.google.com/p/opendatakit/ , navigate to ODK Collect v1.1.5.apk and double-click on it. The application will download.
Click on it to install it. If you go back to your home view (click on the house) and unfold the grey widget at the bottom you can see all the applications your device comes with and the one you just installed.



- If you are not on wireless, you can install a local application using a Shell command.
- Navigate to your SDK folder and open folder /tools. Double click on adb.exe.
Note:If it does not open the Command Prompt automatically, try to open through your programme, under Accessories on Windows OS. Just make then sure to change the directory via ‘cd C:Program Files\android-sdk-windows\tools’ Depending on your Windows version the folder might be called platform-tools.
- This will open a command prompt. The command for installing an application is adb[1] install <path_to_apk>. If you place the application (for instance the downloaded ODK Collect) in the same folder as your adb commands you can leave out typing the path and use adb install ODKCollectv1.1.5.apk. Note: it does not like spaces, so remove the spaces from the application name and retry, should you get “can’t find to install” and you have verified that you path is correct.

- For testing xml forms, you can either download the samples from the ODK repository or copy your xml form onto the device.
- First option: launch application and click on Manage Forms And Data. Then click on New Forms at the bottom of the next window. The application will automatically connect to the data repository. Choose the one you want to test and click on Get Selected. Your form will download and appear on the screen.



- There are several options to copy your own form to the device.
- First option: you can use the adb command. The command is composed like this: adb push <local> <remote>. Launch the adb application and type adb push LLINsurvey_151110.xml sdcard/odk/forms.
Note: LLINsurvey_151110 stands for the full filename; if your file is not in the /tools directory where your adb shell is, you will need to add the path to your filename.

- Second Option: Install the software which has been delivered with your Android phone and drag and drop your xml file into the sdcard/odk/forms directory like you would with any other external hard drive.
- Third Option: Ensure that you have installed the USB driver in your Android SDK. If not, go to Available packages and download from there.



Connect your mobile device. Verify that you have the option Settings/Applications/Development/USB debugging ticked on your device. On the notification panel, choose option “Mount SD Card”. Now drag and drop files from your computer to your device which has now become accessible through your Explorer. Remember to place the xml form in sdcard/odk/forms.
- Fourth Option: Place your form on a server and download it; this is normally achieved through using ODK Aggregate; the form can then be downloaded through the Manage Forms and Data menu in ODK Collect.
In theory you could be downloading a form from any server and copy/paste from the /download folder on your SD card to your /odk/forms folder. However, for this you need to have a file explorer software installed on your android, either from the Android market (ex: AND Explorer) or an inherent file explorer (ex: My Files on Samsung Galaxy) on your device.
- On the ODK Collect main menu, click on Start New Form and you will be able to choose whether you want to test your downloaded form or the local form.



- Uninstalling an application works the same way as it would on a real Android device: You go to Settings/Applications/Manage applications and click on the Application you want to uninstall.


- Special tip: moving an application to the main page does work the same way it would on a real android: grab the application and drag it to the top left or top right and you will be able to place it wherever you want on your main page.
[1] Adb stands for Android debug bridge