[Nexus 5 Original Android Development] mrvelvet:
logcat for tethering error

The tethering issue appears to be down to iptables being unable to apply NAT rules.

There's a full logcat here: https://ptpb.pw/mIGD

and some possibly useful snippets here:

01-15 21:43:05.512 677 692 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.net.wifi.WIFI_AP_STATE_CHANGED flg=0x4000010 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver
01-15 21:43:05.512 677 677 D WifiService: handleWifiApStateChange: currentState=12 previousState=11 errorCode= -1 ifaceName=wlan0 mode=1
01-15 21:43:05.515 318 318 W wificond: Copy constructor is only used for unit tests
01-15 21:43:05.515 318 318 W wificond: Failed to get NL80211_ATTR_EXT_FEATURES
01-15 21:43:05.532 21945 21945 I hostapd : type=1400 audit(0.0:6708): avc: denied { noatsecure } for scontext=u:r:init:s0 tcontext=u:r:hal_wifi_hostapd_default:s0 tclass=process permissive=1

01-15 21:43:05.939 274 353 D TetherController: Tethering services running
01-15 21:43:05.966 21951 21951 I dnsmasq : type=1400 audit(0.0:6709): avc: denied { noatsecure } for scontext=u:r:netd:s0 tcontext=u:r:dnsmasq:s0 tclass=process permissive=1

01-15 21:43:06.150 274 353 W IptablesRestoreController: iptables-restore process 21961 terminated status=256
01-15 21:43:06.150 274 353 E IptablesRestoreController: iptables error:
01-15 21:43:06.150 274 353 E IptablesRestoreController: ------- COMMAND -------
01-15 21:43:06.150 274 353 E IptablesRestoreController: *raw
01-15 21:43:06.150 274 353 E IptablesRestoreController: -D tetherctrl_raw_PREROUTING -p tcp --dport 21 -i wlan0 -j CT --helper ftp
01-15 21:43:06.150 274 353 E IptablesRestoreController: COMMIT
01-15 21:43:06.150 274 353 E IptablesRestoreController: *filter
01-15 21:43:06.150 274 353 E IptablesRestoreController: -D tetherctrl_FORWARD -i rmnet0 -o wlan0 -m state --state ESTABLISHED,RELATED -g tetherctrl_counters
01-15 21:43:06.150 274 353 E IptablesRestoreController: -D tetherctrl_FORWARD -i wlan0 -o rmnet0 -m state --state INVALID -j DROP
01-15 21:43:06.150 274 353 E IptablesRestoreController: -D tetherctrl_FORWARD -i wlan0 -o rmnet0 -g tetherctrl_counters
01-15 21:43:06.150 274 353 E IptablesRestoreController: COMMIT
01-15 21:43:06.150 274 353 E IptablesRestoreController:
01-15 21:43:06.150 274 353 E IptablesRestoreController: ------- ERROR -------
01-15 21:43:06.150 274 353 E IptablesRestoreController: iptables-restore: line 2 failed
01-15 21:43:06.150 274 353 E IptablesRestoreController: ----------------------
01-15 21:43:06.150 274 353 E TetherController: Error setting forward rules
01-15 21:43:06.164 4731 4731 W LanLinkProvider: On 3G network, not sending broadcast.
01-15 21:43:06.188 4731 4731 W LanLinkProvider: On 3G network, not sending broadcast.
01-15 21:43:06.189 3824 3824 V RunConditionMonitor: decideShouldRun: prefRunOnMobileData && isMobileDataConnection
01-15 21:43:06.261 677 704 E Tethering: [wlan0] ERROR Exception enabling NAT: java.lang.IllegalStateException: command '1345 nat enable wlan0 rmnet0 1 192.168.43.0/24' failed with '400 1345 Nat operation failed (No such device)'
01-15 21:43:06.304 274 353 E BandwidthController: No prior alert set
01-15 21:43:06.305 274 353 W IptablesRestoreController: iptables-restore process 20961 terminated status=256
01-15 21:43:06.307 274 353 W IptablesRestoreController: iptables-restore process 21966 terminated status=256
01-15 21:43:06.378 274 352 D TetherController: Sending update msg to dnsmasq [update_ifaces|wlan0]
01-15 21:43:06.383 274 353 D TetherController: untetherInterface(wlan0)