Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

andtop

A visual clone of btop for monitoring an Android device connected over adb — CPU (per core), RAM, battery, network (download/upload) and processes — with braille area graphs, gradients and boxes that match btop's Default theme (colors and glyphs taken straight from btop's source).

It runs nothing on the device and needs no root: it only reads files under /proc and /sys via adb shell and draws everything in your terminal. Great for POS terminals and phones where you can't install a native htop/btop.

andtop running against an Android POS terminal

Why isn't this just btop?

btop is a C++ program that reads the local machine's /proc — it was never meant to monitor a remote device. Running real btop inside an old Android (e.g. a smart POS on Android 7) would require cross-compiling a static ARM binary and driving a TUI over adb shell — impractical. andtop instead reproduces btop's look while reading the data over adb. The colors and braille glyphs come directly from btop's source (the Default theme), so the appearance stays faithful.

Requirements

  • adb (Android Platform Tools) and the device with USB debugging enabled
  • Python 3.10+
  • Libraries: rich

Installation

python3 -m venv .venv
.venv/bin/pip install -r requirements.txt

Usage

.venv/bin/python andtop.py            # default interval 1.5s
.venv/bin/python andtop.py -d 1       # refresh every 1s
.venv/bin/python andtop.py -s SERIAL  # pick a device (see: adb devices)

Press Ctrl+C to quit.

The adb path defaults to /opt/platform-tools/adb. Adjust the ADB constant at the top of andtop.py if yours lives elsewhere.

What it shows

  • Header — device model, Android version, battery level/voltage, refresh interval and a live clock.
  • CPU — a large braille history graph, a per-core meter grid, load average and the detected SoC + average frequency.
  • MEM — Total / Used / Available / Cached / Free as a meter list, plus /data disk usage.
  • NET — download and upload history graphs with current speed (incl. Kibps) and cumulative totals.
  • PROC — top processes by CPU, with the CPU column colored by load.

Credits

  • Appearance based on btop++ by Jakob P. Liljenberg (aristocratos), licensed under Apache-2.0.

License

Released under the MIT License. The visual style (theme colors and braille glyphs) is derived from btop++, which is licensed under Apache-2.0.

About

btop-like monitor for Android devices over adb (visual clone of btop)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages