Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure AOSP for a device with no battery?

I am building Android AOSP 6 (Marshmallow) for a tablet-like device, which is permanently mounted (e.g. industrial deployment) and has no battery. However, when I power it up, it shows a charging indicator and a power reading of 0%. This is mostly a cosmetic problem I hope, but I would like to get rid of that indicator. What do I have to change to tell Android there is no battery? I think that is possible, since Android also runs on devices like set-top-boxes and so on.

like image 924
jdm Avatar asked Jan 14 '18 12:01

jdm


1 Answers

In AOSP build tree , there is a file named config.xml file at this path :

frameworks/base/core/res/res/values/config.xml

There exists a lot of configurations of android in this file . Open this file in a text editor and find keyword battery , you can find a number of configurations related to battery. You can adjust them to meet your requirement.

My suggestion is removing of battery status bar to not showing battery status in system UI. Remove following codes from config.xml file

    <item><xliff:g id="id">@string/status_bar_battery</xliff:g></item>

    <string translatable="false" name="status_bar_battery">battery</string>
like image 108
ofskyMohsen Avatar answered Oct 04 '22 21:10

ofskyMohsen