YouTube (m.youtube.com in a WebView) on the Android Auto screen. Personal sideload app.
- Registers as an Android Auto navigation app, which Android Auto hands a raw drawing surface.
- A private
VirtualDisplayrenders onto that surface; aPresentationon it holds the WebView. - Car taps (
onClick) are replayed as touch events into the WebView; drags (in PAN mode) scroll it. - Top buttons: Search (car keyboard/voice), Back, Home. PAN button = drag-to-scroll mode.
- The phone app is a normal YouTube WebView: sign in there and the car side shares the login.
- Install Android Studio (it bundles JDK 17 and the SDK).
- File → Open → this
CarTubefolder. Let Gradle sync (it creates the wrapper and downloads deps). - Build → Build App Bundle(s)/APK(s) → Build APK(s).
APK:
app/build/outputs/apk/debug/app-debug.apkOr plug in your phone with USB debugging on and press Run.
- Phone Settings → search "Android Auto" → open Android Auto settings.
- Scroll to the bottom, tap Version about 10 times → OK to enable developer mode.
- ⋮ menu (top right) → Developer settings → turn on Unknown sources.
- Back in Android Auto settings → Customize launcher → make sure CarTube is checked.
- Connect to the car (or the Desktop Head Unit emulator) and open CarTube.
- Android Studio → SDK Manager → SDK Tools → check Android Auto Desktop Head Unit Emulator.
- Android Auto developer settings (⋮) → Start head unit server.
- On the PC:
adb forward tcp:5277 tcp:5277 - Run
desktop-head-unit.exefrom%LOCALAPPDATA%\Android\Sdk\extras\google\auto\. Add--usbinstead if your phone is plugged in and you skip steps 2–3.
- Taps require Car API level 5+ hosts (current Android Auto is fine).
- Text boxes on the page can't open a keyboard on the car; use the Search button.
- If Android Auto ever stops showing the app, re-check "Unknown sources" (updates can reset it).