Home Assistant Core on Android Tablet

I don’t think you can install docker just anywhere, and for sure you can’t without root access. I can find this on the topic: Is it possible to install Docker using Termux? - Android Enthusiasts Stack Exchange

Without docker, well, it will require a whole bunch of operations to deal with dependencies, which is what this entire topic is about, and it’s not recommended for beginners. That said, if your Termux is disposable, feel free to follow the instructions from Home Assistant Core on Android Tablet - #217 by romanovj and see where it takes you.

you don’t need root for it

docker in termux requires unlocked bootloader and kernel with config for docker

Did a strace to try to see where it was coming from.

[...]
getpid()                                = 29096
getpid()                                = 29096
pidfd_open(29096, 0)                    = 29096
--- SIGSYS {si_signo=SIGSYS, si_code=SYS_SECCOMP, si_call_addr=0x797a580340, si_syscall=__NR_pidfd_open, si_arch=AUDIT_ARCH_AARCH64} ---
rt_sigaction(SIGSYS, NULL, {sa_handler=0x797c19815c, sa_mask=~[KILL STOP], sa_flags=SA_ONSTACK|SA_RESTART|SA_SIGINFO}, 8) = 0
[...]

So apparently it tried to open the file descriptor for the hass process, and failed? Weird.

yes i have developer unlocked
Android 11 64bit CPU 8Gb RAM

but now I don’t know how to get the homeassistant there

you need to compile custom kernel for docker

just use chroot or install it in termux

Any new ideas? Install homeassisstant supervised on termux via proot-distro debian?
Proot is slower and has some limitations homeassistant could work? There would be sudo and root as in linux. Maybe that would solve the unavailability of /proc/…

pkg install proot distro
proot-distro install debian
proot-distro login debian
apt update -y
apt upgrade -y
apt install sudo

This way I would have both sudo and root.
Install supervised Homeassistant.

you need docker for ha supervised

docker requires unlocked bootloader and custom kernel, and for custom kernel - working kernel sources for your device

I managed to copy paste enough commands from all over the internet to resolve the errors and get home assistant to start and be able to access the web interface. However after creating an account the interface will always show “Home Assistant is starting, please wait…”. On Termux after starting hass -v it seemingly locks up after some time with no more output. The last thing it said was “Setup of domain bluetooth took 0.1 seconds” and it has been stuck on that for 25 minutes. But sometimes it gets stuck on “Starting zeroconf broadcast” instead, which it passes other times

1 Like

HA loads modules in an asynchronous manner.
So the last message you see might not be the relevant one.
With that in mind, the first launches are always the longest since a lot of the required modules will download and install then. For me, for example, a first start might take between 30 to 50 minutes, especially if it has to recompile some stuff on the way.

What you can do:

  1. Analyse the full log for errors and processes in progress
  2. Check the current activity of your processes from the system point of view. See if anything related to HA or python is currently active.

Followed your instructions

Getting the error below :point_down: any help !

hass -v
2023-12-05 07:25:55.467 INFO (MainThread) [homeassistant.bootstrap] Config directory: /data/data/com.termux/files/home/.homeassistant
Bad system call

no problems with 2023.12.0 on fresh termux

2 Likes

Try to see my message and previous ones about the “bad system call”, earlier in this thread.
Basically it’s not solved but in my case using termux-chroot before launching HA allows it to work.

Thanks for good sharing. It’s helpful.
However, how to auto reboot the system when press “restart”? I tried to use Termux-services, but not worked.

reboot HA or Android?

Reboot HA.
I tried, but the Termux just stop without any following action.

What should be installed for this version? I tried with version 2023.11.0 and there was an error in py Turbo JPEG (you need version 1.7.1 and it returns an error in nampy) how can I overcome this?

editing: Ok now I see you updated the code. Thank you
I encountered a bus error, is there a way to solve it? (generic unrooted tablet)

while true; do hass -v; done

Hass will start again after stopping. Also you can write termux service or whatever

Thanks for the answer, I tried and the problem did not go away
I am attaching a screenshot of the error (when trying to load the browser)

1 Like

What about the usb dongles such as, Sonoff and Conbee?