Notice: this project is no longer maintained As an alternative, see: termux

Note: if you're coming here expecting to find a fix for ad-away, the dynamic dns client on this page isn't what you're looking for.

Goal

Update a dns record with bind's nsupdate client. This howto assumes you've already setup a dynamic dns server and have the key on your android.

Install the package

This requires that you have Android Ports installed.

Setup the environment

I put the ddns key in /data/local/root/ddns:

# ls -l /data/local/root/ddns/
total 17
-rw-------    1 root     root           118 Oct 22 11:17 dnskey.key
-rw-------    1 root     root           145 Oct 22 11:18 dnskey.private

Run nsupdate

Notes: bold = typed
This will update the IPv6 address record for phone.dynamic.example.com

/data/local/root # nsupdate -d -k ddns/dnskey
Creating key...
> server myddnsserver.example.com
> zone dynamic.example.com
> update delete phone.dynamic.example.com
> update add phone.dynamic.example.com 60 AAAA 2001:db8:f:cf88:7ee7:ff:fe10:cccc
> send
Sending update to 203.0.113.9#53
Outgoing update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:  22723
;; flags:; ZONE: 1, PREREQ: 0, UPDATE: 2, ADDITIONAL: 1
;; ZONE SECTION:
;dynamic.example.com.           IN      SOA

;; UPDATE SECTION:
phone.dynamic.example.com. 0      ANY     ANY
phone.dynamic.example.com. 60     IN      AAAA    2001:db8:f:cf88:7ee7:ff:fe10:cccc

;; TSIG PSEUDOSECTION:
updatedns.              0       ANY     TSIG    hmac-md5.sig-alg.reg.int. 1319300407 300 16 9qqwwEEEENNxxxxrrrr999== 22723 NOERROR 0 


Reply from update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:  22723
;; flags: qr; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 1
;; TSIG PSEUDOSECTION:
updatedns.              0       ANY     TSIG    hmac-md5.sig-alg.reg.int. 1319300392 300 16 ppppZZZZ4ssshhhhRRRRqq== 22723 NOERROR 0 

> quit

To verify your results

/data/local/root # dig +short phone.dynamic.example.com aaaa
2001:db8:f:cf88:7ee7:ff:fe10:cccc