Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › ADB

How to install and configure the Android Auto Desktop Head Unit emulator

By Freedom251 Team · · 10 min read

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Android Auto Desktop Head Unit (DHU) runs on a Windows, macOS, or Linux computer and emulates the in-car head unit while a real Android phone supplies Android Auto and your app under test. Install it from Android Studio’s SDK Manager, connect the phone by USB accessory mode or ADB tunneling, then select the simulated input and display characteristics in a head-unit configuration file. The official setup guide is Android Developers’ Test using the Desktop Head Unit.

This is a developer test tool, not a replacement for Android Auto on the phone. You need a compiled app installed on the phone, Android Auto installed and current, and a data-capable USB connection for either documented connection method.

As an Amazon Associate I earn from qualifying purchases.

What the Desktop Head Unit emulator does

Google describes the DHU as a way for a development machine to emulate an Android Auto head unit so developers can run and test Android Auto apps. The computer supplies the simulated dashboard window and controls; the phone remains the Android Auto device that runs the projection session and the app. This arrangement lets you exercise an app without connecting to a physical vehicle head unit.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The setup has three moving parts:

  • Development computer: runs the DHU executable on Windows, macOS, or Linux.
  • Android phone: runs Android Auto and the compiled app you want to test.
  • Connection channel: either Android Open Accessory (USB accessory) mode or an ADB tunnel over USB.

Because the phone is part of the test system, installing only the desktop executable will not produce a usable session.

#1 Best Overall
CONMDEX Android Auto USB Cable [3ft, 2-Pack] 10Gbps, 3A Fast Charging | USB 3.1 Gen 2 | Stable Android Auto & CarPlay | Flexible & Durable | for iPhone 18 Pro Max Duo/17/16, iPad Pro, Galaxy S26
  • [Reliable Car Connectivity & Android Auto] Engineered specifically to solve "falling short" connection issues in vehicles. This cable provides a stable, high-speed link for Android Auto and Apple CarPlay, ensuring consistent navigation and music streaming in models like the Ford Raptor and other modern consoles
  • [True 10Gbps Ultra-Fast Data Sync] Eliminate data transfer bottlenecks with genuine USB 3.1 Gen 2 performance. Move 4K movies or entire photo libraries in seconds at 10Gbps—speeds significantly faster than standard USB 3.0 cables that often drop to 40Mbps
  • [Built for Tidy Spaces & Durability] The 3ft length is the "perfect length" for car consoles and tidy desktop setups, eliminating excess cable clutter. Featuring an aluminum alloy case and premium nylon braiding, it is manufactured to prevent loose wires and fraying near the plugs
  • [Versatile One-for-All Functionality] A single solution for your high-speed ecosystem. Seamlessly connects the latest iPhone 18 Pro Max Duo/17/16, Samsung Galaxy S26/S25/S24 Ultra, PS5/PS4 controllers, and external SSDs to USB-A ports
  • [Charging & Compatibility Boundaries] Provides efficient 3A/18W fast charging for smartphones and tablets. Please note: This cable is optimized for mobile devices and is not intended for high-wattage laptops (65W+) or use cases requiring cables longer than 3 feet

Requirements before installation

Component Requirement Practical check
Phone operating system Android 9 (API level 28) or later Check the Android version in the phone’s About or System settings.
Android Auto Installed and updated to the latest version available for the phone Update it through Google Play. For Android 10 (API 29) and later, sign in to Google Play and perform this update before the first DHU run.
App under test A compiled Android Auto app installed on the phone Build the app from your project and install that build before launching the DHU.
Computer Windows, macOS, or Linux Use the executable supplied in the DHU package for your operating system.
Android Studio SDK Manager access The DHU is delivered as an SDK tool rather than a separate installer.
USB connection A data-capable cable that fits both devices A charge-only cable cannot carry the documented accessory or ADB connection.
Linux DHU 2.x runtime GLIBC 2.32 or later, plus libc++1 and libc++abi1 Run ldd --version and install the matching C++ runtime packages for your distribution.

