-
Notifications
You must be signed in to change notification settings - Fork 51
How To update AGPS
Adam Pigg edited this page Jun 4, 2023
·
4 revisions
AGPS files need to be downloaded from the Huami servers, then sent to the watch. This can be achieved with the following method
- Use the huami-token python tool to download the AGPS files
- git clone https://github.com/piggz/huami-token
- Use the Amazfish custom button handling to script downloading the files and uploading to the device
- Create a script harbour-amazfish-script.sh with the following content
#!/bin/sh
if [ "$1" == "3" ]; then
dbus-send --session --print-reply --dest=uk.co.piggz.amazfish /application uk.co.piggz.amazfish.sendAlert string:'' string:'AGPS' string:'Downloading files...' boolean:true
python3 ~/huami-token/huami_token.py -m <method> -g -e <email> -p <password>
dbus-send --session --print-reply --dest=uk.co.piggz.amazfish /application uk.co.piggz.amazfish.sendAlert string:'' string:'AGPS' string:'Uploading files...' boolean:true
dbus-send --session --print-reply --dest=uk.co.piggz.amazfish /application uk.co.piggz.amazfish.prepareFirmwareDownload string:'/home/defaultuser/gps_uihh.bin'
sleep 1
dbus-send --session --print-reply --dest=uk.co.piggz.amazfish /application uk.co.piggz.amazfish.startDownload
dbus-send --session --print-reply --dest=uk.co.piggz.amazfish /application uk.co.piggz.amazfish.sendAlert string:'' string:'AGPS' string:'AGPS Update Started' boolean:true
fi;
Change the method, email and passowrd to match your huami/amazfit account type (see the docs for huami-token)
- In Amazfish, Settings, Application, Button Actions, set the Tripe Press Action to Custom Script