2

I have a tablet from China, it's a Q8H Allwinner.

It is rooted, and I've browsed the internal storage for hours to find the battery animation, I found them at framework-res.apk...

Now I want to find the file who's calling the animation, so I can add a line with the code "/system/bin/reboot", so the tablet boot up on charging.

Does anyone have a clue on where can I find it?

0

The battery charging animation is usually a series of images, displayed in the status bar. Assuming that you are talking about them (the images in the status bar), they are animated when an event is broadcast.

Giving some more detail, whenever a charger is connected, an intent is broadcast, which is received by the SystemUI to animate the status bar's battery indicator image. When a charger is disconnected, another intent is broadcast so as to stop the SystemUI from animating the battery indicator images.

All of this is handled by the file BatteryService.java in frameworks/base of the android source.

The other charging animation that you are talking about, is when an image is displayed on the screen when the screen is turned off, but the charger is connected. This is usually known as off-mode charging, which takes over the framebuffer, and draws an image over it, according to two conditions: 1. charger is connected 2. display is turned off

Answering the second part of your question, the former method, BatteryService.java is in userspace, and you can not do much about it; as booting up the phone with only one service, and it showing the charging images. The latter, if exists on your device, would be when your phone is turned off, and connected to a charger, it usually boots up into the recovery, where it is 'checked' at boot time init whether the charger is present/not, and usually, shows the charging images.

  • The OP's intention is contradictory to your answer: he's looking for a way to boot up on charging. – Machado Aug 31 '15 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.