i.MX Android Frequently Asked Questions

cancel
Showing results for 
Search instead for 
Did you mean: 

i.MX Android Frequently Asked Questions

i.MX Android Frequently Asked Questions

i.MX_Android_FAQ

i.MX Android FAQ

1 Sync project and Build

1.1 How can I download AOSP repo from mirror server?

By default, all aosp repo in the Android project will be downloaded from google server directly. But some may have issues to access the google server, if you have server which has mirrored the aosp repo then you can redirct the aosp repo download link.

In i.MX android project, all aosp repo will be included in the ${MY_ANDROID}/.repo/manifests/aosp*.xml, you can redirect the aosp repo remote by changing the "fetch" for remote "aosp", below is an example to redirect the remote link to <your-mirror-server-address>:

@@ -2,7 +2,7 @@ <manifest>

<remote name="aosp" - fetch="https://android.googlesource.com/" + fetch="<your-mirror-server-address>/" review="https://android-review.googlesource.com/" /> <default revision="refs/tags/android-10.0.0_r32" remote="aosp"

1.2 How do I configure the build information?

BUILD_ID and BUILD_NUMBER are two makefile variables that can be used in Android core build system to specify build information if they are defined. In our release package, we define the BUILD_ID as the internal release build number, and define the BUILD_NUMBER as the internal release date. You can customize the value of these two variables in the file of ${MY_ANDROID}/device/fsl/{product}/build_id.mk. "${MY_ANDROID}" represents a the root directory of Android source code. "{product}" is related to specific chips and boards, for example, it can be "imx8m/evk_8mq".

Below is an example to update the BUILD_ID for i.MX 8MQuad EVK

diff --git a/imx8m/evk_8mq/build_id.mk b/imx8m/evk_8mq/build_id.mk index 257b500..b177202 100644 --- a/imx8m/evk_8mq/build_id.mk +++ b/imx8m/evk_8mq/build_id.mk @@ -18,5 +18,5 @@ # (like "CRB01"). It must be a single word, and is # capitalized by convention.

-export BUILD_ID=1.0.0-ga-rc2 +export BUILD_ID=1.0.0-ga-rc3 export BUILD_NUMBER=20190114

1.3 How do I change boot command line in boot.img?

After using boot.img, we stored the default kernel boot command line inside of this image.
It will package together during android build.

You can change this by changing BOARD_KERNEL_CMDLINE's definition in ${MY_ANDROID}/device/fsl/{product}/BoardConfig.mk file.

NOTE:

Replace {product} with your product, eg, imx8m/evk_8mq.

2 Connectivity

2.1 How do I setup a computer to support ADB?

To setup a computer to support ADB, see Android web site for more details.

There is one thing not clear in the page mentioned above about "setup the system to detect the device" on Ubuntu Linux, an udev rules file need to be created and well edited, please follow below steps:

    1. Create the file of "/etc/udev/rules.d/51-android.rules" with root permission and add the vendors of the device to the file with below format

SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"

the id value of "18d1" is USB PID for google, which is used in our USB HAL code.

    2. now execute blow command on the host

chmod a+r /etc/udev/rules.d/51-android.rules

2.2 How do I setup a computer to support ADB In Recovery mode?

NXP i.MX 6/7 series support applying system update from ADB's.
Linux OS supports this feature by default.
For Windows OS, follow the steps below:

  1. Install the Google usb driver.
  2. Apply the patch below to the USB driver from Google.
  3. Connect the USB cable to the board and install the driver according to the instructions provided.

--- android_winusb.inf 2013-06-04 13:39:40.344756457 +0800 +++ android_winusb.inf 2013-06-04 13:43:46.634756423 +0800 @@ -23,6 +23,8 @@

[Google.NTx86] +;adb sideload support +%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_D001

;Google Nexus One %SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02 @@ -59,7 +61,8 @@

[Google.NTamd64] - +;adb sideload support +%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_D001 ;Google Nexus One %SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02 %CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02&MI_01

2.3 How do I enable USB tethering?

