1. 程式人生 > >開發板刷Android Things系統

開發板刷Android Things系統

開發板及開發板的資訊

這裡寫圖片描述

這裡寫圖片描述

這裡寫圖片描述

Where to buy:

這裡寫圖片描述

刷機: 以Intel® Edison為例

這裡寫圖片描述

Intel® Edison開發板是計算模組化的,它雖然小但是確實一個功能強大的系統(SOC),包含CPU, MCU, memory, storage 雙頻wifi和藍芽。它可以當成一個模組安裝到一個系統的擴充套件板上,就像我們把硬碟或者記憶體條安裝到電腦的主機板上一樣。

Intel® Edison的大小其實就像一個sd那麼大,可以很方便的整合到手機,平板電腦,及其他硬體裝置中。

這裡寫圖片描述

開始刷機
Flashing the image

開始之前我們需要壓根資料線,把開發板和電腦連線起來。

Step 1: Install Fastboot
為了使Edison開發板支援Fastboot,當你第一次使用Edison的時候你需要安裝bootloader,通過以下步驟來實現。
說明:BootLoader是在作業系統核心執行之前執行。

1,更新Android SDK Platform Tools 到25.0.3或者更高版本
    1-1 確認platform-tools檔案下有fastboot.exe檔案
    1-2 配置fastboot.exe到環境變數中

2,Download the Intel Platform Flash Tool Lite for your host platform.

3,Launch the flash tool and select Browse. Navigate to the zipped image file and select it.

選擇映象檔案

Ensure FlashEdison.json is selected in the Flash file listbox.
Select Non_OS in the Configuration listbox.

4,Connect the board to your host computer:
通過usb連結開發板

Step 2: Flash Android Things
1,Open a command line terminal and navigate to the unzipped image directory.

開啟命令列,進入到image映象目錄

2,If your device is not already in fastboot mode, use the adb tool to activate it:
開發板不是快速啟動模式,通過adb tool 啟用。

$ adb reboot bootloader

3,Verify that the device has booted into fastboot mode by executing the following:

$ fastboot devices
1b2f21d4e1fe0129    fastboot

4,Execute the following fastboot commands to install the operating system image:
執行命令開始安裝映象檔案

$ fastboot \
    flash gpt partition-table.img \
    flash u-boot u-boot-edison.bin \
    flash boot_a boot.img \
    flash boot_b boot.img \
    flash system_a system.img \
    flash system_b system.img \
    flash userdata userdata.img \
    erase misc \
    set_active _a

$ fastboot \
    flash gapps_a gapps.img \
    flash gapps_b gapps.img

$ fastboot \
    flash oem_a oem.img \
    flash oem_b oem.img

5,Reboot the device into Android Things:
重啟開發板

$ fastboot reboot

6,To verify that Android is running on the device, discover it using the adb tool:
驗證Android Things系統已經安裝到開發板。

    $ adb devices
    List of devices attached
    Edisonb74661ad    device

Connecting Wi-Fi
當刷機完成,強烈建議將開發板聯網,這樣開發板可以接收到崩潰日誌和接受系統的更新訊息。

1,Send an intent to the Wi-Fi service that includes the SSID and passcode of your local network:
聯網操作

$ adb shell am startservice \
    -n com.google.wifisetup/.WifiSetupService \
    -a WifiSetupService.Connect \
    -e ssid <Network_SSID> \
    -e passphrase <Network_Passcode>

2,Verify that the connection was successful through logcat:
確認聯網是否成功

$ adb logcat -d | grep Wifi
...
V WifiWatcher: Network state changed to CONNECTED
V WifiWatcher: SSID changed: ...
I WifiConfigurator: Successfully connected to ...

3,Test that you can access a remote IP address:
測試開發板可以訪問遠端IP

$ adb shell ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=57 time=6.67 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=57 time=55.5 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=57 time=23.0 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=57 time=245 ms