Lucene search
+L

Android Battery Level

🗓️ 20 Jan 2026 16:23:32Reported by KittySploitType 
kittysploit
 kittysploit
🔗 kittysploit.com👁 1 Views

Android Battery Level module retrieves the battery level of an Android device.

Refs
Code
from kittysploit import *
import re

class Module(Post):

    __info__ = {
        'name': 'Android Battery Level',
        'description': 'Get the battery level of an Android device',
        'author': 'KittySploit Team',
        'session_type': SessionType.ANDROID,
    'agent': {
        'risk': 'intrusive',
        'effects': ['active_exploitation'],
        'expected_requests': 2,
        'reversible': False,
        'approval_required': True,
        'produces': ['risk_signals'],
        'cost': 1.5,
        'noise': 0.5,
        'value': 1.0,
        'requires':         {'min_endpoints': 0,
         'min_params': 0,
         'tech_hints_any': [],
         'tech_hints_all': [],
         'specializations_any': [],
         'risk_signals_any': [],
         'auth_session': False,
         'capabilities_any': [],
         'capabilities_all': [],
         'confidence_min': {},
         'confidence_min_any': {},
         'endpoint_pattern_any': [],
         'param_any': [],
         'api_surface_ready': False},
        'chain':         {'produces_capabilities': [],
         'consumes_capabilities': ['shell'],
         'option_bindings': {},
         'suggested_followups': []},
    },
    }

    def run(self):
        try:
            # Use the framework's command execution path so this works with ADB sessions.
            # This relies on ShellManager auto-creating an `android` shell for android sessions.
            dumpsys = self.cmd_execute("dumpsys battery")

            if not dumpsys or "not connected" in dumpsys.lower():
                print_error("Could not query battery info via ADB (no output / not connected).")
                return False

            # Typical output contains: "level: 73"
            m = re.search(r"(?mi)^\s*level\s*:\s*(\d+)\s*$", dumpsys)
            if not m:
                # Fallback: sometimes `level=` appears depending on vendor tooling.
                m = re.search(r"(?mi)^\s*level\s*=\s*(\d+)\s*$", dumpsys)

            if not m:
                print_error("Battery level not found in `dumpsys battery` output.")
                return False

            battery_level = int(m.group(1))
            print_success(f"Battery level: {battery_level}%")
            return True
        except Exception as e:
            print_error(f'Error: {e}')
            return False

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

10 Jul 2026 11:31Current
5.8Medium risk
Vulners AI Score5.8
1