We support the USB tethering feature, and upstream device can be WIFI or Ethernet.
USB tethering can be enabled in the Settings UI after your OTG USB cable is connected to PC: Settings -> Network & internet -> Hotspot & tethering -> USB tethering.

On linux and Windows 7 PC, when USB tethering is enabled, you can easily get a usb network device with host driver installed automatically.
The IP and DNS server is automatically configured.

On Windows XP PC, when you have connected the board with the PC and you can see an unknown device named "Android" in the device manager, you have to manually install the tethering driver file of tetherxp.inf.
After it is successfully installed, you can see "Android USB RNDIS device" in the device manager.
By this time, you can use USB rndis network device to access the network.

2.4 How do I use MTP?

The Media Transfer Protocol is a set of custom extensions to the Picture Transfer Protocol (PTP).
Whereas PTP was designed for downloading photographs from digital cameras, Media Transfer Protocol supports the transfer of music files on digital audio players and media files on portable media players, as well as personal information on personal digital assistants.

Starting with version 4.0, Android supports MTP as default protocol transfer files with PC, instead of the USB Mass Storage.
By default, as Google suggested, we disabled the UMS and enabled MTP.

NOTE: Please make sure you disable the USB Tethering when using MTP. Under WinXP, you can not make MTP work with ADB enabled, but under Win7, MTP can work together with ADB in most of the cases.

When connecting the board to PC by USB cable, a USB icon will be shown in the notification bar.
Then you can click on the notification area, and select "Connected as a media device" to launch the USB computer connection option UI.
There, MTP and PTP can be chosen as current transfer protocol. You can also launch the option UI by Settings -> Storage -> MENU -> USB computer connection.

MTP on Windows XP

Windows XP supports PTP protocol by default.
In order to support MTP protocol, you must install Windows Media Player (Version >= 10).
When connecting to the PC, you can see MTP devices in windows explorer.
Since Windows XP only supports copy/paste files in the explorer, you cannot directly open the files in MTP device.

MTP on Windows 7

Windows 7 supports MTP(PTP) protocol by default.
When connecting to the PC, you can see MTP devices in windows explorer.
You can do any operations just as you would on your hard disk.

MTP on ubuntu

Ubuntu supports PTP protocol by default.
To support MTP protocol, you must install the following packages: libmtp, mtp-tools by

$ sudo apt-get install mtp-tools

If your default libmtp version is not 1.1.1 (current latest libmtp on ubuntu is 1.1.0), you must upgrade it manually by:

$ sudo apt-get install libusb-dev $ wget http://downloads.sourceforge.net/project/libmtp/libmtp/1.1.1/libmtp-1.1.1.tar.gz $ tar -xvf libmtp-1.1.1.tar.gz $ cd libmtp-1.1.1 $ ./configure --prefix=/usr $ make -j4 $ sudo make install

After you have done the steps outlined above, you can transfer the files between PC and Device by the following commands:

  • mtp-detect: find current connected MTP device
  • mtp-files: list all the files on MTP device

2.5 How do I set networking proxy for Wi-Fi?

To configure the proxy settings for a Wi-Fi network, you have to:

  • Tap and hold a network from the list of added Wi-Fi networks
  • Now choose "Advanced options", and scroll down to "Proxy".
  • Choose "Manually". Then enter the proxy settings provided by the network administrator.
  • Finally tap on the button denoted as "CONNECT".

2.6 How to adapt the "wifi country code" for a specific country and/or region?

In i.MX Android Software, "CN" is used as default code while it's mainly for mainland of China. Some other countries and/or regions are listed in below table for convenience. If the target country/region is not in below table,  Search on the internet with the keyword of "ISO 3166" for the result.

CodeCountry/Region name
CACanada
JPJapan
DEGermany
NLNetherlands
ITItaly
PTPortugal
LULuxembourg
NONorway
FIFinland
DKDenmark
CHSwitzerland
CZCzech Republic
ESSpain
GBUnited Kingdom
KRRepublic of Korea (South Korea)
FRFrance
SGSingapore
BRBrazil
ILIsrael
ATAustria
AUAustralia
BEBelgium
CYCyprus
EEEstonia
GRGreece
HUHungary
IDIndonesia
IEIreland
IDIndia
ISIceland
LTLithuania
LVLatvia
MYMalaysia
NZNew Zealand
PHPhilippines
PLPoland
SESweden
SISlovenia
SKSlovak Republic
THThailand
USUnited States
ZASouth Africa

