60 likes | 196 Views
Working with android source. Seehwan Yoo Mse.cis.DKU. Stick to the standard. Google site (original code) http://source.android.com/index.html Source tab http :// source.android.com/source/index.html To build, http:// source.android.com/source/building.html Set-up build env .
E N D
Working with android source Seehwan Yoo Mse.cis.DKU
Stick to the standard • Google site (original code) • http://source.android.com/index.html • Source tab • http://source.android.com/source/index.html • To build, • http://source.android.com/source/building.html • Set-up build env. • Download source • Build/run • Build for real devices • Kernel build • Flash the output images • Test it works
What’s different with app dev? • Extending android features • E.g.) Adding new hardware and its support • Gesture recognition, new gpu support, etc. • Why we cannot achieve them by app dev? • API rules! • Check existing Android API… • Android API is already fixed (, and you cannot modify) • Then, how Samsung/LG/HTC makes products? • Using native services, • They make proprietary (private) service • Linux driver goes with it, (open source)
Usually, hardware makers provide some source code • Called BSP (board support package) • Kernel + modification for bring up the hardware • CPU, memory, power (hw)modules initialization is different by used hardware • Usually, they are continuously changing (until it is fixed at the final production stage) • Includes device drivers (also changing, under-development) • Sometimes it includes proprietary software • Gpu library (user-level) • Modem software library (user-level) • Security library (runs at different cpu/modes) • Hanbaek elec. provides us some source code • BSP for their hardware
Android has portability layer • Android HAL is the portability layer • Matching against different hardware vendors’ software against ‘standard-distribution’ android stack • The hardware vendor should provide HAL implementation • Who else? • Does API-matching • Behavior checking is required • CTS (Compatibility Test Suite) • Our boardmaker modifiesandroid; and they provide HAL
What we get after build • Building android stack requires huge effort • Correct (valid) ‘new’ driver implementation • Correct HAL implementation • Then, we usually get (the whole software stack) • Bootloader • Android kernel (image) • Android filesystem (mountable image) • Fuse it on the flash device • Update bootloaderto bootstrap new kernel • Kernel includes new device drivers • Android filesystem includes all basic apps, android libraries