Android · GPL-3.0 · secondary-developed from FongMi/TV
MTBOXAndroid video & local-music toolbox
Secondary-developed from the open-source FongMi/TV project (GPL-3.0). Package
com.matou.mtbox, version 6.6.19. The whole package — baseline, patches, music
engine and build scripts — is open source. Local decoding, works offline, no cloud account.
# 1) resource ids shift, so regenerate R.java every round powershell -File javainject\genr.ps1 -Apk app.apk # 2) compile + inject + sign (apktool runs twice) powershell -File javainject\build.ps1 -Tag music → mtbox-music-signed.apk
What it is
Two halves
The decompiled baseline (FongMi/TV 5.6.1 → com.matou.mtbox 6.6.19) plus every smali patch, with apktool run twice to pin the resource ids down.
The music engine is injected
Thirteen hand-written Java files through javac and d8 produce a classes4.dex, dropped into work_fong/unknown and copied verbatim into the APK — no smali round-trip.
A transparent audio path
Equalizer and BassBoost only. LoudnessEnhancer stays off, setPlaybackParams is never called at 1.0×, and lossless sources stay on the native path.
What it does
Everything below ships in the published package.
Covers non-HarmonyOS devices
A separate Android package next to TTBOX, so the Android projector or the old tablet in the house can play too.
Self-held signing key
Signed with a keystore I keep myself, verifiable before install, never re-signed by a third party.
Local import, straight to playback
No cloud account, no sign-in. Import local media and it plays; the network can be off entirely.
Open source under GPL-3.0
The whole package — music engine and build scripts included — is on GitHub, and the FongMi/TV baseline is GPL-3.0 as well.
Transparent audio path
Equalizer and BassBoost only; LoudnessEnhancer is never enabled, setPlaybackParams is untouched at 1.0×, and lossless sources play through the native path.
In the interface
How the package is assembled
Two halves — the decompiled baseline plus the injected music engine — with apktool run twice to pin the resource ids down.
The work_fong baseline
FongMi/TV 5.6.1 decompiled, package renamed to com.matou.mtbox, version bumped to 6.6.19 (versionCode 60619).
smali patches
Unified theming, the version display, fullscreen rotation and the security hardening all live in smali, each one with a written-up plan.
The javainject music engine
Thirteen hand-written Java files through javac and d8 produce a classes4.dex, dropped into work_fong/unknown and copied verbatim into the APK by apktool.
R.java regeneration
genr.ps1 assembles the resource id table from public.xml and an aapt2 dump. Touch res/ and every id shifts, which is why the build runs twice.
The unknown directory
apktool copies everything under work_fong/unknown into the APK as-is, and ART loads classes 1 through 4.dex together.
Signing
apksigner signs v2/v3 and verifies; the keystore stays with me and out of the repository.
Building it locally
Four steps, and the order matters.
- 01
Generate R.java
powershell -File javainject/genr.ps1 -Apk <freshly built .apk>. Resource ids shift, so this runs on every round.
- 02
Set the signing passwords
Export MTBOX_KS_PASS and MTBOX_KEY_PASS. You generate your own keystore.
- 03
Package
powershell -File javainject/build.ps1 -Tag music. apktool runs twice — do not skip pass 1.
- 04
Verify
apksigner verify passes and the ids in R.java line up (tabSongs, musicList and the rest) — that is what success looks like.
FAQ
Why does apktool have to run twice?
Why not write the music engine in smali?
Does the sound effect chain distort anything?
Can the lock screen and the car be controlled?
Why are no sources bundled?
Disclaimer
- This project is a secondary development of the open-source FongMi/TV project (GPL-3.0). The full source and the third-party notice are in the GitHub repository.
- This project ships no content sources and no online parsing URLs. Every external subscription and channel is configured by the user and is not provided by this project.
- This project offers no commercial service: no fees, no payment, no transaction of any kind. It exists for personal study and technical research only.
- Comply with local laws before use. The user alone is responsible for any consequence of using this software, and the author is not liable.
- Upstream third-party components (Thunder SDK, ForceTV, mpv, FFmpeg and others) remain under their own licenses — verify their terms before redistributing.
- This site shows technical and implementation details only and involves no transaction; afdian is a channel for supporting the work and is unrelated to how the APK is distributed.