The Linux library requirement applies specifically to DHU 2.x. Distribution package names and commands differ, so treat the Debian-derived command shown later as an example rather than a universal instruction.

Install the DHU from Android Studio

1. Prepare the phone

  1. Use a phone running Android 9/API 28 or newer.
  2. Enable Android developer mode on the phone. The exact menu wording varies by manufacturer, but Android exposes developer settings after you tap the build information repeatedly in the phone’s software-information screen.
  3. Compile the Android Auto app you intend to test and install that build on the phone.
  4. Install Android Auto. If it is already present, update it to the latest version Google Play offers. On Android 10/API 29 or newer, sign in to Google Play and complete the update before the first DHU launch; no single app version number is guaranteed because availability changes over time.

2. Download the SDK tool

  1. Open Android Studio’s SDK Manager.
  2. Select the SDK Tools tab.
  3. Choose Android Auto Desktop Head Unit Emulator and download it.
  4. After installation, locate the package at SDK_LOCATION/extras/google/auto/. Replace SDK_LOCATION with the SDK directory used by your Android Studio installation.

The directory contains the DHU executable, its supporting files, and sample configurations. Keep the package together when moving or scripting it; the bundled libusb library must remain beside the DHU executable.

3. Make the executable runnable on macOS or Linux

Open a terminal, change to the installed directory, and run:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
cd SDK_LOCATION/extras/google/auto/
chmod +x ./desktop-head-unit

Windows uses the supplied desktop-head-unit.exe file and does not use the Unix chmod command. On macOS and Linux, do not remove or relocate the bundled libusb file; the DHU expects to find it in the same directory.

4. Check Linux 2.x dependencies

Before starting DHU 2.x on Linux, check the GNU C library version:

Rank #2
LDLrui USB C to USB A 3.1 Gen 2 Data Cable, 3ft, 1-Pack, Black | Type C 3A Fast Charge & 10Gbps Data Sync Cable for Android Auto, iPhone 17/16 Series, MacBook, Samsung Galaxy S25, Pixel
  • [ Excellent Performance ] This USB C 3.1 cable connects a portable external USB C 3.1 SSD to a computer for speedy file transfer or syncs and charges Samsung smartphones or tablets equipped with the USB C port. Data synchronization is 20 times faster than USB 2.0 cables (480Mbps). (Does not support video output.)
  • [ Fast Charging & High Speed Data Transfer ] This usba to usbc data power cable can sync your favourite photos, videos and music at a data transfer rate of up to 10Gbps(1250MB/s). Files can be synchronised in seconds. In addition, it can quick-charge your USB-C devices at up to 3A safe charging power. Tested charge Samsung Galaxy S22 from 0 to 60% in 30mins with Qualcomm Quick Charge 3.0 technology.Tips: USB 3.1 Gen 2 renamed to USB 3.2 Gen 2 by USB-IF in 2019.
  • [ Extreme Durability & High Quality ] : Unique ABS case with the reinforced connector withstand 10000+ bending test. Durable TPE cable not only stay tangling-free but also flexible enough to be wrapped up and put in a bag ! (PS:The connector shell is wrapped around by a piece of plastic film to protect the shell from scraching ,feel free to remove the film when you use it.)
  • [ Universal Compatibility ] This USB C to USB A Charger cable is Compatible with almost all USB-C devices. For Samsung Galaxy S24/S24+/S24 Ultra/S23/S23+/S23 Ultra/S22/S21/S20/S10/S9/Note 20/10/A70/A80/A90/A54, iPhone 16/16 Plus/16 Pro/16 Pro Max, iPhone 15/15 Plus/15 Pro/15 Pro Max, Google Pixel 9/8/7/6/5/, Moto G9/G8/G7/G Pure, LG G7/G6/V50, Sony XZ, Bose 700, GoPro, Nintendo switch, Samsung Galaxy Tab S6, iPad Pro 2018 11''/12.9", Samsung T7/T5, Crucial X8/X6, LaCie Rugged SSD, G-Drive, WD My Passport, Seagate Fast, SanDisk Extreme Portable SSD etc. (OnePlus phones are not supported.)
  • [ What You Get ] 1 X Super-Fast USB-A to USB-C 3.1 Gen 2 Cable (3 ft including both ends), our worry-free LIFETIME WARRANTY and friendly customer service. NOTE: If you have any questions, please feel free to contact us, we will be happy to serve you and give you an easy and pleasant shopping experience.
