1

I have an Android App which works fine on Chromebook. But not able to debug from local. Is there a way to debug Xamarin Android App on chromebook? Thanks

shiva
  • 11
  • 2
  • I can not found local debug, but remote debugging using ADB is possible. Follow instructions from here. https://developer.android.com/topic/arc/index.html Here is a blog abot remove debug using ADB http://opensourceforgeeks.blogspot.com/2016/12/debug-android-apps-on-chromebook-using.html – Leon Feb 19 '20 at 01:47

2 Answers2

4

Yes,

UPDATE: on some chrome books it might be possible to do this without steps 1 + 2, by instead enabling Linux and using the "Develop Android Apps" Linux options. However my chromebox doesn't appear to support this linux option, and so I'm unable to test this.

  1. Put Chromebook in to developer mode. details can be found here

  2. in shell (Ctrl-Alt-T in chomebook chrome browser, then type shell):

sudo crossystem dev_boot_signed_only=0

sudo /usr/libexec/debugd/helpers/dev_features_rootfs_verification

sudo reboot

then after reboot:

`sudo /usr/libexec/debugd/helpers/dev_features_ssh`
  1. Get ipaddress of chromebook. (eg 192.168.1.100)

  2. On windows box type: adb connect 192.168.1.100:22

type: adb devices

to confirm it worked.

more info can be found here

  1. The Chromebook should now be shown as a deployment target in visual studio.

deployment combo box in VS - showing chromeos device

Now you can debug from Visual Studio, like you would on a device connected via usb or on an emulator.

Tom
  • 6,325
  • 4
  • 31
  • 55
  • In newer versions of Chrome OS you no longer need to put it in developer mode, you can just "Enable Linux" from Settings. – Meekohi Dec 29 '20 at 15:48
  • @Meekohi - do you happen to know what version that is? or at least a version that works? (before I reset my chrome book to test this) – Tom Dec 29 '20 at 23:31
  • There is a list of supported devices at https://sites.google.com/a/chromium.org/dev/chromium-os/chrome-os-systems-supporting-linux -- I'm not exactly sure which OS version makes the switch, and/or whether older devices can be updated to support it. – Meekohi Dec 31 '20 at 01:08
  • Didn't work on my Lenovo Chrome book C330 running 87.0.4280.109. After enabling Linux, the Linux section failed to have the "Develop Android App" menu option. (And when I checked in android settings (Android preferences -> System -> Developer options), ADB debugging was greyed out, with the following message : "Turn on Chrome OS Developer Mode to enable ADB debugging" - Shame :( – Tom Jan 05 '21 at 01:35
0

I got this to work on my HP X360 Chromebook and was able to debug my Android app.

Steps were to: touch the clock, click the "config" gear icon to open the settings area.

Scroll to the bottom and click "Advanced", go to the "Developers" section and enable the Linux Development Environment. Once enabled there is a section that says "Develop Android Apps", within that there is "Enable ADB debugging". The system will reboot.

The last part for me was to go to my windows command line, find adb.exe and run the command adb connect .

Once I did that a dialog finally popped up on my Chromebook asking if I approved the connection. Only then was the device finally available in Visual Studio.

Lastly, I had to turn off Fast Deployment under "Android Settings" in Visual Studio under the Android project settings - I was getting an error about it requiring Run-as, which I could not figure out how to enable on my Chromebook.

xcr
  • 97
  • 1
  • 10