Skip to content

How It Works

Harshal Sawant edited this page Feb 5, 2026 · 1 revision

Execution Flow

  1. service.sh waits for sys.boot_completed and sleeps 30 seconds
  2. The binary creates the log directory under /data/adb/modules/task_optimizer/logs/
  3. The optimizer scans /proc for matching task names
  4. For each matching process, all threads under /proc/<pid>/task are collected
  5. Policies are applied per group using direct syscalls
  6. Results and a summary report are logged

Matching Model

  • The module matches /proc/<pid>/comm using regular expressions
  • Each pattern is applied across all processes that match
  • All thread IDs for each process are optimized

Retry Model

Each syscall is retried up to 3 times with a 50 ms delay. Failures are logged and do not abort the run.

Clone this wiki locally