ldd --version

The binary requires GLIBC 2.32 or later. It also requires the libc++1 and libc++abi1 runtime packages. On a Debian-derived distribution, Android’s example command is:

sudo apt-get install libc++1 libc++abi1

Use your distribution’s package manager and package names when they differ. If the system reports an older GLIBC, installing the C++ packages alone will not satisfy the requirement; use a supported Linux environment or a newer system.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a connection method

Method Best starting point What you run Important caveat
USB accessory mode Recommended for DHU 2.x ./desktop-head-unit --usb Windows may need a WinUSB driver, and the driver can interfere with ADB.
ADB tunneling Fallback when accessory discovery fails or when you prefer an ADB-managed link adb forward tcp:5277 tcp:5277, then start the DHU The phone must be unlocked, the head-unit server must be running, and Android Auto must allow new cars.

Both methods still require Android Auto and your test app on the phone. They differ only in how the desktop process reaches the Android Auto head-unit service.

Connect with USB accessory mode

Start a general USB scan

  1. Connect the phone to the computer with a data-capable USB cable.
  2. Open a terminal or command prompt in SDK_LOCATION/extras/google/auto/.
  3. On macOS or Linux, run ./desktop-head-unit --usb. On Windows, run the corresponding executable with desktop-head-unit.exe --usb.
  4. Keep the phone available for any Android Auto permission or first-run prompts. The DHU scans for a compatible USB device and opens a head-unit session when it finds one.

Select a particular device

If more than one compatible device is attached, pass its identifier:

./desktop-head-unit --usb=DEVICE_ID

Use the device ID reported by your environment in place of DEVICE_ID. This avoids relying on automatic selection when several phones or USB targets are present.

Rank #3
LDLrui USB C Data Cable 10Gbps, 6ft, 1-Pack, Red, Braided | USB C to USB A Data Transfer, Type C 3A Fast Charging Cord, iPhone 17/16 Series, Samsung Galaxy S25, Android Auto, Carplay
  • [Finder’s Red]: Quickly identify your Data-Sync cable in a tangle of different functions wires. No more guessing: Red = Fast Charge = Data Sync". Lab study: Red data cables reduce‘wrong unplugging’ by 62%. Spotted 3X faster than black in bags/offices. Ideal for travel, meetings, and late-night charging.
  • [Lock-Tight C Port & Zero Interruption]: Super Snug USB-C data cable. No Loose/Wobble, Stable Rapid Charging & Data Sync. Tested to withstand 50,000+ bends and 10000+ Plug-in. Withstands long-term use without loosening. No more annoying ‘disconnected’ alerts.
  • [Phenomenal Superspeed+ 10Gbps Data Transfer Speed]: Wherever you are, access your games, photos, and videos quickly. With read speeds up to 10Gb/s, you can load files up to 2x faster than most usb 3.0 a to c cables, 20x faster than usb 2.0 cables, and 800x faster than USB 1.0 cables. This incredible performance will give you an ultra-fast experience like never before.
  • [High Quality Nylon]: The upgraded USB C 3.1 data cable features military-grade double-braided nylon that outperforms cheap plastic coatings. The tight 1200D nylon weave resists cuts, pet bites, daily wear, and ensure stable 10Gbps high speed data transfer and 3.1A fast charging."(LDLrui Lab Certified: 10+ years lifespan at 8 bends/day).
  • [The Only Charge Cable You Need]: Say goodbye to your old usb a to c charge cables. LDLrui usb charger cable has the unrivaled charging speed you need to fast charge your phone, tablet, and USB-C notebook. Charge Samsung S10 to 50% in just 30 minutes—that’s up to 30% faster than with other 2.4A charger cable.

