2013년 6월 26일 수요일

Soft keyboard bug.

android(4.1.2)에서 USB Keyboard를 연결하고 Soft keyboard를 사용하기 위해 Physical Keyboard turn off 하면 한번 software keyboard가 동작하고 물리적 키보드를 off하여도 안되고 재부팅 해도 안되네요.안드로이드 버그 인듯 한데 재부팅해도 안되는 건 좀 심각한 문제 인 듯 합니다.

http://comments.gmane.org/gmane.comp.handhelds.android.devel/219858

1. connect usb keyboard.
2. physical keyboard turn off.
3. run soft keyboard and It works only one time.
4. set physical keyboard.
5. physical keyboard turn off.
6. does not work soft keyboard never when usb keyboard is connected.

해결책은 언어를 바꾸고 바로 Default를 선택하면 나오는 화면에서 바꿀 수 있네요.


I found a solution.Change Language and just select Default item of "KEYBOARD & INPUT METHODS" menu. and you can change state of Hardware(Physical keyboard) on/off.


1. click "Language & input"

2. click "Default"
3. Change state of Hardware(Physical keyboard) on/off.



fix this file
frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodsPanel.java


 37 import android.view.inputmethod.InputMethodSubtype;
 38 import android.widget.CompoundButton;
 39 import android.widget.CompoundButton.OnCheckedChangeListener;
 40 import android.widget.ImageView;


141     @Override
142     public void onFinishInflate() {
143         mInputMethodMenuList = (LinearLayout) findViewById(R.id.input_method_menu_list);
144         mHardKeyboardSection = (LinearLayout) findViewById(R.id.hard_keyboard_section);
145         mHardKeyboardSwitch = (Switch) findViewById(R.id.hard_keyboard_switch);
146         mHardKeyboardSwitch.setOnCheckedChangeListener(
147             new OnCheckedChangeListener() {
148             @Override
149             public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
150                 updateHardKeyboardEnabled();
151             }
152         });
153         mConfigureImeShortcut = findViewById(R.id.ime_settings_shortcut);
154         mConfigureImeShortcut.setOnClickListener(this);
155         // TODO: If configurations for IME are not changed, do not update
156         // by checking onConfigurationChanged.
157         updateUiElements();
158     }



2013년 6월 20일 목요일

HDMI screen rotation issue for ODROID(Exynos4412)

for Exynos4412(mali)

1080P(Full HD)

Tumblr.


720P -> enable Portrait HDMI Screen



1080P -> not allow Portrait HDMI Screen.





device/samsung/exynos4/libhdmi/libhdmiservice/SecTVOutService.cpp


291     void SecTVOutService::setHdmiRotate(uint32_t rotVal, uint32_t hwcLayer)
292     {
293         //codewalker
294         // 1080p is spec out.
295         if (mLCD_height == 1080)
296             return;

2013년 6월 19일 수요일

ODROID - Android Beta 1.8.0

1. Include XBox Controller kl, kcm.
2. Enable Netflix service.
3. Fix 1080P HDMI rotation issue.
4. If mouse.right.click property set "back", Mouse right click act back button(esc key).
5. If ro.sf.hwrotation is set, It effect rotation of HDMI Screen.
6. Fix not to root.
7. Mount USB Mass Storage automatically. (http://forum.odroid.com/viewtopic.php?f=14&t=1906&p=14016#p14016)
8. remove ODROID, FileManager, Ternmial app. add jackpal AndroidTerm, Ultra Explorer app.

https://www.dropbox.com/sh/d5zfj5z3mo0rohj/g7utJRzedt

Add init.d support to ODROID

Add init.d support to ODROID

create sysinit script device/hardkernel/proprietary/bin/sysinit

#!/system/bin/sh

export PATH=/sbin:/system/sbin:/system/bin:/system/xbin
/system/bin/logwrapper /system/xbin/run-parts /system/etc/init.d


edit device.mk

# init.d support
PRODUCT_COPY_FILES += \
     device/hardkernel/proprietary/bin/sysinit:system/bin/sysinit


edit init.odroidu2.rc

on boot
# Run sysinit
    start sysinit

...

# sysinit (/system/etc/init.d)
service sysinit /system/bin/sysinit
    user root
    oneshot


build android

why support init.d?

Must do 98netflix script for Netflix service.

2013년 6월 13일 목요일

OpenCV test on ODROID-X2.

Download OpenCV test app

http://sourceforge.net/projects/opencvlibrary/files/opencv-android/2.4.5/OpenCV-2.4.5-android-sdk.zip/download

import projects to eclipse.

OpenCV Library - 2.4.5
OpenCV Sample - face-detection

add NDKROOT variable

http://stackoverflow.com/questions/16328637/building-opencv-2-4-5-in-android-adt-ndk-build-not-found-in-path

fix preview parameters

JavaCameraView.java

params.setPreviewFormat(ImageFormat.NV21);
Log.d(TAG, "Set preview size to " + Integer.valueOf(640) + "x" + Integer.valueOf(480));
params.setPreviewSize((int)640, (int)480);
//Log.d(TAG, "Set preview size to " + Integer.valueOf((int)frameSize.width) + "x" + Integer.valueOf((int)frameSize.height));
//params.setPreviewSize((int)frameSize.width, (int)frameSize.height);



for MIPI Camera.

//params.setPreviewFormat(ImageFormat.NV21);
params.setPreviewFormat(ImageFormat.NV16);
Log.d(TAG, "Set preview size to " + Integer.valueOf(640) + "x" + Integer.valueOf(480));
params.setPreviewSize((int)640, (int)480);




2013년 6월 4일 화요일

How to Use WebCam(UVC) for ODROID-X/X2

1. Module UVC driver


--- V4L USB devices
<M>   USB Video Class (UVC)
[ ]     UVC input events device support
<M>   GSPCA based webcams  --->

2. make and copy zImage
$cp arch/arm/boot/zImage android/device/hardkernel/odroidx[x2]/kernel_sdmmc[emmc]

3. copy uvcvideo.ko
$cp driver/media/video/uvcvideo.ko android/device/hardkernel/proprietary/bin/

4. copy driver into "/system/lib/modules/" directory.
device.mk
#
# UVC Module
#
PRODUCT_COPY_FILES += \
    device/hardkernel/proprietary/bin/uvcvideo_x.ko:system/lib/modules/uvcvideo.ko

5. add service for module insert.
init.odroidx[x2][_realtek].rc

service uvc_usb_module /system/bin/insmod /system/lib/modules/uvcvideo.ko
    class core
    user root
    group root
    oneshot

6. select WebCam Camera library.
BoardConfig.mk
BOARD_CAMERA    := odroidx    //MIPI cameara
BOARD_CAMERA    := odroidu    //UVC

7. android build


2013년 5월 31일 금요일

Boot from system partition instead ramdisk for ODROID

mount eMMC or SDCard on PC.


Disk /dev/sde: 15.8 GB, 15758000128 bytes
255 heads, 63 sectors/track, 1915 cylinders, total 30777344 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1         6684672    30646271    11980800    c  W95 FAT32 (LBA)
/dev/sde2          131072     2228223     1048576   83  Linux
/dev/sde3         2228224     6422527     2097152   83  Linux
/dev/sde4         6422528     6684671      131072   83  Linux

Partition table entries are not in disk order
[~/projects/ssd/JellyBean/out/target/product/odroidx2]$

#mount system partition

[~/projects/ssd/JellyBean/out/target/product/odroidx2]$ sudo mount /dev/sde2 /media/microSD/

# copy ramdisk fs.

[~/projects/ssd/JellyBean/out/target/product/odroidx2]$ sudo cp -a root/ /media/microSD/

# change permissions

[~/projects/ssd/JellyBean/out/target/product/odroidx2]$ sudo chmod 644 /media/microSD/init.*
[~/projects/ssd/JellyBean/out/target/product/odroidx2]$ sudo chmod 644 /media/microSD/build.prop

and ODROID power up...

make boot.scr

edit boot.ini



  1 setenv v_out        "hdmi"
  2 setenv fake_fb      "false"
  3 setenv fb_x_res     "1360"
  4 setenv fb_y_res     "768"
  5 setenv hdmi_phy_res "1080"
  6 setenv led_blink    "1"
  7 setenv bootcmd      "movi read kernel 0 40008000;movi read rootfs 0 41000000 100000;bootm 40008000 41000000"
  8 setenv bootargs     "root=/dev/mmcblk0p2 ro rootfstype=ext4 init=/init rootdelay=1 console=/dev/ttySAC1,115200n8 androidboot.console=ttySAC1 v_out=${v_out} fake_fb=${fake_fb} fb_x_res=${fb_x_res} fb_y_res=${    fb_y_res} hdmi_phy_res=${hdmi_phy_res} led_blink=${led_blink}"
  9 boot


$./make_boot_scr.sh

$adb push boot.scr /sdcard/

$adb sync

$adb reboot

boot from system partition.


booting log


[    0.000000] sclk_fimd: source is xusbxti (1), rate is 1500000
[    0.000000] sclk_mfc: source is mout_mfc0 (0), rate is 55000000
[    0.000000] sclk_g3d: source is mout_g3d0 (0), rate is 55000000
[    0.000000] sclk_pwi: source is xusbxti (1), rate is 1500000
[    0.000000] PERCPU: Embedded 7 pages/cpu @c1af8000 s7008 r8192 d13472 u32768
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 519938
[    0.000000] Kernel command line: console=ttySAC1,115200n8 androidboot.console=ttySAC1 mem=2047M root=/dev/mmcblk0p2 ro rootfstype=ext4 init=/init rootdelay=1 console=/dev/ttySAC1,115200n8 androidboot.console=1
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Memory: 2047MB = 2047MB total
[    0.000000] Memory: 1695464k/1695464k available, 400664k reserved, 1342464K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)