Table of Contents
Fetching ...

PriviSense: A Frida-Based Framework for Multi-Sensor Spoofing on Android

Ibrahim Khalilov, Chaoran Chen, Ziang Xiao, Tianshi Li, Toby Jia-Jun Li, Yaxing Yao

TL;DR

PriviSense addresses the lack of reproducible testing for context-sensitive mobile apps on real devices by enabling on-device spoofing of sensor and system signals. The approach relies on Frida-based dynamic instrumentation that hooks into Android APIs to return spoofed values, all executing on a rooted device with a Termux-based pipeline. The paper details the system design, workflow, and a demonstration across five apps, highlighting use cases in software testing, behavioral auditing, and context-driven analysis. While offering significant reproducibility and portability, the authors acknowledge ethical considerations and limitations such as root access and potential anti-tampering defenses.

Abstract

Mobile apps increasingly rely on real-time sensor and system data to adapt their behavior to user context. While emulators and instrumented builds offer partial solutions, they often fail to support reproducible testing of context-sensitive app behavior on physical devices. We present PriviSense, a Frida-based, on-device toolkit for runtime spoofing of sensor and system signals on rooted Android devices. PriviSense can script and inject time-varying sensor streams (accelerometer, gyroscope, step counter) and system values (battery level, system time, device metadata) into unmodified apps, enabling reproducible on-device experiments without emulators or app rewrites. Our demo validates real-time spoofing on a rooted Android device across five representative sensor-visualization apps. By supporting scriptable and reversible manipulation of these values, PriviSense facilitates testing of app logic, uncovering of context-based behaviors, and privacy-focused analysis. To ensure ethical use, the code is shared upon request with verified researchers. Tool Guide: How to Run PriviSense on Rooted Android https://bit.ly/privisense-guide Demonstration video: https://www.youtube.com/watch?v=4Qwnogcc3pw

PriviSense: A Frida-Based Framework for Multi-Sensor Spoofing on Android

TL;DR

PriviSense addresses the lack of reproducible testing for context-sensitive mobile apps on real devices by enabling on-device spoofing of sensor and system signals. The approach relies on Frida-based dynamic instrumentation that hooks into Android APIs to return spoofed values, all executing on a rooted device with a Termux-based pipeline. The paper details the system design, workflow, and a demonstration across five apps, highlighting use cases in software testing, behavioral auditing, and context-driven analysis. While offering significant reproducibility and portability, the authors acknowledge ethical considerations and limitations such as root access and potential anti-tampering defenses.

Abstract

Mobile apps increasingly rely on real-time sensor and system data to adapt their behavior to user context. While emulators and instrumented builds offer partial solutions, they often fail to support reproducible testing of context-sensitive app behavior on physical devices. We present PriviSense, a Frida-based, on-device toolkit for runtime spoofing of sensor and system signals on rooted Android devices. PriviSense can script and inject time-varying sensor streams (accelerometer, gyroscope, step counter) and system values (battery level, system time, device metadata) into unmodified apps, enabling reproducible on-device experiments without emulators or app rewrites. Our demo validates real-time spoofing on a rooted Android device across five representative sensor-visualization apps. By supporting scriptable and reversible manipulation of these values, PriviSense facilitates testing of app logic, uncovering of context-based behaviors, and privacy-focused analysis. To ensure ethical use, the code is shared upon request with verified researchers. Tool Guide: How to Run PriviSense on Rooted Android https://bit.ly/privisense-guide Demonstration video: https://www.youtube.com/watch?v=4Qwnogcc3pw
Paper Structure (6 sections, 2 figures)

This paper contains 6 sections, 2 figures.

Figures (2)

  • Figure 1: Workflow of PriviSense.
  • Figure 2: Sensor app output with and without spoofing.