Windows driver and ADB conflicts

Windows accessory mode can require a WinUSB driver. Changing the phone’s USB driver for accessory communication may affect ADB visibility, so a phone that worked in ADB can disappear from ADB after a driver change. If the DHU cannot discover the phone, try restarting the ADB server with:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
adb kill-server

Then reconnect and retry the accessory command. If discovery still fails, use the ADB tunneling procedure instead; it is the documented alternative when USB accessory setup is troublesome.

Connect through ADB tunneling

ADB tunneling forwards the DHU socket through the Android Debug Bridge. The default DHU socket port is 5277.

  1. On the phone, open Android Auto’s developer options. If the required control is not visible, open the overflow menu and choose Start head unit server.
  2. In Android Auto settings, open Previously connected cars.
  3. Make sure Add new cars to Android Auto is enabled. Without this setting, Android Auto can refuse a new desktop head-unit connection.
  4. Connect the unlocked phone to the development computer by USB. Keep the screen unlocked while establishing the session.
  5. On the computer, forward the default port:
adb forward tcp:5277 tcp:5277
  1. From SDK_LOCATION/extras/google/auto/, start desktop-head-unit.exe on Windows or ./desktop-head-unit on macOS/Linux.
  2. On the first connection, accept the terms displayed on the phone and grant permissions requested by Android Auto.

If another local port is required, pass it to the DHU with --adb. The option accepts either a port or a host-and-port form:

./desktop-head-unit --adb=5999
./desktop-head-unit --adb=localhost:5999

The default remains port 5277 when you do not specify --adb. The port used in the adb forward command and the port supplied to the DHU must refer to the same forwarded socket.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
SUNGUY 10Gbps Android Auto USB C Cable, 1.5FT 3A USB 3.1 Gen 2 Fast Charge & Data Transfer USB C CarPlay Cable, Compatible with iPhone 17/16/15 Pro Max, Samsung T7, Galaxy S23 S22 Ultra Note 20, SSD
  • 10Gbps Data Transfer: SUNGUY USB 3.1 Gen 2 cable supports super speed data transmission up to 10Gbps, transfer HD movies, songs, file or photos in seconds. Backwards compatible to USB 3.0 and 2.0; DOES NOT support video output.
  • Works with Android Auto: This android auto cable can quick-charge your USB-C devices at up to 3A safe charging power. 56KΩ pull-up resistor provides a safer charging current, and protects your devices from damage. Works great with your car's Android Auto.
  • Works with CarPlay: The nylon braided usb c to usb a cable compatible with iPhone 15/15Pro/15 Pro Max/15 Plus CarPlay cable. Supports connecting the iPhone 15 series to iTunes on your computer.
  • Great Compatibility: This usb c data cable is compatible with iPhone 15/15 Pro Max, Galaxy S23/S23 Ultra/S22/S22 Ultra/S21/S21+/Note 10 Plus/Note 20 S10/S10e/S10+, Pixel 5 6 7 Pro, iPad Pro 2020, MacBook, MacBook Pro, MacBook Air, LG G6 G7 V40 V35, ThinQ V30S V30, Chromebook, Dell XPS 13, Samsung T7 Shield, Extreme Portable SSD and more.
  • What You Get: You will receive 1pcs 1.5ft USB 3.1 Gen2 10Gbps Cable, with our 12-month product replacement warranty and lifetime 24/7 friendly technical support.

Configure the simulated display and controls

Use the default or a custom INI file

