2014년 2월 18일 화요일

ODROID-U2/U3/X/X2(Exynos4412) update

first recovery.
ODROID-U2/U3
http://dn.odroid.com/4412/Android/4.1.2_Feb-12-2014/ODROID-U/
ODROID-X2
http://dn.odroid.com/4412/Android/4.1.2_Feb-12-2014/ODROID-X2/
ODROID-X
http://dn.odroid.com/4412/Android/4.1.2_Feb-12-2014/ODROID-X/


[   ]emmc_self_installer.img.zip12-Feb-2014 13:15146M
[   ]emmc_self_installer.img.zip.md5sum12-Feb-2014 13:1562
[   ]sd_self_installer.img.zip12-Feb-2014 13:15146M
[   ]sd_self_installer.img.zip.md5sum12-Feb-2014 13:1560

Windows users


Linux users

$ unzip sd[emmc]_self_installer.img.zip
$ sudo fdisk -l
$ sudo dd if=./sd[emmc]_self_installer.img of=/dev/sdX

Update complete.
Run ODROID Updater.

ODROID-U2/U3
Input URL http://dn.odroid.com/4412/Android/4.1.2_Feb-19-2014/ODROID-U/update.zip

ODROID-X
Input URL http://dn.odroid.com/4412/Android/4.1.2_Feb-19-2014/ODROID-X/update.zip

ODROID-X2
Input URL http://dn.odroid.com/4412/Android/4.1.2_Feb-19-2014/ODROID-X2/update.zip



If you run flappy bird in Landscape mode then app run like this picture.
Mouse worked well, but multitouch screen do not work.


HDMI Portrait screen and HID multitouch.
Run ODROID Utility app.
Select HDMI Portrait and apply. Reboot.


Boot complete, automatically rotate screen to portrait.



Install Google Mobile Service apps.


2014년 2월 13일 목요일

ODROID에 EXT4 외장 저장장치 사용하기(Use external storage fomatted Ext filesystem on ODROID)

ODROID에 microSD(SD)와 USB 이동식 저장 장치를 지원합니다.

지원되는 파일시스템이 fat32와 NTFS를 지원합니다.
fat에는 4Gbyte 이상의 파일을 넣을 수 없는 문제가 있습니다.
NTFS는 4Gbyte이상의 파일을 넣을 수 있지만 readonly로만 mount 되고 불안전 합니다.
그래서 Ext4 파일 시스템을 지원해 보겠습니다.

system/vold/Volume.h/cpp를 아래와 같이 Ext4를 추가 합니다.

 50 protected:
 51     char *mLabel;
 52     char *mMountpoint;
 53     VolumeManager *mVm;                                                                              
 54     bool mDebug;
 55     int mPartIdx;
 56     int mOrigPartIdx;                                                                                
 57     bool mRetryMount;                                                                                
 58     int filesystem;                                                                                  
 59    

 46 #include "Fat.h"
 47 #include "Ntfs.h"
 48 #include "Ext4.h"
 49 #include "Process.h"
 50 #include "cryptfs.h"

260     if (filesystem == VFAT) {
261         if (Fat::format(devicePath, 0)) {
262             SLOGE("Failed to format (%s)", strerror(errno));
263             goto err;
264         }
265     } else if (filesystem == EXT4) {
266         if (Ext4::format(devicePath)) {
267             SLOGE("Failed to format (%s)", strerror(errno));
268             goto err;
269         }
270     }

