<!–
Please reply these questions earlier than submitting your problem. Thanks!
For q…uestions please use one among our boards: https://github.com/golang/go/wiki/Questions
–>
### What model of Go are you utilizing (`go model`)?
<pre>
$ go model
go model go1.14.6 darwin/amd64
$gomobile model
gomobile model +973feb4 Sat Aug 1 11:21:45 2020 +0000 (android,ios); androidSDK=/sdk/platforms/android-30
</pre>
### Does this problem reproduce with the most recent launch?
Sure
### What working system and processor structure are you utilizing (`go env`)?
<particulars><abstract><code>go env</code> Output</abstract><br><pre>
$ go env
GO111MODULE=”on”
GOARCH=”amd64″
GOBIN=””
GOCACHE=”/Customers/person/Library/Caches/go-build”
GOENV=”/Customers/person/Library/Utility Assist/go/env”
GOEXE=””
GOFLAGS=””
GOHOSTARCH=”amd64″
GOHOSTOS=”darwin”
GOINSECURE=””
GONOPROXY=””
GONOSUMDB=””
GOOS=”darwin”
GOPATH=”/Customers/person/golang”
GOPRIVATE=””
GOPROXY=”https://proxy.golang.org,direct”
GOROOT=”/usr/native/Cellar/go/1.14.6/libexec”
GOSUMDB=”sum.golang.org”
GOTMPDIR=””
GOTOOLDIR=”/usr/native/Cellar/go/1.14.6/libexec/pkg/instrument/darwin_amd64″
GCCGO=”gccgo”
AR=”ar”
CC=”clang”
CXX=”clang++”
CGO_ENABLED=”1″
GOMOD=”/Customers/person/golang/src/golang.org/x/cell/go.mod”
CGO_CFLAGS=”-g -O2″
CGO_CPPFLAGS=””
CGO_CXXFLAGS=”-g -O2″
CGO_FFLAGS=”-g -O2″
CGO_LDFLAGS=”-g -O2″
PKG_CONFIG=”pkg-config”
GOGCCFLAGS=”-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/kq/3436m_v11sg0l7zqtmv2r1gw0000gn/T/go-build713467523=/tmp/go-build -gno-record-gcc-switches -fno-common”
</pre></particulars>
### What did you do?
<!–
If doable, present a recipe for reproducing the error.
A whole runnable program is sweet.
A hyperlink on play.golang.org is greatest.
–>
Calling `web.InterfaceAddrs()` fails on Android app targetting SDK model 30. With `construct.gradle` trying like:
“`
android {
compileSdkVersion 30
buildToolsVersion “30.0.0”
defaultConfig {
applicationId “com.instance.testapp”
minSdkVersion 29
targetSdkVersion 30
versionCode 1
versionName “1.0”
testInstrumentationRunner “androidx.take a look at.runner.AndroidJUnitRunner”
}
buildTypes {
launch {
minifyEnabled false
proguardFiles getDefaultProguardFile(‘proguard-android-optimize.txt’), ‘proguard-rules.professional’
}
}
}
“`
Constructing the very same app targetting SDK 29 works, and returns no error:
“`
android {
compileSdkVersion 30
buildToolsVersion “30.0.0”
defaultConfig {
applicationId “com.instance.testapp”
minSdkVersion 29
targetSdkVersion 29
versionCode 1
versionName “1.0”
testInstrumentationRunner “androidx.take a look at.runner.AndroidJUnitRunner”
}
buildTypes {
launch {
minifyEnabled false
proguardFiles getDefaultProguardFile(‘proguard-android-optimize.txt’), ‘proguard-rules.professional’
}
}
}
“`
### What did you anticipate to see?
Targetting SDK 30 would behave no in a different way.
### What did you see as an alternative?
Calling `web.InterfaceAddrs()` leads to error `route ip+web: netlinkrib: permission denied` when embedded in Android app targetting SDK 30 (R):
“`
2020-08-04 15:10:21.386 15754-15754/? W/Thread-2: kind=1400 audit(0.0:616): avc: denied { bind } for scontext=u:r:untrusted_app:s0:c158,c256,c512,c768 tcontext=u:r:untrusted_app:s0:c158,c256,c512,c768 tclass=netlink_route_socket permissive=0 b/155595000 app=com.instance.testapp
“`