The default DHU configuration file is:

~/.android/headunit.ini

To use a different file, pass its path with -c:

./desktop-head-unit -c /path/to/config.ini

Sample configurations are installed in SDK_LOCATION/extras/google/auto/config/. Copy a relevant sample as a starting point, then edit the copy rather than changing the SDK’s original files. The samples show the available configuration structure for different simulated head-unit behaviors.

Input modes

The default emulator presents a touchscreen interface operated by mouse clicks. You can select a different interaction model with -i or the equivalent --input option:

  • touch keeps the touchscreen model.
  • rotary simulates a rotary controller. In this mode, mouse clicks are ignored and keyboard shortcuts represent controller operations.
  • hybrid combines touchscreen and rotary-style input for scenarios that expose both control types.

For example:

./desktop-head-unit -i rotary
./desktop-head-unit --input=hybrid

Choose the input mode that matches the interaction assumptions your app must handle. If a click appears to do nothing after switching to rotary mode, that is expected behavior; use the documented keyboard shortcuts for the simulated controller instead.

Display parameters

The INI configuration can request a simulated display resolution, DPI, and frame rate. These values describe the head unit that Android Auto should render for the session, allowing you to test layouts and performance assumptions against more than one screen profile. Change them in a copied configuration sample and launch the DHU with -c pointing to that file.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep the qualification “requested” in mind: the configuration tells the emulator which display characteristics to present, while Android Auto and the app still determine what content is allowed and rendered.

Best Value
Android Auto Cable 3ft for Car CarPlay, USBA to USBC 10Gbps Data 15W Charge | USB Type A 3.2 to USB Type C Cord for iPhone 17/16/15 Google Pixel 10/9/8/7 Galaxy S26/S25/S24 and more
  • Note: Car models with USB 2.0 ports may experience protocol mismatch with USB 3.2 Android Auto cable, potentially causing device recognition failure, slow charging speeds, or even complete charging failure.
  • Exclusively for Android Auto and CarPlay users: This android auto usb cable is designed for users with Android Auto and CarPlay requirements.
  • 10Gbps Sync Transfer: With 10Gbps high-speed synchronous transmission, USB 3.2 Gen 2 cable can perfectly match your portable ssds with large files for quick transfer to your laptop, increasing work efficiency.
  • Up to 15W Fast Charging: A usb to usb c data transfer cable capable of providing a maximum charging speed of 15W (3A 5V) can charge a smartphone that supports 15W fast charging to full capacity in about an hour.
  • Wide compatibility: This usbc cable is compatible with all USB-C devices, including the Galaxy series, Google Pixel series, iPhone series, tablets, USB-C SSDs, SSD enclosures, and more.

Vehicle and control capabilities

The sample INI files also expose toggles for touch, touchpad, rotary-controller, and instrument-cluster capabilities. They include vehicle data such as fuel types and electric-vehicle connectors. Enable only the capabilities needed for the test profile so that a test result reflects a known simulated head unit rather than an accidental mixture of controls.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Useful command-line options

Option Purpose Example
--usb Scan for a phone using USB accessory mode ./desktop-head-unit --usb
--usb=DEVICE_ID Select a particular USB device ./desktop-head-unit --usb=DEVICE_ID
--adb=PORT Use a specified ADB socket port instead of the default 5277 ./desktop-head-unit --adb=5999
-c FILE Load a configuration file other than ~/.android/headunit.ini ./desktop-head-unit -c /path/to/config.ini
-i touch Select touchscreen input ./desktop-head-unit -i touch
-i rotary Select rotary-controller input ./desktop-head-unit -i rotary
-i hybrid Select combined touch and rotary input ./desktop-head-unit -i hybrid
-h Run headless, without the normal display window ./desktop-head-unit -h
-v Print DHU version information ./desktop-head-unit -v
--help Show the option list supported by the installed build ./desktop-head-unit --help

