Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
thinkpad tmp # go version
go version devel +d862753 Wed Sep 9 05:29:20 2015 +0000 linux/amd64
thinkpad tmp # rm -rf "${GOROOT}"/pkg/android_arm/*
thinkpad tmp # gomobile bind -a -v -x -o bukanir.aar -target android bukanir
GOMOBILE=/home/milann/golang/pkg/gomobile
WORK=/tmp/gomobile-work-826280634
write /tmp/gomobile-work-826280634/go_bukanir/go_bukanirmain.go
mkdir -p $WORK/go_bukanir
gobind -lang=go -outdir=$WORK/go_bukanir bukanir
write /tmp/gomobile-work-826280634/androidlib/main.go
mkdir -p $WORK/androidlib
GOOS=android GOARCH=arm GOARM=7 CC=$GOMOBILE/android-ndk-r10e/arm/bin/arm-linux-androideabi-gcc CXX=$GOMOBILE/android-ndk-r10e/arm/bin/arm-linux-androideabi-g++ CGO_ENABLED=1 go build -p=2 -pkgdir=$GOMOBILE/pkg_android_arm -tags="" -v -x -buildmode=c-shared -o=$WORK/android/src/main/jniLibs/armeabi-v7a/libgojni.so $WORK/androidlib/main.go
WORK=/tmp/go-build056669935
_/tmp/gomobile-work-826280634/go_bukanir
mkdir -p $WORK/_/tmp/gomobile-work-826280634/go_bukanir/_obj/
mkdir -p $WORK/_/tmp/gomobile-work-826280634/
cd /tmp/gomobile-work-826280634/go_bukanir
/home/milann/go/pkg/tool/linux_amd64/compile -o $WORK/_/tmp/gomobile-work-826280634/go_bukanir.a -trimpath $WORK -shared -p _/tmp/gomobile-work-826280634/go_bukanir -complete -installsuffix shared -buildid 6e2f268a747fce08732e118fdd3a425ec0e473c8 -D _/tmp/gomobile-work-826280634/go_bukanir -I $WORK -I /home/milann/golang/pkg/gomobile/pkg_android_arm -pack ./go_bukanirmain.go
command-line-arguments
mkdir -p $WORK/command-line-arguments/_obj/
mkdir -p $WORK/command-line-arguments/_obj/exe/
cd /tmp/gomobile-work-826280634/androidlib
/home/milann/go/pkg/tool/linux_amd64/compile -o $WORK/command-line-arguments.a -trimpath $WORK -shared -p main -complete -installsuffix shared -buildid b54f47ac119106d953b3f1e105bd49e2da3972d2 -D _/tmp/gomobile-work-826280634/androidlib -I $WORK -I /home/milann/golang/pkg/gomobile/pkg_android_arm -pack ./main.go
cd .
/home/milann/go/pkg/tool/linux_amd64/link -o $WORK/command-line-arguments/_obj/exe/a.out -L $WORK -L /home/milann/golang/pkg/gomobile/pkg_android_arm -installsuffix shared -extld=/home/milann/golang/pkg/gomobile/android-ndk-r10e/arm/bin/arm-linux-androideabi-gcc -buildmode=c-shared -buildid=b54f47ac119106d953b3f1e105bd49e2da3972d2 $WORK/command-line-arguments.a
mkdir -p /tmp/gomobile-work-826280634/android/src/main/jniLibs/armeabi-v7a/
mv $WORK/command-line-arguments/_obj/exe/a.out /tmp/gomobile-work-826280634/android/src/main/jniLibs/armeabi-v7a/libgojni.so
write /tmp/gomobile-work-826280634/android/src/main/java/go/bukanir/Bukanir.java
mkdir -p $WORK/android/src/main/java/go/bukanir
gobind -lang=java -outdir=$WORK/android/src/main/java/go/bukanir bukanir
write /tmp/gomobile-work-826280634/android/src/main/java/go/LoadJNI.java
mkdir -p $WORK/android/src/main/java/go
rm $WORK/android/src/main/java/go/Seq.java
ln -s $GOROOTlang/src/golang.org/x/mobile/bind/java/Seq.java $WORK/android/src/main/java/go/Seq.java
aar: AndroidManifest.xml
aar: proguard.txt
aar: classes.jar
PWD=$WORK/android/src/main/java javac -d $WORK/javac-output -source 1.7 -target 1.7 -bootclasspath $ANDROID_HOME/platforms/android-23/android.jar go/LoadJNI.java go/Seq.java go/bukanir/Bukanir.java
jar c -C $WORK/javac-output .
jar: META-INF/MANIFEST.MF
jar: go/LoadJNI.class
jar: go/Seq$1.class
jar: go/Seq$2.class
jar: go/Seq$Object.class
jar: go/Seq$Receive.class
jar: go/Seq$Ref.class
jar: go/Seq$RefTracker.class
jar: go/Seq.class
jar: go/bukanir/Bukanir.class
aar: jni/armeabi-v7a/libgojni.so
aar: R.txt
aar: res/
rm -r -f "$WORK"
thinkpad tmp # unzip bukanir.aar jni/armeabi-v7a/libgojni.so
Archive: bukanir.aar
replace jni/armeabi-v7a/libgojni.so? [y]es, [n]o, [A]ll, [N]one, [r]ename: y
inflating: jni/armeabi-v7a/libgojni.so
thinkpad tmp # readelf -r jni/armeabi-v7a/libgojni.so > readelf.txt
thinkpad tmp # gistcli -f readelf.txt
https://gist.github.com/0ca0af805c63c512aa79
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.