Source https://xnux.eu/devices/feature/modem-pp.html#toc-unlock-adb-access
It's possible to access the Linux side of the modem via adb, or reboot the modem to fastboot mode and boot your own kernel, The modem is rooted by default, and you can install and run your own software inside the modem. It's possible to communicate between A64 and the modem's ARM CPU via USB serial port (ttyGS0 on modem side and ttyUSB1 on A64).
It's also possible to create your own URCs up to 128B in size by sending them as a datagram message to UNIX socket /tmp/.urc_sock. See urc.c.
To install your own program on the modem persistently you need to remount modem's root filesystem read write and install your program somewhere in /usr/bin. Add your startup script to /etc/init.d.
To get adb access to the modem:
- Get adb key via AT+QADBKEY?
- Enter the adb key to the unlocker utility
- Follow the instructions from the
qadbkey-unlock
- adb shell should get you a root shell on the modem
- in case the root shell is password protected, disable the root password
$ adb pull /etc/shadow $ sed -i 's/root:\(.*\.\)\:\(.*\)$/root::\2/' shadow $ adb push shadow /etc/shadow
- in case the root shell is password protected, disable the root password
- adb pull and adb push can be used to copy files to/from the modem