From 800356790df157e7ae2584d695334372f22bf6c0 Mon Sep 17 00:00:00 2001 From: threeoh6000 Date: Wed, 13 Nov 2024 16:23:19 +0000 Subject: [PATCH] add preliminary android support --- distro_machine_detection.7 | 4 ++++ system_detection.2 | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/distro_machine_detection.7 b/distro_machine_detection.7 index 28e3602..f9a6bfd 100644 --- a/distro_machine_detection.7 +++ b/distro_machine_detection.7 @@ -37,6 +37,10 @@ if [ "$subtype" = "proxmox" ]; then fi fi fi +if [ "$subtype" = "android" ]; then + machine="$(getprop ro.product.manufacturer) $(getprop ro.product.model)" +fi + if [ "$system_type" = "openbsd" ]; then if [ "$hasawk" -eq 1 ]; then distro="revision $(sysctl kern.osrevision | awk -F "=" '{print $2}')" diff --git a/system_detection.2 b/system_detection.2 index c8997db..5cc3606 100644 --- a/system_detection.2 +++ b/system_detection.2 @@ -12,6 +12,10 @@ if [ "$(uname -s)" = "Linux" ] && [ "$system_type" = "unknown" ]; then if [ "$?" -eq 0 ] && [ "$subtype" = "none" ]; then subtype="proxmox" fi + command -v getprop >>/dev/null + if [ "$?" -eq 0 ] && [ "$subtype" = "none" ]; then + subtype="android" + fi fi if [ "$(uname -s)" = "OpenBSD" ] && [ "$system_type" = "unknown" ]; then system_type="openbsd"