Intel Edison Kit for Arduino에 Android Things 설치

Android Things란 무엇입니까?


구글의 IoT 플랫폼에서 나온 거예요.
발표할 때
Intel Edison
NXP Pico
Raspberry Pi 3
3개의 하드웨어 설치 가능한 OS 이미지는 Google에서 제공합니다.
https://developer.android.com/things/index.html
https://android-developers.googleblog.com/2016/12/announcing-googles-new-internet-of-things-platform-with-weave-and-android-things.html
이 페이지에는 Intel Edison에 Android Things를 설치하려면
Raspberry Pi3 가져오기 아래 기사를 참조하십시오.
Raspberry Pi3에 Android Things 설치
http://qiita.com/aoinakanishi/items/fae26dc1ad0f16b58558

하드웨어 준비


Intel Edison Kit for Arduino
무선 케이블×2
있으면 이동할 수 있습니다.

OS 이미지 다운로드


https://developer.android.com/things/preview/download.html
여기서부터 androidthings.edison_devpreview_1. zip을 다운로드한다.
System Image Downloads

zip 파일 압축 풀기

% unzip -d devpreview androidthings_edison_devpreview_1.zip
Archive:  androidthings_edison_devpreview_1.zip
  inflating: devpreview/boot.img
  inflating: devpreview/system.img
  inflating: devpreview/userdata.img
  inflating: devpreview/oem.img
  inflating: devpreview/gapps.img
  inflating: devpreview/partition-table.img
  inflating: devpreview/edison_ifwi-dbg-00.bin
  inflating: devpreview/edison_dnx_fwr.bin
  inflating: devpreview/edison_dnx_osr.bin
  inflating: devpreview/u-boot-edison.bin
  inflating: devpreview/u-boot-edison.img
  inflating: devpreview/FlashEdison.json
  inflating: devpreview/README
  inflating: devpreview/brillo-flashall-edison.sh
  inflating: devpreview/fastboot
  inflating: devpreview/adb

Fastboot 설치


Android SDK를 설치하십시오.
특별한 설정 변경 등이 없으면 Mac는 아래에 있습니다.
~/Library/Android/sdk/platform-tools/fastboot

Intel® Plaatform Flash Tool Lite 설치


https://01.org/android-ia/downloads/intel-platform-flash-tool-lite
를 참고하십시오.
Mac의 경우 Plaatform FlashTool Lite5.5.2.0_mac64.pkg을 실행한 후 설치를 시작합니다.

