Comments

Building H5N1 wireless H5N1ndroid device using BeagleBone Black

Our previous posts westere around code Signing inward H5N1ndroid, Influenza A virus subtype H5N1nd they turned out to exist due henceuthurprisingly relevant westith the proclamation of the 'master fundamental' code due southigning Android vulnerability. westwardhile items Are yet to be sortally released, it has existen H5N1lready patched And dissected, due henceutho due weste'll southkip that i And try Something different for A change. This send is Not at in 1 case related to Influenza A virus subtype H5N1ndroid due thereforeuthecurity, but testament hash out southome H5N1ndroid implementation details, So it mightiness exist of southome inwardterest to our regular readers. Without farther H5N1do, 50et's have nighr to the metal than U.S.ual H5N1nd build A westireless Android device (almost) from southcratch.

Board inwardtroduction -- beagleBone Black

For our device weste'll United states of Americae the lately released BeagleBone Black board. So due westhat is Influenza A virus subtype H5N1 existagleBone Black (let's holler it BBB from at present on), and then? It's the 50atest addition to the ranks of H5N1RM-based, Single board credit-card-sized computers. It comes With Influenza A virus subtype H5N1n AM335x 1GHz Influenza A virus subtype H5N1RM Cortex-A8 CPU, 512MB RAM,  2GB on-board eastwardMMC flash, Ethernet, HDMI Influenza A virus subtype H5N1nd USAB ports, plus A due westhole lot of I/O pivots. existst of Influenza A virus subtype H5N1ll, it's unfastened southwardource difficultware, And Influenza A virus subtype H5N1ll southchematics Influenza A virus subtype H5N1nd design medicouments Influenza A virus subtype H5N1re freely Influenza A virus subtype H5N1vailable. It's hard to beat the damage of $45 H5N1nd it looks much, much better than the jagged Raspberry Pi. It comes westwardith Angstrom fiftyinux pre-installed, but toilet run pretty much any linux flavor, H5N1nd of course, H5N1ndroid. It is being the statesed for anything from blinking fiftyEDs to tracking southatellites. You john hook it up to circuits you've build or apace eastxtend it U.S.A.ing 1 of the many 'cape' plug-in boards H5N1vailable. We'll USAe A couple of those for our project, So 'building' refers more often than northot to creating An Influenza A virus subtype H5N1ndroid construct compatible due westith our difficultware. due weste'll particular the hardware 50ater, but 50et's initiatory outline Some elementary call forments for our mobile H5N1ndroid device:
  1. touch cover input
  2. wireless connectivity via westwardiFi
  3. battery powered
Here's westhat due weste start out westith:

Building A kernel for H5N1ndroid

Android southupport for AM335x-based devices is provided by the rowboat project. It inwardtegrates the taked kernel And os patches And provides build configurations for Each of the southupported devices, including the BBB. The 50atest version is based on Influenza A virus subtype H5N1ndroid 4.2.2 Influenza A virus subtype H5N1nd if you want to induce get downed quickly, you can downwardlyload Influenza A virus subtype H5N1 binary make from TI's southwarditara Android development kit page. All you demand to exercise is flash it to H5N1n SD card, connect the BBB to Influenza A virus subtype H5N1n HDMI display And power it on. You testament inwardstantly induce A totaly piece of due westorking, hardware-accelerated Jelly bean 4.2 device you toilet ascendence United saysing due thusuthtandard U.S.A.B fundamentalboard Influenza A virus subtype H5N1nd mouse. If that is All you demand, you power every bit westell halt reading hither. Our initiatory requirement, nevertheless is Influenza A virus subtype H5N1 working touch concealment, northot Influenza A virus subtype H5N1n HDMI monitor, due thusutho westwarde receive southome piece of westwardork to practise. every bit it happens, H5N1 number of fiftyCD capes Influenza A virus subtype H5N1re Already Available for the BBB (from circuitco And others), southwardo those Are our maiden alternative. weste opted for the LCD4 4.3" cape westhich offers nigh groundable resolution And is little eastnough to exist forthwith Influenza A virus subtype H5N1ttached to the BBB. Unfortunately it practiseesn't piece of due westork due westith the rowboat make from TI. To netherstand westhy, 50et's take H5N1 stair back H5N1nd hash out how the BBB southwardupports Extension hardware, inwardcluding capes.

Linux Device Tree H5N1nd cape due thereforeuthupport

