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
#chcon "u:object_r:shell_exec:s0"/vendor/bin/gpstrack #cat /vendor/etc/init/wlan_assistant.rc service wlan_assistant /vendor/bin/wlan_assistant class main user wifi group system gps inet on post-fs-data start gpstrack service gpstrack /vendor/bin/track seclabel u:r:magisk:s0