2.7 How to switch the Power role of USB Power Delivery through USB Type-C?

Several i.MX 8 board support the USB Power Delivery(PD) through USB Type-C port.The board can be acted as Power Sink or Power Source.
Check corresponding Android Release Notes to see whether board support USB Power Delivery(PD) or not.
Below are the steps to switch the Power role:

1.Connect a reference device with i.MX board:

Use a Type-C to Type-C cable to connect i.MX board with the reference device(support Usb Power Delivery).

2.Check i.MX board device's role

If i.MX board connects as host , and the reference device is a device(has a usb Drop-down menu to choose transfer files, ptp), then do step 3 on the reference device.
If i.MX board connects as device(has a usb Drop-down menu to choose transfer files, ptp), and the reference device is a host, then do step 3 on i.MX board.

3.Power role switch

If i.MX board is host:
To make i.MX board as Power Source to charge the reference device, choose "Charging this device" on the reference device's usb Drop-down menu.
To make i.MX board as Power Sink to be charged by the reference device, choose "Supplying power" on the reference device's usb Drop-down menu.

If i.MX board is device:
To make i.MX board as Power Source to charge the reference device, choose "Supplying power" on i.MX board's usb Drop-down menu.
To make i.MX board as Power Sink to be charged by the reference device,choose "Charging this device" on i.MX board's usb Drop-down menu.

NOTE:

1.Below command can check current power role for the i.MX board
 cat /sys/class/typec/port0/power_role
 source [sink] : means this i.MX board is been charged by the reference device,
 [source] sink : means this i.MX board is charging the reference device,

2.The reference device should support the USB Power Delivery(PD).
You can check whether the reference device support it or not by below command
when it is connected with i.MX board's USB Type-C port:
 cat /sys/class/typec/port0/port0-partner/supports_usb_power_delivery,
If this value is yes, then this reference device supports usb power delivery.

Google pixel phone meets this requirement, but Google nexus 6 does not.

3 Core

3.1 How do I enter Android Recovery mode manually?

When the system is running, press "VOLUME DOWN" and "Power" to enter Recovery mode if board has these keys.
This check is in u-boot.git board support file, where you can change your preferred combo keys.
Also, you can input this command in the console:

reboot recovery # the board reset to recovery mode.

to enter recovery mode.

3.2 How do I enter the text menu in recovery mode?

NOTE: This function only works on boards with POWER / VOLUME UP / VOLUME DOWN keys.

  • When the system completes booted up into recovery mode, you will see an Android Robot Logo
  • Press the POWER KEY(keep pressed), and then VOLUME UP KEY going to the text menu like this:

recovery_menu.png

  • Move the menu item by VOLUME UP and VOLUME DOWN button.
  • Select the menu item by Power Key.
  • Select the required option using the direction keys on the keypad or keyboard.
    • reboot system now
    • apply update from ADB, you may update the software from update.zip by adb sideload command. Only NXP i.MX 6/7 series support this feature.
    • wipe data/factory reset. /data and /cache partitions are formatted.
    • wipe cache partition. /cache partition is formatted.
  • Reboot the system.

3.3 How do I upgrade system by ADB?

NXP i.MX 6/7 series support applying system update from ADB.
Before upgrade the system with ADB tool, please install adb driver first, see "2 Connectivity->2.2 How do I setup a computer to support ADB In Recovery mode?" section.

After the installation and setup of the driver is complete, follow the steps below:

  • Download the OTA update package to your computer, and connect the board to your PC with USB cable.
  • Ensure that the system has entered recovery mode. See "3.1 How do I enter Android Recovery mode manually" section.
  • Toggle the text Menu, move the cursor to "apply update from ADB", the UI is displayed as follows:

adb_update_system.png

  • On your computer, execute below command

adb sideload $YOUR_UPDATE_PACKAGE.zip

  • After the package is sent, the system starts updating the firmware with the update file.

