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——一个基于Frida、可在已获取root权限的Android设备上运行的运行时传感器与系统信号欺骗工具包。PriviSense能够将时变传感器数据流(加速度计、陀螺仪、计步器)与系统参数(电池电量、系统时间、设备元数据)通过脚本注入未经修改的应用程序,从而实现在无需模拟器或重写应用的情况下进行可复现的设备端实验。我们的演示在已root的Android设备上,通过五个具有代表性的传感器可视化应用验证了实时欺骗功能。通过支持可脚本化且可逆的参数操纵,PriviSense有助于测试应用逻辑、发现基于情境的行为,以及开展聚焦隐私的分析。为确保符合伦理规范,代码将根据请求分享给经过验证的研究人员。工具指南:如何在已root的Android设备上运行PriviSense https://bit.ly/privisense-guide 演示视频:https://www.youtube.com/watch?v=4Qwnogcc3pw