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);
-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