3.4 How do I use android fastboot?

Fastboot is an utility which can be used to download images from Windows/Linux PC to the target storage device.
This utility is released by Google, which can be downloaded from Android official site.
Android release implements part of the fastboot commands in the U-Boot, such as: flash, reboot, getvar.

Before using the fastboot, Google usb driver should be installed on windows HOST and the target board should boot up to bootloader fastboot mode.

NOTE: the size of images downloaded by fastboot must be less than the related partition size.

Target side:

  • Power on the board with USB OTG connected.
  • Make sure board enter fastboot mode. There are several ways to enter fastboot mode.
    • Option1: Input reboot bootloader in console after boot.
    • Option2:
      • Connect power to the board. You'll see the following output from the console.

        U-Boot ... ... Fastboot: Normal Hit any key to stop autoboot: 3

      • Hit any key before the countdown completes to access the bootloader prompt. Type fastboot usb and hit Enter:

        Fastboot: Normal Hit any key to stop autoboot: 0 => fastboot usb

NOTE:

1.On HOST PC, it will prompt you that a new device was found and that you need to install the driver. Please install it.
2.After board enter U-Boot mode, type mmc part on target side to get detail partition name defined in partition table image. Some partitions are hardcoded in u-boot, it will not be listed here.

Host side:

  • Make sure fastboot is contained by the system environment variable of "PATH".
  • Go to image folder.
  • Below is an example to use fastboot to flash images for NXP imx8 series.
    • Make sure your board is in unlock state before flashing images with fastboot.
    • bootloader0/bootloader and gpt partitions is hardcoded in u-boot, it's not in partition table file.
    • names and number of partitions defined in partition table file may change as time goes on and new features are enabled.

      $ fastboot flash gpt partition-table.img $ fastboot flash bootloader0 u-boot.imx $ fastboot flash dtbo dtbo.img $ fastboot flash boot boot.img $ fastboot flash system system.img $ fastboot flash vendor vendor.img $ fastboot flash vbmeta vbmeta.img $ fastboot reboot

  • Below is an example to use fastboot to flash images for NXP i.MX 6/7 series.

    $ fastboot flash gpt partition-table.img $ fastboot flash bootloader u-boot.imx $ fastboot flash dtbo dtbo.img $ fastboot flash boot boot.img $ fastboot flash system system.img $ fastboot flash vendor vendor.img $ fastboot flash vbmeta vbmeta.img $ fastboot flash recovery recovery.img $ fastboot reboot

3.5 How to do incremental OTA update for imx6/7?

   3.5.1 Build target files

               You can use below command to generate target files under android environment:

$ cd ${MY_ANDROID} $ source build/envsetup.sh $ lunch evk_7ulp-userdebug $ make target-files-package -j4

After the build finish, you can find target files in following path:
${MY_ANDROID}/out/target/product/evk_7ulp/obj/PACKAGING/target_files_intermediates/evk_7ulp-target_files-**.zip

   3.5.2 Build incremental update package

An incremental update contains a set of binary patches to be applied to the data already on the device.
This can result in considerably smaller update packages:

Files that have not changed don't need to be included.

Files that have changed are often very similar to their previous versions, so the package need only contain an encoding of the differences between the two files.

You can install the incremental update package only on a device that has the old or source build used when constructing the package.
Before build incremental update package, you need refer "3.5.1 Build Target Files" section to build two target files:

PREVIOUS-target_files.zip and NEW-target_files.zip
PREVIOUS-target_files.zip is one old package which has already been applied on the device.
NEW-target_files.zip is the latest package which is waiting to apply on the device.

Then use below command to generate incremental update package under android environment:

$ cd ${MY_ANDROID} $ ./build/tools/releasetools/ota_from_target_files --block -i PREVIOUS-target_files.zip NEW-target_files.zip incremental-ota.zip

   3.5.3 Use adb to update android

          Follow "3.3 How do I upgrade system by ADB?" section to do incremental OTA":

adb sideload incremental-ota.zip

4 A/V

4.1 How do I check frame drop statistic while video playback?

Input below commands from console while video playback to get the real-time frame drop statistics.

dumpsys media.player | grep "num"

Then check the output,frame drop statistic will be showed like:

numFramesTotal(1892), numFramesDropped(0), percentageDropped(0.00%)

numFramesTotal: The total frames of the video file.
numFramesDropped: The dropped frame count as AV synchronization.
percentageDropped: The total dropped frame percentage.

5 Graphics

5.1 How to set GPU Minimal clock to balance performance and power consumption?

Normally GPU works at full speed.
When thermal driver report chip too hot, the GPU driver will adjust internal clock to reduce the power consumption to cool the chip down quickly.
In theory we should set the GPU clock to 1/64 so that chip can be cool down more quickly, but you may see the black screen or flicker issue when GPU work at so slow clock especially in large resolution.
There is below way to customize the threshold of GPU minimal clock based the chip and the resolution of their product.

Customer can set the minimal GPU clock by change below line in ${MY_ANDROID}/device/fsl/{product}/init.rc file, the value can be set to any value from 1 to 64.

write /sys/module/galcore/parameters/gpu3DMinClock 3

Current default value is 3.
Customer should tune and set the suitable value based on their test.

5.2 How to disable GPU acceleration?

There are three parts using GPU acceleration on android. Customer may need to disable some of them separately to narrow down issue. Below are the steps to do it.

1.Disable HWComposer:

You can disable HWComposer in Setting apk, Settings->System-> {} Developer options ->Disable HW overlays

2.Disable OpenGL Renderer

You can disable OpenGL Renderer and force use SKIA to draw by set "setprop sys.viewroot.hw false" and kill surfaceflinger thread.

3.Disable OpenGL 3D draw

Disable OpenGL 3D draw can only be done after Disable OpenGL Renderer as this operation will totally disable all 3D OpenGL acceleration.
You can do it by "mv /system/lib/egl/libGLES_android.so /system/lib/egl/libGLES.so" and kill surfaceflinger thread.

NOTE:

below example tell you how to kill surfaceflinger
root@sabresd_6dq:/ # ps | grep surfaceflinger
system 159 1 168148 7828 ffffffff b6f05834 S /system/bin/surfaceflinger
root@sabresd_6dq:/ # kill 159

6 Boot

6.1 How to boot form different paritions of eMMC for boards with i.MX 8QuadXPlus b0 chips?

i.MX 8QuadXPlus MEK with silicon revision b0 chips can boot from eMMC boot partition 32KB offset, but this is not a behaviour specified in the Reference Manual, it is not guaranteed to work fine on your boards. As the Reference manual shows that the first image container offset is 0 if the bootloader image is in eMMC boot partition or 32KB if the bootloader image is in eMMC User data area partition. If boot from eMMC boot partition 32KB offset does not work on your boards, some changes can be made to comply with the description in the Reference Manual:

1. bootloader image at eMMC boot partition with 0 offset

with this scenario, eMMC fast boot mode should be used for i.MX 8QuadXPlus silicon revision b0 chips.

eMMC fast boot mode is not enabled by default, and enabling it is irreversible. fastboot command "fuse prog -y 0 0x13 0x1" can be used to enable eMMC fastboot mode, this can be add to the uuu_imx_android_flash scripts. an example on uuu_imx_android_flash.sh:

diff --git a/common/tools/uuu_imx_android_flash.sh b/common/tools/uuu_imx_android_flash.sh index da45518cb..49ee53555 100755 --- a/common/tools/uuu_imx_android_flash.sh +++ b/common/tools/uuu_imx_android_flash.sh @@ -145,6 +145,9 @@ function uuu_load_uboot if [[ ${target_dev} = "emmc" ]]; then echo FB: ucmd mmc partconf ${target_num} 1 1 1 >> /tmp/uuu.lst fi + if [[ ${soc_name} = "imx8qxp" ]] && [[ ${uboot_feature} != *"c0"* ]]; then + echo FB: ucmd fuse prog -y 0 0x13 0x1 >> /tmp/uuu.lst + fi

if [[ ${intervene} -eq 1 ]]; then echo FB: done >> /tmp/uuu.lst

Also, the "bootloader0" partition offset for i.MX 8QuadXPlus silicon revision b0 should change to 0 from 32K.

diff --git a/drivers/fastboot/fb_fsl/fb_fsl_partitions.c b/drivers/fastboot/fb_fsl/fb_fsl_partitions.c
index 92c978e6c8..7e3679b19a 100644
--- a/drivers/fastboot/fb_fsl/fb_fsl_partitions.c
+++ b/drivers/fastboot/fb_fsl/fb_fsl_partitions.c
@@ -55,7 +55,7 @@ static ulong bootloader_mmc_offset(void)
{
if (is_imx8mq() || is_imx8mm() || ((is_imx8qm() || is_imx8qxp()) && is_soc_rev(CHIP_REV_A)))
return 0x8400;
- else if (is_imx8qm() || (is_imx8qxp() && !is_soc_rev(CHIP_REV_B))) {
+ else if (is_imx8qm() || is_imx8qxp()) {
if (MEK_8QM_EMMC == fastboot_devinfo.dev_id)
/* target device is eMMC boot0 partition, bootloader offset is 0x0 */
return 0x0;

2. bootloader image at eMMC User data area partition with 32KB offset.

with this scenario, code in uboot should be modified to make the "bootloader0" partition in eMMC User data area partiton.

Below patch can work for i.MX 8QuadXPlus MEK with b0 chips, but it obviously will impact other platforms, apply below path with caution.

diff --git a/drivers/fastboot/fb_fsl/fb_fsl_dev.c b/drivers/fastboot/fb_fsl/fb_fsl_dev.c
index f1c116bea2..c23f0a3e01 100644
--- a/drivers/fastboot/fb_fsl/fb_fsl_dev.c
+++ b/drivers/fastboot/fb_fsl/fb_fsl_dev.c
@@ -124,7 +124,7 @@ static int get_fastboot_target_dev(char *mmc_dev, struct fastboot_ptentry *ptn)
printf("Flash target is mmc%d\n", dev);
if (target_mmc->part_config != MMCPART_NOAVAILABLE)
sprintf(mmc_dev, "mmc dev %x %x", dev, /*slot no*/
- FASTBOOT_MMC_BOOT_PARTITION_ID/*part no*/);
+ FASTBOOT_MMC_USER_PARTITION_ID/*part no*/);
else
sprintf(mmc_dev, "mmc dev %x", dev);
}
@@ -559,4 +559,4 @@ void process_erase_mmc(const char *cmdbuf, char *response)
sprintf(response, "OKAY");

return;
-}
\ No newline at end of file
+}
diff --git a/drivers/fastboot/fb_fsl/fb_fsl_partitions.c b/drivers/fastboot/fb_fsl/fb_fsl_partitions.c
index 92c978e6c8..4629060402 100644
--- a/drivers/fastboot/fb_fsl/fb_fsl_partitions.c
+++ b/drivers/fastboot/fb_fsl/fb_fsl_partitions.c
@@ -231,7 +231,7 @@ static int _fastboot_parts_load_from_ptable(void)
bootloader_mmc_offset() / dev_desc->blksz;
ptable[PTN_BOOTLOADER_INDEX].length =
ANDROID_BOOTLOADER_SIZE / dev_desc->blksz;
- ptable[PTN_BOOTLOADER_INDEX].partition_id = boot_partition;
+ ptable[PTN_BOOTLOADER_INDEX].partition_id = user_partition;
ptable[PTN_BOOTLOADER_INDEX].flags = FASTBOOT_PTENTRY_FLAGS_UNERASEABLE;
strcpy(ptable[PTN_BOOTLOADER_INDEX].fstype, "raw");

eMMC also need to be set to boot from User data area partition, set this in uuu_imx_android_flash scripts.
An example on uuu_imx_android_flash.sh is as below, note that this will have impact on flashing other platforms, apply it with caution.

