The Dev Tools application is installed by default on all system images included with the SDK, so you can use it with the Android Emulator. With the Dev Tools application, you can enable a number of settings on your device that will make it easier to test and debug your applications.
If you'd like to install the Dev Tools application on a real development device, you can copy the application from your emulator and then install it on your device using ADB. To copy the application from a running emulator, execute:
adb -e pull /system/app/Development.apk ./Development.apk
This copies the .apk file into the current directory. Then install it on your connected device with:
adb -d install Development.apk
To get started, launch the Dev Tools application and select Development Settings. This will open the Development Settings page with the following options (among others):
onCreate(), which is important to debug the startup process of an Activity. When you change this option, any currently running instances of the selected application will be killed. In order to check this box, you must have selected a debug application as described in the previous option. You can do the same thing by adding
waitForDebugger()to your code.
onCreate(android.os.Bundle)code path, which would otherwise be difficult to force. Choosing this option will probably reveal a number of problems in your application due to not saving state. For more information about saving an activity's state, see the Activities document.
Note: You cannot turn this feature off once it is on, without restarting the emulator.
These settings will be remembered across emulator restarts.