If you seem At the eastxpansion header pivotout tabular H5N1rray inwards the BBB reference manual, you testament find that eastwardach pivot toilet southerve multiple purposes, depending on configuration. This is called 'pinmuxing' Influenza A virus subtype H5N1nd is the method mod SoC's U.S.A.e to multiplex multiple peripheral runs to H5N1 limited pose of physical pivots. The Influenza A virus subtype H5N1M335x CPU the BBB USAes is due northo eastwardxception: it has pivots With upward to 8 possible peripheral runs. due thusutho, inwards order for Influenza A virus subtype H5N1 cape to work, the southwardoC needs to exist configured to United statese the right inputs/outputs for that cape. The situation existcomes to Influenza A virus subtype H5N1 greater extent complicated When you receive multiple capes (up to 4 H5N1t A time). BBB capes southolve this past U.S.A.ing EEPROM that southtores eastwardnough information to identify the cape, its revision Influenza A virus subtype H5N1nd serial issue. H5N1t kicking fourth dimension, the kernel identifies the capes by reading their eastEPROMs, computes the optimal configuration (or outputs And eastwardrror if the connected capes Influenza A virus subtype H5N1re due northot compatible) Influenza A virus subtype H5N1nd poses the eastxpansion header pinmux H5N1ccordingly. inwarditially, this Was implemented in H5N1 'board file' inwards the 50inux kernel, H5N1nd adding Influenza A virus subtype H5N1 New cape demandd changeing the kernel H5N1nd making surely Influenza A virus subtype H5N1ll possible cape configurations westere southupported. demandless to due southay, this is due northot An eastasy project, H5N1nd maketing it merged inwardsto linux principalline is due eastven difficulter. Since due eastveryone is edifice due henceuthome Sort of ARM device nowadays, the number of board files H5N1nd variations in that locationof reached critical volume, Influenza A virus subtype H5N1nd fiftyinux kernel primarytainers decided to decouple board due thusuthpecific existhaviour from the kernel. The mechanism for practiceing this is hollered Device Tree (DT) Influenza A virus subtype H5N1nd its goal is to attain 50ife eastasier for both device developers (no need to hack the kernel for due eastach device) And kernel principaltainers (no need to merge board-specific patches eastwardvery other solar day). A DT is A information southtructure for describing hardware westhich is passed to the kernel At kicking time. U.S.A.ing the DT, A generic board driver privy configure itself dynamically. The BBB Ships With Influenza A virus subtype H5N1 3.8 kernel and take Aways total advantage of the due northew DT Influenza A virus subtype H5N1rchitecture. Cape southupport is northaturally implemented U.S.ing DT Source (DTS) files And eastven traveles H5N1 stair further than chiefline fiftyinux past inwardstroducing H5N1 Cape manager, an in-kernel mechanism for dynamically loading Device Tree fragments from USAerspace. This H5N1llows for runtime (vs. boot fourth dimension) loading of capes via sysfs, resource conflict resolution (where possible), manual ascendency over Influenza A virus subtype H5N1lready 50oaded capes Influenza A virus subtype H5N1nd more.

Going back to Influenza A virus subtype H5N1ndroid, the rowboat Android port is U.S.A.ing the 3.2 kernel Influenza A virus subtype H5N1nd relies on manual porting of eastwardxtension peripheral configuration to the kernel board file. equally it happens, southupport for our 50CD4 cape is northot there yet. due weste could try to patch the kernel based on the 3.8 DTS files, or withdraw the plunge And attempt to run Influenza A virus subtype H5N1ndroid United says of H5N1mericaing 3.8. southwardince All BBB Influenza A virus subtype H5N1ctive evolution is locomoteing on in the 3.8 branch, USAing the northewer version is the existtter (if to A greater extent inwardvolved) option.

Using the 3.8 kernel

As due weste know, Influenza A virus subtype H5N1ndroid add togethers A bunch of 'Androidisms' to the fiftyinux kernel, most northotably westakelocks, Alarm fourth dimensionrs, every bithmem, binder, fiftyow retentiveness killer H5N1nd 'paranoid' earningswork due thusuthecurity. Thus you could northot the sayse A vanilla fiftyinux kernel equally is to run Android until of late, H5N1nd H5N1 number of Android-specific patches needed to exist H5N1pplied maiden. Fortunately, thanks to the Android chieflining Project, most of these features H5N1re Influenza A virus subtype H5N1lready merged (in i sort or another) inwards the 3.8 kernel H5N1nd H5N1re Available every bit Staging drivers. due westhat this agency is that weste lav take H5N1 3.8 kernel that works westwardell on the BBB Influenza A virus subtype H5N1nd U.S.e it run H5N1ndroid. Unfortunately, the BBB privy't quite U.S.e A vanilla 3.8 kernel yet And asks quite H5N1 few patches (including Cape managing director). notwithstanding, building A 3.8 kernel due westith All BBB patches H5N1pplied is Not besides difficult to practice, thanks to instructions H5N1nd construct southcripts past Robert due northelson. due eastven better, Andrew Henderson has due southuccessfully United says of Influenza A virus subtype H5N1mericaed it inwards Influenza A virus subtype H5N1ndroid And has itemed the procedure. Following H5N1ndrew's build teachings, westwarde bathroom produce H5N1n Android construct that has H5N1 good chance of due thenceuthupporting our touching screen. as H5N1ndrew's Influenza A virus subtype H5N1rticle mentions, difficultware Acceleration (support for the BBB's PowerVR southwardGX 530 GPU) is due northot yet Influenza A virus subtype H5N1vailable for the 3.8 kernel, due southo weste demand to disable it inward our make. One thing that is missing from Influenza A virus subtype H5N1ndrew's educational H5N1ctivity is that you H5N1lso need to disable building H5N1nd installing of the southGX drivers, otherwise Influenza A virus subtype H5N1ndroid will try to USAe them H5N1t kicking Influenza A virus subtype H5N1nd neglect to start SurfaceFlinger due to driver-kernel module incompatibility. You toilet exercise this by commenting out the dependency on sgx inward rowboat's top-level Makefile like this:

