Skip to content

IPv6 Listening and Home Broadband Access

AndroidUse can bind the MCP server to IPv6 because the CLI parses --host and --port as a socket address. The default is local-only.

Prefer adb forwarding

For normal use, keep ANDROIDUSE_MCP_HOST=127.0.0.1 and use adb forward. Internet exposure should be a deliberate exception, not the default.

Phone-Side Listener

Bind to IPv6 all interfaces:

sh
adb shell 'su -M -c "mkdir -p /data/adb/modules/AndroidUse/.config/androiduse"'
adb shell 'su -M -c "printf \"%s\n\" ANDROIDUSE_MCP_HOST=:: > /data/adb/modules/AndroidUse/.config/androiduse/mcp.env"'
adb shell 'su -M -c "printf \"%s\n\" ANDROIDUSE_MCP_PORT=8765 >> /data/adb/modules/AndroidUse/.config/androiduse/mcp.env"'
adb shell 'su -M -c "sh /data/adb/modules/AndroidUse/boot-completed.sh"'

Use bracket syntax for IPv6 URLs:

sh
curl -H "Authorization: Bearer $ANDROIDUSE_MCP_SECRET" \
  "http://[240e:xxxx:....:abcd]:8765/mcp"

Home Router Firewall

Most home broadband IPv6 gives every LAN device a public IPv6 address, but the router still has a stateful inbound firewall. What router UIs describe as "IPv6 session", "IPv6 inbound firewall", or "IPv6 firewall" is often that stateful inbound filter.

Do not fully disable it for normal use. Open one inbound rule instead:

Router UI fieldValue
Source zoneWAN / Internet
DestinationPhone's current IPv6 address
ProtocolTCP
Destination port8765
ActionAllow / Accept
Session firewallKeep enabled if rule exceptions are supported

OpenWrt Example

sh
uci add firewall rule
uci set firewall.@rule[-1].name='Allow-AndroidUse-MCP-IPv6'
uci set firewall.@rule[-1].src='wan'
uci set firewall.@rule[-1].dest='lan'
uci set firewall.@rule[-1].proto='tcp'
uci set firewall.@rule[-1].dest_ip='240e:xxxx:....:phone'
uci set firewall.@rule[-1].dest_port='8765'
uci set firewall.@rule[-1].target='ACCEPT'
uci commit firewall
/etc/init.d/firewall reload

If your router only provides a global disable switch, use it only for a short test window, then turn it back on and use a targeted rule or VPN path.

Research and education use only.