Create specific device tree for AOSP

后端 未结 1 1386
猫巷女王i
猫巷女王i 2021-02-02 09:53

I followed official Google`s tutorial to build my own AOSP and succeeded in all steps: I have a \"Pure AOSP version\" running on a nexus emulator. https://source.android.com/sou

相关标签:
1条回答
  • 2021-02-02 10:41
    1. Process of adding new device to AOSP: First the device definition should be placed in device/vendor/model path. and then you should add AndroidProducts.mk file with COMMON_LUNCH_CHOICES which specify the name and the build type of your AOSP (Eng,userdebug,release) and PRODUCT_MAKEFILES which should point to you main device makefile.

    2. What goes to device/vendor/model: device/vendor/model contains the core configuration of the device itself such as Bluetooth configs, audio_policy configs, wpa_supplicant configs, device-tree, prebuilt hardware firmware or prebuilt images for boot or recovery. Also it contains The framework overlays that you can configure some of the framework parameter and for example decide the your android should have a navigation bar or what type of status bar you want. It also contains the SELinux policies that you can make rules for different processes, defines new contexts, and even ban some processes of running or having access to some resources. and at last it contains the makefiles that you can include what packages you need for you AOSP (aosp.mk) or what is you device configuration (BoardConfig.mk) for example what is the cpu architecture, gpu driver name or should it use hardware composer or does you system have wifi, bluetooth and if it has what is the address and the name of the required drivers. Also we have the init (in case that you want to add some additional changes to android boot process), fstab (describes the android partition and how should they be mounted) and ueventd and some udev rules that should be in this directory.

    3. Look at the number 1.

    4. For OTA update packages, first you need to generate the required keys that is essential for generating a zip for ota updates. if you are starting now , I suggest that you use fastboot. but if you want I put a link that shows how you can encrypt the required packages. when the encryption is done, you can generate your OTA image by this command:

      img_from_target_files signed-target-files.zip signed-img.zip

    OTA update guide: https://source.android.com/devices/tech/ota/sign_builds

    1. I think what you are looking for are not OTA packages, but how to form the unified zip. OTA packages will have changes made after the system was installed once. My OTA package has ~500mb of files (payload) etc. This was Full Update. Incremental Updates are much smaller. However when I build a flashable package, I get ~2.6gb of files. Flashing varies device to device. QCom (Qualcomm) requires QFil Tool to flash the full system. Or you flash the individual images through fastboot. So I don't know how 4. works for you. Looks like the original Answer was based on the poor documentation from Google. When it comes to AOSP, experience is must, documentation is never enough
    0 讨论(0)
提交回复
热议问题