A Magisk module that automatically switches your Android device's settings based on whether you're using Android Auto (wired or wireless) or not in your car.
Yes, this module requires:
- Rooted Android device
- Magisk v20.4 or higher installed
Rooting your device and installing Magisk modules may void your warranty. Use at your own risk.
Tested on Android 10-14. Some features may not work on older/newer versions due to API changes.
Download the latest ZIP from:
- The
rel/directory in this repository - GitHub Releases page (recommended)
- Build it yourself using
build.ps1orbuild.sh
- Download the ZIP file
- Open Magisk Manager app
- Tap Modules tab
- Tap Install from storage
- Select the ZIP file
- Reboot when prompted
Check these:
- Magisk version is 20.4 or higher
- Android Auto app is installed
- You've paired your car via Bluetooth
- Module is enabled in Magisk Manager
- Check logs:
adb shell cat /data/adb/modules/caros-switcher/log.txt
/sdcard/CarOS/config.env
The module creates this automatically on first boot. You can edit it with any text editor.
No! The configuration is reloaded automatically. Just connect to your car and the changes take effect.
Method 1 (easiest):
- Go to Settings > Bluetooth
- Look at paired devices
- Your car's name is listed there
Method 2 (using logs):
- Set
VERBOSE=1in config - Connect to your car
- Check logs for Bluetooth device names
See EXAMPLES.md for more details.
Some cars append numbers or change names. Use MAC address matching instead:
AUDI_BT_MAC="AA:BB:CC:DD:EE:FF" # Your car's MAC addressYes! Use regex patterns:
AUDI_BT_NAMES="Audi|BMW|Rental"Escape them with backslashes:
AUDI_BT_NAMES="Car \\(2024\\)|John's Car"Yes! It detects both wired (USB) and wireless (Bluetooth) Android Auto connections.
The module automatically grants necessary permissions to critical apps:
- Notification permissions: Android Auto, Waze, Google Maps, Nova Launcher, Spotify
- Location permissions: Google Maps, Waze, Android Auto (including background location)
This fixes the common issue where Android Auto requests permissions on every connection. Permissions are granted on boot and re-checked every 30 minutes.
Yes, set AUTO_GRANT_PERMISSIONS=0 in your config file:
AUTO_GRANT_PERMISSIONS=0If you have AUTO_GRANT_PERMISSIONS=0 or the module just installed, you may need to manually grant permissions once, or enable the automatic permission feature.
Some Android versions restrict WiFi control. Check:
- No battery optimization for system apps
- Check logs for error messages
- Try toggling
KEEP_WIFI_IN_WIREDsetting
Some devices don't allow apps to enable battery saver. This is an Android restriction on newer versions.
Yes! Set IDLE_MAX_CPU_FREQ in kHz:
IDLE_MAX_CPU_FREQ="1516800" # ~1.5 GHzLeave empty to disable CPU throttling.
In wired mode, the module tries to reduce fast charging to prevent phone overheating during long drives. This is "best effort" and may not work on all devices.
No. If SET_NOVA_DEFAULT=1 but Nova isn't installed, the module just skips this step. No errors.
CarOS supports two methods for streaming audio from another phone:
Method 1: Bluetooth A2DP Sink
When ENABLE_BT_AUDIO_SINK=1, your CarOS phone becomes discoverable and can receive audio from another phone via Bluetooth.
Limitation: May not work if Bluetooth is already used for car audio/calls, even in wired mode.
Method 2: WiFi Hotspot (Recommended)
When ENABLE_WIFI_AUDIO_HOTSPOT=1, your CarOS device creates a WiFi hotspot that other devices can connect to for streaming audio.
Advantages: Works even when Bluetooth is used by the car. Requires an audio streaming app on the emitting phone.
To use WiFi hotspot:
- Enable in config:
ENABLE_WIFI_AUDIO_HOTSPOT=1 - Set SSID and password:
WIFI_AUDIO_HOTSPOT_SSID="CarOS-Audio" - Connect to car via USB (wired mode)
- Emitting phone connects to WiFi hotspot
- Use audio streaming app (SoundWire, AudioRelay, etc.)
No, it's device-dependent. Some Android devices don't support A2DP sink mode. Additionally, even in wired mode, many cars use Bluetooth for audio and phone calls, which prevents the phone from acting as an A2DP sink simultaneously.
If Bluetooth doesn't work: Use the WiFi hotspot method instead (ENABLE_WIFI_AUDIO_HOTSPOT=1).
If ENABLE_BT_AUDIO_SINK=1 but your phone isn't discoverable:
- Bluetooth may be in use by the car - Even in wired mode, many cars use Bluetooth for audio/calls
- Try WiFi hotspot instead - Set
ENABLE_WIFI_AUDIO_HOTSPOT=1 - Check that you're in WIRED mode (USB connection)
- Look for "BT Audio Sink" messages in logs
- Your device may not support A2DP sink mode
No, both features are automatically disabled in IDLE mode to save battery. They only work when connected to your car in WIRED mode.
No, in wireless mode both Bluetooth and WiFi are typically used by the car for Android Auto connection. The audio streaming features only work in WIRED mode where the car connection is via USB.
Popular options include:
- SoundWire (free) - Low latency audio streaming
- AudioRelay (free) - WiFi/USB audio streaming
- AirMusic - DLNA/UPnP streaming
- Any app that supports streaming to a WiFi network
Check:
- Android Auto app is installed and running
- You're connected to your car (USB or Bluetooth)
- Enable
VERBOSE=1and check logs - Verify process name:
pidof com.google.android.projection.gearhead
- Check logs:
adb shell cat /data/adb/modules/caros-switcher/log.txt - Verify Bluetooth name matches:
AUDI_BT_NAMES="Your Car Name" - Try MAC address matching instead
- Ensure Android Auto is actually running (not just connected)
Some features require specific permissions:
- WiFi/Bluetooth control: Usually works
- Battery saver: May be restricted on Android 12+
- CPU frequency: Requires kernel support
These are best-effort features. Some may not work on all devices.
This usually means:
- Running on older Android version
- SELinux blocking access (rare with Magisk)
- System service isn't running
Try rebooting. If persists, the module will use fallback detection methods.
Check your configuration:
DATA_OFF_OUTSIDE=1(disable data when idle)KEEP_WIFI_IN_IDLE=0(disable WiFi when idle)- Set
IDLE_MAX_CPU_FREQto throttle CPU - Ensure
VERBOSE=0(verbose logging uses more battery)
This is normal during Android Auto use. The module tries to help:
LIMIT_QUICK_CHARGE_WIRED=1reduces charging heat- Ensure good phone ventilation in car
- Consider a phone mount with cooling
Yes, but changes will be lost on module updates. Better to:
- Fork the repository
- Make your changes
- Build your own version
- Consider contributing back via pull request
/data/adb/modules/caros-switcher/ # Module directory
/data/adb/modules/caros-switcher/log.txt # Logs
/data/adb/modules/caros-switcher/state.json # Current state
/sdcard/CarOS/config.env # User configuration
- Open Magisk Manager
- Go to Modules
- Tap Remove on CarOS Profile Switcher
- Reboot
Configuration file at /sdcard/CarOS/ will remain (delete manually if desired).
Yes:
- Open Magisk Manager
- Disable the module
- Reboot
Or keep enabled but set conservative settings.
Minimal. The service checks every 3 seconds, which uses negligible battery. Most battery usage comes from Android Auto itself, not this module.
Service alive, loop #300
This appears every ~5 minutes (100 loops × 3 seconds) to prove the service is running. It's normal.
Yes! Tested and working. The module includes specific handling for LineageOS's delayed /sdcard mounting.
Should work, but Samsung's One UI has aggressive battery optimization. You may need to:
- Disable battery optimization for system services
- Add Magisk to "Never sleeping apps"
- Disable "Adaptive battery"
Yes, well-tested on Pixel devices.
Yes! As long as the head unit supports Android Auto (wired or wireless), this module will work. You just need to configure the Bluetooth name correctly.
Yes. The module:
- Runs in background
- Doesn't interrupt Android Auto
- Automatically turns screen off (can be disabled)
- Designed specifically for in-car use
No. The module monitors Android Auto but doesn't modify it. Profile switching happens in the background.
Very unlikely. The module:
- Uses standard Magisk framework
- Doesn't modify system partitions
- Can be disabled from Magisk recovery if needed
If issues occur, boot to recovery and disable/remove via Magisk.
- Enable
VERBOSE=1in config - Reproduce the issue
- Collect logs:
adb shell cat /data/adb/modules/caros-switcher/log.txt - Open a GitHub issue with logs and details
Absolutely! See CONTRIBUTING.md for guidelines.
# PowerShell
.\build.ps1
# Bash
./build.shShell script (Bash/sh) - standard for Magisk modules.
- Check EXAMPLES.md for configuration examples
- Check CONTRIBUTING.md for development info
- Open an issue on GitHub with your question
- Include logs and device info for technical questions
Remember: Always include logs when asking for help!
adb shell cat /data/adb/modules/caros-switcher/log.txt