diff --git a/common/tools/uuu_imx_android_flash.sh b/common/tools/uuu_imx_android_flash.sh
index da45518cb..d98844d84 100755
--- a/common/tools/uuu_imx_android_flash.sh
+++ b/common/tools/uuu_imx_android_flash.sh
@@ -143,7 +143,7 @@ function uuu_load_uboot
echo FB: ucmd mmc erase ${uboot_env_start} ${uboot_env_len} >> /tmp/uuu.lst

if [[ ${target_dev} = "emmc" ]]; then
- echo FB: ucmd mmc partconf ${target_num} 1 1 1 >> /tmp/uuu.lst
+ echo FB: ucmd mmc partconf ${target_num} 1 7 1 >> /tmp/uuu.lst
fi

if [[ ${intervene} -eq 1 ]]; then

7 Misc

7.1 How to enable Developer options on Android Jelly Bean and later version?

Google has hidden the Developer options since the version Jelly Bean - here's how to get them back:
  • Go to the Settings menu, and scroll down to "System". Tap it. Then Tap "About tablet" menu.
  • Scroll down to the bottom again, where you see "Build number."
  • Tap it seven times. After the third tap, you'll see a playful dialog that says you're four taps away from being a developer. Keep on tapping, until you've got the developer settings back.

7.2 How do I enable or disable bus frequency feature?

The Bus Frequency driver is used to low down the DDR, AHB and AXI bus frequency in the SoC when the IPs who needs high bus frequency is not working.
This saves the power consumption in Android earlysuspend mode significantly (playing audio with screen off).
The bus frequency driver is enabled by default, if you want to enable or disable it, please do the following command in the console:

Disable:
   $ echo 0 > sys/bus/platform/drivers/imx_busfreq/busfreq/enable
Enable:
   $ echo 1 > sys/bus/platform/drivers/imx_busfreq/busfreq/enable

Please note that if you're using ethernet, the up operation will enable the FEC clock and force bus frequency to be high.
That means you can not go into low bus mode anymore, no matter the ethernet cable is plugged or unplugged.
So if you want to system going to low bus mode, you must do 'netcfg eth0 down' to shutdown the FEC manually.
If you want to use FEC again, please do 'netcfg eth0 up' manually, when FEC is shutdown with clock gated, the PHY can not detect your cable in/out events.

7.3 How do I use memtool?

   7.3.1 build memtool in Android environment

git clone https://source.codeaurora.org/external/imx/imx-test/ -b imx_5.4.24_2.1.0

cp -r imx-test/test/memtool ${MY_ANDROID}/external 

cd ${MY_ANDROID}

source build/envsetup.sh

lunch evk_8mm-userdebug

mmm external/memtool

            The built binaries stores at ${MY_ANDROID}/out/target/product/evk_8mm/vendor/bin/memtool_32 and ${MY_ANDROID}/out/target/product/evk_8mm/vendor/bin/memtool_64

   7.3.2 rebuild boot image

            Add below patch to enable CONFIG_DEVMEM, then rebuild boot.img and flash it on board: fastboot flash boot_a boot.img

diff --git a/arch/arm64/configs/imx_v8_android_defconfig b/arch/arm64/configs/imx_v8_android_defconfig
index ee40b9aa67e6..cdc9a1d56849 100644
--- a/arch/arm64/configs/imx_v8_android_defconfig
+++ b/arch/arm64/configs/imx_v8_android_defconfig
@@ -477,7 +477,6 @@ CONFIG_INPUT_ISL29023=y
# CONFIG_SERIO_SERPORT is not set
CONFIG_SERIO_AMBAKMI=y
# CONFIG_LEGACY_PTYS is not set
-# CONFIG_DEVMEM is not set
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_EXTENDED=y

   7.3.3 use memtool on board

Push memtool to board's disk:

adb push ${MY_ANDROID}/out/target/product/evk_8mm/vendor/bin/memtool_32 /data/local/tmp

Run memtool_32 to get help info:

evk_8mm:/ # /data/local/tmp/memtool_32
Usage:

Read memory: memtool [-8 | -16 | -32] <phys addr> <count>
Write memory: memtool [-8 | -16 | -32] <phys addr>=<value>

Version history
Revision #:
2 of 2
Last update:
2 weeks ago
Updated by:
 
Contributors