Top Banner
android-x86.org Android-x86 Project Marshmallow Porting https://docs.google.com/presentation/pub? id=1mUQDFaERipwQQWHiZxmkvwPXNPlqtdv9lXrY5hPoUJ4 黃志偉 [email protected] 2015/11/28 http://cwhuang.info
56

Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

Nov 14, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Android-x86 ProjectMarshmallow Porting

https://docs.google.com/presentation/pub?id=1mUQDFaERipwQQWHiZxmkvwPXNPlqtdv9lXrY5hPoUJ4

黃志偉[email protected]

2015/11/28http://cwhuang.info

Page 2: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Agenda

●Introduction: what, why, how?●History and milestones, current status●How to develop android-x86●Inside android-x86●App compatibility issues●What we contributed?●Difficulties and challenges●Live Demo?

Page 3: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Introduction

●What's Android-x86?●Why needs Android-x86?●How can we do it?

Page 4: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

What's Android-x86 ?

●An open source project aimed to provide a complete solution for Android on x86 devices.

●At first we use ASUS Eee PC and virtual box as the reference platform.

●Some vendors donate tablets to us, like Tegatech Tegav2, 4tiitoo AG WeTab and AMD.

●BSP (Board support Package) for x86 platform

Page 5: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Why needs Android for x86?

●Android is an open source operating-system designed for arm platform●But it's open source, we can port it to other platforms?

● Mips porting (MIPS Technology)● PowerPC porting

● Mentor Graphics● Power.org

● x86 porting

Page 6: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

But what are the benefits?

●Understanding Android porting process●The x86 platform is widely available●As a test platform, much faster than SDK

emulator●Android-x86 on vbox / vmware●Suitable for tablet apps

Page 7: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Android architecture

Page 8: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

How to do that?

●Toolchains – already in AOSP, but old...●Kernel – almost works, except power management, drivers●Libraries – bugfixes or improvements

● Building time – bionic, llvm, ppp, v8, ...● Runtime – bluetooth, vold, ...

●HAL (hardware abstraction layer)●Framework / app●Android 4.0 (ICS) is the first Android version that can be built for x86 without patches. However, to make it run on a real x86 device, there are still a lot of work to do.

Page 9: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

History (2009)

●Mar: Not maintained, need patches●Apr: Patch hosting for android x86 support by

Yi Sun <beyounn at gmail.com>●May: Hard to maintain and sync with upstream●Jun: Need a common, complete code base●Jul: android-x86.org, release v0.9●Aug: Build 20090820●Sep: Build 20090916●Oct: Build 20091024●Nov: Android-x86 1.6 released●Dec: Eclair 2.0 porting

Page 10: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

History (2010)

●Jan: Build 20100115 (Android 2.0)●Feb: Create eclair-x86 branch (Android 2.1)●Mar: Android-x86 1.6-r2 released●Apr: Eclair-x86 updated to 2.1-update1 ●Jul: Working on froyo-x86●Aug: A test iso for vm released●Sep: target eeepc, i915 HAL, 3G support●Oct: 3D hardware acceleration●Nov: Improved vold, target viewpad10●Dec: Installer read-write support, i965 support

Page 11: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

History (2011)

●Jan: Android-x86 2.2 released●Feb: Gingerbread-x86 branch (Android 2.3)●Mar: Honeycomb-x86 porting (private)●Jul: Android-x86 2.2-r2 released●Aug: Android-x86 2.3-RC1 released●Nov: Android-x86 3.2-RC2 released●Dec: ICS-x86 branch (Android 4.0)

Page 12: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

History (2012)

●Jan: Build 20120101●Feb: Android-x86 4.0-RC1 released●Apr: Update ics-x86 to 4.0.4●Jul: Android-x86 4.0-RC2 released●Nov: Jb-x86 porting based on Android 4.2●Jul: Build 20121225 (Android 4.2)

Page 13: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

History (2013)

●Feb: Build 20130228 (Android 4.2)●Jun: Android-x86 4.0-r1 released●Jul: Build 20130725 (Android 4.3)●Nov: Kitkat-x86 porting based on Android 4.4

Page 14: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

History (2014)

●Feb: Android-x86 4.4-RC1 released●Apr: Add ntfs/exfat/ext4 support to vold●May: Android-x86 4.4-RC2 released●Aug: Android-x86 4.4-r1 released●Nov: Lollipop-x86 porting based on Android 5.0●Dec: Kernel 3.18 porting

Page 15: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

History (2015)

●Jan: Android-x86 4.4-r2 released●Mar: Lollipop-x86 updated to Android 5.1●Apr: Kernel 4.0 porting●Oct: Android-x86 5.1-rc1 released●Oct: Marshmallow-x86 porting for Android 6.0●Oct: Move git server to SourceForge

Page 16: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Analytics: www.android-x86.org

Page 17: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Visitors map overlay

Page 18: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Statistics (2009/08-2012/04)

●Visits: 7,212,717●Unique Visitors: 4,447,993●Pageviews: 15,503,549●Top 5 Country/Territory

● United States● South Korea● Germany● Russia● China

Page 19: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Features of lollipop-x86

●Android 5.1.1 (Lollipop-MR1) based●Support both 32-bit and 64-bit systems●Kernel 4.0.9, KMS enabled, support netbook/tablet native resolution●Live CD & disk installer, support ext4/ext3/ext2/ntfs/fat32●Provide hybrid iso image and EFI image●Hardware 3D acceleration (intel/radeon/nvidia chipsets)●Wifi, Bluetooth and Audio support●Auto-detect drivers●Touchscreen support, including calibration●Compressed filesystem (squashfs)●Support virtual machine like Virtual Box, Qemu and VMware●Debug mode (busybox, mksh, …)

Page 20: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Screenshots

Page 21: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Develop android-x86

●Get the source tree●Create a target (optional)●Customize kernel (optional)●Build an iso●Test on target device

Page 22: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Get source

●The git server● git.androidx86.org● android-x86.git.sf.net

$ repo init -u git://gitscm.sf.net/gitroot/android-x86/manifest \ -b marshmallow-x86$ repo sync

Page 23: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Generic target

●Device tree under■ device/generic/x86■ device/generic/x86_64■ device/generic/common

●BoardConfig.mk

Page 24: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

BoardConfig.mk

●BOARD_GPU_DRIVERS :=i915 i965 r600g swrast i915g nouveau r300g vmwgfx

●WPA_SUPPLICANT_VERSION := VER_0_8_X or VER_0_6_X

●TARGET_ARCH_VARIANT:=x86 or x86-atom

●include $(GENERIC_X86_CONFIG_MK)

Page 25: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Build kernel

●Building rules under$(TOP)/build/core/tasks/kernel.mk

●Each target can specify its own kernel config●Kernel image and modules are built on-fly●Build kernel solely:

make kernel➔ out/target/product/$TARGET/kernel➔ out/target/product/$TARGET/system/lib/modules/

Page 26: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Customize kernel

●$ source build/envsetup.sh●$ lunch android_x86(_64)-userdebug●$ make -C kernel O=$OUT/obj/kernel \

ARCH=x86 menuconfig●$ cp $OUT/obj/kernel/.config kernel/arch/x86/configs/●DO NOT make in kernel/ directly. If you do so, try

$ make -C kernel distclean$ rm -rf $OUT/obj/kernel

Page 27: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Build an iso image

●$ source build/envsetup.sh●$ lunch $target-userdebug●$ make -jN iso_img

● out/target/product/$target/$target.iso{kernel,initrd.img,installer.img,ramdisk.img,system.sfs}

●Compress filesystem if mksquashfs is available(Disable it by USE_SQUASHFS=0)

Page 28: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Test the iso image

●Hybrid iso format●Create a bootable USB

● dd if=target.iso of=/dev/sdX● Unetbootin● Linux Live USB Creator ( LiLi )

●Boot from the USB disk● Live mode● VESA mode● Debug● Installer

Page 29: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Inside android-x86

●Bootstrap●Peripherals support

● Graphic hardware acceleration● Wifi● Touchscreen● Audio● Bluetooth● GPS● G-sensor● 3G modem● Storage

Page 30: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Bootstrap android-x86

●Bootloader (grub) loads kernel & initrd.img●init script (bootable/newinstaller/initrd/init)

● Detect android-x86 filesystem● Unpack ramdisk.img, mount /android/system● Load scripts (/scripts, /src/scripts)● Run installer if INSTALL=1● Load modules (auto-detect)● mount /android/data, /android/sdcard● Run ts_calibrate if BOARD_USES_TSLIB=true● Set DPI● Post detect● switch_root (chroot) /android

Page 31: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Init hook scripts

●Default scripts● 0-auto-detect ● 1-install● 2-mount● 3-tslib● 4-dpi

●Target script●Customize scripts

Page 32: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Revise booting

●Boot parameters can be put to cmdline● ROOT● SRC● DATA, SDCARD● EXTMOD● DEBUG● UVESA_MODE● HWACCEL● BOARD_USES_TSLIB● DPI

●Put scripts in $SRC/scripts/

Page 33: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Debug mode

●Boot by DEBUG=1●Write boot log to /tmp/log●Enter interactive shell twice

● After mount android filesystem● Before chroot

●Another two virtual consoles at Alt-F2 / F3●Run android-x86 in chroot

● Be able to access files outside android filesystem at Alt-F2 / F3 (e.g., /mnt/grub/menu.lst)

●Auto start logcat (/data/log.txt)

Page 34: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Graphic system

●Android uses framebuffer driver, no X● vesa driver● uvesa driver● hardware driver - KMS or non-KMS

●Use soft rendering by default● Buggy for 1366x768● Very slow in 32-bit color depth

●Implements hardware rendering by Mesa library● Needs KMS driver

Page 35: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

How to change resolution?

●vesa drivervga=xxx, vga=ask

●uvesa driverUVESA_MODE=

●hardware driver, no Mesavideo=1280x800-32

●KMS + Mesasetprop debug.drm.mode 1024x768

Page 36: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Mesa porting for HW acceletion

●Version 11.0.3●~ 60 fps●Support

● Intel integrated graphic chip● AMD radeon/radeonsi● Nvidia (nouveau)● Vmware? (vmwgfx)

●Not support● Intel Atom Zxxx, E6xx (PowerVR)

Kernel KMS driver

GPU hardware

libdrm

libGLES_mesa

drm_gralloc (HAL)

Android graphic system

Page 37: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Wifi

●Android-x86 adds patches to auto-detect wifi driver● /sys/class/net/*/wireless

●WPA_SUPPLICANT_VERSION := ● VER_0_8_X● VER_0_6_X

●BOARD_WPA_SUPPLICANT_DRIVER :=● NL80211 (0_8)● AWEXT (0_6)

●BOARD_WPA_SUPPLICANT_PRIVATE_LIB :=● private_lib_driver_cmd (0_8)

Page 38: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Touchscreen

●ICS needs an idc file for touchscreen● VID & PID● Device name

●Android-x86 uses a default GenericTouch.idc if no special idc found for a touchscreen.●Most touchscreens should just work if drivers are available.

Page 39: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Touchscreen driver

●May need to load driver by EXTMOD●May need to calibrate by setting BOARD_USES_TSLIB=true●Most new multi-touch touchscreens are supported by hid-multitouch driver.

echo 3 03eb 201c 1 > \ /sys/module/hid_multitouch/drivers/hid:hid-multitouch/new_id

●Multi-touch issues can be reported to Benjamin Tissoires, who has great help to android-x86.org.

Page 40: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Audio

●Audio HAL has been changed in ICS. WindRiver’s implementation alsa_sound doesn’t work anymore.●Use a hacked version from Linaro.●BoardConfig.mk

BOARD_USES_GENERIC_AUDIO := falseBOARD_USES_ALSA_AUDIO := trueBUILD_WITH_ALSA_UTILS := true

●Some audio chips don’t work?

Page 41: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Bluetooth

●Android searches /sys/class/rfkill/rfkillXwhere X starts from 0

●Not always true if devices reconnect●Android-x86 modified it to search /sys/class/rfkill/ directly●Tested drivers: btusb, ath3k●Some issues are reported for ath3k

Page 42: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

GPS

●HAL hardware/gps contributed by a volunteer to support GPS input from tty

● setprop ro.kernel.android.gps ttyS3● setprop ro.kernel.android.gpsttybaud 9600

●Bluetooth GPS also works (need an app from Market)

Page 43: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

G-sensor

●HAL Kbdsensor: Support G-sensor inputs from keyboard driver: Ctrl-Alt-arrow keys

● BOARD_USES_KBDSENSOR := true● BOARD_USES_KBDSENSOR_ROTKEY1 := true (F9-F12)● BOARD_USES_KBDSENSOR_ROTKEY2 := true (F5-F8)

●HDAPS accelerometer sensor (thinkpad)● BOARD_USES_HDAPS_ACCEL := true

Page 44: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

3G modem

●Two implementations of RIL● reference-ril● huaweigeneric-ril

●setprop rild.libpath /system/lib/libhuaweigeneric-ril.so●setprop rild.libargs "-d /dev/ttyUSB2 -v /dev/ttyUSB1"●Only tested OK on Huawei modem●Internet, SMS work●Phone also works, but no sound

Page 45: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Storage

●Support internal storage since 4.0-RC1● Use internal storage to simulate /mnt/sdcard● Share the same space as /data

●MMC/SD/USB auto-mount● A modified vold daemon● No vold.fstab needed

●Fake sdcard is considered obsolete

Page 46: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

App compatibility?

●Use arm native code (jni)● NDK r6 support x86

●Need special peripherals● Sensors, GPS, NFC

●Resolution issue● Not design for tablet

●Force portrait mode

Page 47: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Make the app friendly for x86

●Do not use jni, or build x86 libs■ MoboPlayer for x86, Dolphin

player●Consider larger resolution●Allow landscape mode●Design tablet mode

Page 48: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Open source activities

●www.android-x86.org● code.google.com/p/android-x86● sourceforge.net/projects/android-x86

●Over 2,800,000 downloads● Over 320,000 downloads for ics-x86

●twitter.com/android_x86●IRC at irc.freenode.net #android-x86

Page 49: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Discussion group

●groups.google.com/group/android-x86●[email protected]●Over 3600 subscribers●~ 1000 emails/month

Page 50: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Cowork with upstream AOSP

●Submit patches to review.source.android.com●19 patches are accepted and merged (2010):●9779, 10065, 10066, 11443, 11444, 13251,13272, 13467, 13468, 14078, 14117, 15209, 15599, 15664, 15702, 15975, 16034, 16979, 16980●Patches review in progress●16035, 16162, 16163, 16318, 17233, 17234, 17273

Page 51: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Open source partners

●0xdroid - 0xlab●CyanogenMod●MirOS (mksh)●OESF●Open Invention Network (OIN)●LIME

Page 52: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

What we contributed?

●Modified build system to customize kernel●Open source OpenGL ES implementation●New style Android installer●MMC/SD/USB auto-mount●Configurable keyboard layouts●Soft mouse cursor (obsolete)●Ethernet support (deprecated)

Page 53: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Soft mouse cursor & Ethernet

●Handle mouse events and draw cursor on Canvas●Support wheel for scrolling, right button●Obsolete since honeycomb

●Ethernet status tracker (like Wifi status tracker)●Monitor the Ethernet status●Configurable via Settings●Considered deprecated●Simulate by libril-ethernet?

Page 54: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Challenges

●Too many platforms, peripherals●auto-detect, target specified scripts

●Android is originally designed for ARM●Some are optimized for ARM only●Some apps only provide ARM version

●Optimization for x86●Art, bionic, llvm, v8, ...●Hardware acceleration (2D/3D, codec, ...)

●Power management

Page 55: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Vendors

●Google●No interesting before, but may

changed since ICS●Difficulty: don't use AOSP tree

●Intel●At first no interesting, no help●Begin their own porting recently●Criticize?

Page 56: Marshmallow Porting Android-x86 Projectsoft.cs.tsinghua.edu.cn/os2atc2015/ppt/hzw.pdfandroid-x86.org Android architecture. ... Android 4.0 (ICS) is the first Android version that can

android-x86.org

Call for developers

●Google group: Android-x86http://groups.google.com/group/android-x86

●IRC channel at irc.freenode.net

#android-x86

●Issue trackerhttp://code.google.com/p/android-x86/issues/list