background preloader

Generic Hints

Facebook Twitter

Android Debugging - OMAPpedia. From OMAPpedia There are many different ways of debugging various parts of the Android software stack (ie: bootloader, kernel, applications etc.). We will cover a few tools that we have used. Please feel free to update this list or provide more information about other methods that may be available. [edit] Eclipse ADT [edit] Note on Installing Eclipse Plugins Before installing the Android Development Tools, be sure to put your proxy server (if applicable) into the General preferences under Network Connections and to "install" the software update link to the version of Eclipse you have (3.5 is " You will likely have to install several required plugins from Eclipse before ADT will install (possibly GEF and WST plugins). [edit] Debugging on Zoom2 with Eclipse ADT The Android Development Tools (ADT) plugin for Eclipse adds powerful extensions to the Eclipse integrated development environment.

Window -> Open Perspective -> Other -> DDMS; Click on OK 1. Repo command reference. Repo usage takes the following form: repo COMMAND OPTIONS Optional elements are shown in brackets [ ]. Once Repo is installed, you can get information about any command by running repo help COMMAND Many commands take a project list as an argument. You can specify project-list as a list of names or a list of paths to local source directories for the projects: repo sync [PROJECT0 PROJECT1 ... Init $ repo init -u URL [OPTIONS] Installs Repo in the current directory. Options: -u: specify a URL from which to retrieve a manifest repository.

Note: For all remaining Repo commands, the current working directory must either be the parent directory of .repo/ or a subdirectory of the parent directory. sync repo sync [PROJECT_LIST] Downloads new changes and updates the working files in your local environment. When you run repo sync, this is what happens: If the project has never been synchronized, then repo sync is equivalent to git clone. -d: switch specified projects back to the manifest revision. Upload diff. Intents and Intent Filters. An Intent is a messaging object you can use to request an action from another app component. Although intents facilitate communication between components in several ways, there are three fundamental use-cases: Intent Types There are two types of intents: Explicit intents specify the component to start by name (the fully-qualified class name). You'll typically use an explicit intent to start a component in your own app, because you know the class name of the activity or service you want to start.

For example, start a new activity in response to a user action or start a service to download a file in the background. Implicit intents do not name a specific component, but instead declare a general action to perform, which allows a component from another app to handle it. When you create an explicit intent to start an activity or service, the system immediately starts the app component specified in the Intent object.

Building an Intent Component name The name of the component to start. Action Data. Android How-tos. From OMAPpedia [edit] Audio BOARD_USES_GENERIC_AUDIO := true this define allows a dummy audio device to be built for initial testing. to use this option comment out other audio defines such as alsa: BOARD_USES_GENERIC_AUDIO := true #BOARD_USES_ALSA_AUDIO := true #BUILD_WITH_ALSA_UTILS := true [edit] Camera USE_CAMERA_STUB := true this define allows a dummy camera device to be built for initial testing. [edit] OMAP OMAP_ENHANCEMENT := true this define enables a wide range of android enhancements targeted towards the usage of OMAP3 and OMAP4 platforms.

[edit] Vendor Files new with gingerbread, a vendor directory is now supported. the vendor directory is expected to be in the root directory. if your vendor directory is in another part of the file system, include a link to the correct directory: ln -s /vendor /system/vendor [edit] JAR Files make sure that the /data and /cache directories are mounted read/write or you will get errors reporting that some of the jar files needed for the JNI are not found. or.

Run Android Application from Command Line. Sometime, we want to start the android application program from command line (Android Shell). Before, we usually clicking on the icon at application folder to run our program. So, there is an alternative way to run the program. We use the Android Shell and issue am command to brought up the program. below is an example to do that.1. Make sure that android emulator is running2. Enter the shell with issuing command at command shell (prompt): adb shell3. Issue am command. am command syntax is as follow : am [start|instrument]am start [-a <action>] [-d ] [-t <mime_type>] [-c <category> [-c <category>] ...] For example we have android program with Manifest like below: To run the code issue command like this (in one line): am start -a android.intent.action.MAIN -ncom.iftitah.android.contact/com.iftitah.android.contact.Contactok, Have a nice try!

Do you want to learn more ?