There are different ways to access perf counters on Android:
- On root-ed device, you can access PMU via root user
- Execute programs that calls
perf_event_open
syscall inadb shell
You need to copy executables to Android using adb push
. But beware that some partitions are mounted as noexec in some devices e.g. /storage/emulated/0/
.
If you find it hard to find a target directory for adb push
, you can:
- Run
sshd
in Termux to launch a SSH server