You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.9 KiB

Setting up for WALT Android app development

In general WALT Android app has no special requirements but since WALT usually takes up the only available USB connector on the phone, the typical development using ADB via USB becomes difficult. Below are some options to overcome this problem.

Using a USB hub and a USB Ethernet adapter

ADB can work over TCP connections. The official documentation assumes that the TCP connection is established over WiFi, but a wired Ethernet connection can be used in the same way and is reported to work much better with ADB. Android will recognize and use most USB-Ethernet adapters out of the box.

  1. With the phone connected you computer via USB, run adb tcpip 5555 (you can replace 5555 with any port)
  2. Disconnect the phone from USB
  3. Connect a USB hub (preferably powered) to the phone using a USB-C to USB-A-female adapter or a USB-OTG adapter.
  4. Use the hub to connect WALT, Ethernet adapter and whatever other USB peripherals you might want to test using WALT

Note, this setup is sensitive to the order in which you connect the different components and adapters, experiments with it.

Using a ChromeOS device with Android

A ChromeOS device with Android (e.g. Asus Flip) is another convenient option.

Since Android on ChromeOS has no access to USB, it requires a TCP bridge script implemented in walt.py. Detailed instructions in Chromeos.md.

In order to set up your for Android development, use either the official guide for Android development on ChromeOS. Or the following short list:

  1. Log in to Chromebook via a non-guest account, also avoid restricted corporate/managed accounts
  2. Go to settings, scroll down to Google Play Store and click enable
  3. Click Manage your Android preferences and enable ADB debugging like on a regular Android device:
  4. Click About device
  5. Keep tapping the build number until it says “You are now a developer” (7 taps)
  6. Go back and click on Developer options
  7. Enable ADB debugging
  8. Get your Chromebook connected to a network so it would be accessible from you workstation
  9. Switch Chromebook to terminal via ctrl+alt+f2 and log in as root
  10. Run ifconfig to get the ip address of eth0 (or wlan0 if using wireless)
  11. On your workstation, run ssh root@ip_addr to verify that Chromebook is accessible
  12. Run adb connect ip_addr:22. From this point on Android studio and adb on your workstation should treat the Chromebook just like a regular Android device
  13. Run the WALT TCP bridge (more details here)
  14. scp the pywalt folder from your workstation and run the following on the Chromebook:
  15. iptables -A INPUT -p tcp --dport 50007 -j ACCEPT
  16. python walt.py -t bridge