Scan your whole stack
From OX Research Newsroom
Are you using manafa?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.0.2
manafa was last scanned on 25 Nov 2026 at version 1.0.2. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.0.2 LATEST | 25 Nov 2026 | No rules fired |
| 1.0.1 | 24 Nov 2026 | No rules fired |
| 0.4.15 | 24 Nov 2026 | No rules fired |
Findings for v1.0.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.0.2; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
E-MANAFA measures the energy and the memory that an Android device consumes while an app runs. It needs only an adb connection to the device (USB or Wi-Fi): no root access and no external power meter. It gives:
The device can also record a session with no computer connected (see On-device mode), and an LLM client can use E-MANAFA through an MCP server.
Host (Python + adb) Android device
+-----------------------------+ start +-------------------------------+
| 1. init | ---------> | Perfetto trace: |
| detect power rails, | | power rails (energy) |
| read the power profile | | /proc/meminfo (memory) |
| 2. start | | CPU frequency and idle |
| 3. your workload runs | | batterystats history |
| (time, key or command) | | method trace of the app |
| 4. stop | <--------- | (am profile or Hunter) |
+--------------+--------------+ pull files +-------------------------------+
|
v
+-----------------------------+ +-----------------------------------+
| 5. parse | | 6. results |
| energy for each rail, | ---> | summary in the terminal |
| memory statistics, | | JSON or CSV file |
| energy for each method | | sunburst diagram (HTML) |
+-----------------------------+ +-----------------------------------+
E-MANAFA has two sources of energy data. It selects one automatically.
| Source | How | Accuracy |
|---|---|---|
| Power rails (first choice) | The device has power sensors on its supply rails (Pixel 6 and later, and other recent devices). Perfetto records their energy counters. | Measured by hardware. |
| Energy consumers (second choice) | The PowerStats HAL of the device reports the energy of some components (Android 12 and later), for example each CPU cluster. Perfetto records these counters. E-MANAFA uses them if the device has no rails but has consumers for its CPU clusters. | The values of the vendor. The total has only the components that have a consumer. |
| Legacy model (last choice) | batterystats gives the state of each component. Perfetto gives the CPU frequencies. power_profile.xml gives the current of each state. E-MANAFA multiplies them. |
An estimate. It is only as good as the power profile of the manufacturer. See Accuracy. |
E-MANAFA selects the first source in this order that the device has. Each result names the source that it used (energy.source: power rails, energy consumers or power profile). In the energy mode, E-MANAFA also compares the CPU energy of the session between all the sources that the device has (energy.cpu_joules_by_source), and gives a warning if two of them disagree by more than a factor of 2.
The power profile of the legacy model comes from the device (dumpsys batterystats --power-profile), or from the file that you give with -p.
Full documentation: https://sanadlab.github.io/E-MANAFA/
You need:
adb) in your PATH.Install from PyPI:
pip install manafa
Or install from the sources:
git clone https://github.com/sanadlab/E-Manafa.git
cd E-MANAFA
python -m venv env && source env/bin/activate
pip install -r requirements.txt
The sunburst diagram also needs plotly: pip install "manafa[sunburst]" or pip install plotly.
The examples below use emanafa, the command that pip install manafa gives. From the sources, use python3 manafa/main.py.
# measure the energy of the device for 30 seconds
emanafa -s 30
# measure an app for 30 seconds, with the energy of each method
emanafa -a com.example.app -s 30
E-MANAFA starts the app again when you give -a. It prints a summary and writes a JSON file with the details.
Select the measurement with -pm (--profile-mode):
| Mode | Energy | Memory | Use it when |
|---|---|---|---|
energy (default) |
power rails | no | you want energy with the smallest overhead |
memory |
no | /proc/meminfo |
you want memory only |
both |
power rails | /proc/meminfo |
you want the two results from the same run |
legacy |
legacy model | no | the device has no power rails |
emanafa -a com.example.app -s 30 -pm energy
emanafa -a com.example.app -s 30 -pm memory
Memory is polled each 50 ms. Change this with --meminfo-period-ms.
Memory polling uses CPU time, and this adds energy. For the most accurate energy result, measure the two in separate runs of the same workload:
emanafa -a com.example.app -cmd "./run-test.sh" -pm energy -o energy.json
emanafa -a com.example.app -cmd "./run-test.sh" -pm memory -o memory.json
emanafa -a com.example.app -s 30 -pm both
This is quicker, and the two results are from exactly the same execution. The energy result includes the cost of memory polling.
E-MANAFA changes to the legacy model automatically. To use the legacy model on a device that has power rails:
emanafa -a com.example.app -s 30 --force-legacy
| Option | The session stops |
|---|---|
-s 30 |
after 30 seconds |
-cmd "./run-test.sh" |
when the command on the host is complete |
| none | when you press a key |
With -a <package>, E-MANAFA records the methods of the app with am profile (sampling). The app must be debuggable, or must have <profileable android:shell="true"/> in its manifest.
--trace-methods |
How | Needs |
|---|---|---|
am (default with -a) |
sampled method trace of am profile |
-a, a debuggable or profileable app |
hunter (or -ht) |
log lines of the Hunter instrumentation | an instrumented app |
perf |
call-stack samples of linux.perf. Gives mostly native functions, with less overhead than am |
-a, power rails, a debuggable or profileable app |
none |
no method trace | nothing |
# energy of an app, without the method trace
emanafa -a com.example.app -s 30 --trace-methods none
How the energy of a method is calculated:
In the energy mode, the trace also has the scheduler events. E-MANAFA divides the energy of each CPU rail between the threads that ran on the CPUs of that rail, in each interval between two rail samples. The results give the energy of each process (energy.by_process), and of each thread of the app (energy.app_process). The session report prints the processes with the most energy.
The sunburst shows where the app consumes energy in its call graph.
pip install plotly
emanafa -a com.example.app -s 30 --sunburst app.html
Open app.html in a browser.
The diagram needs the power rails. With the legacy model, E-MANAFA writes no diagram.
The page has three views. Select one with the buttons above the diagram:
-a. --package of manafa.sunburst selects a different package prefix.Hot spots. A sector is orange, not blue, if it has more than 10 % of the energy of the diagram or more than 20 % of the energy of its ring, and if it also ran for more than 10 ms. Change the limits with --hot-total, --hot-ring and --hot-min-ms of manafa.sunburst.
Values. A value is the total of all the calls of the method (or of the call path). The hover text also gives the number of calls, the mean energy of one call and the execution time.
In all the views:
Methods that only wait (for example Object.wait or an idle Looper) get no energy. Call paths with less than 0.05 % of the energy are not drawn.
You can also make the diagram later, from a result file. The method trace (*_calls.csv) must be in its initial location.
python3 -m manafa.sunburst results.json -o app.html
python3 -m manafa.sunburst results.json --focus com.example.ui,androidx # start the graph at these packages
python3 -m manafa.sunburst results.json --focus all --max-depth 20 # all the process, more levels
python3 -m manafa.sunburst results.json --package com.example.ui # "app only" view for this package
python3 -m manafa.sunburst results.json --hot-total 5 --hot-ring 30 --hot-min-ms 50 # other hot spot limits
python3 -m manafa.sunburst results.json --include-blocked # also give energy to methods that wait
Each run prints a summary: total energy (J and Wh), the rails that consume the most, memory statistics, and the estimated battery drain (percentage of the full capacity that the device reports).
-o <file> sets the result file, and -of csv writes CSV. The default is a JSON file with the name emanafa_<mode>_<time>.json.
{
"mode": "energy",
"app": "com.example.app",
"duration_seconds": 30,
"energy": {
"total": 14.12, // joules, all rails
"by_rail": { "power.rails.cpu.big": 4.81, "...": 0.0 },
"measured_duration_seconds": 29.75, // time that the rail samples cover
"method_rails": ["power.rails.cpu.big", "..."] // rails that are attributed to methods
},
"memory": { "MemAvailable": { "min_mb": 3201.4, "avg_mb": 3320.1, "max_mb": 3450.0, "samples": 600 } },
"method_invocations": {
"total": 1842, "distinct": 217,
"trace_file": ".../results_calls.csv",
"methods": { "<method>_<id>": { "0": { "begin_time": 0, "end_time": 0, "consumption": 0.01 } } }
},
"battery_drain": { "consumed_energy_joules": 14.12, "battery_drain_percentage": 0.083 }
}
In the energy mode, energy also has by_process (energy of the CPU rails for each process), app_process (the app and its threads, with -a) and method_energy_scope. With --trace-methods perf, the file has sampled_functions.
With method tracing, the JSON file has one record for each method call, so it can be some tens of MB. To keep it small, the signature of a method (method_def) is only in its first call, and a call has no fields for components with no energy.
The raw files (Perfetto trace, batterystats log, method trace) and the power profile of the device are in manafa/results/. Each new run deletes the files of the previous run.
# session of the energy, memory or both mode (power rails): only the trace is necessary
emanafa -pft trace-<id>.perfetto-trace -o again.json
# session of the legacy model
emanafa -bts bstats-<id>.log -pft trace-<id>.systrace -o again.json
emanafa -d <directory with bstats-*, trace-* and method_traces-* files>
This mode needs no device. With no device, give the power profile of the legacy model with -p.
The recorded files are in manafa/results until the next measurement starts.
In the normal mode, the computer controls the session through adb. In the on-device mode, a small recorder script on the device records the session, so the USB cable can be disconnected during the measurement (a connected cable charges the device). The computer analyses the recorded files later, with the same code as the normal mode.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.