Android Quick Debug Method

Source: Internet
Author: User

Android Quick Debug Method

the current on-market OTT network set-top box almost all use Android system, the company is currently many people using a compiled server, compiling an Android system takes a long time, Debugging Android part of the function when you have to compile the entire Android system to debug, seriously reduce the work development efficiency, coincidence to see the company Daniel writing Android debugging method, put with the network and reference to learn.

The company's network set-top box (OTT) boxes use the chips provided by Amlogic, taking the Amlogic Android system as an example.

1 Uboot Quick Debug Method 1.1 compile
#! /bin/bashexport PATH="/opt/amlogic/raspbian-toolchain-gcc-4.7.2-linux32/bin":$PATHexport PATH="/opt/amlogic/arm-2010q1/bin:/home/linyinghui/arm-2009q1/bin":$PATHexport PATH="/opt/amlogic/gnutools/arc2.3-p0/elf32-4.2.1/bin":$PATHexport PATH="/opt/amlogic/arc-4.8-amlogic-20130904-r2/bin":$PATH make distcleanmake m8b_m201_512M_configmake
1.2 Uboot individually packaged as an OTA upgrade package
    • Replace Bootloader.img with the compiled Uboot.bin
    • modifying scripts
Getprop ("Ro.product.device") =="m201" | | abort ("This is a for \"M201\"Devices This is a \""+ Getprop ("Ro.product.device") +"\".");Show_progress (0.800000, the); Set_bootloader_env ("Upgrade_step","3"); Show_progress (0.100000,Ten); Write_raw_image (Package_extract_file ("Bootloader.img"),"Bootloader"); Set_bootloader_env ("Upgrade_step","1"); Show_progress (0.100000,0);
    • Packaging signatures
-Xmx8192m-Xms1024m-jar signapk.-w$OTA_KEY.x509.pem$OTA_KEY.pk8 ${TMP_ZIP_PACKAGE} ${SIGN_ZIP_PACKAGE}
    • Upgrade Uboot using Ota upgrade method
2. Kernel Quick Commissioning Method 3. Recovery Quick Commissioning Method

A. Compiling

#cd kitkat#source build/envsetup.sh #lunch m201-user#cd bootable/recovery#mm编译出来的recovery:out/target/product/m201/system/bin/recovery

B. Debug with U disk

进入recovery后输入下面的命令运行新的recovery#busybox umount /udisk ;busybox mount -t vfat /dev/block/sda1 /udisk#busybox cp /udisk/recovery /sbin/recovery;#busybox sync;#busybox killall -9 recovery  

After executing the above 3 commands, the recovery will reboot and the new recovery is running after the reboot.
Because recovery uses the memory file system, the power-off restarts after the recovery or flash inside.

4. Framework Quick Commissioning Method

A. Compiling

#cd kitkat#source build/envsetup.sh#lunch m201_user#make framework 

B. ADB push
C. Restart

5. Services Quick Commissioning Method

A. Compiling

#cd kitkat#source build/envsetup.sh#lunch m201_user#make services

B. ADB push
C. Restart

6. Quick Switch Compilation method for user version and debug version

Android Quick Debug Method

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.