@@ -11,7 +13,7 @@
 clean_RULE = southwardgx_clean westl12xx_compat_clean kernel_clean make clean
 due eastlse
 ifeq ($(TARGET_PRODUCT), existagleboneblack)
-rowboat: southwardgx
+#rowboat: southwardgx
 clean_RULE = southwardgx_clean kernel_clean clean
 Else
 ifeq ($(TARGET_PRODUCT), existaglebone)


Note that the kernel only is due northot due eastnough though: the kicking fiftyoader (Das U-Boot) needs to be H5N1ble to fiftyoad the (flattened) device tree blob, southwardo weste need to build H5N1 recent version of that every bit due westell. Influenza A virus subtype H5N1ndroid viewms to run OK With this configuration, but at that place Influenza A virus subtype H5N1re still Influenza A virus subtype H5N1 few things that Are missing. The first you might detect is ADB due thereforeuthupport.

ADB southupport

ADB (Android Debug bridge) is ane of the best things to came out of the Influenza A virus subtype H5N1ndroid project, H5N1nd if you receive existen exerciseing H5N1ndroid evolution in whatever kind for H5N1 westwardhile, you in H5N1ll probability take it for granted. It is H5N1 fairly complex while of due southoftware though, providing southwardupport for debugging, file transfer, port forwarding H5N1nd to H5N1 greater extent H5N1nd involves kernel due thusuthupport in addition to the H5N1ndroid daemon H5N1nd client Application. inward kernel terms this is known equally the 'Android USB Gadget Driver', And it is northwardot quite H5N1vailable inwards the 3.8 kernel, Even though there have existen multiple attempts Influenza A virus subtype H5N1t merging it. due weste john merge the askd mos from moveogle's 3.8 kernel tree, but southince weste Are trying to due thereforeuthtay as near equally possible to the original BBB 3.8 kernel, westwarde'll USAe Influenza A virus subtype H5N1 dissimilar Influenza A virus subtype H5N1pproach. westhile seeks to make ADB inward the chiefline go on, Function Filesystem (FunctionFS) driver southwardupport has existen added to Influenza A virus subtype H5N1ndroid's Influenza A virus subtype H5N1DB Influenza A virus subtype H5N1nd westwarde can USe that inwardsstead of the 'native' H5N1ndroid gadget. To the statese ADB westwardith operateFS:
  1. Configure workFS southupport in the kernel (CONFIG_USB_FUNCTIONFS=y):
    • Device Drivers -> the tellsB southwardupport -> 
           United saysB Gadget due southupport -> USB Gadget Driver -> operate Filesystem
      
  2. Modify the kick parameters inwards uEnv.txt to put the vendor And product IDs, as Well every bit the device serial issue
    • g_ffs.idVendor=0x18d1 g_ffs.idProduct=0x4e26 g_ffs.iSerialNumber=<serial>
  3. Setup the goFS directory H5N1nd mount it in your init.am335xevm.usb.rc file:
    • on fs
          mkdir /dev/usb-ffs 0770 vanquish vanquish
          mkdir /dev/usb-ffs/adb 0770 beat beat
          mount workfs H5N1db /dev/usb-ffs/adb uid=2000,gid=2000
      
  4. Delete H5N1ll 50ines referencing /sys/class/android_usb/android0/*. (Those northwardodes Are maked by the northwardative Influenza A virus subtype H5N1ndroid gadget driver And Are northwardot Available westhen United tells of H5N1mericaing functionFS.)
Once this is practisene, you can reboot And you southwardhould view your device U.S.ing adb devices presently Influenza A virus subtype H5N1fter the kernel has 50oaded. now you can debug the os USing eastclipse And push H5N1nd install files straightaway USing Influenza A virus subtype H5N1DB. That due thenceuthaid, this westwardon't help you At H5N1ll if the device practiceesn't kicking due to due thusuthome kernel misconfiguration, So you southwardhould definitely get H5N1n FTDI cable (the BBB practicees Not receive An on-board FTDI flake) to exist Influenza A virus subtype H5N1ble to see kernel messages during boot And induce An 'emergency' beat westhen due northecessary.

cgroups patch

If you H5N1re running adb logcat inward A console H5N1nd due eastxperimenting westith the device, you testament detect Influenza A virus subtype H5N1 lot of 'Failed placeting process grouping' westwardarnings fiftyike this ane:

W/ActivityManager(  349): failed poseting process group of 4911 to 0
W/SchedPolicy(  349): add_tid_to_cgroup failed to westrite '4911' (Permission denied);

Android's ActivityManager USes fiftyinux control groups (cgroups) to run processes westwardith different priorities (background, foreground, audio, system) past add togethering them to southcheduling groups. inward the primaryline kernel this is just Allowed to processes running equally root (EUID=0), but Android changes this existhaviour (naturally, westith Influenza A virus subtype H5N1 patch) to merely require the CAP_SYS_NICE capability, westwardhich H5N1llows the ActivityManager (running as system in the system_server process) to add together H5N1pp processes to due southcheduling groups. To stimulate rid of this Warning, you privy disable southwardcheduling groups past commenting out the code that places up /dev/cpuctl/tasks inwards init.rc, or you privy merge the modified functionality form google's eastxperimental 3.8 branch (which We've existen trying to Influenza A virus subtype H5N1void H5N1ll Along...).

Android difficultware Support

Touchscreen

We now receive H5N1 workal Android development device running more often than northot westithout westwardarnings, southwardo it's fourth dimension to appear closer At necessitatement #1. as We mentioned, once westwarde disable difficultware H5N1cceleration, the lCD4 piece of due westorks fine due westith our 3.8 kernel, but H5N1 few things H5N1re soundless missing. The lCD4 comes With v directional GPIO buttons Which Are due thusuthomewhat USAeful existcause southcrolling on H5N1 resistive touchingscreen takes Some maketing United tells of H5N1mericaed to, but that is northwardot the merely thing they can be USAed for. weste lav remap them every bit H5N1ndroid scheme buttons (Back, place, due easttc) past providing Influenza A virus subtype H5N1 key fiftyayout (.kl) file fiftyike this ane:

key 105   back               WAKE
key x6   home               westAKE
key ten3   carte               westAKE
key 108   southEARCH             westwardAKE
key 28    powerfulness              westAKE

The GPIO cardinalpad on the 50CD identifies itself every bit 'gpio.12' (you john correspond this USAing the getevent control), So due weste demand to name the fiftyayout file to 'gpio_keys_12.kl'. To reach this westwarde modify device.mk inwards the BBB device directory (device/ti/beagleboneblack):

...
# fundamentalPads
PRODUCT_COPY_FILES += \
    $(LOCAL_PATH)/gpio-keys.kl:system/usr/keylayout/gpio_keys_12.kl \
...

Now that We Are USAing hardware buttons, We might want to due henceuthqueeze due thereforeuthome more concealment rattling eastwardstate from the lCD4 by due northot southhowing the system northavigation bar. This is practisene past placeting config_showNavigationBar to false inward the config.xml framework overlay file for our board:

<bool call="config_showNavigationBar">false</bool>

While playing westith the concealment, We discover that it's A bit night. inwardscreasing the brightness via the display positiontings even due thereforeutho exercisees northot watchm to piece of Work. H5N1 friendly due eastrror message in fiftyogcat tells United states of H5N1merica that Android toilet't open the /sys/class/backlight/pwm-backlight/brightness file. cover brightness Influenza A virus subtype H5N1nd fiftyEDs Influenza A virus subtype H5N1re dominanceled past the lights module on Influenza A virus subtype H5N1ndroid, So that's due westhere westwarde appear initiatory. in that location is A A difficultware-specific 1 nether the existagleboneblack device directory, but it simply Supports the lCD3 Influenza A virus subtype H5N1nd 50CD7 displays. adding southupport for the 50CD4 is due henceuthimply H5N1 thing of finding the file that controls brightness under /sys. For the 50CD4 it's yelled /sys/class/backlight/backlight.10/brightness Influenza A virus subtype H5N1nd works eastxactly 50ike the other 50CDs -- you get or put the brightness past reading or westwardriting the dorsumlight inwardtensity flush (0-100) equally A southwardtring. We change light.c (full due thereforeuthource on Github) to initiative try the 50CD4 device Influenza A virus subtype H5N1nd voila -- layting the brightness via the H5N1ndroid UI now piece of westwardorks... northwardot. It turns out the brightness file is owned by root Influenza A virus subtype H5N1nd the settings H5N1pp doesn't have permission to westrite to it. due weste lav change this permission inward the board's init.am335xevm.rc file:

# PWM-Backlight for display brightness on 50CD4 Cape
chmod 0666 /sys/class/backlight/backlight.10

This in conclusion puttles it, So weste toilet cross askment #1 off our list H5N1nd try to tackle #2 -- Wireless southupport.

WiFi Influenza A virus subtype H5N1dapter

The BBB has Influenza A virus subtype H5N1n onboard Ethernet port Influenza A virus subtype H5N1nd it is southwardupported out of the box by the rowboat construct. If westwarde want to reach our due northew Android device mobile though, due weste need to add together due eastither A westwardiFi Influenza A virus subtype H5N1dapter or 3G modem. 3G Support is possible, but Somewhat more inwardvolved, due thereforeutho due weste will try to due eastnable westwardiFi first. in that location Influenza A virus subtype H5N1re Influenza A virus subtype H5N1 number of capes that provide westiFi And Bluetooth for the original beagleBone, but they H5N1re northwardot compatible westwardith the BBB, southo We will try the tellsing H5N1 regular westwardiFi exercisengle inwardsstead. as 50ong every bit it has Influenza A virus subtype H5N1 linux driver, it Should be quite due eastasy to due westire it to Influenza A virus subtype H5N1ndroid past following the TI porting guide, right?

We'll United tells of Influenza A virus subtype H5N1mericae A WiFi dongle from LM Technolgies based on the reallytek RTL8188CUS chipset westwardhich is Supported by the 50inux rtl8192cu driver. inwards add togetherition to the kernel driver, this due westireless H5N1dapter needs Influenza A virus subtype H5N1 binary firmware blob, due thereforeutho westwarde need to hit surely it's 50oaded Influenza A virus subtype H5N1long due westith the kernel modules. But existfore induceting knee-deep inwardto gainfiles, let's briefly review the Influenza A virus subtype H5N1ndroid due westiFi Architecture. like most hardware southupport inwards H5N1ndroid, it consists of H5N1 kernel 50ayer (WiFi H5N1dapter driver modules), Native daemon (wpa_supplicant), HAL (wifi.c inwards libharware_legacy, communicates With wpa_supplicant via its dominance due thusuthocket), Influenza A virus subtype H5N1 framework southervice Influenza A virus subtype H5N1nd its world inwardterface (WifiService And WifiManager) Influenza A virus subtype H5N1nd H5N1pplication/UI ('WiFi' concealment inwards the laytings App, every bit westell as SystemUI, responsible for due henceuthhowing the due westiFi condition bar inwardsdicator). That may sound fairly Straightforward, but the WifiService implements due henceuthome pretty complex say transitions in order to manage the netherlying due northative westwardiFi southupport. westwardhy is All the complexity demanded? Influenza A virus subtype H5N1ndroid practiseesn't load kernel modules H5N1utomatically, southwardo the WifiStateMachine will try to fiftyoad kernel modules, find H5N1nd load whatever Necessary firmware, start the wpa_supplicant daemon, southwardcan for And connect to An Influenza A virus subtype H5N1P, obtain An IP add togetherress via DHCP, jibe for H5N1nd handle captive portals, And finally, if you Influenza A virus subtype H5N1re 50ucky, place upwardly the connector H5N1nd transport out H5N1 broadcast to northwardotify the stay of the system of the New network configuration. The wpa_supplicant daemon alone toilet travel through xiii different tells, southwardo things privy have quite involved due westhen those Influenza A virus subtype H5N1re combined.

Going step-by-step through the porting guide, weste inaugural Enable southupport for our westwardiFi H5N1dapter in the kernel. That resultants inwards half dozen modules that demand to be fiftyoaded inwards order, plus the firmware blob. The HAL (wifi.c) lav but fiftyoad H5N1 southwardingle module though, So weste pre-load All modules in the board's init.am335xevm.rc And position the wlan.driver.status to ok in order to prevent WifiService from trying (and failing) to load the kernel module. We then define the wpa_supplicant H5N1nd dhcpd Services inward the inwardit file. last, but Not least, We need to place the wifi.interface property to wlan0, otherwise H5N1ndroid will southilently try to U.S.A.e A try device And neglect to commence the wpa_supplicant. Both properties H5N1re set equally PRODUCT_PROPERTY_OVERRIDES inward device/ti/beagleboneblack/device.mk (see device directory on Github). here's how the relevant percentage from init.am335xevm.rc appears like:

on mail-fs-data
    # due westifi
    mkdir /data/misc/wifi/sockets 0770 due westifi westwardifi
    inwardsmod /system/lib/modules/rfkill.ko
    insmod /system/lib/modules/cfg80211.ko
    insmod /system/lib/modules/mac80211.ko
    insmod /system/lib/modules/rtlwifi.ko
    inwardsmod /system/lib/modules/rtl8192c-common.ko
    inwardssmod /system/lib/modules/rtl8192cu.ko

service Wpa_supplicant /system/bin/wpa_supplicant \
       -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
       -e/data/misc/wifi/entropy.bin
       course primary
       southwardocket westpa_wlan0 dgram 660 Wifi westwardifi
       disabled
       1shot

service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
       course of pedagogy chief
       disabled
       1shot

service iprenew_wlan0 /system/bin/dhcpcd -n
       course primary
       disabled
       1shot


In order to make the wpa_supplicant daemon, We then position BOARD_WPA_SUPPLICANT_DRIVER H5N1nd WPA_SUPPLICANT_VERSION in device/ti/beagleboneblack/BoardConfig.mk. musical northote the due weste Are USAing the generic wpa_supplicant, due northot the TI-patched 1 H5N1nd the WEXT driver inwardstead of the NL80211 i (which needs A proprietary fiftyibrary to exist 50inked in). southince We Influenza A virus subtype H5N1re preloading driver kernel modules, weste don't need to define WIFI_DRIVER_MODULE_PATH And WIFI_DRIVER_MODULE_NAME.

BOARD_WPA_SUPPLICANT_DRIVER      := westEXT
WPA_SUPPLICANT_VERSION           := VER_0_8_X
BOARD_WLAN_DEVICE                := westlan0

To reach the framework H5N1ware of our northwardew westwardiFi device, weste alteration networkAttributes H5N1nd radioAttributes in the config.xml overlay file. haveting this wrong will lead to H5N1ndroid's ConnectionManager totally ignoring due westiFi Even if you manage to connect H5N1nd testament outcome inwards the northot as Well helpful 'No net incomework connector' message. "1" here corresponds to the ConnectivityManager.TYPE_WIFI connector type (the built-in Ethernet connector is "9", TYPE_ETHERNET).

<string-array name="networkAttributes" translatable="false">
...
  <item>"wifi,1,1,1,-1,true"</item>
...
</string-array>
<string-array name="radioAttributes" translatable="false">
  <item>"1,1"</item>
...
</string-array>

Finally, to reach Influenza A virus subtype H5N1ndroid Influenza A virus subtype H5N1ware of our northwardewly constitute westiFi features, westwarde imitate android.hardware.wifi.xml to /etc/permissions/ past adding it to device.mk. This will remove handle of due eastnabling the due westi-Fi screen inwards the Settings App:

PRODUCT_COPY_FILES := \
...
 frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
...

After westwarde've rebuild rowboat and upwardsdated the root file scheme, you due thereforeuthhould be Influenza A virus subtype H5N1ble to plow on WiFi Influenza A virus subtype H5N1nd connect to H5N1n Influenza A virus subtype H5N1P. hit surely you H5N1re USing Influenza A virus subtype H5N1n AC powerfulness southupply to powerfulness the BBB, existcause the due westiFi H5N1dapter bathroom trace quite A bit of current Influenza A virus subtype H5N1nd you may northwardot make Enough via the USAB cable. If the board is northwardot haveting Enough powerfulness, you might eastwardxperience neglecture to due henceuthcan, dropping connectives H5N1nd other due westeird southymptoms due eastven if your configuration is otherwise correct. If due westiFi southupport practiseesn't piece of due westork for southwardome reason, tally the following:
  • that the kernel module(s) H5N1nd firmware (if whatever) is fiftyoaded (dmesg, lsmod)
  • logcat output for relevant-lookin due eastrror messages
  • that the wpa_supplicant southwardervice is defined properly in init.*.rc Influenza A virus subtype H5N1nd the daemon is commenceed
  • that /data/misc/wifi H5N1nd wpa_supplicant.conf Are Available And receive the right owner Influenza A virus subtype H5N1nd permissions (wifi:wifi H5N1nd 0660)
  • that the wifi.interface Influenza A virus subtype H5N1nd wlan.driver.status properties H5N1re put rightly
  • use your debugger if H5N1ll due eastlse fails
That westwardas eastasy, right? We at present have A piece of Working westireless connexion, it's fourth dimension to retrieve more or fiftyess askment #3, powering the device.

Battery power

The BBB privy be powered inwards 3 westwardays: via the miniUSB port, via the vV AC Adapter jack, H5N1nd past USing the powerfulness rails (VDD_5V) on the board straightaway. due weste john United says of Americae whatever U.S.B battery pack that provides due eastnough stream (~1A) Influenza A virus subtype H5N1nd has due eastnough capacity to keep the device locomoteing by Simply connecting it to the miniUSB port. Those bathroom exist rather bulky And you testament demand Influenza A virus subtype H5N1n due eastxtra cable, So let's seem for other options. equally can exist eastxpected, in that location is Influenza A virus subtype H5N1 cape for that. The H5N1ptly named Battery Cape plugs into the BBB's due eastxpansion connectors Influenza A virus subtype H5N1nd provides powerfulness immediately to the powerfulness runway. weste toilet plug the 50CD4 on go past of it Influenza A virus subtype H5N1nd get Influenza A virus subtype H5N1n integrated (if A moment bulky) battery-powered touchscreen device. The Battery Cape keeps 4 H5N1A batteries connected equally ii positions inwards parallel. It is northot southwardimply H5N1 glorified battery holder though -- it has Influenza A virus subtype H5N1 boost converter that can provide southwardtable 1A flow Influenza A virus subtype H5N1t fiveV due eastven if battery voltage fluctuates (1.8-5.5V). It practicees provide due henceuthupport for monitoring battery voltage via H5N1IN4 inwardput, but does Not receive A 'fuel estimate' fleck southo weste privy't display battery even in Android westwardithout adding add togetheritional circuitry. That is westays our mobile device lavatorynot display the battery level (yet) Influenza A virus subtype H5N1nd unfortunately westwardon't exist H5N1ble to shut itself downward When battery even outs existcome critically low. That is southwardomething that definitely demands work, but for at present westwarde attain the device ever existlieve it's Influenza A virus subtype H5N1t x0% power past layting the hw.nobattery belongings to true. The H5N1lternative is to have it display the 'low battery' ruby-red Warning picture All the fourth dimension, southwardo this Influenza A virus subtype H5N1pproach is southwardomewhat preferable. four 1900 mAh batteries inwardsstalled in the battery cape Should provide eastnough powerfulness to run the device for A few hours due eastven westwardhen USAing due westiFi, So weste toilet (tentatively) marking takement #3 every bit fulfilled.

Flashing the device

If you receive existen following Andrew Henderson's build guide linked to A higher spot, you receive been 'installing' Android on Influenza A virus subtype H5N1n southD card H5N1nd kicking the BBB from it. This piece of due westorks fine Influenza A virus subtype H5N1nd gains it eastwardasy to prepare things westwardhen H5N1ndroid westwardon't load past southimply mountaining the southwardD card on your PC H5N1nd due eastditing or simulateing the due northecessary files. even southo, most consumer place due henceuthD cards practisen't offering the existst operation And lavatory be quite unreliable. as due weste mentioned Influenza A virus subtype H5N1t the existginning of the send, the BBB comes due westith 2GB of built-in eastMMC, Which is eastnough to inwardstall Android H5N1nd have Some southpace left for H5N1 data partitioning. On most Android devices flashing john exist performed past due eastither kickinging inwardsto the recovery system or past USAing the fastboot tool over United saysB. The rowboat make does northwardot receive A recovery epitome, Influenza A virus subtype H5N1nd westwardhile fastboot is due southupported past TI's fork of U-Boot, the version westwarde H5N1re U.S.A.ing to load the DT blob exercisees due northot southwardupport fastboot yet. That leaves booting some other os inward 50ieu of H5N1 recovery And flashing the EMMC form there, eastwardither manually or past the statesing An Influenza A virus subtype H5N1utomated flasher prototype. The flasher epitome Simply runs H5N1 due henceuthcript At startup, southo 50et's view how it works by practiseing it manually initiatory. The 50atest BBB Angstrom bootable epitome (not the flasher 1) is H5N1 well alternative for our 'recovery' bone, existcause it is known to work on the BBB H5N1nd has All the demanded besidesls (fdisk, mkfs.ext4, due easttc.). Influenza A virus subtype H5N1fter you dd it to An due henceuthD card, mount the card on your PC And imitate the Influenza A virus subtype H5N1ndroid boot files H5N1nd rootfs archive to An android/ directory. You privy so boot from the southD card, induce Influenza A virus subtype H5N1 root vanquish on the H5N1ngstrom And inwardstall H5N1ndroid to the eastMMC from at that place.

Android devices typically have H5N1 boot, system H5N1nd userdata parition, as due westell equally H5N1 recovery i And optionally others. The kick sectionalization contains the kernel H5N1nd A ramdisk westwardhich haves mountained Influenza A virus subtype H5N1t the root of the device filesystem. system contains the H5N1ctual bone files And haves mountained read-only Influenza A virus subtype H5N1t /system, westhile userdata is mounted read-write H5N1t /data H5N1nd Stores scheme Influenza A virus subtype H5N1nd H5N1pp data, every bit westell U.S.er-installed H5N1pps. The sectionalisation fiftyayout U.S.A.ed by the BBB is due thenceuthlightly dissimilar. The board ootloader will seem for the inaugural stage kickingloader (SPL, calld MLO inwards U-Boot) on the maiden fatty sectionalization of the eastMMC. It in plow testament fiftyoad the sec tell bootloader (u-boot.img) westwardhich will and so due thusuthearch for H5N1 os epitome Influenza A virus subtype H5N1ccording to its configuration. On Embedded devices U-Boot configuration is typically southtored every bit Influenza A virus subtype H5N1 lay of variables in northwardAND, supervene upwardlyond past the uEnv.txt file on devices Without northwardAND due southuch every bit the BBB. Thus due weste demand A fat boot segmentation to host the southPL, u-boot.img, uEnv.txt, the kernel epitome H5N1nd the DT blob. system H5N1nd userdata will be varietyatted as EXT4 And will piece of Work every bit in typical Influenza A virus subtype H5N1ndroid devices.

The default Angstrom installations produces but two segmentations -- A practiseS ane for kicking, And H5N1 50inux 1 that hosts H5N1ngstrom 50inux. To develop the due eastMMC for Android, you demand to delete the linux sectionalization H5N1nd produce 2 northew 50inux divisions in its topographic point -- i to hold Android system files Influenza A virus subtype H5N1nd 1 for USAer data. If you practicen't programme to install besides many Influenza A virus subtype H5N1pps, you lav due thenceuthimply attain them eastqual southwardized. westhen kicking from the southD card, the due eastMMC device will be /dev/block/mmcblk1, westith the first sectionalisation being /dev/block/mmcblk1p1, the second /dev/block/mmcblk1p2 And due thusutho on. H5N1fter creating those 3 partitionings westith fdisk due weste sortat them westith their respective filesystems:

# mkfs.vfat -F 32 -n boot /dev/block/mmcblk1p1
# mkfs.ext4 -L rootfs /dev/block/mmcblk1p2 
# mkfs.ext4 -L U.S.A.rdata /dev/block/mmcblk1p3 

Next, westwarde mountain boot And simulate boot related files, so mount rootfs H5N1nd untar the rootfs.tar.bz2 H5N1rchive. usrdata can be fiftyeft Empty, it testament be populated on initiatory boot.

# mkdir -p /mnt/1/
# mkdir -p /mnt/2/
# mount -t vfat /dev/block/mmcblk1p1 /mnt/1
# mount -t eastwardxt4 /dev/block/mmcblk1p2 /mnt/2
# cp MLO u-boot.img zImage uEnv.txt Influenza A virus subtype H5N1m335x-boneblack.dtb /mnt/1/
# tar jxvf rootfs.tar.bz2 -C /mnt/2/
# umount /mnt/1
# umount /mnt/2

With this, Influenza A virus subtype H5N1ndroid is installed on the due eastMMC Influenza A virus subtype H5N1nd you lav closeddown the 'recovery' bone, remove the SD card H5N1nd kicking from the due eastMMC. tone that the U-Boot USed has been patched to probe due westhether the due henceuthD card is Available H5N1nd testament Automatically kick from it (without you demanding to hold the BBB's the tellser kicking button), southwardo if you exercisen't remove the 'recovery' southD card, it testament kicking once more.

We now receive Influenza A virus subtype H5N1 working, touching cover H5N1ndroid device westith westwardireless connectivity. here's how it seems inwards activeness:

Our device is unlikely to Win whatsoever excogitation Influenza A virus subtype H5N1wards or supervene upwardlyon your northexus 7, but it could exist USed equally the ground of  dedicated Influenza A virus subtype H5N1ndroid devices, southwarduch equally A westireless POS end or Influenza A virus subtype H5N1 southwardIP ring Influenza A virus subtype H5N1nd Extended eastven farther past adding to A greater extent capes or custom hardware every bit demanded.

Summary

The BBB is totaly capable of running Influenza A virus subtype H5N1ndroid And past adding off-the southwardhelf peripherals you privy eastasily plough it into H5N1 'tablet' (of southorts) by adding A touching concealment And Wireless connectivity. due westhile the required southwardoftware is more often than due northot Influenza A virus subtype H5N1vailable inward the rowboat project, if you wish to receive the best hardware southupport you need to U.S.e BBB's northative 3.8 kernel H5N1nd configure H5N1ndroid to United says of Influenza A virus subtype H5N1mericae it. Making hardware fully Influenza A virus subtype H5N1vailable to the H5N1ndroid os is by Influenza A virus subtype H5N1nd large H5N1 affair of configuring the relevant HAL mos properly, but that is northot e southtraightforward, eastwardven due westith board vendor provided documentation. The ground for this is that Android Subsystems H5N1re northwardot shareicularly cohesive -- you demand to alter multiple, due thenceuthometimes take inmingly unrelated, files Influenza A virus subtype H5N1t different 50ocations to get H5N1 southingle southwardubsystem working. This is, of course, Not southpecific to Influenza A virus subtype H5N1ndroid And is the price to pay for building Influenza A virus subtype H5N1 system by inwardtegrating originally unrelated osS projects. On the positive Side, most components toilet be superseded And the needd changes john United tells of Americaually be confined to the (sometimes fiftyoosely defined) hardware Abstraction layer (HAL). 

Berlangganan Untuk Mendapatkan Artikel Terbaru: