Every digital device, no matter if it is running software by Microsoft or Google I consider basically compromised - they may as well ( and probably do ) have root access to it. However, me being me, I like having the same amount of access and information. Just in case my device gets stolen/lost/otherwise dissapears. For this I've created a small service that can be run on boot, based on the source code of "iwlist" - which is freely available and GPL'd.
This tool, which you can find below this post as source code, can connect to my GPS tracker server, and send it the current coordinates as found by the Android system, as well as all the nearby WiFi networks. This allows the server then to determine where the phone is. This file can be compiled with an arch arm64 installation, or any other arm64 linux machine.
gcc -o gpstrack -O3 -static phonetrack.c
service wlan_assistant /vendor/bin/wlan_assistant
group system gps inet
service gpstrack /vendor/bin/track