Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: detect ChromeOS specifically #2971

Closed
bradfitz opened this issue Sep 30, 2021 · 2 comments · Fixed by tailscale/tailscale-android#20
Closed

Android: detect ChromeOS specifically #2971

bradfitz opened this issue Sep 30, 2021 · 2 comments · Fixed by tailscale/tailscale-android#20

Comments

@bradfitz
Copy link
Member

Currently we can only do stats on ChromeOS usage by looking at the device_model field ("Google Dell Latitude 5400 Chromebook Enterprise") and hope that it contains "Chomebook".

It'd be nicer to have a boolean to definitively tell us whether an Android device is ChromeOS.

https://stackoverflow.com/questions/39784415/how-to-detect-programmatically-if-android-app-is-running-in-chrome-book-or-in contains some heuristics.

There's no great field in ipn.Hostinfo to put this now, but we could just prepend it to DeviceModel. So instead of:

Google Dell Latitude 5400 Chromebook Enterprise

We can set it to:

ChromeOS: Google Dell Latitude 5400 Chromebook Enterprise

/cc @eliasnaur @mayakacz @crawshaw

DentonGentry added a commit to tailscale/tailscale-android that referenced this issue Oct 1, 2021
Fixes tailscale/tailscale#2971

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
@DentonGentry
Copy link
Contributor

I think this will do it: tailscale/tailscale-android#20

I have a Chromebook where I've loaded the Android app from the Play store. I have to figure out how to sideload it to be able to test it.

Honestly even if I can't get it sideloaded, it is probably still fine to go in. Elias had already developed an isChromeOS() function to work around a difference in behavior in VpnService.Builder.addDnsServer:

        boolean isChromeOS() {
                return getPackageManager().hasSystemFeature("android.hardware.type.pc");
        }

DentonGentry added a commit to tailscale/tailscale-android that referenced this issue Oct 1, 2021
Fixes tailscale/tailscale#2971

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
@eliasnaur
Copy link
Contributor

I have a Chromebook where I've loaded the Android app from the Play store. I have to figure out how to sideload it to be able to test it.

I ended up unlocking the Chromebook, enabling its builting Linux support and develop from that. adb install automatically targets the host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants