top of page
  • Writer's pictureIlan Ganor

Android internals - making Android talk to hardware

Updated: Jan 9, 2021

So you want to develop your embedded product based on Android, that great!

application development is going to be super easy for you, easy to maintain, standard, resulting in state of the art solution, just one question though, have you taken the time to understand what it takes to have costume ROM (meaning your customized Android image)?

you would need to attend to the following :

maintaining \ building:

Android code base is huge, 100's of GB, how do you maintain it ? on company servers? maintain all? maintain only specific repositories? maintain only patches?

make sure you understand well repo, git, and understand the considerations for each project, since answers may differ regarding on ROM provider, company that maintains the products, amount of expected changes , etc...


security is a big issue in such projects, some basic topics you will need to cover:

Secure boot - making sure no one hacked your boot loader, hance overriding you security

u-boot security - basically means how to stop attacker from halting on u-boot console, and modify SELlinux flags, kernel address, etc...

SELinux :a major obstacle for many, a lot of time the product is required to provide access from Android level to hardware, how to allow that without having your product issues with SELinux as "permissive" , setting those rules takes a lot of expertise, make sure to research that well

signed images - how do you sign your system apps?, how do you sign the OS image?

JNI \ sockets how do you plan to reach from application to hardware:

whatever you choose keep in mind those two basic rules:

1. application developer does not need to know the specific hardware he is working with

2. create as little integration as possible between application developers and low level developers, integration is always hard, creating common understanding between different knowledge areas is always difficult, keep it to a bare minimum

Android is based on Linux, Linux drivers knowledge is a must

keep in mind, when you are going to use propriety hardware, at some point you will probably have to support new hardware, this involves two basic layers of support:

1. Linux driver level support, ability to write \ back-port \ configure required drivers

2. Android HAL \ Framework support , notice that most drivers, if needed to use standard Android API, needs to be supported in the Android HAL \ Framework level, this is always an interesting "ride", make sure you understand the complexity level before going into such an adventure.


after developing many Android internals projects, I can say most projects result in very powerful products, and allow the company to expend it's services, since Android provides such a powerful flexible framework to relay on.

BSP initial stage is hard, it also requires maintenance, constant security patches, etc...

48 views0 comments


Post: Blog2_Post
bottom of page