Release updates: @lycidias93
ASVD BT Type Helper is a Magisk / priv-app helper for changing Android Bluetooth device type metadata.
It started while I was working on my Audio Safe Volume Disabler / ASVD module. ASVD handles safe-volume / Sound Dose behavior; this helper covers the Bluetooth device-type part I needed during that work.
My Pixel detected a Bluetooth receiver as a headphone-like device. Android Settings showed the device type option, but it was greyed out and not manually changeable. On my reference setup, setting Android Bluetooth metadata key 17 to Carkit made the receiver show up as Car / Auto.
The helper can list paired Bluetooth devices, read metadata key 17, and set it for one explicitly selected device. The main verified use case is Carkit; other metadata values are implemented but still need feedback from other devices and ROMs.
| Area | Status |
|---|---|
| Current stable release | v0.6.1 |
| Version / versionCode | 0.6.1 / 61 |
| Runtime model | Magisk module with privileged helper APK |
| Package | org.asvd.bttypehelper |
| Normal APK install | Not supported |
| Root / Magisk required | Yes |
| Verified phone | Pixel 10 Pro XL / Android 16 / SDK 36 |
| Verified target | H222 Bluetooth receiver |
| Verified result | metadata_17=Carkit |
| Online updates | Enabled via Magisk updateJson |
| Non-Carkit types | Implemented, experimental until more UI mappings are confirmed |
| Other phones / OEM ROMs | Unknown, tester feedback needed |
All releases:
https://github.com/Lycidias93/asvd-bt-type-helper/releases
Latest release:
https://github.com/Lycidias93/asvd-bt-type-helper/releases/tag/v0.6.1
Download the Magisk ZIP from the newest stable release:
ASVD-BT-Type-Helper-vX.X.X.zip
Do not install this as a normal APK. Flash the ZIP in Magisk.
- Flash the ZIP in Magisk.
- Reboot.
- Grant/check permissions:
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-grant.sh- Start the main menu:
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/asvd.shUse the setup wizard first:
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-setup.shThe wizard lists paired Bluetooth devices, reads the selected target, and asks before writing.
MAC addresses are redacted by default. Use --show-mac only locally when exact MAC targeting is needed. Do not post raw Bluetooth MAC addresses publicly.
- List or pick the target device.
- Run dry-run first.
- Confirm exactly one target match.
- Apply the wanted type with an explicit confirmation flag.
- Verify with GET.
- Run Doctor if something looks wrong.
Dry-run example:
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-set-type.sh --name H222 --type car --dry-runExpected dry-run markers:
DRY_RUN=yes
write_performed=no
RESULT: ASVD_BT_TYPE_HELPER_SET_TYPE_DRY_RUN_DONE
Apply car / Carkit after a successful dry-run:
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-set-type.sh --name H222 --type car --confirm-setVerify the target:
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-get.sh --name H222Expected marker for the verified reference target:
metadata_17_before=Carkit
RESULT: ASVD_BT_TYPE_HELPER_GET_WRAPPER_DONE
| CLI type / alias | Metadata value | Status |
|---|---|---|
car, auto, carkit |
Carkit |
Verified on H222 |
speaker |
Speaker |
Experimental |
headset, headphones |
Headset |
Experimental |
untethered-headset, earbuds, tws |
Untethered Headset |
Experimental |
watch |
Watch |
Experimental |
stylus, pen |
Stylus |
Experimental |
hearingaid, hearing-aid |
HearingAid |
Experimental |
default |
Default |
Experimental |
clear, reset, null |
clear metadata key 17 | Implemented, use carefully |
Carkit is the verified reference type. Other metadata values are implemented but still need feedback from more devices, ROMs, and OEM Bluetooth settings UIs.
Use the duplicate-safe picker when Android shows a custom Bluetooth name, but the backend device name is duplicated.
Example:
- Android UI name:
Sauna - Backend name:
Tribit XSound Go - Two devices have the same backend name
Interactive path:
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/asvd.shThen use:
[5] Pick duplicate-safe device
[6] Set picked device dry-run
[7] Set picked device confirmed
Direct helper path:
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-pick-device.sh --filter "Tribit XSound Go"
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-pick-device.sh --filter "Tribit XSound Go" --select 1
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-set-picked.sh --type speaker --dry-run
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-set-picked.sh --type speaker --confirm-setThe picker shows non-secret hints such as candidate_id, source_index, backend_name, metadata_17, duplicate_name, last_connected, dev_type, dev_class, and likely_current_media.
No raw Bluetooth MAC address is shown by default.
Currently connected devices:
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-connected-devices.shLast connected Bluetooth hints:
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-last-devices.sh --last-connectedLast devices summary:
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-last-devices.shMagisk Action Button report:
/storage/emulated/0/Download/ASVD-BT-Type-Helper-action-latest.txt
The Action Button report is read-only and includes module version, shared ASVD state, Doctor summary, current/last device hints, metadata overview, and recommended commands.
The helper writes sanitized shared state for Audio Safe Volume Disabler / ASVD v1.2.6+:
/data/adb/asvd/bt-helper.env
Example fields:
helper_present=1
helper_package=org.asvd.bttypehelper
helper_version=0.6.1
helper_versionCode=61
target_name=H222
requested_type=Carkit
last_result=PASS
current_type=Carkit
previous_type=Carkit
method=metadata_api
asvd_apply_now_triggered=0
The shared-state file must not contain a raw Bluetooth MAC address.
ASVD remains independent. BT Helper is optional and does not force ASVD actions by default.
Optional ASVD apply-now after a confirmed metadata write:
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-set-type.sh --name H222 --type car --confirm-set --asvd-apply-nowConfirmed SET/CLEAR actions create a backup before writing.
Compare currently paired device types:
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-compare-types.shRestore last saved metadata backup:
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-restore-last.sh --dry-run
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-restore-last.sh --confirm-restoretsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-doctor.shSuccessful result:
RESULT: ASVD_BT_TYPE_HELPER_DOCTOR_PASS
Generate a public-safe debug report:
tsu /system/bin/sh /data/adb/modules/asvd-bt-type-helper/helper-debug.sh --name H222MAC addresses are redacted by default. Do not post output generated with --show-mac publicly.
v0.6.1 fixes a Pixel/Termux root-shell broadcast path where am broadcast can fail before the receiver is invoked because system_server is denied access to the Termux PTY (/dev/pts/0).
Changes:
am broadcastruns detached from the Termux PTY.- Package preflight output is captured before printing where
helper-common.shis used. helper-get.shusesrequest_idpolling and strict GET result validation.helper-get.shfails if no fresh GET result exists.helper-doctor.shtreats GET wrapper failures as real failures.
v0.6.0 fixes the setup Wizard stale-result failure mode.
Before v0.6.0, the wizard could request LIST but consume an existing last-result.txt from a previous GET, causing a false no_devices_parsed even though Bluetooth access worked.
The wizard now validates result provenance before parsing devices:
action=org.asvd.bttypehelper.LIST
RESULT: ASVD_BT_TYPE_HELPER_LIST_DONE
request_id=<matching request>
Wrong or stale results fail explicitly:
FAIL stale_or_wrong_result action=GET expected=LIST
- No Google Play Services manipulation.
- No Bluetooth service reload.
- No direct patching of
/data/misc/bluedroid/bt_config.conf. - No background daemon.
- No automatic boot-time Bluetooth metadata changes.
- No automatic ASVD apply-now trigger by default.
- No support for non-root / non-Magisk devices.
- No normal APK install support.
The module contains:
updateJson=https://raw.githubusercontent.com/Lycidias93/asvd-bt-type-helper/main/update.json
Magisk uses versionCode for update comparison. v0.6.1 uses versionCode: 61.
Full changelog:
Additional docs:
Related module:
- Audio Safe Volume Disabler / ASVD: https://github.com/Lycidias93/audio-safe-volume-battery-aware
v0.6.4 switches the helper from the Android app/priv-app metadata path to a root-side Binder bridge for Android 17.
Why this exists:
- normal user-app metadata GET/SET is blocked by
BLUETOOTH_PRIVILEGEDon Android 17; - the systemless priv-app install path was not reliably registered on the tested Android 17 SukiSU/HybridMount setup;
- the root bridge uses
IBluetoothManager.registerAdapter(callback)andIBluetooth.getMetadata/setMetadatafrom root.
Primary helpers:
helper-get.sh --name <device>reads Bluetooth metadata key17;helper-set-type.sh --name <device> --type <type>writes metadata key17;helper-set-carkit.sh --name <device>sets the type toCarkit;helper-doctor.shchecks the root bridge and optional smoke target.
Validated Pixel Android 17 result: H222 changed Carkit -> Speaker -> Carkit and restored cleanly. Logs and repository documentation intentionally avoid raw Bluetooth MAC addresses.