Android source code tracking and debugging (use of ddms and log)

Source: Internet
Author: User

1. Start the simulator (my source code is SDK 2.1)

Emulator-AVD sdk_2_1

2. Modify and compile modules

In the source code, write the log where you need to verify and save

First go to the source package

Mmm packages/apps/launcher if the prompt does not find the mmm command to execute. Build/envsetup. SH and then execute the above command 3. reinstall the application ProgramThe compiled APK package overwrites the original APK and enters the APK directory. Run the following command: ADB-install-r {APK package path} Extension: ADB-install-l: "-l" means forward-lock the app-R: "-R" means reinstall the app, keeping its data-S: "-s" indicates that the program is installed on the SD card, not in memory. 4. Open ddms to view log and process information. Open ddms: ddms & select the corresponding process, and the virtual machine hypes the corresponding software. The ddms will show that the program source code running process runs to your log location, the log information is displayed for tracking.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.