gitmyhub

FloatStudyAssistant

Java ★ 18 updated 20d ago

探索线上考试过检测搜题(非root方案)

Android app that helps students look up exam answers on XuexiTong by using accessibility services to read content and Shizuku to detect and hide from the platform's anti-cheating screenshots.

JavaAndroid SDKAccessibility ServicesShizukuAndroid MediaProjection APIsetup: hardcomplexity 4/5

This is an Android application written in Java that helps students look up answers during online exams on a Chinese education platform called XuexiTong, without requiring root access on the device.

The background: third-party floating-window tools that assist with exam questions typically work by capturing the screen using Android's media projection API, then running OCR to extract text from whatever is visible. XuexiTong counters this by using the same media projection API to take its own periodic screenshots during exams, roughly every five minutes, to check whether any unauthorized tools are running. It also applies a system security flag called FLAG_SECURE to its exam windows, which blocks screen capture and ADB-based screen mirroring from seeing those windows at all.

This project works around both countermeasures. Instead of capturing the screen, it reads exam content through Android's accessibility services, which see the on-screen text directly without needing a screenshot. To avoid being caught in XuexiTong's own periodic snapshots, the app uses Shizuku, a tool that provides ADB-level permissions without root, to frequently poll the system's window list and count how many FLAG_SECURE-protected windows are currently active. When that count drops, indicating XuexiTong's screenshot process has paused or ended, the floating window stays visible. When the count rises, the floating window hides itself so it does not appear in the exam platform's snapshot.

The README is brief and written in Chinese. It describes the problem and the approach taken, and references a demo video in the repository's docs folder. No build instructions, configuration steps, or installation guide are provided in the README itself.

Where it fits