Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android "External" folder functionality?

I find External folder in Android sources which if I am not wrong is designed to have U-HAL (User Space Hardware Abstraction Layer) so OEM's can write propriety driver which need not be exposed to outer world under GPL license.

As Android evolved I find more and more folders getting included into External folder may be Google is adding more support with each version of Android such as freetype,Yaffs2.

I would like to know how to use external folder logic into Apps? Is that these are generated as Shared Libraries(.so) which in turn apps uses for functionality?

I am not sure how this entire logic which is propriety can be embedded in External folder and how this communicates with lower layers (may be sysfs)? Is there any blog or documents which describes External folder usage , functionality and HowTo?

Appreciate your help!

like image 342
Rajesh SO Avatar asked Nov 30 '25 22:11

Rajesh SO


1 Answers

The external folder is not primarily intended for user space hardware abstractions. External refers to external open source libraries. That means libraries that the Android platform depend upon but that are not primarily developed and maintained by the Android open source project. Typical examples are webkit for the browser, FreeType for fonts, SqlLite for databases and so on. As more features are added to Android, more of these libraries are included in external.

If you are looking for a place to put user space hardware drivers the hardware folder holds some of these. This is also where the source for the Android hardware abstraction layer (HAL) resides. The device folder also contain some hardware specific source for some devices and could be a suitable place to add additional code like this.

For more info on the general layout of the folders in the AOSP see my answer to this question

like image 142
BMB Avatar answered Dec 03 '25 11:12

BMB



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!