Use --help and -v against the executable you actually installed. This avoids relying on an option or version that belongs to a different DHU package.

A reliable first-run sequence

Following the same order each time makes connection failures easier to isolate:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Install or update Android Auto on the phone, and install the compiled app under test.
  2. Confirm the phone meets Android 9/API 28 or later.
  3. Start with USB accessory mode for DHU 2.x by running --usb.
  4. If accessory discovery does not succeed, stop the attempt, prepare Android Auto’s head-unit server and car settings, and switch to ADB tunneling.
  5. When the DHU window appears, verify that the expected input mode is active. In rotary mode, test the keyboard controls rather than mouse clicks.
  6. For a non-default screen, close the session, edit a copied INI sample, and relaunch with -c.
  7. Accept first-run terms and permissions on the phone before evaluating the app’s behavior.

A successful launch means the computer is displaying the emulated head unit while Android Auto on the phone maintains the projection connection. The app under test should then appear according to its Android Auto category and permissions.

Troubleshooting by symptom

The USB accessory scan finds no phone

  • Confirm the cable supports data and that the phone is unlocked.
  • On Windows, check whether the required WinUSB driver is installed for accessory mode.
  • Remember that a WinUSB change can interfere with ADB. Try adb kill-server, reconnect the phone, and run the scan again.
  • Pass an explicit device ID with --usb=DEVICE_ID when multiple devices are attached.
  • If discovery remains unreliable, use ADB tunneling rather than repeatedly changing drivers.

ADB tunneling does not connect

  • On the phone, verify that Start head unit server has been selected from Android Auto’s overflow menu.
  • Open Previously connected cars and confirm Add new cars to Android Auto is enabled.
  • Reconnect the USB cable and leave the phone screen unlocked.
  • Run adb forward tcp:5277 tcp:5277 again and check that it exits without an ADB error.
  • Start the DHU from the same SDK directory. If you selected a custom port, ensure the --adb value matches the port you forwarded.

DHU 2.x will not start on Linux

  • Run ldd --version and verify GLIBC is 2.32 or newer.
  • Install both libc++1 and libc++abi1 using packages appropriate for your distribution.
  • Ensure the bundled libusb library is still in the DHU executable’s directory.
  • Do not assume an older distribution can satisfy the GLIBC requirement merely by installing application libraries; the C library itself must meet the minimum.

The window opens but controls do not respond

  • Check the selected input mode. Rotary mode intentionally ignores mouse clicks.
  • Use --help to confirm the option spelling accepted by your installed build.
  • If the test requires touch and rotary controls, select -i hybrid or enable the corresponding capabilities in the INI profile.

The display size or density is unsuitable

  • Stop the DHU and open the configuration file supplied with -c, or the default ~/.android/headunit.ini.
  • Adjust the requested resolution, DPI, and frame-rate values using a sample in SDK_LOCATION/extras/google/auto/config/ as your model.
  • Relaunch with the same configuration path and record which profile produced the result so later tests use consistent settings.

Keeping test profiles repeatable

Use one copied INI file per head-unit profile instead of editing the default file between tests. A touch-focused profile, a rotary profile, and a combined profile can each specify their own controls and display parameters. Launch the desired profile explicitly:

./desktop-head-unit -c /path/to/touch-profile.ini
./desktop-head-unit -c /path/to/rotary-profile.ini

When documenting a bug, include the DHU version from -v, the connection method, the phone’s Android version, and the configuration file used. Those details distinguish an app issue from a difference in display density, frame rate, input capability, or transport path.

What the DHU does not replace

The DHU is the computer-side head-unit emulator. It does not install Android Auto on the phone, supply the app under test, or remove the need for Android Auto permissions and first-run acceptance. A phone running Android 9/API 28 or later remains part of every documented setup, whether you connect through accessory mode or ADB tunneling.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

ADBAndroid AutoAndroid developmentAndroid StudioDesktop Head UnitDHU

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.