i.MX Processors Knowledge Base

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX Processors Knowledge Base

Discussions

Sort by:
Overview The purpose of this doument is to introduce how to enable PCIe WiFi into i.MX6 Android release. Environment Setup Hardware: i.MX6 SABRE-SD board Software: Android Jelly Bean 4.2 Software Configurations The source codes of Intel PCIe WiFi have been integrated for i.MX6 SABRE-SD board into i.MX6 Android release. However it's disabled by default. To enable it for i.MX6 SABRE-SD board, you can do the following: Change BOARD_WLAN_VENDOR to INTEL in device/fsl board configuration files. For example, diff --git a/sabresd_6dq/BoardConfig.mk b/sabresd_6dq/BoardConfig.mk index 9c8a32d..912e752 100755 --- a/sabresd_6dq/BoardConfig.mk +++ b/sabresd_6dq/BoardConfig.mk @@ -11,7 +11,7 @@ TARGET_BOOTLOADER_BOARD_NAME := SABRESD PRODUCT_MODEL := SABRESD-MX6DQ # Wifi -BOARD_WLAN_VENDOR                       := ATHEROS +BOARD_WLAN_VENDOR                       := INTEL # for atheros vendor ifeq ($(BOARD_WLAN_VENDOR),ATHEROS) BOARD_WLAN_DEVICE                       := ar6003 @@ -30,6 +30,7 @@ WIFI_COMPAT_MODULE_ARG                         := "" endif #for intel vendor ifeq ($(BOARD_WLAN_VENDOR),INTEL) +BOARD_WLAN_DEVICE                       := INTEL BOARD_HOSTAPD_PRIVATE_LIB               ?= private_lib_driver_cmd BOARD_WPA_SUPPLICANT_PRIVATE_LIB        ?= private_lib_driver_cmd WPA_SUPPLICANT_VERSION                  := VER_0_8_X After changing BOARD_WLAN_VENDOR as "INTEL", the following files will be compiled for intel WiFi: device/fsl-proprietary/pcie-wifi/ external/wpa_supplicant_8 hardware/imx/wlan/intel/ hardware/libhardware_legacy/wifi/wifi_intel.c Enable PCIe WiFi driver in kernel_imx by running "make menuconfig" command: Select "System Type -> Freescale MXC Implementations -> PCI Express support" as "*" Select "Networking support -> Wireless ->  cfg80211 - wireless configuration API" as "*". Then select "Networking support -> Wireless -> Generic IEEE 802.11 Networking Stack (mac80211)" as "*" Select "Device Drivers ->  Network device support -> Wireless LAN -> Intel Wireless WiFi 4965AGN (iwl4965)" as "*" Then run "make" command to build kernel. The followings are the dependencies files to enable above configuration: Kernel configuration: * -> System Type -> Freescale MXC Implementations Select the PCI Express support. Then config intel WIFI driver: Generic IEEE 802.11 Networking Stack (mac80211) used by WIFI devices Symbol: MAC80211 [=y] Type : tristate Prompt: Generic IEEE 802.11 Networking Stack (mac80211) Defined at net/mac80211/Kconfig:1 Depends on: NET [=y] && WIRELESS [=y] && CFG80211 [=y] Location: -> Networking support (NET [=y]) -> Wireless (WIRELESS [=y]) Intel iwl4965 or iwl6300 card driver Symbol: IWL4965 [=y] Type : tristate Prompt: Intel Wireless WiFi 4965AGN (iwl4965) Defined at drivers/net/wireless/iwlegacy/Kconfig:65 Depends on: NETDEVICES [=y] && WLAN [=y] && PCI [=y] && MAC80211 [=y] Location: -> Device Drivers -> Network device support (NETDEVICES [=y]) Then you can follow up the instructions into Android User guide to build Android image. Known Limitation PCIe low power mode is not supported according to BSP release note. So when building in PCIe, the system suspend/resume should be disabled now.
View full article
Here are two patches to support BT656 and BT1120 output for i.MX6 ipuv3. With this patch, the i.MX6 can support the CVBS output on TV encoder. It is useful for a TV box. "L3.0.35_1.1.0_GA_bt656_output_patch.zip" is the patch for Freescale L3.0.35_1.1.0_GA_iMX6DQ BSP. "r13.4.1_bt656_output_patch.zip" is the patch for Freescale Android R13.4.1 BSP. 1. Features supported:     1) Support BT656(8 bits) and BT1120 (16 bits)interlaced output on display port.     2) Support both RGB and YUV frame buffer for BT656/BT1120 output.     3) Support PAL and NTSC mode.     4) Support on the fly switch between PAL and NTSC mode.     5) Support CVBS output based on adv7391 TV encoder. 2. Hardware link between iMX6 and adv7391 TV encoder chip.     IPU1_DI0_DISP_CLK connected to adv7391 CLKIN pin.     IPU1_DISP0_DAT_23~DISP0_DAT_16 connected to adv7391 P7~P0 pins.     IPU1_DI0_PIN2 connected to adv7391 HSYNC pin. (option)     IPU1_DI0_PIN4 connected to adv7391 VSYNC pin. (option)   - Android R13.4.1 kernel. 3. How to use -- Copy the two patch files to kernel folder.     $ git apply ./0001-Support-BT656-and-BT1120-output-for-iMX6-ipuv3.patch     $ git apply ./0002-Support-adv739x-TV-encoder-for-BT656-output.patch -- Select them in kernel config and build the new kernel image:                     Device Drivers  --->                       Graphics support  --->                           [*]   MXC BT656 and BT1120 output                           [*]   ADV7390/7391 TV Output Encoder -- Uboot parameters for video mode    Output BT656 NTSC data to display port with UVYV frame buffer mode:       "video=mxcfb0:dev=bt656,BT656-NTSC,if=BT656,fbpix=UYVY16"    Output BT656 NTSC data to display port with RGB565 frame buffer mode:       "video=mxcfb0:dev=bt656,BT656-NTSC,if=BT656,fbpix=RGB565"    Output BT656 PAL data to display port with RGB24 frame buffer mode:       "video=mxcfb0:dev=bt656,BT656-PAL,if=BT656,fbpix=RGB24"    Output CVBS NTSC signal on adv7391 with UYVY frame buffer mode:       "video=mxcfb0:dev=adv739x,BT656-NTSC,if=BT656,fbpix=UYVY16"    Output CVBS PAL signal on adv7391 with RGB565 frame buffer mode:       "video=mxcfb0:dev=adv739x,BT656-PAL,if=BT656,fbpix=RGB565" -- Switch between PAL and NTSC    $ echo D:720x480i-60 > /sys/class/graphics/fb0/mode    $ echo D:720x576i-50 > /sys/class/graphics/fb0/mode 4. Note     1) For 8 bits BT656 interface, the default data pins are "DISP0_DAT_23~DISP0_DAT_16", it can also        be any other continued display data pins, for example if "DISP0_DAT_7~DISP0_DAT_0" are used, the        macro "BT656_IF_DI_MSB" in "kernel_imx/drivers/mxc/ipu3/ipu_disp.c" should be changed from "23"        to "7".     2) For 16 bits BT1120 interface, the default data pins are "DISP0_DAT_23~DISP0_DAT_8", it can also        be any other continued display data pins, the macro "BT656_IF_DI_MSB" should be modified if the        hardware pins are changed.     3) When bt656 interface is the second display for each IPU,1-layer-fb (it can be checked with command        "$ cat /sys/class/graphics/fbx/fsl_disp_propperty"), the frame buffer can only be YUV format. In this        case, the IPU DC channel was used for BT656 display, it has no CSC function, so RGB frame buffer was        not supported. 2013-08-09 updated: The new release package "L3.0.35_1.1.0_GA_bt656_output_patch_2013-08-09.zip" had fixed the BT656 dual display issue on iMX6S/DL. Removed the old release package. 2013-09-04 updated: The new release package "r13.4.1_bt656_output_patch_2013-09-04.zip" had fixed the BT656 dual display issue on iMX6S/DL. For default, the dual display was tested with HDMI + CVBS, HDMI is the main display and adv739x CVBS output is the second display. For iMX6DQ which has two IPUs, please assign dual display to two IPUs, for example adv739x is on IPU1 DI0, it is fixed, because hardware pins used for it is fixed. Then we can assign HDMI or LVDS to another IPU (IPU2). For iMX6S/DL which has only one IPU, since adv739x had used IPU1 DI0, another display should be IPU1 DI1. 2013-09-30 updated: Added patch for L3.0.35_4.1.0_GA BSP, the file is "L3.0.35_4.1.0_GA_bt656_output_patch_2013-09-30.zip". 2014-07-21 updated: Added patch for L3.10.17_1.0.0_GA BSP, the file is "L3.10.17_1.0.0_GA_bt656_output_patch_2014-07-21.zip". 2015-01-26 updated: Updated the IPU microcode for 1080i50 and 1080i60 BT1120 output, the parameters "N" for command BMA is a 8 bits parameters, so its max value is 255, but for 1080i50 and 1080i60 output, it needs more blank data in each line, the "N" will be bigger than 255, the updated IPU microcode can fix this limitation. The updated file is "IPU_Microcode_Update_for_BT1120_1080i_20150126.zip". You can update the macro "DC_MCODE_BT656_xxx"  and function _ipu_dc_setup_bt656_interlaced() to the old patch if you used BT1120 mode to support 1080i display. The verified 1080i display mode is: {    /* 1080I60 Interlaced output */   "BT1120-1080I60", 30, 1920, 1080, 13468,   20, 3,   20, 2,   280, 1,   FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,   FB_VMODE_INTERLACED,   FB_MODE_IS_DETAILED,}, {   /* 1080I50 Interlaced output */   "BT1120-1080I50", 25, 1920, 1080, 13468,   20, 3,   20, 2,   720, 1,   FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,   FB_VMODE_INTERLACED,   FB_MODE_IS_DETAILED,}, 2016-01-28 updated: Updated IPU microcode to align with BT656.4 specification for NTSC output. For other BSP version with NTSC format support, please reference to ipu_disp_update.c for the final microcode. File "L3.0.35_4.1.0_GA_bt656_output_patch_20160128.zip"., Details, please reference to the readme.txt file in the package. 2016-06-24 update: Added BT656 and BT1120 progressive mode support. File "L3.0.35_4.1.0_GA_bt656_output_patch_20160624.zip". Details, please reference to the readme.txt file in the package. The patch for 3.14.52 GA1.1.0 BSP will be released in next week. 2016-06-27 update: Add BT656 and BT1120 display patch for 3.14.52 BSP. File "L3.14.52_1.1.0_GA_bt656_output_patch_2016-06-27.zip", details, please reference to the readme.txt in the package. 2017-03-10 update: Fixed a hard coding DC macro issue for progressive mode. Added patch "0008-Fixed-a-hard-coding-DC-macro-issue-for-progressive-m.patch" in L3.0.35_4.1.0_GA_bt656_output_patch_2017-03-10.zip. The code in patch "L3.14.52_1.1.0_GA_bt656_output_patch_2016-06-27" is correct.
View full article
After upgrading Ubuntu 11.04 to 11.10, I encountered several building failures such as the following: error:"_FORTIFY_SOURCE" redefined [-Werror] To fix this building issue: 1. Following guides in Initializing a Build Environment | Android Open Source, to get build env ready for Ubuntu 11.10; 2. Edit build/core/combo/HOST_linux-x86.mk and replace:     "HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0"     with     "HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0" Based on further Internet research, I found a Google Groups that summarizes all modifications to fix the building failure encountering in Ubuntu 11.10.
View full article
Overview The purpose of this document is to provide the patches to fix display mess issue in TextView based on MX6 Android R13.4-GA and R13.4.1 ICS release. Please note these patches are only validated basically for dedicated issues. If you find any side effect with these patches, please add the comments into this document. Issue Description Software: R13.4-GA or R13.4.1 Android releases Hardware: i.MX6Dual/Quad SabreSD board or i.MX6DualLite SabreSD board. Test steps: Install testviewtest.apk Run this APK and key in the text, you will see the text display mess after key in more texts. You can also get the issue descriptions from https://community.freescale.com/thread/303194 Patches You can get the patches from attached textview_fix.zip. For R13.4-GA, please apply the following patches: kernel_imx, unzip Kernel/r13.4-ga/kernel-patch-r13.4-ga-gpu4.6.9p10.tar.gz and apply the patches. device/fsl-proprietary/gpu-viv: unzip gpu_lib/gpu-viv-lib-4.6.9p10-font-libGAL-crash-fix.tar.gz and replace lib folder. For R13.4.1, please apply the following patches: kernel_imx, Apply the patch Kernel/r13.4.1/0001-upgrade-gpu-4.6.9p10-kernel-driver_r13.4.1.patc device/fsl-proprietary/gpu-viv: unzip gpu_lib/gpu-viv-lib-4.6.9p10-font-libGAL-crash-fix.tar.gz and replace lib folder.
View full article
Overview The purpose of this document is to demonstrate how to enable USB Bluetooth Dongle based on i.MX6 Android ICS. Hardware i.MX6Dual/Quad or i.MX6DualLite SabreSD board USB Bluetooth Dongle Software i.MX6DQ/MX6DL Android ICS R13.4 or R13.4.1 Release Changes 0001-enable-usb-dongle-BT.patch: Update bluedroid to disable RFKILL and enable HCIATTACH property for USB Bluetooth Dongle. diff --git a/bluedroid/Android.mk b/bluedroid/Android.mk index 17df49b..569be44 100644 --- a/bluedroid/Android.mk +++ b/bluedroid/Android.mk @@ -5,6 +5,13 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) +ifeq ($(BOARD_BLUETOOTH_DOES_NOT_USE_RFKILL),true) +  LOCAL_CFLAGS := $(LOCAL_CFLAGS) -DBLUETOOTH_DOES_NOT_USE_RFKILL +endif + +ifeq ($(BOARD_BLUETOOTH_USES_HCIATTACH_PROPERTY),true) +  LOCAL_CFLAGS := $(LOCAL_CFLAGS) -DBLUETOOTH_HCIATTACH_USING_PROPERTY +endif LOCAL_SRC_FILES := \   bluetooth.c diff --git a/bluedroid/bluetooth.c b/bluedroid/bluetooth.c index 4cc9204..2636942 100644 --- a/bluedroid/bluetooth.c +++ b/bluedroid/bluetooth.c @@ -44,7 +44,7 @@ static int rfkill_id = -1; static char *rfkill_state_path = NULL; - +#ifndef BLUETOOTH_DOES_NOT_USE_RFKILL static int init_rfkill() {      char path[64];      char buf[16]; @@ -135,6 +135,7 @@ out:      if (fd >= 0) close(fd);      return ret; } +#endif static inline int create_hci_sock() {      int sk = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI); @@ -151,13 +152,20 @@ int bt_enable() {      int ret = -1;      int hci_sock = -1;      int attempt; - +#ifndef BLUETOOTH_DOES_NOT_USE_RFKILL      if (set_bluetooth_power(1) < 0) goto out; - +#endif +#ifndef BLUETOOTH_HCIATTACH_USING_PROPERTY      LOGI("Starting hciattach daemon"); -    if (property_set("ctl.start", "hciattach") < 0) { +    if (property_set("ctl.start", "hciattach") < 0) +#else +    if (property_set("bluetooth.hciattach", "true") < 0) +#endif +    {          LOGE("Failed to start hciattach"); +#ifndef BLUETOOTH_DOES_NOT_USE_RFKILL          set_bluetooth_power(0); +#endif          goto out;      } @@ -186,14 +194,18 @@ int bt_enable() {          if (property_set("ctl.stop", "hciattach") < 0) {              LOGE("Error stopping hciattach");          } +#ifndef BLUETOOTH_DOES_NOT_USE_RFKILL          set_bluetooth_power(0); +#endif          goto out;      }      LOGI("Starting bluetoothd deamon");      if (property_set("ctl.start", "bluetoothd") < 0) {          LOGE("Failed to start bluetoothd"); +#ifndef BLUETOOTH_DOES_NOT_USE_RFKILL          set_bluetooth_power(0); +#endif          goto out;      } @@ -222,14 +234,20 @@ int bt_disable() {      ioctl(hci_sock, HCIDEVDOWN, HCI_DEV_ID);      LOGI("Stopping hciattach deamon"); -    if (property_set("ctl.stop", "hciattach") < 0) { +#ifndef BLUETOOTH_HCIATTACH_USING_PROPERTY +    if (property_set("ctl.stop", "hciattach") < 0) +#else +   if (property_set("bluetooth.hciattach", "false") < 0) +#endif +   {          LOGE("Error stopping hciattach");          goto out;      } - +#ifndef BLUETOOTH_DOES_NOT_USE_RFKILL      if (set_bluetooth_power(0) < 0) {          goto out;      } +#endif      ret = 0; out: @@ -246,9 +264,10 @@ int bt_is_enabled() {      // Check power first +#ifndef BLUETOOTH_DOES_NOT_USE_RFKILL      ret = check_bluetooth_power();      if (ret == -1 || ret == 0) goto out; - +#endif      ret = -1;      // Power is on, now check if the HCI interface is up 0002-usb_dongle-on-SabreSD.patch: Update MX6 board configuration files to enable USB Bluetooth dongle feature. diff --git a/imx6/imx6.mk b/imx6/imx6.mk @@ -63,6 +63,7 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \   audio.tinyalsa.freescale   \   audio.legacy.freescale    \ +        audio.a2dp.default                      \   alsa_aplay                \   alsa_arecord    \   alsa_amixer        \ diff --git a/imx6/sabresd/SabreSDBoardConfigComm.mk b/imx6/sabresd/SabreSDBoardConfigComm.mk index 03d8ce5..1a8a6bd 100755 --- a/imx6/sabresd/SabreSDBoardConfigComm.mk +++ b/imx6/sabresd/SabreSDBoardConfigComm.mk -# atheros 3k BT -BOARD_USE_AR3K_BLUETOOTH := true +# Default use USB BT dongle for imx6, so should enable below +BOARD_BLUETOOTH_DOES_NOT_USE_RFKILL := true +BOARD_BLUETOOTH_USES_HCIATTACH_PROPERTY := true + USE_ION_ALLOCATOR := false USE_GPU_ALLOCATOR := true diff --git a/imx6/sabresd/init.rc b/imx6/sabresd/init.rc index ff9f0ff..f127177 100755 --- a/imx6/sabresd/init.rc +++ b/imx6/sabresd/init.rc @@ -84,9 +84,12 @@ on boot      # No bluetooth hardware present      setprop hw.bluetooth 0      setprop wlan.interface wlan0 +    setprop hw.bluetooth 1 diff --git a/imx6/sabresd/required_hardware.xml b/imx6/sabresd/required_hardware.xml index c9a2271..f7db37b 100644 --- a/imx6/sabresd/required_hardware.xml +++ b/imx6/sabresd/required_hardware.xml @@ -22,6 +22,7 @@      <feature name="android.hardware.camera.flash" />      <feature name="android.hardware.camera.front" />      <feature name="android.hardware.location" /> +    <feature name="android.hardware.bluetooth" />      <feature name="android.hardware.location.network" />      <feature name="android.hardware.location.gps" />      <feature name="android.hardware.telephony" />
View full article
Overview This purpose of this document is to introduce how to support recovery mode for POR reboot event based on MX6 Android R13.4.1. Background If you boot Android R13.4.1 on MX6 SabreSD board, the reboot reason is Watchdog. But if the reboot reason is changed from Watchdog to POR, the recovery mode is failed to enter after factory reset. In R13.4.1, the bit 8 of SRC_GPR10 is used as the persistent bit of recovery mode. This bit is expected to be kept after reboot so that U-boot can use this bit to distinguish what mode should enter. However all SRC registers will be reset on POR sequence according to i.MX6DQRM Section 59.4.1.2.3 IPP_RESET_B (POR). So when the reboot reason is POR, the persistent bit of recovery mode is cleared even if the software set it before reboot. It causes the bootloader won't enter recovery mode after reboot. Software Changes According to i.MX6DQRM, the SNVS_LP General Purpose Register provides a 32 bit read write register, which can be used by any application for retaining 32 bit data during a power-down mode. So to support recovery mode for POR event, the SNVS_LP register can be used to store the persistent bit of recovery mode. The following changes are reqiured to apply (See patches.tar.gz) Apply for Uboot patch bootable/bootloader/uboot-imx/0001-ENGR00235817-mx6-use-SNVS-LPGPR-register-to-store-bo.patch. diff --git a/cpu/arm_cortexa8/mx6/generic.c b/cpu/arm_cortexa8/mx6/generic.c index 257c930..bd47130 100644 --- a/cpu/arm_cortexa8/mx6/generic.c +++ b/cpu/arm_cortexa8/mx6/generic.c @@ -1146,14 +1146,14 @@ int check_and_clean_recovery_flag(void) {   int flag_set = 0;   u32 reg; - reg = readl(SRC_BASE_ADDR + SRC_GPR10); + reg = readl(SNVS_BASE_ADDR + SNVS_LPGPR);   flag_set = !!(reg & ANDROID_RECOVERY_BOOT);   /* clean it in case looping infinite here.... */   if (flag_set) {    reg &= ~ANDROID_RECOVERY_BOOT; -  writel(reg, SRC_BASE_ADDR + SRC_GPR10); +  writel(reg, SNVS_BASE_ADDR + SNVS_LPGPR);   }   return flag_set; @@ -1168,14 +1168,15 @@ int fastboot_check_and_clean_flag(void) {   int flag_set = 0;   u32 reg; - reg = readl(SRC_BASE_ADDR + SRC_GPR10); + + reg = readl(SNVS_BASE_ADDR + SNVS_LPGPR);   flag_set = !!(reg & ANDROID_FASTBOOT_BOOT);   /* clean it in case looping infinite here.... */   if (flag_set) {    reg &= ~ANDROID_FASTBOOT_BOOT; -  writel(reg, SRC_BASE_ADDR + SRC_GPR10); +  writel(reg, SNVS_BASE_ADDR + SNVS_LPGPR);   }   return flag_set; diff --git a/include/asm-arm/arch-mx6/mx6.h b/include/asm-arm/arch-mx6/mx6.h index efb90c2..45381e2 100644 --- a/include/asm-arm/arch-mx6/mx6.h +++ b/include/asm-arm/arch-mx6/mx6.h @@ -732,6 +732,8 @@ #define SRC_GPR9  0x40 #define SRC_GPR10  0x44 +#define SNVS_LPGPR              0x68 + /* Get Board ID */ #define board_is_rev(system_rev, rev) (((system_rev & 0x0F00) == rev) ? 1 : 0) #define chip_is_type(system_rev, rev) \ Apply for kernel patch kernel_imx/0001-ENGR00235817-mx6-use-SNVS-LPGPR-register-to-store-bo.patch diff --git a/arch/arm/mach-mx6/system.c b/arch/arm/mach-mx6/system.c index 6d24f22..61649c5 100644 --- a/arch/arm/mach-mx6/system.c +++ b/arch/arm/mach-mx6/system.c @@ -563,7 +563,7 @@ void mxc_clear_mfgmode(void) #endif #ifdef CONFIG_MXC_REBOOT_ANDROID_CMD -/* This function will set a bit on SRC_GPR10[7-8] bits to enter +/* This function will set a bit on SNVS_LPGPR[7-8] bits to enter   * special boot mode.  These bits will not clear by watchdog reset, so   * it can be checked by bootloader to choose enter different mode.*/ @@ -574,18 +574,18 @@ void do_switch_recovery(void) {   u32 reg; - reg = __raw_readl(SRC_BASE_ADDR + SRC_GPR10); + reg = __raw_readl(MX6Q_SNVS_BASE_ADDR + SNVS_LPGPR);   reg |= ANDROID_RECOVERY_BOOT; - __raw_writel(reg, SRC_BASE_ADDR + SRC_GPR10); + __raw_writel(reg, MX6Q_SNVS_BASE_ADDR + SNVS_LPGPR); } void do_switch_fastboot(void) {   u32 reg; - reg = __raw_readl(SRC_BASE_ADDR + SRC_GPR10); + reg = __raw_readl(MX6Q_SNVS_BASE_ADDR + SNVS_LPGPR);   reg |= ANDROID_FASTBOOT_BOOT; - __raw_writel(reg, SRC_BASE_ADDR + SRC_GPR10); + __raw_writel(reg, MX6Q_SNVS_BASE_ADDR + SNVS_LPGPR); } #endif diff --git a/arch/arm/plat-mxc/include/mach/mx6.h b/arch/arm/plat-mxc/include/mach/mx6.h index 48b04b1..bb22de0 100644 --- a/arch/arm/plat-mxc/include/mach/mx6.h +++ b/arch/arm/plat-mxc/include/mach/mx6.h @@ -302,6 +302,8 @@ #define SRC_GPR9   0x40 #define SRC_GPR10   0x44 +#define SNVS_LPGPR   0x68 + /* GPC offsets */ #define MXC_GPC_CNTR_OFFSET  0x0
View full article
Starting from $52, the VAR-SOM-MX6 sets the bar for unparalleled design flexibility. The VAR-SOM-MX6 ensures scalable and simplified development, while also extending the product lifecycle. Thanks to four CPU core assembly options, customers can apply a single System on Module in a broad range of applications to achieve short time-to-market for their current innovations, while still accommodating potential R&D directions and marketing opportunities.     VAR-SOM-MX6 CPU: Freescale iMX6 Key features include: Freescale i.MX6 1.2GHz Quad / Dual / Single core Cortex-A9       2GB DDR3, 1GB SLC NAND Flash       Full HD 1080p video encoding/decoding capability       Vivante GPU providing 2D/3D acceleration       Simultaneous multiple display support       Gigabit Ethernet       TI WiLink™ 6.0 single-chip connectivity solution (Wi-Fi, Bluetooth®)       PCI-Express 2.0, S-ATA 3.0       Camera interface       USB 2.0: Host, OTG       Audio In/Out       Dual CAN Bus This versatile solution's -40 to 85°C temperature range and Dual CAN support is ideal for industrial applications, while 1080p video and graphics accelerations make it equally suitable for intensive multimedia applications. The impressive scalability of the VAR-SOM-MX6 satisfies the needs of the most demanding future application requirements whether faster processing power, enhanced algorithms or improved graphics and video performance to name just a few. The VAR-SOM-MX6 is an all-round solution with broad connectivity and sophisticated video and acceleration graphic capabilities, delivering a range of middle to high end assembly options all from the same product. For more details, please see VAR-SOM-MX6 CPU: Freescale iMX6
View full article
Introduction Disk encryption on Android is based on dm-crypt, which is a kernel feature that works at the block device layer. Therefore, it is not usable with YAFFS, which talks directly to a raw nand flash chip, but does work with emmc and similar flash devices which present themselves to the kernel as a block device. The current preferred filesystem to use on these devices is ext4, though that is independent of whether encryption is used or not. [1] Let's encrypt! I will show the whole process first, and then point out the issue I noticed on i.MX6. To use this feature, go to settings and security as below: Encrypted phones need to set the numeric PIN, so click Screen lock to set password: Choose PIN: After setting up PIN code, the Screen lock is showed "Secured with PIN" as below: We can then click Encrypt phone to start: Note the words on this page, it needs start with a charged battery and the charger needs to be on. Click Encrypt phone button and it will ask PIN code setup before: Enter the PIN code and then has the confirmed page: Click Encrypt phone, it will reset framework and starting to encrypt: After running 100%: It then reset the device. When it boots, it will ask you enter the PIN to enter system. Check Setting -> Security again: The status showed Encrypted under Encrypt phone. Errors While Doing Encryption on i.MX6 In the following, I list the error I met and the way to fix. Orig filesystem overlaps crypto footer region.  Cannot encrypt in place It needs to make sure the filesystem doesn't extend into the last 16 Kbytes of the partition where the crypto footer is kept. The encryption in place and get_fs_size() in system/vold/cryptfs.c will check it, so needs to re-make data partition. sudo mke2fs -t ext4 /dev/sde7 1034000 -Ldata The original size is larger than 103400, so I used this value to reserved 16 Kbytes for crypto footer. device-mapper: table: 254:0: crypt: Error creating IV E/Cryptfs ( 2221): Cannot load dm-crypt mapping table. The actual encryption used for the filesystem for first release is 128 AES with CBC and ESSIV:SHA256. The master key is encrypted with 128 bit AES via calls to the openssl library. This is done by enable CONFIG_CRYPTO_SHA256 in kernel. Enable post_fs_data_done Vold sets the property vold.post_fs_data_done to "0", and then sets vold.decrypt to "trigger_post_fs_dat". This causes init.rc to run the post-fs-data commands in init.rc and init..rc. They will create any necessary directories, links, et al, and then set vold.post_fs_data_done to "1". Vold waits until it sees the "1" in that property. Finally, vold sets the property vold.decrypt to "trigger_restart_framework" which causes init.rc to start services in class main again, and also start services in class late_start for the first time since boot. This is done by: diff --git a/imx6/etc/init.rc b/imx6/etc/init.rc index 17cbd4c..f2823f2 100644 --- a/imx6/etc/init.rc +++ b/imx6/etc/init.rc @@ -203,7 +203,7 @@ on post-fs-data      # must uncomment this line, otherwise encrypted filesystems      # won't work.      # Set indication (checked by vold) that we have finished this action -    #setprop vold.post_fs_data_done 1 +    setprop vold.post_fs_data_done 1 Don't unmount data partition when cryptfs_restart After the steps above, it can finish encryption. But I found Android will crash after encryption and reboot. When data partition is encrypted, Android's init to mount /data will fail. The cryptfs.c here to try unmount will fail since the data partition isn't mounted before. diff --git a/cryptfs.c b/cryptfs.c index 052c033..fd05259 100644 --- a/cryptfs.c +++ b/cryptfs.c @@ -694,7 +694,7 @@ int cryptfs_restart(void)      if (! get_orig_mount_parms(DATA_MNT_POINT, fs_type, real_blkdev, &mnt_flags, fs_options)) {          SLOGD("Just got orig mount parms\n"); -        if (! (rc = wait_and_unmount(DATA_MNT_POINT)) ) { +        //if (! (rc = wait_and_unmount(DATA_MNT_POINT)) ) {              /* If that succeeded, then mount the decrypted filesystem */              mount(crypto_blkdev, DATA_MNT_POINT, fs_type, mnt_flags, fs_options); @@ -710,7 +710,7 @@ int cryptfs_restart(void)              /* Give it a few moments to get started */              sleep(1); -        } +        //}      } References: [1]: Notes on the implementation of encryption in Android 3.0 | Android Open Source
View full article
To use Android GDB for native code, take mediaserver as an example. Setup on board. adb push prebuilt/android-arm/gdbserver/gdbserver system/bin/ adb shell ps adb shell /system/bin/gdbserver :5039 --attach <PID> & Setup on host. source build/env.sh adb forward tcp:5039 tcp:5039 gdbclient mediaserver b createPlayer c
View full article
Procrank can be used to check if a process has memory leakage. Procrank will list four types of memory usage. For details refer to: http://elinux.org/Android_Memory_Usage Vss = virtual set size Rss = resident set size Pss = proportional set size Uss = unique set size Uss can be used to check if a process has memory leakage. If the Uss increases when some operations start and stop, this means there could be memory leakage. Procrank can get from: <myandroid>/out/target/product/<product_name>/system/xbin/procrank and also needs to push to the library you target: <myandroid>/out/target/product/< product_name >/system/lib/libpagemap.so
View full article
What is HTML5 Video? HTML5 video is an element for the purpose of playing videos or movies in HTML5 specification. HTML5 video is intended by its creators to become the new standard way to show video on the web without plugins. Video will be shown inside the web page, like flash. HTML5 Video Web Page <video> element example <video src="movie.mp4" poster="movie.jpg" controls> </video> HTML5 video page source example <html>           <head>           </head>            <body>                      <video src="http://10.192.225.226/movie.mp4" width="640" height="480"  controls="true">                      </video>            </body> </html> HTML5 Video Rendering Path Performance Data in i.MX6Q with Android ICS With LVDS display, H264@1080p@20Mbps Can reach 30 fps With HDMI 1080p display, H264@1080p@10Mbps Can reach 25 fps HTML5 Video Website Some HTML5 Video website when accessing with android platform www.youtube.com www.iqiyi.com HTML5 reference document SPEC         http://dev.w3.org/html5/spec/single-page.html?utm_source=dlvr.it&utm_medium=feed Wikipedia page        http://en.wikipedia.org/wiki/HTML5
View full article
Android Power Debug and Optimization Introduction Android Power Management on i.MX Overview How to do power optimization for Android on i.MX How to check high power consumption on i.MX How to debug suspend/resume problems on i.MX Introduction This document describes i.MX Android power issues debug and power consumption optimization. Android Power Management on i.MX Overview What Power Manager introduced by Android • Early Suspend    It is allow drivers like LCD, keypad backlight, touch-screen, gsensor, to be notified when user-space writes to /sys/power/request_state to indicate that the user visible sleep state should change. These drivers will act as like Linux stand suspend() to let these devices entry in suspend for better battery life. •Late Resume    Late resume is matching with early suspend. It will resume the devices suspended during early suspend after the Stand Linux resume finished •Wake Locks     Wake locks are used by applications, services, kernel drivers to request CPU resources. A locked wakelock, depending on its type, prevents the system from entering suspend or other low-power states. It as a core member in android power management architecture from framework to kernel What introduced by i.MX to enhance the power framework BusFreq Support High bus, Low power audio bus and Low bus totally 3 system bus working points. Switching between these 3 bus mode according clock flags automatically. DDR running frequency will change according bus mode changing (highest 528/400MHz and lowest at 24MHz for MX6DQ/DL). CPUFreq The CPU frequency scaling device driver allows the clock speed of the CPUs to be changed on the fly. Once the CPU frequency is changed, the GP voltage will be changed to the voltage value. Enhance the default interactive governor for better performance on SDHC/GPU etc. System Power Profile Service and App (just for MX6DQ/DL) Support 3 profiles currently: Normal mode, Power Saving Mode and Performance Mode to get much better balance between performance and power consumption. Profiles can be customized according customers’ HW /MD design, including: CPU running max freq, trigger temperature, CPU running minimal freq, running cpu LDO bypass mode           i.MX6X has built-in LDO module, but also allows you to use external LDO suppliers. SW will provide the configuration using external LDO or internal LDO. How to do power optimization for Android on i.MX Suspend Mode All devices enter in suspend or low power Config GPIO PADs as High Z or input mode (depending on HW design,FSL provide Ref code) Cut off LDOs which no modules need (depending on HW design, FSL provide Ref code) DDR enter in self-refresh mode (FSL done) Config DDR IO Float pin to reduce the DDR IO consumption (FSL done) ARM core entry stop mode (WFI) (FSL done) All PLLs will cut off, just 32KHZ sleep clock living (FSL done) Notify the PMIC entry in standby to save some power (FSL done) User Idle Mode Optimization on device driver for WiFi, 3G, BT, screen brightness modules, etc., to save some power Let some device/GPIOs entry in suspend mode/low power mode Active power saving profile to reduce some system power loading. GPU 2D/3D auto entry in Stop/Standby mode if no activity needs update. (FSL done) Enable CPUFreq reduce ARM CORE power consumption (FSL done) Busfreq scanning to let system work at lower Freq to save power (FSL done) Audio/Video Playback Mode Optimization on device driver for WiFi, 3G, BT, screen brightness modules, etc., to save some power Let some device/GPIOs entry in suspend mode/low power mode Disable HW 3D acceleration for some Apps such as System UI, Music Player, etc., to save some power when System in IDLE or music playing mode. Enable CPUFreq and SOC WAIT mode, decrease CPU Freq/Voltage to save power for ARM CORE when no there is no task need cpu to handle(FSL done) Busfreq scanning will set bus work at low power audio bus mode to save some power (FSL done for audio case) DDR enter in self-refresh mode (FSL done for audio case) Reduce the screen brightness will save some power (for video case) VPU clock auto-gating to save power on SOC domain (for video case, FSL done) GPU 2D/3D auto-gating to save some power on SOC domain (FSL done) Try VDOA+IPU to bypass GPU in video playback(not comment for Android platform, pure Linux environment using this method, for it has some limitation such as the input/output size limit), this can save some power on DDR domain. How to check high power consumption on i.MX Idle Audio/Video Playback high power consumption Check the CPUFreq and  Bus_freq is enabled           cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor           cat /sys/devices/platform/imx_busfreq.0/enable Check whether the system bus working poing   For MX6Q:           cat /sys/kernel/debug/clock/osc_clk/pll2_528_bus_main_clk/periph_clk/mmdc_ch0_axi_clk/rate   For MX6DL/SL:           cat /sys/kernel/debug/clock/osc_clk/pll2_528_bus_main_clk/pll2_pfd_400M/periph_clk/mmdc_ch0_axi_clk/rate Check CPU Loading and Interrupt(cat /proc/interrupts) Check clock tree carefully to see which clocks arenot gated off  but no any modules need them.            powerdebug –d  -c SUSPEND MODE high power consumption Make sure all device entries are in suspend mode Make sure the system entry in DSM(measure the voltage &current of VDDARM_CAP, VDDSOC_CAP,DDR_1V5, VDD_HIGH…)      Some tips help to locate the problems Add debug message in device drivers which may lead high power consumption Enable PM debug in kernel Catch the waveform from these modules which may impact the high power consumption Remove devices from the board or do H/W rework to exclude some H/W problems How to debug suspend/resume problems on i.MX System could not entry in suspend mode Check below settings has been disabled: GPS has been disabled Don't connect USB cable to the board (adb will hold a wake lock) RIL will hold a wake lock if RIL failed to initialize (logcat -b radio) Setting->Application->Developer options->stay awake (stay awake not set) Check all wake locks which holed by kernel have been released          echo 15 > /sys/module/wakelock/parameters/debug_mask Check all user wake locks have been releaed          echo 15 > /sys/module/userwakelock/parameters/debug_mask System hang when resume or suspend Enable PM debug system to get more info about PM in kernel     make menuconfig  enable the PM debug sys [*] Power Management support                                                           [*]   Power Management Debug Support                                                           [*]     Verbose Power Management debugging Add no_console_suspend to the boot option for kernel         This makes the system print more useful info before entry in suspend Check the PMIC_STBY_REQ signal. Measure the VDDARM_IN Using Trace32 or ICE to locate the problem. Using RAMCONSOLE to dump the kernel log after reboot. Kernel resume back from suspend  but Android not    This is usually because of the wrong key layout file Use tool to get power key scan code        getevent  Correct the Keylayout         system/usr/keylayout/****.kl Correct the scandcode with your power key report value to Match the POWE key
View full article
Print caller stack may help you to analyze the program and find out the caller stack more easily. You can write your code like this: Java:      Exception e = new Exception();      Log.e(TAG,"xxx",e); C++ file:       #include <utils/Callstack.h>      android::CallStack stack;      stack.update(1,30);      stacn.dump("xxx"); Then you can see the function's caller stack in Android main log file. C file: #include <corkscrew/backtrace.h> #define MAX_DEPTH 31 #define MAX_BACKTRACE_LINE_LENGTH 800 static backtrace_frame_t mStack[MAX_DEPTH]; static size_t mCount; void csupdate(int32_t ignoreDepth, int32_t maxDepth) {     if (maxDepth > MAX_DEPTH) {         maxDepth = MAX_DEPTH;     }     ssize_t count = unwind_backtrace(mStack, ignoreDepth + 1, maxDepth);     mCount = count > 0 ? count : 0; } void csdump(const char* prefix)\ { size_t i = 0;     backtrace_symbol_t symbols[MAX_DEPTH];     get_backtrace_symbols(mStack, mCount, symbols);     for (i = 0; i < mCount; i++) {         char line[MAX_BACKTRACE_LINE_LENGTH];         format_backtrace_line(i, &mStack[i], &symbols[i],                 line, MAX_BACKTRACE_LINE_LENGTH);         ALOGE("%s%s", prefix, line);     }     free_backtrace_symbols(symbols, mCount); } void myFunc() {      csupdate(1, 30);      csdump("myprefix"); } In Android.mk, add libcorkscrew, as below LOCAL_SHARED_LIBRARIES := libxxx libyyy libcorkscrew
View full article
Graphics are a big topic in the Android platform, containing java/jni graphic framework and 2d/3d graphic engines (skia, OpenGL-ES, renderscript). This document describes the general Android graphic stack and UI features on Freescale devices. 1. Android Graphic Stacks All Android 3D apps and games have the following graphic stack: Android system UI and all Apps UI follow 2D graphic stack as below, the hardware render will accelerate Android 2D UI with GPU HW OpenGL-ES 2.0 to improve the whole UI performance. Hardware acceleration can be disabled on i.mx6 in device/fsl/imx6/soc/imx6dq.mk USE_OPENGL_RENDERER := false Then rebuild frameworks/base/core/jni, and replace libandroid_runtime.so Surfaceflinger is responsible of all surface layers composition, and  then generate the framebuffer pixmap for display devices. these graphic surface layers are from 2D/3D apps. Hwcomposer is the alternative module of Surfaceflinger with OpenGL-ES. Hwcomposer is used to combine the specific surface layers supported by specific vendor devices. Freescale i.MX6 devices use GPU 2D to combine most surface layers, and the system power can be reduced with GPU 2D instead of GPU 3D. The typical power saving case is video playback. Hwcomposer with GPU 2D can offload GPU 3D task when running game and benchmarks, it is proved to improve the overall system performance about 20%. 2. Performance measurment Show FPS for Android system performance For NFS boot you can set “debug.sf.showfps” to 1 in init.freescale.rc (“setprop debug.sf.showfps 1”) and then reboot the system. For SD or EMMC boot, you can issue command “setprop debug.sf.showfps 1” in console, then find system_server thread by top and kill it to reset the system. Graphic benchmarks for 3D capability measurement Quadrant Full test benchmark cover CPU, Memory, IO, 2D and 3D GLBenchmark http://www.glbenchmark.com/ NenaMark2 https://market.android.com/details?id=se.nena.nenamark2 An3DBench http://www.androidzoom.com/android_applications/tools/an3dbench_hnog.html AnTutu http://www.antutu.com/software.html 3DMark http://www.futuremark.com/benchmarks/3dmark06/introduction/ Browser benchmarks http://www.webkit.org/perf/sunspider/sunspider.html http://v8.googlecode.com/svn/data/benchmarks/current/run.html http://www.craftymind.com/guimark2/ http://www.craftymind.com/factory/guimark/GUIMark_HTML4.html http://themaninblue.com/writing/perspective/2010/03/22/ 3.  Android UI features Dual display with same content This feature is supported in the default image in Android i.MX 6 release package. In this feature, LVDS panel and HDMI output can be supported simultaneously. It is only enabled when the HDMI TV has been connected with the board. Overscan for TV devices Some TVs may miss display the contents in overscan area. To avoid the contents in overscan area being lost, the common implement is by underscanning with an adjustable black border and letitng the viewer adjust the width of the black border. The downscan operation is done by surfaceflinger when it does surface composition through HW OpenGL ES. There is no performance impact since all the work is done by GPU HW. Overscan can be configured in display setting in visual mode: 32 bits color depth 32bpp UI can be supported by adding “bpp=32” in uboot as below: setenv bootargs ‘… video=mxcdi1fb:RGB666,XGA,bpp=32 …’, also can configure it in display setting. Enable 32bpp frame buffer and application surface buffer will be allocate to RGBA8888 format instead of default RGB565 format, that means more system memory is allocated. After enabling 32bpp, if some applications still don't have better UI quality, check to see if  there is hard code to request RGB565 format surface (should request RGBA8888 format to get better quality). Sample code is attached to test for 32bpp (left is on 16bpp, right is on 32bpp) Display Visual Setting The display setting is the add-on feature in FSL Android release, it is very convenient for end-users to change display property, mostly for the following features: Dual display enablement Display color depth setting(16bpp, 32bpp) Overscan adjustment in horizontal and vertical orientation 4. Issue Diagnosis Application Compatibility Some Android applications may not run correctly on some Android releases. It may cause application compatibility, so check the application in other platforms. For example Neocore and Asphalt 5 can run on Eclair, Froyo, and Gingerbread, but will not correctly run on Honeycomb. GPU Compatibility Some game UIs may not correctly display on our Android release. When encountering this kind of issue, the customer can check whether it is caused by the game using an OpenGL extension which our GPU does not support. They can download another data package (for example not extension data package) to have a check. Others Enlarge GPU memory if you encounter UI abnormally displaying after running an application for a while. Some applications need Wifi connections, so monitor the console log to see whether there are any error reports.
View full article
Description about VPU & IPU usage in Android R13.4 GA release for i.MX6DQ
View full article
Trace the malloc and expose violate access to freed memory Introduction Libc has a malloc debug framework for difference debugger. Each debugger takes as a libraries, and override the default malloc/free/calloc/realloc/, hooked before calling the real functions. NOTE: This tip assume that you are working with an eng or userdebug build of the platform, not on a production device. Trace the low level malloc/free in bionic Bionic has a malloc debugger called leak debugger, which can record all the malloc/free in low level. And developers can use ddms on host to check each block of memory on heap by malloc. And ddms support convert caller function address to name conver. That makes easy for us to check which component, which function allocated for how many memories. You can turn on memory tracking with debug level 1: $ adb shell setprop libc.debug.malloc 1 $ adb shell stop $ adb shell start You need to restart the runtime so that zygote and all processes launched from it are restarted with the property set. Now all Dalvik processes have memory tracking turned on. You can look at these with DDMS, but first you need to turn on its native memory UI: Open ~/.android/ddms.cfg Add a line "native=true" Upon relaunching DDMS and selecting a process, you can switch to the new native allocation tab and populate it with a list of allocations. This is especially useful for debugging memory leaks. NOTE: to solve the module symbols, please export two env on HOST: $ export PATH=$PATH:<android src>/prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin $ export ANDROID_PRODUCT_OUT=<android src>/out/target/product/<platform> Expose the memory access to freed area In this release he Electric Fence 2.2.0 has been ported to Android. it's also a memory debugger tool as above leak debugger. It helps you detect two common programming bugs: software that overruns the boundaries of a malloc() memory allocation, and software that touches a memory allocation that has been released by free(). It will dump the call stack and mmap of the process, if the malloc/free is not called with correct parameters. It will also make a segment fault, when applications want to access the address which is freed. The usage of efence is almost same as above, which we define it's debug level to 15: $ adb shell setprop libc.debug.malloc 15 After setting this property, you can run your applications, and if there's any memory leakage, logcat will show information. Example: Access the memory, which has been freed already: root@android:/data # setprop libc.debug.malloc 15 I/libc    ( 4136): setprop using MALLOC_DEBUG = 1 (leak checker) root@android:/data # ./memtest I/libc    ( 4138): ./memtest using MALLOC_DEBUG = 15 (efence) F/libc    ( 4138): Fatal signal 11 (SIGSEGV) at 0x4015bff4 (code=2) I/DEBUG  ( 3856): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** I/DEBUG  ( 3856): Build fingerprint: 'freescale/sabresd_6dq/sabresd_6dq:4.0.4/R13.5-rc1/eng.b03824.20120711.11133 8:eng/test-keys' I/DEBUG  ( 3856): pid: 4138, tid: 4138  >>> ./memtest <<< I/DEBUG  ( 3856): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 4015bff4 I/DEBUG  ( 3856):  r0 00000000  r1 00000002  r2 40151c6c  r3 00000000 I/DEBUG  ( 3856):  r4 4015bff4  r5 bec75a54  r6 00000001  r7 bec75a5c I/DEBUG  ( 3856):  r8 00000000  r9 00000000  10 00000000  fp 00000000 I/DEBUG  ( 3856):  ip 00000000  sp bec75a20  lr 40133f8f  pc 0000a554  cpsr 60000010 I/DEBUG  ( 3856):  d0  203f810033915fe5  d1  0000000000000000 I/DEBUG  ( 3856):  d2  0000000000000000  d3  0000000000000000 I/DEBUG  ( 3856):  d4  0000000000000000  d5  0000000000000000 I/DEBUG  ( 3856):  d6  0000000000000000  d7  204cb48d00000000 I/DEBUG  ( 3856):  d8  0000000000000000  d9  0000000000000000 I/DEBUG  ( 3856):  d10 0000000000000000  d11 0000000000000000 I/DEBUG  ( 3856):  d12 0000000000000000  d13 0000000000000000 I/DEBUG  ( 3856):  d14 0000000000000000  d15 0000000000000000 I/DEBUG  ( 3856):  d16 41c0265a46a47ae1  d17 3f50624dd2f1a9fc I/DEBUG  ( 3856):  d18 41c9c8aff2800000  d19 0000000000000000 I/DEBUG  ( 3856):  d20 0000000000000000  d21 0000000000000000 I/DEBUG  ( 3856):  d22 0000000000000000  d23 0000000000000000 I/DEBUG  ( 3856):  d24 0000000000000000  d25 0000000000000000 I/DEBUG  ( 3856):  d26 0000000000000000  d27 0000000000000000 I/DEBUG  ( 3856):  d28 0000000000000000  d29 0000000000000000 I/DEBUG  ( 3856):  d30 0000000000000000  d31 0000000000000000 I/DEBUG  ( 3856):  scr 00000010 I/DEBUG  ( 3856): I/DEBUG  ( 3856):          #00  pc 0000a554  /data/memtest I/DEBUG  ( 3856):          #01  pc 00016834  /system/lib/libc.so (__libc_init) I/DEBUG  ( 3856): I/DEBUG  ( 3856): code around pc: I/DEBUG  ( 3856): 0000a534 e3a0000a ebfff8d1 e3a01001 e1a00004  ................ I/DEBUG  ( 3856): 0000a544 e5c4100a ebfff8d9 e3560001 e3a03000  ..........V..0.. I/DEBUG  ( 3856): 0000a554 e5c43000 0a000064 e59f21f0 e2857004  .0..d....!...p.. I/DEBUG  ( 3856): 0000a564 e5954004 e08f1002 e1a00004 ebfff8c0  .@.............. I/DEBUG  ( 3856): 0000a574 e3500000 0a00003f e59fc1d4 e1a00004  ..P.?........... I/DEBUG  ( 3856): I/DEBUG  ( 3856): code around lr: I/DEBUG  ( 3856): 40133f6c 68200701 0001f020 454e1046 2e00d018  .. h ...F.NE.... I/DEBUG  ( 3856): 40133f7c 2102da01 1c81e000 43394338 f7eb4622  ...!....8C9C"F.. I/DEBUG  ( 3856): 40133f8c 4605ed56 d1ec2800 da062e00 0101f008  V..F.(.......... I/DEBUG  ( 3856): 40133f9c f06f4620 f7ea4200 4628e8d4 87f0e8bd  Fo..B....(F.... I/DEBUG  ( 3856): 40133fac eff0f7e9 6003234b 30fff04f bf00e7f6  ....K#.`O..0.... I/DEBUG  ( 3856): I/DEBUG  ( 3856): memory map around addr 4015bff4: I/DEBUG  ( 3856): 40150000-4015a000 I/DEBUG  ( 3856): 4015a000-4015d000 I/DEBUG  ( 3856): 4015d000-4015e000 I/DEBUG  ( 3856): I/DEBUG  ( 3856): stack: I/DEBUG  ( 3856):    bec759e0  00000000 I/DEBUG  ( 3856):    bec759e4  00000000 I/DEBUG  ( 3856):    bec759e8  00000000 I/DEBUG  ( 3856):    bec759ec  4012090f  /system/lib/libefence.so I/DEBUG  ( 3856):    bec759f0  4015a014 I/DEBUG  ( 3856):    bec759f4  00002000 I/DEBUG  ( 3856):    bec759f8  00000004 I/DEBUG  ( 3856):    bec759fc  40120df1  /system/lib/libefence.so I/DEBUG  ( 3856):    bec75a00  4015bff4 I/DEBUG  ( 3856):    bec75a04  bec75a54  [stack] I/DEBUG  ( 3856):    bec75a08  00000001 I/DEBUG  ( 3856):    bec75a0c  bec75a5c  [stack] I/DEBUG  ( 3856):    bec75a10  00000000 I/DEBUG  ( 3856):    bec75a14  400d9167  /system/lib/libc.so I/DEBUG  ( 3856):    bec75a18  df0027ad I/DEBUG  ( 3856):    bec75a1c  00000000 I/DEBUG  ( 3856): #00 bec75a20  00008924  /data/memtest I/DEBUG  ( 3856):    bec75a24  bec75a54  [stack] I/DEBUG  ( 3856):    bec75a28  00000001 I/DEBUG  ( 3856):    bec75a2c  bec75a5c  [stack] I/DEBUG  ( 3856):    bec75a30  00000000 I/DEBUG  ( 3856):    bec75a34  400d9837  /system/lib/libc.so I/DEBUG  ( 3856): #01 bec75a38  00000000 I/DEBUG  ( 3856):    bec75a3c  00000000 I/DEBUG  ( 3856):    bec75a40  00000000 I/DEBUG  ( 3856):    bec75a44  00000000 I/DEBUG  ( 3856):    bec75a48  00000000 I/DEBUG  ( 3856):    bec75a4c  b00046ef  /system/bin/linker I/DEBUG  ( 3856):    bec75a50  00000001 I/DEBUG  ( 3856):    bec75a54  bec75b79  [stack] I/DEBUG  ( 3856):    bec75a58  00000000 I/DEBUG  ( 3856):    bec75a5c  bec75b83  [stack] I/DEBUG  ( 3856):    bec75a60  bec75b8f  [stack] I/DEBUG  ( 3856):    bec75a64  bec75ba2  [stack] I/DEBUG  ( 3856):    bec75a68  bec75bc5  [stack] I/DEBUG  ( 3856):    bec75a6c  bec75bde  [stack] I/DEBUG  ( 3856):    bec75a70  bec75c08  [stack] I/DEBUG  ( 3856):    bec75a74  bec75c20  [stack] I/DEBUG  ( 3856):    bec75a78  bec75c57  [stack] I/DEBUG  ( 3856):    bec75a7c  bec75c61  [stack] I/BootReceiver( 3551): Copying /data/tombstones/tombstone_00 to DropBox (SYSTEM_TOMBSTONE) D/dalvikvm( 3551): GC_CONCURRENT freed 398K, 10% free 8805K/9735K, paused 3ms+5ms [2] + Segmentation fault  ./memtest
View full article
Introduction This guide provides a step by step explanation of what is involved in adding a new WiFi driver and making a new WiFi card work well in a custom Android build. (This guide was written for Android 4.1 but should be applicable to previous Android releases and hopefully future releases.) Contents Understand how Android WiFi works Port WiFi driver. Compile a proper wpa_supplicant in your BoardConfig.mk Modify your wifi.c in HAL. Launch wpa_supplicant and dhcpcd services in init.rc. Several debug tips. Understand How Android WiFi Works As the following figure, Android wireless architecture can be divided into three parts: Java Framework(WifiManager, WifiMonitor etc..), HAL(wifi.c,wpa_supplicant,netd) kernel space modules(wireless stack, wifi drivers) Java Framework communicate with wpa_supplicant using native interface (wifi.c). Wpa_supplicant and netd uses wireless extension or nl80211 to control WiFi drivers. Port WiFi driver Usually WiFi driver is provided as a kernel module. There are mainly two types of Android WiFi architecture:nl80211 and wext. With the implementation of nl80211/cfg80211 many wireless drivers in main line kernel  support nl80211 interface instead of wireless extension. For different vendors’ WiFi drivers, writing one Android.mk to add its compile into Android is what you should do. Here take atheros’s AR6kl as an example: ath6kl_module_file :=drivers/net/wireless/ath/ath6kl/ath6kl_sdio.ko $(ATH_ANDROID_SRC_BASE)/$(ath6kl_module_file):$(mod_cleanup) $(TARGET_PREBUILT_KERNEL) $(ACP)         $(MAKE) -C $(ATH_ANDROID_SRC_BASE) O=$(ATH_LINUXPATH) ARCH=arm CROSS_COMPILE=$(ARM_EABI_TOOLCHAIN)/arm-eabi- KLIB=$(ATH_\ LINUXPATH) KLIB_BUILD=$(ATH_LINUXPATH)         $(ACP) -fpt $(ATH_ANDROID_SRC_BASE)/compat/compat.ko $(TARGET_OUT)/lib/modules/         $(ACP) -fpt $(ATH_ANDROID_SRC_BASE)/net/wireless/cfg80211.ko $(TARGET_OUT)/lib/modules/ include $(CLEAR_VARS) LOCAL_MODULE := ath6kl_sdio.ko LOCAL_MODULE_TAGS := optional LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/modules LOCAL_SRC_FILES := $(ath6kl_module_file) include $(BUILD_PREBUILT) Compile a proper wpa_supplicant in your BoardConfig.mk In Android’s external directory, there are two wpa_supplicant_* projects. For wext-based wifi driver, wpa_supplicant_6 can be used. For nl80211-based WiFi driver, wpa_supplicnat_8 can only be used. But if WiFi vendors supply their own customized wpa_supplicant, it will be much easier to debug the communication between wpa_supplicant and WiFi drivers. No matter which supplicant  you choose, just control their compile in your BoardConfig.mk. Take atheros’s ath6kl as an example: ifeq ($(BOARD_WLAN_VENDOR),ATHEROS) BOARD_WLAN_DEVICE                        := ar6003 BOARD_HAS_ATH_WLAN                      := true WPA_SUPPLICANT_VERSION                  := VER_0_8_ATHEROS WIFI_DRIVER_MODULE_PATH                  := "/system/lib/modules/ath6kl_sdio.ko" WIFI_DRIVER_MODULE_NAME                  := "ath6kl_sdio" WIFI_DRIVER_MODULE_ARG                  := "suspend_mode=3 wow_mode=2 ar6k_clock=26000000 ath6kl_p2p=1" WIFI_DRIVER_P2P_MODULE_ARG              := "suspend_mode=3 wow_mode=2 ar6k_clock=26000000 ath6kl_p2p=1 debug_mask=0x2413" WIFI_SDIO_IF_DRIVER_MODULE_PATH          := "/system/lib/modules/cfg80211.ko" WIFI_SDIO_IF_DRIVER_MODULE_NAME          := "cfg80211" WIFI_SDIO_IF_DRIVER_MODULE_ARG          := "" WIFI_COMPAT_MODULE_PATH                  := "/system/lib/modules/compat.ko" WIFI_COMPAT_MODULE_NAME                  := "compat" WIFI_COMPAT_MODULE_ARG                  := "" endif then you need to provide a proper wpa_supplicant.conf  for your device. wpa_supplicant.conf  is very important because the control socket for android is specified in this file(ctrl_interface=). This file should be copied to /system/etc/wifi. Minimum required config options in wpa_supplicant.conf : There are two different ways in which wpa_supplicant can be configured, one is to use a "private" socket in android namespace, created by socket_local_client_connect() function in wpa_ctrl.c and another is by using a standard UNIX socket. Android private socket ctrl_interface=wlan0 update_config=1 - Unix standard socket ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi update_config=1 Modify your wifi.c in HAL Here what you should do is modifying some codes like wifi_load_driver and wifi_unload_driver. For Broadcom or CSR’s wifi driver, you can directly use the original wifi.c. But for atheros’s ath6kl driver, there are total three  .ko modules to install. So some micro variables and codes need to be changed to adapt it. Launch wpa_supplicant and dhcpcd services in init.rc If you have configured to use android private socket, you should do like this: service wpa_supplicant /system/bin/wpa_supplicant -Dwext -iwlan0 -c / data/misc/wifi /wpa_supplicant.conf socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot or if you have configured to use unix standard socket, you should do like this: service wpa_supplicant /system/bin/wpa_supplicant -Dwext -iwlan0  -c/data/misc/wifi/wpa_supplicant.conf disabled oneshot If WiFi driver is not “wext” but “nl80211”, you should change it to –Dnl80211. For dhcpcd, you should lunch it like the following: service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL     class late_start     disabled oneshot The parameters “-ABKL” can largely enhance wifi connection speed.  About what “ABKL” stand for, you can refer to dhcpcd’s GNU manual. Several debug tips Incorrect permissions will result in wpa_supplicant not being able to create/open the control socket andlibhardware_legacy/wifi/wifi.c won't connect. Since Google modified wpa_supplicant to run as wifi user/group the directory structure and file ownership should belong to wifi user/group (see os_program_init() function in wpa_supplicant/os_unix.c ). Otherwise errors like: E/WifiHW  (  😞 Unable to open connection to supplicant on "/data/system/wpa_supplicant/wlan0": No such file or directory will appear. Also wpa_supplicant.conf should belong to wifi user/group because wpa_supplicant will want to modify this file. How to Enable debug for wpa_supplicant.               By default wpa_supplicant is set to MSG_INFO that doesn't tell much.                    To enable more messages:                 modify common.c and set wpa_debug_level = MSG_DEBUG                 modify common.h and change #define wpa_printf from if ((level) >= MSG_INFO) to if ((level) >= MSG_DEBUG)         3. WiFi driver’s softmac.               For most vendors’ WiFi driver, the mac address is fixed. We should add one softmac rule to let WiFi driver’s mac is unique for each board.
View full article
When streaming, if you want to play a streaming URL, it can be inconvenient if the browser cannot recognize the URL as a media stream and downloads the content rather than using Gallery to play it. To create this kind of media streaming, you need to write an apk to use VideoView to play the URL/media stream from the console. Here is the command of how to play a media file or network stream from console. Gingerbread am start -n com.cooliris.media/com.cooliris.media.MovieView -d "<URL>"       The URL can be file position or network stream URL, such as: you can play a local file by: am start -n com.cooliris.media/com.cooliris.media.MovieView -d "/mnt/sdcard/test.mp4" You can also play a http stream by: am start -n com.cooliris.media/com.cooliris.media.MovieView -d "http://v.iask.com/v_play_ipad.php?vid=76710932" Or play a rtsp stream by: am start -n com.cooliris.media/com.cooliris.media.MovieView -d "rtsp://10.0.2.1:554/stream" ICS am start -n com.android.gallery3d/com.android.gallery3d.app.MovieActivity -d "<URL>"        The URL has the same definition of Gingerbread.
View full article
Sometimes we need to use proxy to access network with Ethernet. Here are the steps for how to set proxy in Gingerbread and ICS. Gingerbread 1. Enable http proxy >  sqlite3 /data/data/com.android.providers.settings/databases/settings.db "INSERT INTO secure VALUES (99, 'http_proxy', 'wwwgate0.freescale.net:1080');" With this setting, you can access network for web browsing. If you want to play some http streaming content, you need to set a property for the player, > setprop rw.HTTP_PROXY http://wwwgate0-az.freescale.net:1080 2. Disable http proxy >  sqlite3 /data/data/com.android.providers.settings/databases/settings.db "delete from secure where name='http_proxy'" >  setprop rw.HTTP_PROXY "" ICS 1. Enable http proxy >  setprop net.proxy wwwgate0-az.freescale.net:1080 With this setting, you can access network for web browsing. If you want to play some http streaming content, you need to set a proxy property for the player, >  setprop rw.HTTP_PROXY http://wwwgate0-az.freescale.net:1080 2. Disable http proxy >  setprop net.proxy "" >  setprop rw.HTTP_PROXY ""
View full article
There is a very quick way to find out which line cause the crash in logcat, Generally, if some native service crashes, look in the crash log in logcat like this: I/DEBUG ( 2253): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** I/DEBUG ( 2253): Build fingerprint: 'freescale/sabresd_6dq/sabresd_6dq:4.0.4/R13.3-rc3/eng.b18293.20120710.124535:user/test-keys' I/DEBUG ( 2253): pid: 3043, tid: 3080 >>> /system/bin/mediaserver <<< I/DEBUG ( 2253): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad I/DEBUG ( 2253): r0 deadbaad r1 00000001 r2 a0000000 r3 00000000 I/DEBUG ( 2253): r4 00000000 r5 00000027 r6 00bfd370 r7 40c1ef18 I/DEBUG ( 2253): r8 00004349 r9 00000000 10 000003f5 fp 00000000 I/DEBUG ( 2253): ip ffffffff sp 418876a0 lr 400ff1b5 pc 400fb91c cpsr 60000030 I/DEBUG   ( 2253):  ip ffffffff  sp 418876a0  lr 400ff1b5  pc 400fb91c  cpsr 60000030 We can see it’s possibly related to some code that we debugged, but don’t know exactly where or which line of code, Android has a tool to convert this log to a more precise log. As a quick example, if you got this crash in logcat: F/libc ( 3043): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1) I/DEBUG ( 2253): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** I/DEBUG ( 2253): Build fingerprint: 'freescale/sabresd_6dq/sabresd_6dq:4.0.4/R13.3-rc3/eng.b18293.20120710.124535:user/test-keys' I/DEBUG ( 2253): pid: 3043, tid: 3080 >>> /system/bin/mediaserver <<< I/DEBUG ( 2253): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad I/DEBUG ( 2253): r0 deadbaad r1 00000001 r2 a0000000 r3 00000000 I/DEBUG ( 2253): r4 00000000 r5 00000027 r6 00bfd370 r7 40c1ef18 I/DEBUG ( 2253): r8 00004349 r9 00000000 10 000003f5 fp 00000000 I/DEBUG ( 2253): ip ffffffff sp 418876a0 lr 400ff1b5 pc 400fb91c cpsr 60000030 I/DEBUG ( 2253): d0 3e4ccccd00000000 d1 7e37e43c3e4ccccd I/DEBUG ( 2253): d2 0000004042000000 d3 4200000000000000 I/DEBUG ( 2253): d4 3ff0000000000000 d5 3ff0000000000000 I/DEBUG ( 2253): d6 4220000041300000 d7 3e4ccccd3e4ccccd I/DEBUG ( 2253): d8 000000000000685d d9 00000000010bee7c I/DEBUG ( 2253): d10 0000000000000000 d11 0000000000000000 I/DEBUG ( 2253): d12 0000000000000000 d13 0000000000000000 I/DEBUG ( 2253): d14 0000000000000000 d15 0000000000000000 I/DEBUG ( 2253): d16 0000000000000000 d17 3ff0000000000000 I/DEBUG ( 2253): d18 7e37e43c8800759c d19 0000000000000000 I/DEBUG ( 2253): d20 bfe0000000000000 d21 405443dab91ed79f I/DEBUG ( 2253): d22 0000000000000000 d23 3f40624dd2f1a9fc I/DEBUG ( 2253): d24 7fff80007fff0000 d25 3f6328e1cb8c85e0 I/DEBUG ( 2253): d26 0000000000000000 d27 0000000000000000 I/DEBUG ( 2253): d28 0000000000000000 d29 0000000000000000 I/DEBUG ( 2253): d30 0000000000000000 d31 0000000000000000 I/DEBUG ( 2253): scr 28000010 I/DEBUG ( 2253): I/DEBUG ( 2253): #00 pc 0001791c /system/lib/libc.so I/DEBUG ( 2253): #01 pc 00003f3e /system/lib/libcutils.so (__android_log_assert) I/DEBUG ( 2253): #02 pc 0006c436 /system/lib/libstagefright.so (_ZN7android8OMXCodec16drainInputBufferEPNS0_10BufferInfoE) I/DEBUG ( 2253): #03 pc 0006cbc2 /system/lib/libstagefright.so (_ZN7android8OMXCodec17drainInputBuffersEv) I/DEBUG ( 2253): #04 pc 0006f570 /system/lib/libstagefright.so (_ZN7android8OMXCodec4readEPPNS_11MediaBufferEPKNS_11MediaSource11ReadOpti onsE) I/DEBUG ( 2253): #05 pc 00051aba /system/lib/libstagefright.so (_ZN7android11AudioPlayer5startEb) I/DEBUG ( 2253): #06 pc 0005411e /system/lib/libstagefright.so (_ZN7android13AwesomePlayer18startAudioPlayer_lEb) I/DEBUG ( 2253): #07 pc 0005554a /system/lib/libstagefright.so (_ZN7android13AwesomePlayer6play_lEv) I/DEBUG ( 2253): #08 pc 000558e0 /system/lib/libstagefright.so (_ZN7android13AwesomePlayer4playEv) I/DEBUG ( 2253): #09 pc 00027f4e /system/lib/libmediaplayerservice.so (_ZN7android17StagefrightPlayer5startEv) I/DEBUG ( 2253): #10 pc 00024dda /system/lib/libmediaplayerservice.so (_ZN7android18MediaPlayerService6decodeEixxPjPiS2_) I/DEBUG ( 2253): I/DEBUG ( 2253): code around pc: I/DEBUG ( 2253): 400fb8fc 4623b15c 2c006824 e026d1fb b12368db \.#F$h.,..&..h#. I/DEBUG ( 2253): 400fb90c 21014a17 6011447a 48124798 24002527 .J.!zD.`.G.H'%.$ I/DEBUG ( 2253): 400fb91c f7f47005 2106ee22 eebef7f5 f04fa901 .p.."..!......O. I/DEBUG ( 2253): 400fb92c 460a5380 93032006 94029401 ea7af7f5 .S.F. ........z. I/DEBUG ( 2253): 400fb93c 4622a905 f7f52002 f7f4ea84 2106ee0e .."F. .........! I/DEBUG ( 2253): I/DEBUG ( 2253): code around lr: I/DEBUG ( 2253): 400ff194 41f0e92d 4c0c4680 447c2600 68a56824 -..A.F.L.&|D$h.h I/DEBUG ( 2253): 400ff1a4 e0076867 300cf9b5 dd022b00 47c04628 gh.....0.+..(F.G I/DEBUG ( 2253): 400ff1b4 35544306 37fff117 6824d5f4 d1ee2c00 .CT5...7..$h.,.. I/DEBUG ( 2253): 400ff1c4 e8bd4630 bf0081f0 00028346 41f0e92d 0F......F...-..A I/DEBUG ( 2253): 400ff1d4 9004b086 f602fb01 460c461f 46154814 .........F.F.H.F I/DEBUG ( 2253): I/DEBUG ( 2253): memory map around addr deadbaad: I/DEBUG ( 2253): becef000-bed10000 [stack] I/DEBUG ( 2253): (no map for address) I/DEBUG ( 2253): ffff0000-ffff1000 [vectors] I/DEBUG ( 2253): You can see it’s related to which lib, but don’t know which line. So, let’s go to your source code, for example: mydroid; after do $. build/envsetup.sh$ lunch sabresd_6dp-eng $ development/scripts/stack Then you have a prompt: Reading native crash info from stdin The you just copy all the crash log in above to this prompt. And then Key in EOF (CTRL+D) in this prompt. You will get output like this: Reading symbols from /home/b33651/proj/ics/out/target/product/sabresd_6dq/symbols pid: 3043, tid: 3080 >>> /system/bin/mediaserver <<< signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad   r0 deadbaad r1 00000001 r2 a0000000 r3 00000000   r4 00000000 r5 00000027 r6 00bfd370 r7 40c1ef18   r8 00004349 r9 00000000 10 000003f5 fp 00000000   ip ffffffff sp 418876a0 lr 400ff1b5 pc 400fb91c Stack Trace:   RELADDR FUNCTION FILE:LINE   0001791c __libc_android_abort+92 /home/b33651/proj/ics/bionic/libc/unistd/abort.c:82   00003f3e __android_log_assert+94 /home/b33651/proj/ics/system/core/liblog/logd_write.c:246   0006c436 android::OMXCodec::drainInputBuffer(android::OMXCodec::BufferInfo*)+138 /home/b33651/proj/ics/frameworks/base/media/libstagefright/OMXCodec.cpp:3181   0006cbc2 android::OMXCodec::drainInputBuffers()+102 /home/b33651/proj/ics/frameworks/base/media/libstagefright/OMXCodec.cpp:3125   0006f570 android::OMXCodec::read(android::MediaBuffer**, android::MediaSource::ReadOptions const*)+136 /home/b33651/proj/ics/frameworks/base/media/libstagefright/OMXCodec.cpp:4020   00051aba android::AudioPlayer::start(bool)+134 /home/b33651/proj/ics/frameworks/base/media/libstagefright/AudioPlayer.cpp:93   0005411e android::AwesomePlayer::startAudioPlayer_l(bool)+70 /home/b33651/proj/ics/frameworks/base/media/libstagefright/AwesomePlayer.cpp:953   0005554a android::AwesomePlayer::play_l()+202 /home/b33651/proj/ics/frameworks/base/media/libstagefright/AwesomePlayer.cpp:888   000558e0 android::AwesomePlayer::play()+20 /home/b33651/proj/ics/frameworks/base/media/libstagefright/AwesomePlayer.cpp:837   00027f4e android::StagefrightPlayer::start()+6 /home/b33651/proj/ics/frameworks/base/media/libmediaplayerservice/StagefrightPlayer.cpp:90   00024dda android::MediaPlayerService::decode(int, long long, long long, unsigned int*, int*, int*)+206 /home/b33651/proj/ics/frameworks/base/media/libmediaplayerservice/MediaPlayerService.cpp:1428 So, you get more reason logs. Note: The Android directory must have built once. The crash log better aligns with your Android build environment.
View full article