Hello,
I am using VIM3 dev board with Android 9 SDK and I want to show my battery percentage on status bar. Right now, I am not seeing even battery symbol on status bar. How do I enable battery status on status bar?
Hello,
I am using VIM3 dev board with Android 9 SDK and I want to show my battery percentage on status bar. Right now, I am not seeing even battery symbol on status bar. How do I enable battery status on status bar?
The VIM3 don’t support the battery, and the board haven’t the power manager chip for battery.
of course SoC has internal PMIC, but maybe one of the GPIO pins can be used to measure analog voltage and hence calculate battery voltage and the percent capacity ?
The GPIO can’t measure voltage, even if you use ADC, you also can’t accurately measure the battery capacity.
@Terry
What if anyone connect external battery management IC on I2C and add fuel gauge support from the kernel?
We have already added our battery driver in the kernel and our driver gets probed successfully while we connect our battery to VIM3.
And apart from this,
We were also able to see the dummy battery percentage in the settings app. So, there could be a way to show that percentage on status bar.
AIDA64 shows information about the battery charge, but it is fake, you can see it in this program.
So, If I have external battery charging/discharging and fuel gauge ICs connected over one of the I2Cs then is it possible to present correct battery percentage on status bar?
That is what I think is missing in VIM3 android 9 besides I looked into the source and found battery service so I guess we could do something to show correct battery information provided by my fuel gauge IC.
You are right
What if I want to enable that battery percentage and symbol on status bar?
Because I have my battery charger and fuel gauge connected over I2C and it seems like they are getting probed successfully. So, only thing which we are not able to figure out is that how to show that percentage on status bar.
So, could you please tell us what is lacking in VIM3 android 9 source?
Check systemUI code all you need is there to enable the symbol and percentage on status bar, also remove this from your build.prop in vendor: ro.boot.fake_battery (core_amlogic.mk in sdk)
Now im not sure this will work, since this sdk it was really not made to support battery!
in systemui source, goto StatusBarIconController.java line 79 remove the battery.
You also might want to to go to config.xml also from systemui, and add battery to:
quick_settings_tiles_default
quick_settings_tiles_stock
quick_settings_tiles_retail_mode
Good luck!
Thanx for your suggestions.
It really did work but battery percentage is not changing while I keep my device on. But when I do reboot/restart then it gets changed.
So, Is there anything missing here?
well looks like is only reading it once, you have to dig more in to the systemui code, you might also want to have a look at BatteryMonitor.cpp in system folder in sdk, and BatteryService.java in frameworks.
Is all i can tell you now without digging more in to the sdk, i do not have the time now to look at it.
I do recommend you probing the service from adb.
here is a good reading for that probing:
Android Battery Mocking tutorial. This article does not require the user… | by Kaushik N. Sanji | Medium
Could you tell me which power board are you using? How do you control when to charge batteries and when to release current? I also want to arrange battery power for the VIN3 and a few if you could show a few photos it would be great
@superceleron
Thanx.
SystemUI is not updating the percentage but everything else seems fine. Battery charging and discharging symbol works good.
I just need to see about the percentage.
Ok good, then you really need to dig more deep in to the systemui code.
@superceleron @Terry @Vladimir.v.v
Just asking,
Do we have any other source code for VIM3 android 9 which is designed for tablet or mobiles?
Well amlogic should have it, but i think they only give to phone/tablet makers.
But not sure here.
On the Edge-v series (Rockchip 3399) it may be there, there is just a version for the tablet, but I have not tested it. On Amlogic I have never encountered this.