Android source code development about compilation and other small knowledge points summary

Source: Internet
Author: User

Tag:android    source     development Knowledge point    

  1. FastBoot Flash boot out/target/product/generic/boot.img no use, hint < waiting for device;
       reason lookup:
       Use the FastBoot command to view the device prompt without permission, as follows:
          $ fastboot-l Devices
           no permissions         fastboot usb:2-1.3
        then knew it was because of a permissions problem, that FastBoot did not have permission to resolve the steps:
       1. Change the Owner property of the FastBoot to root
          Use the which FastBoot command to locate the directory where the FastBoot is located, then enter the directory, and then use the command Chown to change its properties:
          sudo chown root:root FastBoot
       2. Change its permissions:
          sudo chmod +s fastboot
       Rerun
       fastboot Flash boot out/target/product/generic/boot.img is normal:
       sending ' boot ' (6520 KB) ...
       OKAY [  0.207s]
       writing ' boot ' ...
       OKAY [  0.311s]
       finished. Total time:0.518s

  2. Under Ubuntu, the ADB command relies on many packages, so if the ADT Toolkit is not installed and the ADB command is not available in the source directory, you can make sure that the Android source code can be compiled, and that it can be compiled with the ADB command in the compiled out directory.

  3. Compile on the server, there is no EABI-ARM-GCC error found, this part of the printing information is written in build/envsetup.sh, and then quit the server, re-login problem solved ...

  4. In recovery mode, ADB devices cannot be found and ADB operations cannot be performed. The same terminal, which is available on other Ubuntu desktops, determines the configuration issue for Ubuntu.
    FIX: Modify/etc/udev/rules.d/51-android.rules
    subsystem== "USB", attr{idvendor}== "18d1", attr{idproduct}== "d001", mode= "0600"
    Switch
    subsystem== "USB", attr{idvendor}== "18d1", attr{idproduct}== "d001", mode= "0666", owner= "user"

  5. Recovery mode, direct ADB push to replace/sbin/recovery is not feasible, after performing a replacement successfully, after restarting, recovery is still replaced with the previous, can only use the build recovery.img, and then use FastBoot Flash recovery recovery.img the way to upgrade. Because the file system under recovery is of type RAMDisk, power loss is lost.

  6. [Email protected]:~/workspace/project/rdadroid-5.1.1_r13$ fastboot Devices
    No Permissions FastBoot
    [Email protected]:~/workspace/project/rdadroid-5.1.1_r13$ which fastboot
    /home/guofengwan/workspace/project/rdadroid-5.1.1_r13/out/host/linux-x86/bin/fastboot
    [Email protected]:~/workspace/project/rdadroid-5.1.1_r13$

    In addition, a window is launched:
    [Email protected]:~$ fastboot Devices
    dragon2012 FastBoot
    [Email protected]:~$ which fastboot
    /home/guofengwan/environment/adt-bundle-linux-x86_64-20140702/sdk/platform-tools/fastboot

  7. Recovery mode, after the ADB shell entered, found that the non-root user, and run the SU command failed, after exiting the ADB root problem resolved.

  8. The user version of the Android code, each modification, if the individual mm a jar package or command, will cause the newly generated jar package file and the signature in the previous IMG file is inconsistent, so one but modified, need the whole source make once.
    In the Android source code, add a new command, enter the directory of the command mm, will be generated into the corresponding/system/bin/directory in the Out directory, and then compile the source code, the command will be generated into the system.img file, but if you commit to it,
    On the server will not go into the directory of the command mm operation, so you need to modify the compiled target corresponding to the Device.mk file, added to the device.mk.

  9. Android system debugging process, native code error, system tag; Java code error, androidruntime tag.

  10. adb shell Dumpsys window displays can get information such as the screen resolution of Android,

    View memory size by Cat/proc/meminfo command:

  11. The ADB Shell Service list can list the service of the system.

  12. Make Snod package The files inside the Out directory into IMG.

  13. In recovery mode, use Framebuffer to display the interface to get the image content displayed on the screen:
    ADB root
    adb shell cat/dev/graphics/fb0 > 2.data
    Using GIMP clock-in 2.data, according to the actual situation set RGB8888 or RGB565, such as pixel format, length and width of the difference rate.

  14. If in the source code, because a module compilation failed, but do not want because it, cause the entire Android source code compilation does not pass, can in the Build/core/envsetup.mk file, add Scan_exclude_dirs: = This module's name. You can make it non-compiled. The premise is that the compilation of this module has no effect on other modules.


This article is from the "absolute blog" blog, please be sure to keep this source http://4080467.blog.51cto.com/4070467/1743404

Android source code development about compilation and other small knowledge points summary

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.