My phone Moto X 4 has LineageOS 17.1 installed and is rooted with magisk. I use the phone's hot spot as main mean to connect to the internet.
In this scenario the android device acts as DHCP server, therefore distributing random IP addresses in the 192.168.43.0/24 sub range. I would like to assign static IP addresses to my devices, then i can connect to them trough SSH easily. The clementine android remote also requires my laptop to be available on a fixed IP.
I do not like to carry a travel router for this basic network ability.
On android 9 this was possible by setting up the dnsmasq.conf file, setting the file permissions and configuring SELinux rules.
This workaround helped me to set it up.
Android uses dnsmasq as its DHCP/DNS server (up to Pie). So create the configuration file /etc/dnsmasq.conf with option dhcp-host=<MAC>,<IP>.