GlassMic is an open-source virtual microphone and audio pipeline testing module for rooted Android devices with LSPosed. It lets you route an imported audio file into target recording apps through AudioRecord/AAudio hooks while keeping the module visible, controllable, and easy to disable.
GlassMic is intended for local testing, development, compatibility checks, and lawful accessibility or debugging scenarios on devices you own or control. Do not use it to impersonate others, deceive people, bypass platform rules, harass anyone, or violate privacy or law.
- Import local audio files such as MP3, WAV, M4A, AAC, OGG, and FLAC.
- Manage audio clips and groups.
- Use playback policies: loop, silence after end, or return to the real microphone.
- Restore the last selected audio source after the app process is killed.
- Start restored audio in a paused state so playback is explicit.
- Floating window with capsule mode, expanded playback controls, pause/resume, and seek bar.
- Configurable floating window opacity.
- Runtime routing through a foreground service and always-visible notification.
- LSPosed integration with recommended scope limited to Android/system framework.
- AudioRecord and AAudio input interception paths.
- Per-consumer sample-rate/channel conversion for clients such as WeChat and system recorders.
- Diagnostics, logs, hook status, and interception statistics.
- Optional experimental audio effects such as high gain and stronger noise simulation.
- Android 15/16 target environment.
- Root access, for example Magisk or KernelSU.
- LSPosed with libxposed API support.
- Android notification, overlay, file access, and foreground service permissions.
- JDK 17 and Android SDK for building from source.
- Install the APK.
- Enable the GlassMic module in LSPosed.
- Use the recommended LSPosed scope:
androidandsystem. - Reboot the device so the module is loaded cleanly.
- Open GlassMic, complete onboarding, grant permissions, import an audio file, and select it as the current source.
- Start GlassMic from the main screen when you want the virtual microphone to be active.
GlassMic has three modules:
app: Android app, Compose UI, foreground service, floating window, ContentProviders, diagnostics, and audio publishing.xposed: LSPosed/libxposed entry points, AudioRecord hooks, native AAudio hook, and PCM pipe reader.core: shared models, constants, and scope matching helpers.
When enabled, target recording calls are intercepted and filled from the current PCM stream. The app publishes PCM through a ContentProvider pipe, and each consumer receives audio converted to its requested sample rate and channel count.
GlassMic is designed to fail toward the real microphone:
- Device reboot disables the active virtual microphone state.
- Safe mode can stop the module after repeated system/audio failures.
- If no valid selected audio file exists, GlassMic falls back instead of forcing a broken source.
- The foreground notification remains visible while the service is running.
- The app itself is excluded from interception to avoid feedback loops.
git clone https://github.com/<owner>/GlassMic.git
cd GlassMic
./gradlew assembleDebugOn Windows:
.\gradlew.bat assembleDebugThe debug APK is generated under:
app/build/outputs/apk/debug/
Open-source LSPosed virtual microphone and Android audio pipeline testing module for rooted devices.
GlassMic is licensed under the GNU General Public License v3.0. See LICENSE.