Android x86架构分析与移植1
Android x86架构分析与移植1
Android x86架构分析与移植1
Marshmallow Porting
https://docs.google.com/presentation/pub?
id=1mUQDFaERipwQQWHiZxmkvwPXNPlqtdv9lXrY5hPoUJ4
[email protected]
2015/11/28
http://cwhuang.info
android-x86.org
Agenda
android-x86.org
Introduction
What's Android-x86?
Why needs Android-x86?
android-x86.org
What's Android-x86 ?
android-x86.org
Why needs Android for x86?
platforms?
Mips porting (MIPS Technology)
PowerPC porting
Mentor Graphics
Power.org
x86 porting
android-x86.org
But what are the benefits?
emulator
Android-x86 on vbox / vmware
android-x86.org
Android architecture
android-x86.org
How to do that?
android-x86.org
History (2009)
android-x86.org
History (2010)
android-x86.org
History (2011)
android-x86.org
History (2012)
android-x86.org
History (2013)
android-x86.org
History (2014)
android-x86.org
History (2015)
android-x86.org
Analytics: www.android-x86.
org
android-x86.org
Visitors map overlay
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
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, )
android-x86.org
Screenshots
android-x86.org
Develop android-x86
Build an iso
android-x86.org
Get source
git.androidx86.org
android-x86.git.sf.net
android-x86.org
Generic target
device/generic/x86_64
device/generic/common
BoardConfig.mk
android-x86.org
BoardConfig.mk
BOARD_GPU_DRIVERS :=
VER_0_8_X or VER_0_6_X
TARGET_ARCH_VARIANT:=
x86 or x86-atom
include $(GENERIC_X86_CONFIG_MK)
android-x86.org
Build kernel
android-x86.org
Customize kernel
$ source build/envsetup.sh
$ lunch android_x86(_64)-userdebug
ARCH=x86 menuconfig
$ cp $OUT/obj/kernel/.config kernel/arch/x86/configs/
android-x86.org
Build an iso image
$ source build/envsetup.sh
$ lunch $target-userdebug
(Disable it by USE_SQUASHFS=0)
android-x86.org
Test the iso image
Live mode
VESA mode
Debug
Installer
android-x86.org
Inside android-x86
Bootstrap
Peripherals support
Graphic hardware acceleration
Wifi
Touchscreen
Audio
Bluetooth
GPS
G-sensor
3G modem
Storage
android-x86.org
Bootstrap android-x86
android-x86.org
Init hook scripts
Default scripts
0-auto-detect
1-install
2-mount
3-tslib
4-dpi
Target script
Customize scripts
android-x86.org
Revise booting
ROOT
SRC
DATA, SDCARD
EXTMOD
DEBUG
UVESA_MODE
HWACCEL
BOARD_USES_TSLIB
DPI
Put scripts in $SRC/scripts/
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)
android-x86.org
Graphic system
vesa driver
uvesa driver
hardware driver - KMS or non-KMS
Use soft rendering by default
android-x86.org
How to change resolution?
vesa driver
vga=xxx, vga=ask
uvesa driver
UVESA_MODE=
hardware driver, no Mesa
video=1280x800-32
KMS + Mesa
android-x86.org
Mesa porting for HW acceletion
libdrm
Intel Atom Zxxx, E6xx (PowerVR)
Kernel KMS driver
GPU hardware
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)
android-x86.org
Touchscreen
are available.
android-x86.org
Touchscreen driver
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
android-x86.org
Audio
BOARD_USES_GENERIC_AUDIO := false
BOARD_USES_ALSA_AUDIO := true
BUILD_WITH_ALSA_UTILS := true
Some audio chips dont work?
android-x86.org
Bluetooth
android-x86.org
GPS
android-x86.org
G-sensor
BOARD_USES_HDAPS_ACCEL := true
android-x86.org
3G modem
android-x86.org
Storage
android-x86.org
App compatibility?
Resolution issue
android-x86.org
Make the app friendly for x86
player
Consider larger resolution
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
android-x86.org
Discussion group
groups.google.com/group/android-x86
[email protected]
~ 1000 emails/month
android-x86.org
Cowork with upstream AOSP
android-x86.org
Open source partners
0xdroid - 0xlab
CyanogenMod
MirOS (mksh)
OESF
Open Invention Network (OIN)
LIME
android-x86.org
What we contributed?
MMC/SD/USB auto-mount
android-x86.org
Soft mouse cursor & Ethernet
Considered deprecated
Simulate by libril-ethernet?
android-x86.org
Challenges
Power management
android-x86.org
Vendors
Intel
Criticize?
android-x86.org
Call for developers
http://groups.google.com/group/android-x86
#android-x86
Issue tracker
http://code.google.com/p/android-x86/issues/list
android-x86.org