April 24, 2024

Introduction

Have you ever ever needed to construct your personal Android? It’s straightforward in keeping with the official handbook, however it’s getting tougher on a Home windows (or Mac) machine, or for those who’d prefer to run it on bodily {hardware}. Nonetheless too straightforward? Let’s construct Android Automotive OS – the identical supply code, however one other layer of complexity. On this handbook, we’ll cowl all steps wanted to construct and run Android Automotive OS 11 AOSP on Raspberry Pi 4B utilizing Home windows. The answer is just not excellent, nevertheless. Probably the most principal situation is an absence of Google Providers as a result of all the AAOS is on an open-source mission and Google doesn’t present its companies this fashion. However, let’s construct the open-source model first, after which we are able to attempt to face incoming points.

Stipulations

{Hardware}

If you wish to run the system on a bodily gadget, you want one. I exploit the Raspberry Pi 4 mannequin B with 8GB of RAM (https://www.raspberrypi.com/products/raspberry-pi-4-model-b/). By the best way, if you wish to construct and run an emulator from the supply, it’s additionally doable, however there’s a small limitation – packaging the emulator to a zipper file, transferring it to a different laptop, and even working it below Android Studio was launched in Android 12.

To energy your Raspberry, you want an influence adapter (USB C, min. 5V 3A). I exploit the Raspberry-official 5.1V 3A mannequin. It’s also possible to energy the Raspberry laptop out of your desktop/laptop computer’s USB port, particularly for those who’re going to debug it through a serial connection. Verify the “If it doesn’t work” part beneath for the required {hardware}.

One other piece of {hardware} wanted is an SD card. In idea, 4GB is all you want, nevertheless, I like to recommend shopping for a bigger card to have some further house in your functions on Android. I exploit 32GB and 64GB playing cards. You’ll additionally want a built-in or exterior card reader. I exploit the latter. 

The following step is a display screen. It’s non-obligatory however fancy. You’ll be able to join your mouse and optionally keyboard to your Raspberry Pi through USB and join any show you will have through micro-HDMI however utilizing a contact display screen is far more intuitive. I exploit a Waveshare 10-inch display screen devoted to Raspberry (https://www.waveshare.com/wiki/10.1inch_HDMI_LCD_(B)_(with_case). The display screen field has a spot to screw the Raspberry too, so that you don’t want any further case. It’s also possible to purchase it with an influence adapter and a show cable.

Should you don’t purchase a bundle, ensure you have all obligatory equipment: micro-HDMI – HDMI cable to attach a display screen (Waveshare or every other), USB A – USB mini A cable to attach a contact sensor of the display screen, USB mini A 5V 3A adapter to energy the display screen.

In fact, you want a pc. On this handbook, we use a Home windows machine with at the least 512GB of storage (the Android supply is large) and 16GB of RAM.

Software program

You’ll be able to most likely construct every part in pure Home windows, however the advisable technique is to make use of WSL. I assume you have already got it put in, so simply ensure you have the most recent WSL2 model. If in case you have by no means used WSL earlier than, see the total handbook right here https://learn.microsoft.com/en-us/windows/wsl/install.

WSL changes

The usual WSL set up makes use of a too-small digital drive and restricted RAM, so it’s essential modify it. 

Let’s begin with the disk. Make certain the WSL is shut down by working ‘wsl –shutdown’ within the command immediate. Open Home windows Command Immediate with admin privileges and enter ‘diskpart’. Then run ‘choose vdisk file=”<path to WSL drive file>”’. For me, the trail is “C:Customers<consumer>AppDataLocalPackagesCanonicalGroupLimited.Ubuntu_<WSL_instance_id>LocalStateext4.vhdx”. Now you possibly can broaden it with the command ‘broaden vdisk most=512000’. Round 300GB is sufficient for Android 11, however if you wish to play with a number of branches of Android on the identical time, you want extra space. Now you possibly can shut the diskpart with the ‘exit’ command. Subsequent, open the WSL and run ‘sudo resize2fs /dev/sdb 512000M’. I assume you will have solely a single drive connected to the WSL and it’s seen within the Linux subsystem as /dev/sdb. You’ll be able to test it with the instructions ‘sudo mount -t devtmpfs none /dev || mount | grep ext4’. 

Now, let’s modify the reminiscence. Cease the WSL once more. Open your property listing in Home windows and open .wslconfig file. Create it if this file doesn’t exist but. Within the file, it’s essential create a [wsl2] part and reminiscence configuration. The whole file ought to seem like this: 

As you possibly can see, I’ve connected 16GB to the digital machine. It’s assigned dynamically, in keeping with wants, however you have to be conscious that the digital machine can take all of it, so for those who permit it to eat your total RAM, it could pressure your Home windows to make use of a tough disk to outlive (which is able to sluggish every part down considerably).

Disclaimer:

Constructing Android on 8 cores, 16GB RAM machine takes round 4 hours. If you wish to do it sooner otherwise you don’t have a pc highly effective sufficient at your property or workplace, you possibly can think about constructing within the cloud. Easy AWS EC2 with 32 cores and 64GB of reminiscence does the job in a single hour (to obtain and construct) and prices only a few bucks.

Let’s Get Able to Rumble!!!

..or at the least to constructing.

Extra conditions

We’d like some software program however not a lot. Simply set up the next packages. This set of libraries lets you construct Android Automotive OS variations 11 to 13.

sudo apt replace && sudo apt set up gcc-aarch64-linux-gnu libssl-dev bc python3-setuptools repo python-is-python3 libncurses5 zip unzip make gcc flex bison -y

Supply code downloading

Let’s create a house listing for our android and obtain sources.

mkdir android-11.0.0_r48 && cd android-11.0.0_r48
repo init -u https://android.googlesource.com/platform/manifest -b android-11.0.0_r48 --partial-clone --clone-filter=blob:restrict=10M
git clone https://github.com/android-rpi/local_manifests .repo/local_manifests -b arpi-11
repo sync

“repo init” will ask you for some private information. It’s collected by Google. To study extra about optimizations right here, test this handbook: https://docs.gitlab.com/ee/topics/git/partial_clone.html. ‘git clone’ provides a customized code from Android RPI mission (https://groups.google.com/g/android-rpi) with drivers in your Raspberry Pi. The mission is nice and it’s all you want if you wish to run Android TV. To run Android Automotive OS, we’ll want to regulate it barely (see “Changes” part beneath). ‘repo sync’ will take a while as a result of it’s essential obtain round 200GB of code. If in case you have a strong machine with an important Web connection, you should use extra threads with ‘-j X’ parameter added to the command. The default thread rely is 4. If in case you have already synchronized your supply code with out android-rpi native manifest, it’s essential add –force-sync to the ’repo-sync’ command.

Changes

All adjustments from this part can obtain as a patch file connected to this text. See the “Path file” part beneath.

Android-rpi supplies Android TV for Raspberry Pi. We have to take away the TV-related configuration and add the Automotive OS one.

Let’s begin with eradicating pointless information. You’ll be able to safely take away the next information and directories:

  • gadget/arpi/rpi4/overlay/frameworks/base/core/res/res/anim
  • gadget/arpi/rpi4/overlay/frameworks/base/core/res/res/values-television
  • gadget/arpi/rpi4/overlay/frameworks/base/core/res/res/values/dimens.xml
  • gadget/arpi/rpi4/overlay/frameworks/base/core/res/res/values/kinds.xml
  • gadget/arpi/rpi4/overlay/frameworks/base/packages

To take away the consumer discover display screen not wanted in Automotive OS, create a brand new file gadget/arpi/rpi4/overlay/packages/companies/Automobile/service/res/values/config.xml with the next content material:

<?xml model="1.0" encoding="utf-8"?>
<sources xmlns:xliff="urn:oasis:names:tc:xliff:doc:1.2"> 
  <string title="config_userNoticeUiService" translatable="false"></string>
</sources>

To interchange the essential TV overlay config with the Automotive overlay config, modify the configuration in gadget/arpi/rpi4/overlay/frameworks/base/core/res/res/values/config.xml.

Take away:

  • <integer title=”config_defaultUiModeType”>4</integer> <!–disable compelled UI_MODE_TYPE_TELEVISION, as there’s solely MODE_TYPE_CAR obtainable now–>
  • <integer title=”config_longPressOnHomeBehavior”>0</integer> <!–disable dwelling button lengthy press motion–>
  • <bool title=”config_hasPermanentDpad”>true</bool> <!–disable D-pad–>
  • <string title=”config_appsAuthorizedForSharedAccounts”>;com.android.television.settings;</string> <!–take away pointless entry for a shared account as there’s nothing in com.android.television.* now–>

… and add:

  • <bool title=”config_showNavigationBar”>true</bool> <!–allow software program navigation bar, as there is no such thing as a hardwave one–>
  • <bool title=”config_enableMultiUserUI”>true</bool> <!–allow multi-user, as AAOS makes use of background processes referred to as in one other classes –>
  • <integer title=”config_multiuserMaximumUsers”>8</integer> <!–set most consumer rely, required by the earlier one–>

Additionally in gadget/arpi/rpi4/overlay/frameworks/base/packages/SystemUI/res/values/config.xml, take away <string title=”config_statusBarComponent” translatable=”false”>com.android.systemui.statusbar.television.TvStatusBar</string>.

Now let’s rename the android-rpi unique /gadget/arpi/rpi4/rpi4.mk to /gadget/arpi/rpi4/android_rpi4.mk. We have to modify the file a bit of bit.

Take away the next variables definitions. A few of them you’ll re-create in one other file, whereas a few of them aren’t wanted.

  • PRODUCT_NAME
  • PRODUCT_DEVICE
  • PRODUCT_BRAND
  • PRODUCT_MANUFACTURER
  • PRODUCT_MODEL
  • USE_OEM_TV_APP
  • DEVICE_PACKAGE_OVERLAYS
  • PRODUCT_AAPT_PRED_CONFIG
  • PRODUCT_CHARACTERISTICS

Take away the next invocations. We’re going to name obligatory exterior information in one other mk file.

  • $(name inherit-product, gadget/google/atv/merchandise/atv_base.mk)
  • $(name inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk)
  • $(name inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
  • embrace frameworks/native/construct/tablet-10in-xhdpi-2048-dalvik-heap.mk

In PRODUCT_PROPERTY_OVERRIDES take away debug.drm.mode.pressure=1280×720 and add the next properties. This fashion you take away the TV launcher configuration and override the default automotive launcher configuration.

  • dalvik.vm.dex2oat64.enabled=true
  • keyguard.no_require_sim=true
  • ro.logd.measurement=1m

Now it’s essential fully take away the android-rpi TV launcher and add RenderScript assist for Automotive OS. In PRODUCT_PACKAGES take away:

… and add:

Create a brand new rpi4.mk4 with the next content material:

PRODUCT_PACKAGE_OVERLAYS += gadget/generic/automobile/widespread/overlay
$(name inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
$(name inherit-product, gadget/arpi/rpi4/android_rpi4.mk)
$(name inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
$(name inherit-product, gadget/generic/automobile/widespread/automobile.mk)
PRODUCT_SYSTEM_DEFAULT_PROPERTIES += 
    android.automobile.number_pre_created_users=1 
    android.automobile.number_pre_created_guests=1 
    android.automobile.user_hal_enabled=true
DEVICE_PACKAGE_OVERLAYS += gadget/arpi/rpi4/overlay gadget/generic/automobile/car_x86_64/overlay

PRODUCT_NAME := rpi4
PRODUCT_DEVICE := rpi4
PRODUCT_BRAND := arpi
PRODUCT_MODEL := Raspberry Pi 4
PRODUCT_MANUFACTURER := GrapeUp and ARPi

As a result of license, keep in mind so as to add your self to the PRODUCT_MANUFACTURER area.

Now you will have two mk information – android-rpi.mk is borrowed from android-rpi mission and adjusted, and rpi.mk comprises all adjustments for Automotive OS. You’ll be able to meld these two collectively or cut up them into extra information for those who’d like, however needless to say the order of invocations does matter (not all the time, however nonetheless). 

As Android Automotive OS is greater than Android TV, we have to improve the system partition measurement to suit the brand new picture. In gadget/arpi/rpi4/BoardConfig.mk improve BOARD_SYSTEMIMAGE_PARTITION_SIZE to 2147483648, which suggests 2GB.

You have to apply all adjustments described in https://github.com/android-rpi/device_arpi_rpi4/wiki/arpi-11-:-framework-patch too. These adjustments are additionally included within the patch file connected.

Should you use the 8GB model of Raspberry Pi, it’s essential exchange gadget/arpi/rpi4/boot/fixup4.dat and gadget/arpi/rpi4/boot/start4.elf information. You’ll find the right information within the patch file connected or chances are you’ll use the official supply: https://github.com/raspberrypi/firmware/tree/master/boot. It’s most likely not wanted for 4GB model of Raspberry, however I don’t have such a tool for verification. 

Path file 

Should you favor to use all adjustments described above as a single file, go to your sources listing and run ‘git apply –no-index <path_to_patch_file>’. There’s additionally a boot animation changed within the patch file. If you wish to create one in every of your personal, comply with the official handbook right here: https://android.googlesource.com/platform/frameworks/base/+/master/cmds/bootanimation/FORMAT.md.

Now we are able to construct!

That’s the straightforward half. Simply run a couple of instructions from beneath. Firstly, we have to construct a customized kernel for Android. ‘merge_config.sh’ script simply configures all variables required. The primary ‘make’ command builds the actual kernel picture (which might take a couple of minutes). Subsequent, construct a tool tree configuration. 

cd kernel/arpi
ARCH=arm64 scripts/kconfig/merge_config.sh arch/arm64/configs/bcm2711_defconfig kernel/configs/android-base.config kernel/configs/android-recommended.config
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make Picture.gz
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- DTC_FLAGS="-@" make broadcom/bcm2711-rpi-4-b.dtb
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- DTC_FLAGS="-@" make overlays/vc4-kms-v3d-pi4.dtbo
cd ../..

The following half is to construct all the system. “envsetup.sh” script units up variables and provides customized instructions to your terminal. Then you possibly can decide the right pair of Android variations and gadgets with “lunch”. You’ll be able to run it with out parameters to see (nearly) all doable configurations. On this step, you possibly can determine to construct a system for devoted {hardware} (eg. Dragonboard) and swap between telephone/pill/TV/wearable/automotive variations of Android. The final line is an actual constructing. We are able to’t run simply “make” or “m”, as documented within the official handbook as a result of we have to create three particular pictures to jot down them on an SD card and run them on Raspberry Pi. Exchange “X” in ‘-j X’ with the variety of threads you need to use. The default worth is the variety of logical processors in your laptop. 

supply construct/envsetup.sh
lunch rpi4-eng
make -j X ramdisk systemimage vendorimage

I hope you will have a pleasant e-book subsequent to you as a result of the final constructing takes a couple of hours relying in your {hardware}. Excellent news!  If it’s essential adapt one thing and construct once more, most often you simply want the three final strains (and even simply the final one) – to supply the surroundings setup, to choose the lunch configuration, and to make ramdisk, system, and vendor pictures. And it takes hours for the primary time solely. 

Creating an SD card 

This step appears to be straightforward, however it isn’t. WSL doesn’t comprise drivers for the USB card reader. You should utilize usbip to ahead a tool from Home windows to the subsystem, however it doesn’t work nicely with exterior storage with out partitions. The answer is a VirtualBox with Ubuntu put in. Simply create a digital machine, set up Ubuntu, and set up Visitor Additions. Then you possibly can join the cardboard reader and go it to the digital machine. Should you’re a minimalist, you should use Ubuntu Server or every other Linux distribution you want. Bear in mind that utilizing a card reader constructed into your laptop could also be difficult relying on drivers and the {hardware} connection kind (USB-like, or PCI-e). 

Now, it’s essential create a partition schema on the SD card. I assume the cardboard is loaded to the system as /dev/sdb. Verify your configuration earlier than persevering with to keep away from formatting your predominant drive or one other catastrophe. Let’s erase the present partition desk and create a brand new one. 

sudo umount /dev/sdb*
sudo wipefs -a /dev/sdb
sudo fdisk /dev/sdb

Now let’s create partitions. First, you want a 128MB energetic partition of the W95 FAT32 (LBA) kind, second a 2GB Linux partition, third a 128MB Linux partition, and the remainder of the cardboard for consumer information (additionally Linux partition). Right here’s find out how to navigate by fdisk menu to configure all partitions.

Welcome to fdisk (util-linux 2.37.2).
Modifications will stay in reminiscence solely, till you determine to jot down them.
Watch out earlier than utilizing the write command.
Machine doesn't comprise a acknowledged partition desk.
Created a brand new DOS disklabel with disk identifier 0x179fb9bc.
Command (m for assist): n
Partition kind
   p   main (0 main, 0 prolonged, 4 free)
   e   prolonged (container for logical partitions)
Choose (default p): 
Utilizing default response p.
Partition quantity (1-4, default 1): 
First sector (2048-61022207, default 2048): 
Final sector, +/-sectors or +/-sizeK,M,G,T,P (2048-61022207, default 61022207): +128M
Created a brand new partition 1 of kind 'Linux' and of measurement 128 MiB.
Command (m for assist): a
Chosen partition 1
The bootable flag on partition 1 is enabled now.
Command (m for assist): t
Chosen partition 1
Hex code or alias (kind L to listing all): 0c
Modified kind of partition 'Linux' to 'W95 FAT32 (LBA)'.
Command (m for assist): n
Partition kind
   p   main (1 main, 0 prolonged, 3 free)
   e   prolonged (container for logical partitions)
Choose (default p): 
Utilizing default response p.
Partition quantity (2-4, default 2): 
First sector (264192-61022207, default 264192): 
Final sector, +/-sectors or +/-sizeK,M,G,T,P (264192-61022207, default 61022207): +2G
Created a brand new partition 2 of kind 'Linux' and of measurement 2 GiB.
Command (m for assist): n
Partition kind
   p   main (2 main, 0 prolonged, 2 free)
   e   prolonged (container for logical partitions)
Choose (default p): 
Utilizing default response p.
Partition quantity (3,4, default 3): 
First sector (4458496-61022207, default 4458496): 
Final sector, +/-sectors or +/-sizeK,M,G,T,P (4458496-61022207, default 61022207): +128M
Created a brand new partition 3 of kind 'Linux' and of measurement 128 MiB.
Command (m for assist): n
Partition kind
   p   main (3 main, 0 prolonged, 1 free)
   e   prolonged (container for logical partitions)
Choose (default e): p
Chosen partition 4
First sector (4720640-61022207, default 4720640): 
Final sector, +/-sectors or +/-sizeK,M,G,T,P (4720640-61022207, default 61022207):
Created a brand new partition 4 of kind 'Linux' and of measurement 26,8 GiB.
Command (m for assist): w
The partition desk has been altered.
Calling ioctl() to re-read partition desk.
Syncing disks.

Watch out with the final partition – fdisk proposes creating an prolonged one by default, which isn’t wanted in our use case.

Should you don’t do it for the primary time on the identical card, you may even see a warning that some partition already comprises a file system signature. You’ll be able to safely conform to take away it. 

Partition #4 comprises a ext4 signature.
Do you need to take away the signature? [Y]es/[N]o: Y
The signature can be eliminated by a write command.

Now, let’s provide file techniques for the primary and the final partitions. 

sudo mkdosfs -F 32 /dev/sdb1
sudo mkfs.ext4 -L userdata /dev/sdb4

We gained’t write something to the final one, because it’s for consumer information solely and can be crammed by Android through the first boot. However we have to write some information for the primary one. Let’s create a brief mount listing below /mnt/p1 (like “partition 1”), mount it, and duplicate the required information from the Android constructed within the earlier part. It’s unusual, however we’re going to repeat information from one digital machine (WSL) to a different (VirtualBox). You’ll be able to merely mount a wsl drive as a shared folder in VirtualBox. Should you don’t see a WSL drive in your Home windows Explorer, you possibly can map it as a community drive utilizing “wsl$Ubuntu” path

sudo mkdir /mnt/p1
sudo mount /dev/sdb1 /mnt/p1
sudo mkdir /mnt/p1/overlays
cd <PATH_TO_YOUR_ANDROID_SOURCES_IN_WSL>
sudo cp gadget/arpi/rpi4/boot/* /mnt/p1
sudo cp kernel/arpi/arch/arm64/boot/Picture.gz /mnt/p1
sudo cp kernel/arpi/arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dtb /mnt/p1
sudo cp kernel/arpi/arch/arm/boot/dts/overlays/vc4-kms-v3d-pi4.dtbo /mnt/p1/overlays/
sudo cp out/goal/product/rpi4/ramdisk.img /mnt/p1
sudo umount /mnt/p1
sudo rm -rf /mnt/p1

Should you’re wanting on the official android-rpi mission handbook, there’s a completely different path for vc4-kms-v3d-pi4.dtbo file. That’s OK – they use a symbolic hyperlink we’re unable to make use of on this filesystem. 

Generally, you possibly can see an error message when creating an “overlays” listing. It occurs occasionally, as a result of “mount” returns to the console earlier than actually mounting the drive. In such a case, simply name “mkdir” once more. Pay attention to that, particularly for those who’re going to copy-paste all the itemizing from above. 

Now, let’s copy the 2 remaining partitions. Should you’re scuffling with dd command (it could dangle), you possibly can attempt to copy massive *.img information from WSL to VirtualBox first.

cd <PATH_TO_YOUR_ANDROID_SOURCES_IN_WSL>/out/goal/product/rpi4/
sudo dd if=system.img of=/dev/sdb2 bs=1M standing=progress
sudo dd if=vendor.img of=/dev/sdb3 bs=1M standing=progress

Congratulations!

You’re accomplished. You’ve downloaded, ready, constructed, and saved your personal Android Automotive OS. Now you possibly can put the SD card into Raspberry, and join all cables (ensure you join the Raspberry energy cable on the finish). There isn’t any “energy” button, and it doesn’t matter which micro-HDMI or USB port of Raspberry you employ. It’s now time to take pleasure in your personal Android Automotive OS! 

If it doesn’t work

The world is just not excellent and typically one thing goes terribly flawed. Should you see the boot animation for a very long time, or in case your gadget crashes in a loop a couple of seconds after boot, you possibly can attempt to debug it.

You want a USB-TTL bridge (like this one https://www.sunrom.com/p/cp2102-usb-ttl-uart-module) to attach the right pins from the Raspberry to the USB. You have to join pin 6 (floor) to the GND pin within the bridge, pin 8 (RXD) to the RXD pin of the bridge and pin 10 (TXD) to the TXD pin of the bridge. If you wish to energy the Raspberry through the bridge, it’s essential additionally join pin 2 to +5V pin of the bridge. It’s not advisable, due to the decrease voltage, so your system is likely to be unstable. Should you don’t have an influence adapter, you possibly can merely join a USB cable between your laptop port and the USB C port of the Raspberry. Warning! You’ll be able to’t join each a +5V connector right here and a USB C energy port of the Raspberry otherwise you’ll burn the Raspberry board. 

See the schema for the connection reference.

The picture relies on 20171226043249PINOUT-USBTTL-CP2102.pdf (staticbg.com) and File:RaspberryPi 4 Model B.svg – Wikimedia Commons

Relying in your bridge mannequin, chances are you’ll want an extra driver. I exploit this one: https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads.

Whenever you join the +5V pin or USB-C energy adapter (once more, by no means each on the identical time!), the Raspberry begins. Now you possibly can open Putty and connect with your Android. Decide Serial and sort COMX within the serial line definition. X is the variety of your COM port. You’ll be able to test it in your gadget supervisor – search for “USB to UART bridge (COM4)” or the like. The right connection pace is 115200.

Open the connection to entry the Android shell. By default, Android spawns all logs to the usual output, so it is best to see a whole lot of them instantly. Anyway, it’s dual-side communication and you’ve got full terminal entry to your Android if it’s essential test/modify any file or name any command. Simply strike enter to see the command immediate. You’ll be able to even name ‘su’ to achieve superuser entry in your Android working on Raspberry. 

Connecting through adb 

If you wish to use Android Debug Bridge to connect with your gadget, utilizing a USB bridge is just not sufficient. When working ‘adb gadgets’ in your laptop, the Android Automotive OS working on Raspberry is just not acknowledged. You should utilize a putty connection to activate a TCP debug bridge as an alternative. 

Be sure you’ve related Android and your laptop to the identical community. Open putty and connect with the working Android console. Log as root and allow ADB through TCP. Then test your IP tackle. 

su
setprop service.adb.tcp.port 5555
cease adbd
begin adbd
ifconfig wlan0

Now, utilizing your Home windows command line, go to the Android SDK platform-tools listing and connect with your gadget. As you possibly can see, the IP tackle of mine Raspnberry is 192.168.50.47.

cd %userprofilepercentAppDataLocalAndroidSdkplatform-tools
adb join 192.168.50.47:5555

If you wish to use ADB in WSL, you possibly can hyperlink the Home windows program in WSL utilizing the next command.

sudo ln -s /mnt/c/Customers/<your_username>/AppData/Native/Android/Sdk/platform-tools/adb.exe /usr/bin/adb

Now you can use ADB to make use of logcat with out putty or to put in functions with out manually transferring APK information to the SD card. Enjoyable reality – for those who use a USB bridge and USB energy provide, you will have two bodily connections between your laptop and the Android-running one, nevertheless, you continue to want to make use of ADB over WiFi to make use of the debug bridge.

Abstract

That’s all. Android Automotive OS 11 is working. You’ll be able to set up the apps you want, take them to your automobile, or do no matter you’d like with them.  Utilizing {hardware} as an alternative of an emulator lets you manually handle partitions (e.g. for the OTA replace) and join exterior gadgets like an actual GPS receiver or accelerometer. The naked steel {hardware} overperforms the emulator too. And most significantly – you possibly can simply take it to your automobile, obtain energy from an in-car USB port, join it to an ODB-II port and run real-life checks with out a laptop computer.