Android is compatible with LCM with different resolutions.
1. Time Series
In JB, the interface disp_drv_get_lcm_driver implements compare id and obtains the lcm driver and lcm param actions. For DSI, the sequence is reset according to the settings in the lcm driver before each attempt to read the id, so the worry that different time series cannot read IDS is redundant.
2. About the boot logo
By default, the Macro BOOT_LOGO will be defined in ProjectConfig. mk to facilitate reading the corresponding resources in the \ mediatek \ custom \ common \ lk \ logo directory and display them as the boot logo.
There are two types of boot logos: U-boot logo and kernel logo. We will discuss the display principles of the two logos respectively.
· U-boot logo (and Battery logo)
The U-boot logo is the first interface after boot. The U-boot logo and Battery logo are packaged as logo. bin. For the JB version, the main workflow is as follows:
1. little Kernel first obtains lcm params in the platform_early_init stage. Its workflow is to find the inserted LCM through the read id, apply a frame buffer of the corresponding size based on the LCM resolution and determine the starting address of the frame buffer.
2. Reserve 4 M Ram for logo. bin
3. In the platform_init stage, the logo. bin is directly loaded into 4 M Ram.
4. After loading, mt_disp_show_boot_logo () in platform_init will call show_logo (0); the first logo will be displayed. The index = 0 indicates the logo. the first image compressed in bin, logo. the image compression sequence in bin allows you to view the file mediatek \ custom \ common \ lk \ logo \ rules. mk, as shown below
RESOURCE_OBJ_LIST: = \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ uboot. raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ battery. raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ low_battery.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ charger_ov.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ num_0.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ num_1.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ num_2.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ num_3.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ num_4.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ num_5.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ num_6.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ num_7.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ num_8.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ num_9.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ num_percent.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_animation_01.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_animation_02.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_animation_03.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_animation_04.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_animation_05.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_animation_06.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_animation_07.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_animation_08.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_animation_09.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_animation_10.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_10_01.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_10_02.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_10_03.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_10_04.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_10_05.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_10_06.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_10_07.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_10_08.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_10_09.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_10_10.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_bg.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_img.raw \
$ (BOOT_LOGO_DIR)/$ (BOOT_LOGO) _ bat_100.raw \
· Kernel logo
The Kernel logo works differently from the U-boot logo through init. the boot_logo_updater service registered in rc reads raw data files for painting. Therefore, the kernel logo is converted from bmp to raw, generate the raw data file boot_logo under the directory mediatek \ custom \ common \ lk \ logo. Then, the boot_logo file is moved to out \ target \ product \ xxxx \ system \ media \ images through the script file and packaged as system. img and download are available in the/system/media/images directory.
For the U-boot logo, you only need to compress images of different resolutions to logo. bin, and display the corresponding image according to different indexes during reading.
For the Kernel logo, We need to generate the boot_logo raw data file of different resolutions and copy it to the mobile phone. The boot_logo_updater can identify and read the corresponding logo file based on different resolutions.
Take qhd and hd720 resolution compatibility as an example. The solution is roughly as follows. Note that the corresponding logo needs to be completed by your company.
Implement the compare id interface in lcm driver
U-boot logo compression, in mediatek \ custom \ common \ lk \ logo \ rules. in mk, modify the RESOURCE_OBJ_LIST list and use the expected resolution to replace the BOOT_LOGO variable. (the definition of BOOT_LOGO in makefile will be invalid)
RESOURCE_OBJ_LIST: = \
$ (BOOT_LOGO_DIR)/$ qhd/$ qhd_uboot.raw \
...
...
$ (BOOT_LOGO_DIR)/$ hd720/$ hd720_uboot.raw \
...
...
Records the number of raw data inserted at each resolution.
Mt_disp_show_boot_logo (); The uboot logo of the corresponding id is read in the function based on the LCM resolution. For Fast startup of an ipo, please go to the directory mediatek \ external \ ipod \ bootlogo. mt65xx_disp_show_boot_logo () in cpp; make the same modification
5. The files modified in different SW versions in this step are different. On JB, modify mediatek \ custom \ common \ lk \ logo \ rules. mk to modify the following content:
######################################## #################
Ifneq ($ (strip $ (MTK_PLATFORM )),)
Include $ (CLEAR_VARS)
LOCAL_MODULE: = boot_logo_qhd
LOCAL_MODULE_TAGS: = user
LOCAL_MODULE_CLASS: = DATA
LOCAL_MODULE_PATH: = $ (TARGET_OUT)/media/images
LOCAL_GENERATE_CUSTOM_FOLDER: = custom: lk/logo
LOCAL_SRC_FILES: = custom/$ (LOCAL_MODULE)
Include $ (BUILD_PREBUILT)
Endif
######################################## #################
Ifneq ($ (strip $ (MTK_PLATFORM )),)
Include $ (CLEAR_VARS)
LOCAL_MODULE: = boot_logo_hd720
LOCAL_MODULE_TAGS: = user
LOCAL_MODULE_CLASS: = DATA
LOCAL_MODULE_PATH: = $ (TARGET_OUT)/media/images
LOCAL_GENERATE_CUSTOM_FOLDER: = custom: lk/logo
LOCAL_SRC_FILES: = custom/$ (LOCAL_MODULE)
Include $ (BUILD_PREBUILT)
Endif
On JB2, add the preceding content to the file mediatek \ external \ boot_logo_updater \ Android. mk. Do not add the statement.
LOCAL_MODULE_TAGS: = user; otherwise, the compilation fails.
6. This step has different modification methods on different SW versions. In JB, boot_logo_qhd & boot_logo_hd720 is added to fuse in \ build \ core \ user_tags.mk. In JB2, the value of PRODUCT_PACKAGES in \ build \ target \ product \ $ Project. mk is added to boot_logo_qhd & watermark
7. Define two raw data paths in boot_logo_updater, and then read the corresponding raw data file according to the LCM resolution in the main function.
Android software resolution compatibility with hardware
Hello,
Android designs the UI based on the resolution and DPI (pixel density) of each phone.
Generally, developers only need to set the approximate window conditions and some other details. Then, andriod will automatically layout the interface based on the resolution and pixel density.
It is not a simple extension, such as the differences between the application interfaces of tablets and mobile phones,
For tablets and mobile phones with the same resolution, their DPI is generally quite different.
By grasping these two elements, the program interface is easy to apply to different models.
I am specialized in programming, and I know a little about Andriod application development...--, I only have a little bit.
Are Android mobile phones compatible with General Android phones? Are mobile phones compatible with different resolutions?
Some software automatically identifies the screen and adjusts the resolution, and some are specially set for a specific resolution. However, the Android mobile phone software uses the same format as. APK, which is explained during resolution download or self-testing. The resolution can run at different times, but the display is incomplete.