Android Things 담금질

  • 방금 설치한 Plaatform Flash Tool Lite 시작
  • 「Browse...」를 누르고 방금 다운로드한 파일을 선택합니다.
  • Flash file: FlashEdison.json
    Configuration: Non_OS
    하다
  • Intel Edison
  • 을 펌웨어 복구 모드로 시작합니다.
  • 확인 (1) 스위치가 마이크로USB 측면
  • FW 스위치를 누르고 마이크로USB 케이블을 (3)의 J16에 꽂아 모함(Mac)과 연결
  • 기판의 LED 켜짐 확인 후 FW 스위치 해제
  • Start to Flash를 클릭하여 플래시 시작
  • 완료
  • 실패할 수도 있고...
  • Terminal에서fastboot 설치


    Intel® Plaatform Flash Tool Lite 설치 실패 후에도 Terminal 설치 가능
    % /Applications/Platform\ Flash\ Tool\ Lite.app/Contents/MacOS/platformflashtoollitecli -f ~/Downloads/androidthings_edison_devpreview_1.zip -c non_os
    01/26/17 22:29:18.014  INFO   : Intel(R) Platform Flash Tool Lite V 5.5.2.0 x64 (build on Tuesday April 26th 2016, 14:52:58 UTC)
    01/26/17 22:29:18.014  INFO   : Using xFSTK Downloader version: 1.8.0
    01/26/17 22:29:18.026  INFO   : Using DFU Downloader version: 0.8.4
    01/26/17 22:29:18.146  INFO   : Using Intel Command Line FlashTool v.2.56 (Download Library v.5.23)
    01/26/17 22:29:18.161  INFO   : Using Android Debug Bridge version 1.0.35
    Revision f001255927f8-android
    01/26/17 22:29:18.161  INFO   : No external tool registered
    01/26/17 22:29:18.174  INFO   : OS version detected: OS X 10.10.5 (Yosemite) x64
    01/26/17 22:29:18.178  INFO   : SSL supported: Yes
    01/26/17 22:29:18.213  INFO   : Adb and fastboot binaries OK
    01/26/17 22:29:18.221  INFO   : Loading /Users/*****/Downloads/androidthings_edison_devpreview_1/FlashEdison.json
    01/26/17 22:29:18.238  INFO   : Available flash configurations:
    conf[full] name=Full, description=full reflash
    conf[non_os] name=Non_OS, description=ifwi and u-boot reflash
    conf[os] name=OS, description=os reflash
    conf[update] name=Update, description=update system
    01/26/17 22:29:18.238  INFO   : 'non_os' configuration used to flash
    01/26/17 22:29:18.288  INFO   : [Port 1/2] New device detected on 1/2 (id=0101000000000001)
    01/26/17 22:29:18.334  INFO   : Platform Flash Tool Lite initialized successfully
    01/26/17 22:29:18.335  INFO   : [Port 1/2] Starting flash ...
    01/26/17 22:29:18.335  INFO   : [Port 1/2] Running `Notify Please reset the edison (with reset button)` command
    01/26/17 22:29:18.335  INFO   : [Port 1/2] Command `Notify Please reset the edison (with reset button)` succeed
    01/26/17 22:29:18.335  INFO   : [Port 1/2] Running `"xfstkFlashTool" "-1" "/Users/*****/Downloads/androidthings_edison_devpreview_1/edison_dnx_fwr.bin" "/Users/*****/Downloads/androidthings_edison_devpreview_1/edison_ifwi-dbg-00.bin" "/Users/*****/Downloads/androidthings_edison_devpreview_1/edison_dnx_osr.bin" "/Users/*****/Downloads/androidthings_edison_devpreview_1/u-boot-edison.img" "0x80000007" "none" "none" "0"` command
    01/26/17 22:29:18.335  INFO   : [Port 1/2] Disabling xFSTK wipe out IFWI option
    01/26/17 22:29:18.336  INFO   : [Port 1/2] Disabling xFSTK Misc DnX
    01/26/17 22:29:18.336  INFO   : [Port 1/2] xFSTK Soft Fuse not set
    01/26/17 22:29:18.336  INFO   : [Port 1/2] Using xFSTK Solo interface (new API)
    01/26/17 22:29:18.337  INFO   : [Port 1/2] XFSTK Downloader API 1.8.0
    Copyright (c) 2015 Intel Corporation
    01/26/17 22:29:18.337  INFO   : [Port 1/2] fwdnx -- /Users/*****/Downloads/androidthings_edison_devpreview_1/edison_dnx_fwr.bin
    01/26/17 22:29:18.337  INFO   : [Port 1/2] fwimage -- /Users/*****/Downloads/androidthings_edison_devpreview_1/edison_ifwi-dbg-00.bin
    01/26/17 22:29:18.337  INFO   : [Port 1/2] osdnx -- /Users/*****/Downloads/androidthings_edison_devpreview_1/edison_dnx_osr.bin
    01/26/17 22:29:18.337  INFO   : [Port 1/2] osimage -- /Users/*****/Downloads/androidthings_edison_devpreview_1/u-boot-edison.img
    01/26/17 22:29:18.337  INFO   : [Port 1/2] gpflags -- 0x80000007
    01/26/17 22:29:18.337  INFO   : [Port 1/2] softfuse --
    ....01/26/17 22:29:18.439  INFO   : [Port 1/2] Initiating download...
    01/26/17 22:29:18.498  INFO   : [Port 1/2] XFSTK-STATUS--FW download is in progress ...
    01/26/17 22:29:18.499  INFO   : [Port 1/2] XFSTK-STATUS--FW: Sending DnX DCFI00 ...
    01/26/17 22:29:21.526  INFO   : [Port 1/2] XFSTK-STATUS--Error Code: 0 - Success
    01/26/17 22:29:21.527  INFO   : [Port 1/2] XFSTK-STATUS--Firmware download completed. Continuing to OS...
    01/26/17 22:29:21.527  INFO   : [Port 1/2] XFSTK-STATUS--Reconnecting to device - Attempt #1
    01/26/17 22:29:22.531  INFO   : [Port 1/2] XFSTK-STATUS--Reconnecting to device - Attempt #2
    01/26/17 22:29:23.535  INFO   : [Port 1/2] XFSTK-STATUS--Reconnecting to device - Attempt #3
    01/26/17 22:29:24.539  INFO   : [Port 1/2] XFSTK-STATUS--Reconnecting to device - Attempt #4
    01/26/17 22:29:25.556  INFO   : [Port 1/2] XFSTK-STATUS--POS download is in progress ...
    01/26/17 22:29:28.795  INFO   : [Port 1/2] XFSTK-STATUS--Error Code: 0 - Success
    01/26/17 22:29:28.796  INFO   : [Port 1/2] XFSTK-STATUS--Firmware and OS download completed.
    
    XFSTK: Transfer Completed Successfully.
    01/26/17 22:29:28.797  INFO   : [Port 1/2] Success: Download of FW Completed.
    01/26/17 22:29:28.800  INFO   : [Port 1/2] Command `"xfstkFlashTool" "-1" "/Users/*****/Downloads/androidthings_edison_devpreview_1/edison_dnx_fwr.bin" "/Users/*****/Downloads/androidthings_edison_devpreview_1/edison_ifwi-dbg-00.bin" "/Users/*****/Downloads/androidthings_edison_devpreview_1/edison_dnx_osr.bin" "/Users/*****/Downloads/androidthings_edison_devpreview_1/u-boot-edison.img" "0x80000007" "none" "none" "0"` succeed
    01/26/17 22:29:28.800  INFO   : [Port 1/2] Running `Wait for device with status pos on port 1/2` command
    01/26/17 22:30:22.673  INFO   : [Port 1/2] Command `Wait for device with status pos on port 1/2` succeed
    01/26/17 22:30:22.673  INFO   : [Port 1/2] Running `Notify Run 'provision' or 'brillo-flashall-edison.sh', then 'fastboot reboot' to boot the device.` command
    01/26/17 22:30:22.673  INFO   : [Port 1/2] Command `Notify Run 'provision' or 'brillo-flashall-edison.sh', then 'fastboot reboot' to boot the device.` succeed
    01/26/17 22:30:22.673  INFO   : [Port 1/2] Flash success (duration=00:01:04.338)
    01/26/17 22:30:22.686  INFO   : Platform Flash Tool Lite exited with code 0
    

    fastboot을 통한 장치 식별 확인

    % fastboot devices
    edison********  fastboot
    

    Android Things OS 담금질


    방금 unzip 디렉터리로 이동합니다.스크립트 실행
    % sh brillo-flashall-edison.sh
    brillo-flashall-edison.sh: line 62: ./fastboot: cannot execute binary file
    
    fastboot에서 실행할 수 없는 오류가 발생했습니다.
    mv fastboot fastboot.bk
    등, 실행 파일의 이름을 무효로 변경합니다. (fastboot이 설치되어 있기 때문에 필요 없습니다.)
    % sh brillo-flashall-edison.sh
    target reported max download size of 117440512 bytes
    sending 'gpt' (33 KB)...
    OKAY [  0.009s]
    writing 'gpt'...
    OKAY [  0.149s]
    sending 'u-boot' (375 KB)...
    OKAY [  0.023s]
    writing 'u-boot'...
    OKAY [  0.103s]
    erasing 'misc'...
    OKAY [  0.133s]
    rebooting into bootloader...
    OKAY [  0.000s]
    finished. total time: 0.417s
    < waiting for any device >
    ERROR: Unable to create a plug-in (e00002be)
    ERROR: Unable to create a plug-in (e00002be)
    target reported max download size of 117440512 bytes
    sending 'gpt' (33 KB)...
    OKAY [  0.008s]
    writing 'gpt'...
    OKAY [  0.079s]
    erasing 'u-boot'...
    OKAY [  0.489s]
    sending 'u-boot' (375 KB)...
    OKAY [  0.021s]
    writing 'u-boot'...
    OKAY [  0.105s]
    sending 'boot_a' (10362 KB)...
    OKAY [  0.435s]
    writing 'boot_a'...
    OKAY [  1.165s]
    sending 'boot_b' (10362 KB)...
    OKAY [  0.459s]
    writing 'boot_b'...
    OKAY [  1.161s]
    sending sparse 'system_a' 1/5 (114685 KB)...
    OKAY [  5.800s]
    writing 'system_a' 1/5...
    OKAY [ 22.825s]
    sending sparse 'system_a' 2/5 (114573 KB)...
    OKAY [  6.017s]
    writing 'system_a' 2/5...
    OKAY [ 13.719s]
    sending sparse 'system_a' 3/5 (114338 KB)...
    OKAY [  5.481s]
    writing 'system_a' 3/5...
    OKAY [ 14.203s]
    sending sparse 'system_a' 4/5 (114646 KB)...
    OKAY [  5.965s]
    writing 'system_a' 4/5...
    OKAY [ 17.450s]
    sending sparse 'system_a' 5/5 (40618 KB)...
    OKAY [  2.202s]
    writing 'system_a' 5/5...
    OKAY [  6.713s]
    sending sparse 'system_b' 1/5 (114685 KB)...
    OKAY [  5.835s]
    writing 'system_b' 1/5...
    OKAY [ 22.848s]
    sending sparse 'system_b' 2/5 (114573 KB)...
    OKAY [  5.976s]
    writing 'system_b' 2/5...
    OKAY [ 13.714s]
    sending sparse 'system_b' 3/5 (114338 KB)...
    OKAY [  6.167s]
    writing 'system_b' 3/5...
    OKAY [ 14.156s]
    sending sparse 'system_b' 4/5 (114646 KB)...
    OKAY [  6.075s]
    writing 'system_b' 4/5...
    OKAY [ 17.452s]
    sending sparse 'system_b' 5/5 (40618 KB)...
    OKAY [  2.326s]
    writing 'system_b' 5/5...
    OKAY [  6.690s]
    sending 'userdata' (35529 KB)...
    OKAY [  1.433s]
    writing 'userdata'...
    OKAY [  4.813s]
    erasing 'misc'...
    OKAY [  0.133s]
    Setting current slot to '_a'...
    OKAY [  0.104s]
    finished. total time: 212.023s
    target reported max download size of 117440512 bytes
    sending sparse 'gapps_a' 1/2 (114684 KB)...
    OKAY [  5.510s]
    writing 'gapps_a' 1/2...
    OKAY [ 12.781s]
    sending sparse 'gapps_a' 2/2 (65384 KB)...
    OKAY [  3.198s]
    writing 'gapps_a' 2/2...
    OKAY [  7.112s]
    sending sparse 'gapps_b' 1/2 (114684 KB)...
    OKAY [  4.614s]
    writing 'gapps_b' 1/2...
    OKAY [ 12.783s]
    sending sparse 'gapps_b' 2/2 (65384 KB)...
    OKAY [  2.669s]
    writing 'gapps_b' 2/2...
    OKAY [  7.109s]
    finished. total time: 55.777s
    target reported max download size of 117440512 bytes
    sending 'oem_a' (4676 KB)...
    OKAY [  0.186s]
    writing 'oem_a'...
    OKAY [  0.878s]
    sending 'oem_b' (4676 KB)...
    OKAY [  0.197s]
    writing 'oem_b'...
    OKAY [  0.868s]
    finished. total time: 2.128s
    Please run the following command to restart your Edison
        fastboot  reboot
    
    설치가 완료되었습니다.
    fastboot reboot
    실행 및 재부팅

    adb를 통해 확인


    재부팅 후 잠시 후
    % adb devices
    List of devices attached
    edison********  device
    
    
    이렇게 터미널을 볼 수 있어요.

    adb 셸 연결

    % adb shell
    edison:/ $ id
    uid=2000(shell) gid=2000(shell) groups=2000(shell),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc) context=u:r:shell:s0
    

    adb 루트를 통한 액세스

    % adb root
    restarting adbd as root
    
    % adb shell
    edison:/ # id
    uid=0(root) gid=0(root) groups=0(root),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc) context=u:r:su:s0
    

    시작 후 프로세스 목록


    Android Device Monitor를 시작하면 일반적인 Android 장치와 마찬가지로 장치의 내용을 확인할 수 있습니다.

    감상


    안드로이드 스마트폰과 태블릿PC로 ROM을 다시 태우는 순서는 랩베리 피3보다 Intel Edison에 안드로이드 씽스를 설치하는 것이 안드로이드 같다.USB로 직접 연결할 수 있으므로 이더넷 환경이 필요 없고 어플리케이션 개발 시 Wifi로 adb 연결 필요 없음

    좋은 웹페이지 즐겨찾기