Open fabian-z opened 10 years ago
Screenshot:
Very cool thank you! :)
This is fantastic - it really makes me want to put Pond into Debian - it would be great to get Pond with Lil'Debbie.
As I have not found a way to apply two build tags at the same time, one will have to edit some go files.
go build -tags "nogui notpm"
(?)
Thank you everyone. Since I don't usually do much terminal work with my device, Lil'Debi would have been overkill for me in terms of space and complexity - the static binary does very well in these cases. Installing Pond on the other hand would be easier on Lil'Debi for now.
@ebfe Thanks for your suggestion. It actually seems to work when used directly with go (compiling for the current host). Unfortunately when cross-compiling, I run
go-linux-arm get -tags "nogui notpm" github.com/agl/pond/client
and get the following error - nothing is built:
package notpm: unrecognized import path "notpm"
If I use go-linux-arm build -tags "nogui notpm"
instead of go-linux-arm get
the error is
can't load package: package notpm: cannot find package "notpm" in any of: $GOROOT, $GOPATH
Of course, If I put the tags the other way round, the error message is for nogui instead of notpm - otherwise it stays the same.
I tried serveral methods on my first compile (seperated with commas, with whitespace, with and without single or double quotation marks, etc.), but none of them yielded anything but an error.
@ebfe Thanks for your suggestion. It actually seems to work when used directly with go (compiling for the current host). Unfortunately when cross-compiling, I run
go-linux-arm get -tags "nogui notpm" github.com/agl/pond/client and get the following error - nothing is built: package notpm: unrecognized import path "notpm"
This looks like a bug in golang-crosscompile. There is a fix for it that never got merged davecheney/golang-crosscompile#13.
@ioerror
This is fantastic - it really makes me want to put Pond into Debian
yes, please!
@ebfe Nice discovery!
It actually seems like I used the predecessor of the nowadays more widely used https://github.com/laher/goxc - but nonetheless there have been some recent commits to golang-crosscompile. Since goxc is supposed to crosscompile to all platforms at once, it maybe more useful to simply fork golang-crosscompile and apply the pending pull request. Another possibility is to try and use goxc to compile only for linux/arm. I'll look into this a little further.
Appears Go 1.4 offers a GOOS=android option which might simplify this build process (examples)
I don't feel like it will greatly simplify the process of getting the CLI to run on an Android phone as it most probably makes no difference regarding issues with tmpfs and certificates store, which make up for most of the manual work in the process.
It could allow us to skip choosing the GOARM variable and just use GOOS=android to build a static binary, but judging from a quick google search there seem to be some issues with cgo left on this route. Well, let's wait for the dust to settle.
What this should allow for is - after ironing out the tmpfs and certificates store issues - to build pond as a library to use with a Java UI (given the Java -> Go language binding generator).
Alternatively, there is the possibility to build a simple localhost web server with a responsive HTML5/JS UI into pond (maybe having a webgui tag in addition to nogui).
I actually like the web server idea, because it would allow to package pond (with a simple webview) for Android. Comments on reddit suggest this should be possible. It would also allow for alternate GUI usage on unsupported, older distributions and, in the long run, could make the base for pond to be used from multiple access points over a network. Using HTTPS and the statefile password as user auth, this should imho provide reasonable security, too.
Any thoughts on this?
At 27.11.2014 on 01:29 Jeff Burdges wrote:
Appears Go 1.4 offers a GOOS=android option https://www.reddit.com/r/golang/comments/2kv0s1/go_14_on_android which might simplify this process (examples https://github.com/MarinX/godroid)
— Reply to this email directly or view it on GitHub https://github.com/agl/pond/issues/119#issuecomment-64730208.
@fabian-z What we did is shim the core and provide an RPC API then use a native Java app. You might find you need more communication with the android runtime than you thought.
The certs issue is easily solved with a patch to just hardcode the few external CAs that panda needs - I should be able to upstream this if it will help ( but it's trivial ) [UPDATE: This is not required from 1.4, they handle Android's cert dir]
I've never had tmpfs issues ( unless I solved them very early and forgot )
I think the web server idea is a very, very bad one. It would 'work' but it creates an appalling hornets nest of extra timing / linkability / complexity and ( for multiple access points ) state issues. I realised at one point I had made this trivial so I refactored everything to make it harder again and burnt the evidence. ;)
I could build a binary for CM11 on Ubuntu 14.04 and could create an account, but when I execute pond on my device the process gets killed shortly after loading the status.
dmesg shows output like this:
select 5370 (pond), adj 0, size 55123, to kill
send sigkill to 5370 (pond), adj 0, size 55123
Can anyone reproduce this?
Just another tool worth keeping an eye on : https://github.com/google/gxui
I was successful in statically compiling the Pond CLI client for Android, so I thought I'll share my steps here for review before submitting a pull request. Looking forward to your feedback :smiley:
Remarks:
And finally, if you trust me, you can try out my prebuilt ARMv7 binary: http://d-h.st/DfL
Note that you will still need to follow step 7 (with your own paths of course) and possibly install vim on your device for Pond to work.