
Product
Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
github.com/norselabs/mobile
initialize your go module
i. go mod init
ii. replace gomobile remote repository using command : go mod edit -replace=golang.org/x/mobile@latest=github.com/MrKrisYu/mobile@latest
,or manually edit go.mod as following
module bonjour
go 1.21.1
replace golang.org/x/mobile v0.0.0 => github.com/MrKrisYu/mobile v0.0.0-20230925073923-bf58556eb872
require (
golang.org/x/mobile v0.0.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/tools v0.13.0 // indirect
)
iii. get gomobile/bind dependency
go env -w GOPROXY=https://goproxy.cn
go get golang.org/x/mobile/bind
install gomobile
i. git clone https://github.com/MrKrisYu/mobile.git
, then cd mobile/cmd/gomobile directory,
finally install gomobile.exe or gomobile(based on your os) using command: go install .
ii. initialize gomobile(On condition that you have already prepare NDK, Android SDK, JDK, ) using command: gomobile init
iii. due to gombile init
will automatically install gobind from golang.org/x/mobile, you need cd previous cloned project 's mobile/cmd/gobind directory and then open terminal and run command go install .
to replace gobind exectuable file.
compile AAR files
if you successful get gomobile executable file, now you are able to build aar using command: gomobile bind -target=android <YourPackage> -v
Import multi aar into Android Studio Project(The following will be referred to AS)
i. copy your aar files and gomobile-java.jar
(at libs directory) into your libs directory in AS project
ii. add some configuration into your application 's settings.gradle as following
//=============setting.gradle=================
dependencyResolutionManagement {
repositories {
flatDir {
dirs 'libs'
}
}
}
//=============build.gradle(Your Application)======
dependencies {
implementation(name: 'AAR-1-Module-From-Gomobile', ext: 'aar')
...
implementation(name: 'AAR-N-Module-From-Gomobile', ext: 'aar')
implementation(name: 'gomobile-java', ext: 'jar')
}
iii. sync your gradle setting, now you are able to use your libs.
The Go mobile repository holds packages and build tools for using Go on mobile platforms.
Package documentation as a starting point:
The Go Mobile project is experimental. Use this at your own risk. While we are working hard to improve it, neither Google nor the Go team can provide end-user support.
This is early work and installing the build system requires Go 1.5. Follow the instructions on golang.org/wiki/Mobile to install the gomobile command, build the basic and the bind example apps.
--
Contributions to Go are appreciated. See https://golang.org/doc/contribute.html.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.