403     filesystem = VFAT;
404 
405     for (i = 0; i < n; i++) {
406         char devicePath[255];
407 
408         sprintf(devicePath, "/dev/block/vold/%d:%d", MAJOR(deviceNodes[i]),
409                 MINOR(deviceNodes[i]));
410 
411         SLOGI("%s being considered for volume %s\n", devicePath, getLabel());
412 
413         errno = 0;
414         setState(Volume::State_Checking);
415 
416         if (Fat::check(devicePath)) {
417             if (errno == ENODATA) {
418                 SLOGW("%s does not contain a FAT filesystem\n", devicePath);
419                 if (Ntfs::doMount(devicePath, getMountpoint(), false, false, false,
420                     1000, 1015, 0702, false)) {
421                     SLOGE("%s failed to mount via NTFS (%s)\n", devicePath, strerror(errno));
422                     if (Ext4::doMount(devicePath, getMountpoint(), false, false, false)) {
423                         SLOGE("%s failed to mount via Ext4 (%s)\n", devicePath, strerror(errno));
424                     } else {
425                         filesystem = EXT4;
426                         SLOGE("Ext4 mounted");
427                         continue;
428                     }
429                 } else {
430                     filesystem = NTFS;
431                     SLOGE("NTFS mounted");
432                     continue;
433                 }
434             }

ubuntu PC에서 SD Card나 USB Storage를 Ext4로 format하시고 아래와 같이 권한을 변경해 주세요.

sudo nautilus로 실행하시면 됩니다.




2014년 1월 28일 화요일

How to connect ODROID to Ubuntu using MTP

How to connect ODROID to Ubuntu using MTP


http://ppa.webupd8.org/post/43022082410/libmtp-updated-for-ubuntu-quantal-and-precise-with

1. install go-mtpfs and go-mtpfs-unity


http://www.webupd8.org/2012/12/how-to-mount-android-40-ubuntu-go-mtpfs.html

https://launchpad.net/~webupd8team/+archive/unstable/+build/4074768

https://launchpad.net/~webupd8team/+archive/unstable/+build/4074769

https://drive.google.com/file/d/0B5aZmgmqP9rOVGV6aXc5RW8xWkk/edit?usp=sharing
https://drive.google.com/file/d/0B5aZmgmqP9rOblZZWmJENjZQUjg/edit?usp=sharing
https://drive.google.com/file/d/0B5aZmgmqP9rOVjVtSjBTNnNBeDA/edit?usp=sharing

http://almost-a-technocrat.blogspot.kr/2013/01/how-to-connect-samsung-galaxy-nexus-to.html

2. mkdir /media/MyAndroid

3. create /etc/udev/rules.d/99-android.rules

  1 # Hardkernel Odroid MTP mode (multimedia device)
  2 SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="0002", MODE="0666" # MTP media
  3
  4 # Hardkernel Odroid MTP mode : automatic mount when plugged (all android versions)
  5 ENV{ID_MODEL}=="Odroid", ENV{ID_MODEL_ID}=="0002", ACTION=="add", RUN+="/usr/bin/sudo -b -u codewalker /usr/bin/go-mtpfs -allow-other=true /media/MyAndroid"
  6
  7 # Hardkernel Odroid MTP mode : automatic unmount when unplugged (all android versions)
  8 ENV{ID_MODEL}=="Odroid", ENV{ID_MODEL_ID}=="0002", ACTION=="remove", RUN+="/bin/fusermount -u /media/MyAndroid"

4. sudo service udev restart

5. remove other mtp device

We will release android supported MTP soon.

2014년 1월 24일 금요일

cm(android-4.2.1) on ODROID-U2/U3

eMMC recovery tool for ODROID-U2/U3

http://forum.odroid.com/viewtopic.php?f=53&t=969

How to use.
1. Prepare a microSD card and flash the attached image.
2. Boot with the microSD without eMMC
3. Turn on U2/U3 and wait a few seconds and blue LED will blink.
4. Plug your eMMC module into U2/U3
5. Plug micro-USB cable into U2/U3 and connect other side to your PC USB host or ODROID's USB host port. (This is a trigger to start the recovery)
6. After recovery process (only a few seconds), the blue LED will turn off automatically.
7. Finish. Install OS on your eMMC with as usual.


Install CM for odroid-u2/u3

http://wiki.cyanogenmod.org/w/Install_CM_for_odroidu2

$ sh ./install-emmc.sh /dev/sdX


2013년 12월 22일 일요일

USB vid/pid를 이용해서 장치 연결 상태 알아내기

USB 장치 중에 vid가 0bda이고 pid가 8176인 장치가 연결되어 있는지 알아 보는 방법입니다.

USB node는 /sys/bus/usb/devices/ 에 생성되고 idVendoridProuct를 읽어보면 됩니다.

{
    DIR *dir = opendir("/sys/bus/usb/devices/");
    struct dirent *dent;
    if (dir != NULL) {
        while ((dent = readdir(dir)) != NULL) {
            char node[50] = {'\0',};
            sprintf(node, "/sys/bus/usb/devices/%s/idVendor", dent->d_name);
            int vid_fd = open(node, O_RDONLY);
            char buf[5];
            if (vid_fd > 0) {
                read(vid_fd, buf, 4);
                ALOGE("node = %s, vid = %s", node, buf);
                if (strcmp(buf, "0bda") == 0) {
                    sprintf(node, "/sys/bus/usb/devices/%s/idProduct", dent->d_name);
                    int pid_fd = open(node, O_RDONLY);
                    read(pid_fd, buf, 4);
                    ALOGE("node = %s, pid = %s", node, buf);
                    if (pid_fd > 0) {
                        if (strcmp(buf, "8176") == 0) {
                            //pid가 8176인 장치가 연결되어 있음
                            break;
                        }
                        close(pid_fd);
                    }  
                }  
                close(vid_fd);
            }  
        }  
    }  
    close(dir);
}

2013년 12월 11일 수요일

AOSP build and run emulator(Android Virtual Device)

1. Download android source code.

http://source.android.com/source/downloading.html

$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.4_r1.2
$ repo sync

2. Build

$ source build/envsetup.sh
$ lunch
You're building on Linux

Lunch menu... pick a combo:
     1. aosp_arm-eng
     2. aosp_x86-eng
     3. aosp_mips-eng
     4. vbox_x86-eng
     5. mini_mips-userdebug
     6. mini_armv7a_neon-userdebug
     7. mini_x86-userdebug
     8. aosp_manta-userdebug
     9. aosp_grouper-userdebug
     10. aosp_flo-userdebug
     11. aosp_deb-userdebug
     12. aosp_tilapia-userdebug
     13. aosp_mako-userdebug
     14. aosp_hammerhead-userdebug

Which would you like? [aosp_arm-eng] 1

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4
TARGET_PRODUCT=aosp_arm
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.11.0-14-generic-x86_64-with-Ubuntu-13.10-saucy
HOST_BUILD_TYPE=release
BUILD_ID=KRT16S
OUT_DIR=out
============================================

[~/projects/android_kitkat]$ make -j8


....

k-r8e/:/opt/toolchains/arm-eabi-4.6/bin/:/opt/toolchains/arm-2010q1/bin:/usr/bin/:/usr/lib/ccache
+ ENABLE_SPARSE_IMAGE=
+ '[' out/target/product/generic/system = -s ']'
+ '[' 6 -ne 5 -a 6 -ne 6 ']'
+ SRC_DIR=out/target/product/generic/system
+ '[' '!' -d out/target/product/generic/system ']'
+ OUTPUT_FILE=out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img
+ EXT_VARIANT=ext4
+ MOUNT_POINT=system
+ SIZE=576716800
+ FC=out/target/product/generic/root/file_contexts
+ case $EXT_VARIANT in
+ '[' -z system ']'
+ '[' -z 576716800 ']'
+ '[' -n out/target/product/generic/root/file_contexts ']'
+ FCOPT='-S out/target/product/generic/root/file_contexts'
+ MAKE_EXT4FS_CMD='make_ext4fs  -S out/target/product/generic/root/file_contexts -l 576716800 -a system out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/generic/system'
+ echo make_ext4fs -S out/target/product/generic/root/file_contexts -l 576716800 -a system out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/generic/system
make_ext4fs -S out/target/product/generic/root/file_contexts -l 576716800 -a system out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/generic/system
+ make_ext4fs -S out/target/product/generic/root/file_contexts -l 576716800 -a system out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/generic/system
Creating filesystem with parameters:
    Size: 576716800
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 7040
    Inode size: 256
    Journal blocks: 2200
    Label:
    Blocks: 140800
    Block groups: 5
    Reserved block group size: 39
Created filesystem with 1262/35200 inodes and 81852/140800 blocks
+ '[' 0 -ne 0 ']'
Install system fs image: out/target/product/generic/system.img
out/target/product/generic/system.img+ maxsize=588791808 blocksize=2112 total=576716800 reserve=5947392
[~/projects/android_kitkat]$

3. Install eclipse and adt
http://developer.android.com/sdk/installing/installing-adt.html

4. Install android sdk
https://developer.android.com/sdk/index.html

5. Android SDK Manager
update API 19

6. Change your output images.
$ [~/android-sdks/system-images/android-19]$ cd armeabi-v7a/
[~/android-sdks/system-images/android-19/armeabi-v7a]$ ls
build.prop   NOTICE.txt   source.properties  userdata.img
kernel-qemu  ramdisk.img  system.img

7. Make avd




8. Run AVD


2013년 12월 9일 월요일

Exynos4412 Android-4.1.2 (Beta 2.1.0) Release

29-Jun-2014
1. fix EDID
2. enable MTP
3. fix uboot to enable cm bootstrap.

Download for eMMC user.

https://www.dropbox.com/sh/vjplveim5ieq91e/jUSKWcmjw4

How to connect ODROID to Ubuntu using MTP
http://codewalkerster.blogspot.kr/2014/01/how-to-connect-odroid-to-ubuntu-using.html

19-Dec-2013
1. enable /dev/CEC node.
2. enable HDMI-EDID/CEC

https://www.dropbox.com/s/7nhmnnssuekk50n/odroidu-1.9.0.zip


http://dn.odroid.com/Android_Beta_1.9.0/

수정사항
1. Q/Q2 부팅 시 죽는 문제 수정
2. SD/eMMC 를 하나의 커널로 통합.
3. ODROID-U2를 ODROID-U로 변경

업그레이드 방법
1. X/X2/Q/Q2는 기존 방법처럼 아래와 같이 진행
http://codewalkerster.blogspot.kr/2013/05/odroid-update-and-install-gms.html

2. U2는 microSD일 경우 아래 이미지를 write하고 부팅
http://dn.odroid.com/Android_Beta_1.9.0/U/SD/
eMMC일 경우 아래 이미지를 write 하고 부팅 하면 자동 복구 후 부팅
http://dn.odroid.com/Android_Beta_1.9.0/U/eMMC_installer/

Google Mobile Service(GMS) 설치는 아래와 같이 One Click gapps installer에서 4.1.2를 선택.
http://codewalkerster.blogspot.kr/2013/11/universal-1-click-gapps-installer-for.html