Android-x86 has anyone btdtgtp ? (for smart home)

Soldato
Joined
1 Mar 2010
Posts
21,911
Has anyone dual booted (or one-shot run) x86 android - https://www.android-x86.org/ , as an alternative to using an emulator.

I have an older windows XP laptop (and windows tablet) I fancied trying it on, for running some Android Apps, that will not work correctly with an emulator, since that does not provide a wifi interface, it should be faster too.

Apps like those that communicate with smart devices, hue/sengled.

I was going to use rufus and put the ISO on a USB drive.

Just started using Nox emulator with Nougat upgrade - whats the catch ?

not for plaing games, but just access to a few android apps.
with hardware acceleration, it seems much faster than either bluestacks/Andy or googles android studio.

After it starts, I do block some IP addresses in the hosts file, in windows
per https://www.reddit.com/r/noxappplayer/comments/5nmoyf/stop_nox_from_installing_random_apps/
theoretically to avoids it loading unwanted apps.
[also https://www.youtube.com/watch?v=vyQK2oIJvug]

The above article suggests blocking in both windows, and rooted android, but, I cannot find a free hosts editor for android,
and have not yet researched a better technique.

Anyway has anyone had any problems with it ??
 

Pho

Pho

Soldato
Joined
18 Oct 2002
Posts
9,324
Location
Derbyshire
I'd have thought you could run it in Hyper-V/Vmware/VirtualBox and pass through WiFi if you needed it rather than booting it directly.

If you're looking for home automation you might want to try out https://www.home-assistant.io/ running on a Raspberry PI / Virtual Machine. It works with Hue, Nest, smart switches, etc etc and lets you easily set-up automation between them. Really good.
 
Soldato
OP
Joined
1 Mar 2010
Posts
21,911
Dual booting android on an old laptop, is of intertest on its own (new lease of life they only have xp)

but, for the home automation, I had already tried that Noxplayer and other emulators that use vmware,
the issue is that hue and other systems need 2 - way communications with hubs/servers, it's like trying to setup a web server in an emulator,
so would need a port redirection mechanism to get the traffic to the emulator.

eg
49472100992_5515603f3b_c_d.jpg


To initially setup the zigbee bulbs, some of the manufacturer apps give more control than you can get with a home-assistant integration, hence I looked at the two mechanisms as complimentary.
I'd been looking at this usb/windows option https://gadget-freakz.com/diy-zigbee-gateway
 

Pho

Pho

Soldato
Joined
18 Oct 2002
Posts
9,324
Location
Derbyshire
Every hypervisor I've used let you connect the VM directly to the network so it'll get an IP from your router. You'll then be able to talk to it as if it were any physical device on the network.
 
Soldato
OP
Joined
1 Mar 2010
Posts
21,911
OK , I'll look again, I'd been put off by this kind of discourse https://developer.android.com/studio/run/emulator-networking

Using network redirection
To communicate with an emulator instance behind its virtual router, you need to set up network redirection on the virtual router. Clients can then connect to a specified guest port on the router, while the router directs traffic to/from that port to the emulated device host port.

To set up the network redirection, you create a mapping of host and guest ports/addresses on the emulator instance. There are two ways to set up network redirection: using emulator console commands and using the adb tool, as described below.

Setting up redirection through the Emulator Console
Each emulator instance provides a control console that you can connect to, to issue commands that are specific to that instance. You can use the redir console command to set up redirection as needed for an emulator instance.

First, determine the console port number for the target emulator instance. For example, the console port number for the first emulator instance launched is 5554. Next, connect to the console of the target emulator instance, specifying its console port number, as follows:
 

Pho

Pho

Soldato
Joined
18 Oct 2002
Posts
9,324
Location
Derbyshire
I think that's more about all the network options you can simulate in the emulator when you're developing apps to simulate various situations.

I just ran Android x86 in Hyper-V using the guide from https://linustechtips.com/main/topic/764366-guide-how-to-run-android-x86-on-hyper-v/ - took 5 minutes, and 3 of that was downloading it! Inside Android you'll see a fake virtual wireless access point; join to that and it'll then give you internet.

It was also getting its IP from my router which means you should be fine to talk to it.

ODdS5Iu.png

vKN2TEh.png
 
Soldato
OP
Joined
1 Mar 2010
Posts
21,911
Inside Android you'll see a fake virtual wireless access point
for the android virtual device to register the hub (which can then find the bulbs) I think it needs to be on the real access point the hub is connected too, and which the device running the emulation shares, since the android device needs to (multicast) broadcast to all the devices on the ssid to find the hub.
I need to install wireshark, or something to try and understand the traffic
 

Pho

Pho

Soldato
Joined
18 Oct 2002
Posts
9,324
Location
Derbyshire
Wouldn't it be easier to use a real Android device? :p

It works fine connected to my Hue bridge with the fake wifi:
dY53gaU.png



What some people at work do with Windows guests is pass a USB wifi dongle through to the virtual machine so they can then access real wifi networks without a simulated network layer in-between. You'd just need to find which chipsets are supported on Android x86.
 
Soldato
OP
Joined
1 Mar 2010
Posts
21,911
Wouldn't it be easier to use a real Android device? :p
It works fine connected to my Hue bridge with the fake wifi:
re-purposing old tablets(hp slate, linx), +laptops with Android, sounds like a good afterlife -

thanks - ok I'll indeed try android-x86 with its wifi.

If you're looking for home automation you might want to try out https://www.home-assistant.io/ running on a Raspberry PI / Virtual Machine. It works with Hue, Nest, smart switches, etc etc and lets you easily set-up automation between them. Really good.
so does (your?) raspberry pie act as a zigbee hub itself, or, the existing hue hub remains ?
in which case, it's disappointing that the hue hubs are not intelligent enough to have complex automation algorithms running on them directly, as opposed to needing a permanently on PI, too.

[
I'd been looking at this usb/windows option https://gadget-freakz.com/diy-zigbee-gateway
that was hopefully a lowish cost, zigbee hub, to erradicate other hubs
]
 
Soldato
OP
Joined
1 Mar 2010
Posts
21,911
well (easily) tried android-x86 iso live boot via a usb stick, courtesy of rufus, on an old laptop, booted fine,

the iso had no linux drivers for my wifi card, which, is apparently normal, connection via ethernet runs fine

and no sign of the promised
  • Simulate WiFi adapter by Ethernet to increase app compatibility.


49478881038_b2e7f10d26_w_d.jpg
 

Pho

Pho

Soldato
Joined
18 Oct 2002
Posts
9,324
Location
Derbyshire
so does (your?) raspberry pie act as a zigbee hub itself, or, the existing hue hub remains ?
in which case, it's disappointing that the hue hubs are not intelligent enough to have complex automation algorithms running on them directly, as opposed to needing a permanently on PI, too.

[

that was hopefully a lowish cost, zigbee hub, to erradicate other hubs
]

I'm using the Hue bridge but you can use a USB zigbee gateway if you want in the pie. From what I've read people use deCONZ with a Conbee USB bridge (not sure if this is the exact ConBee one people use)

If you pair your lights to another bridge I think you'll lose a lot of the Hue features like entertainment and ability to use Hue compatible apps unless you can configure the Pie to emulate a Hue bridge, not sure.

A pi uses ~10w so it's not the end of the world. Third party hue apps (All4Hue/iConnectHue) can let you set-up much more complex routines etc than the default Hue app does.. have you tried these?

I was mostly looking at Home Assistant to integrate several different smart things rather than because I felt the Hue was lacking.

well (easily) tried android-x86 iso live boot via a usb stick, courtesy of rufus, on an old laptop, booted fine,

the iso had no linux drivers for my wifi card, which, is apparently normal, connection via ethernet runs fine

and no sign of the promised
  • Simulate WiFi adapter by Ethernet to increase app compatibility.

I'm not sure. I'd just run it in a VM if I were you, less hassle and probably more efficient than an old XP laptop.

Maybe just getting a cheap USB wifi dongle that has the necessary drivers in Android-x86 is all you need? I'm sure they'll only be a few quid.
 
Soldato
OP
Joined
1 Mar 2010
Posts
21,911
I think you'll lose a lot of the Hue features like entertainment
ok - I'd thought Hue protocols had been mapped out, by packet analysis

have you tried these?
the thing I want to setup is a one touch zigbee switch (tradfri probably) method for a light, so that, you could, depending on the duration of press, cycle through a number of scenes, low intensity night time 2700k, to higher intensity day time 4000k ... which would be great for landing lights.
 

Pho

Pho

Soldato
Joined
18 Oct 2002
Posts
9,324
Location
Derbyshire
They may have been I'm not too sure, don't take my word for it :).

You can definitely use the Hue dimmer switch to configure several different scenes that you can rotate through. E.g, click 1 = scene 1, click 2 = scene 2, etc. I configured all mine with Hue Essentials which is far nicer than the official app in my opinion. I see no reason why you can't do it with a generic one-touch switch either.

To be fair to Philips, they've opened up their hub to make integrating Tradfri kit and other manufactures things really simple.
 
Soldato
OP
Joined
1 Mar 2010
Posts
21,911
Third party hue apps (All4Hue/iConnectHue) can let you set-up much more complex routines etc than the default Hue app
I don't understand if these just unlock capabilities on the hue hub, which runs the routines nonetheless, or,
if the app is running/scheduling from its host (phone/PI), so the hue hub has to be available for the app to connect too, all the time. ?
 
Back
Top Bottom