Modifier valeur batterie Android

2 minute(s) de lecture

Pourquoi vouloirs modifier la valeur affichée d’Android ? Exemple, j’ai un ami qui se sert d’une nexus 7 comme autoradio il a voulu remplacer la batterie par une alimentation continue, mais le problème c’est qu’android penser qu’elle se décharger quand même. Donc on a cherché comment empêcher ça et on a trouvé.

Attention !! : les commandes ci-dessous peuvent endommager votre appareille !!

Avant tout il vous faut un téléphone root et l’application terminale

Puis on ouvre l’application terminale ses parties:

su # pour passer en root

dumpsys battery # pour récupérer les infos :

Current Battery Service state:
AC powered: false
USB powered: true
Wireless powered: false
status: 2
health: 2
present: true
level: 50
scale: 100
voltage:3750
temperature: 260
technology: Li-ion

dumpsys battery –write # pour voir comment modifier les valeurs :

set ac|usb|wireless|status|level|invalid reset

 

dumpsys battery set level 80 # on force l’indicateur a 80%

 

Et si l’on veut tout annuler, il suffit de taper :

dumpsys battery reset

 

Il y a d’autre commande pour les voir on peut faire :

dumpsys | grep "DUMP OF SERVICE"

<span class="pln">DUMP OF SERVICE </span><span class="typ">SurfaceFlinger</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE accessibility</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE account</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE activity</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE alarm</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE appwidget</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE audio</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE backup</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE battery</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE batteryinfo</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE clipboard</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE connectivity</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE content</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE cpuinfo</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE device_policy</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE devicestoragemonitor</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE diskstats</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE dropbox</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE entropy</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE hardware</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE input_method</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE iphonesubinfo</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE isms</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE location</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE media</span><span class="pun">.</span><span class="pln">audio_flinger</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE media</span><span class="pun">.</span><span class="pln">audio_policy</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE media</span><span class="pun">.</span><span class="pln">player</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE meminfo</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE mount</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE netstat</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE network_management</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE notification</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE package</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE permission</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE phone</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE power</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE reboot</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE screenshot</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE search</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE sensor</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE simphonebook</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE statusbar</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE telephony</span><span class="pun">.</span><span class="pln">registry</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE throttle</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE usagestats</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE vibrator</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE wallpaper</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE wifi</span><span class="pun">:</span><span class="pln">
DUMP OF SERVICE window</span><span class="pun">:

Et <span id="spans0e0">voilà</span> on peut s'amuser avec les <span id="spans0e1" class="msac">paramettres</span> d'Android</span>