Difference between revisions of "Step by step guide to your first android app (DACU)"

From DAVE Developer's Wiki
Jump to: navigation, search
(Develop your firts application)
Line 74: Line 74:
  
 
....
 
....
 +
 +
=== Deploy the application on the target ===
 +
 +
Using ADB, please lauch the following command:
 +
 +
<pre class="workstation-terminal">
 +
adb install <>/.apk
 +
</pre>

Revision as of 16:22, 26 July 2012

Info Box
Android-logo.jpg Applies to Android
Dacu-top-view.png Applies to Dacu


Introduction[edit | edit source]

This tutorial shows how to develop your first Android application and run it on the DACU platform.

Boot the system[edit | edit source]

Let's assume the system is configured to boot loading the kernel and root file system from the internal flash.

Start the system as described in the Running Android in "normal mode" section.

Change the default ip address[edit | edit source]

If the default ip address is not suitable for your network configuration, you need to modify it. The first thing to do is to connect the null-modem serial cable to the J3 connector

Dacu serial cable

and start your preferred terminal emulator, as described in the Running Android in "full control mode" section.

On the u-boot console, please enter the following command to check the default ip address:

=> print ipaddr                                                                                                    
ipaddr=192.168.0.122                                                                                               

To change the ip address, please enter the following commands:

=> setenv ipaddr <enter-new-target-ip-address>                                                                                                          
=> saveenv                                                                                                         
Saving Environment to Flash...                                                                                     
Un-Protected 1 sectors                                                                                             
Un-Protected 1 sectors                                                                                             
Erasing Flash...                                                                                                   
. done                                                                                                             
Erased 1 sectors                                                                                                   
Writing to Flash... done                                                                                           
Protected 1 sectors                                                                                                
Protected 1 sectors                                                                                                
=>                                                                                    

Once configured, you can start the system launching the following commmand:

=> boot

For further information, please refer to the U-Boot section.

Check the Android Debug Bridge (ADB) and connect to the target[edit | edit source]

Start a connection through the Android Debug Bridge as described in the Running ADB section. Please note that setting the correct IP address on the target and is mandatory to make ADB work.

Develop your first application with Eclipse[edit | edit source]

Start working with Eclipse[edit | edit source]

Launch the Eclipse IDE and start the AVD Manager to create a DACU emulator.

Create a new project[edit | edit source]

.....

Launch the application on the emulator[edit | edit source]

....

Deploy the application on the target[edit | edit source]

Using ADB, please lauch the following command:

adb install <>/.apk