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_opensyscall 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
sshdin Termux to launch a SSH server