Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Go support for android #46

Closed
jpjp opened this issue Jun 21, 2014 · 21 comments
Closed

Go support for android #46

jpjp opened this issue Jun 21, 2014 · 21 comments

Comments

@jpjp
Copy link

jpjp commented Jun 21, 2014

Seen this? :)

https://docs.google.com/document/d/1N3XyVkAP8nmWjASz8L_OjjnjVKxgeVBjIsTr5qIUcA4/preview?sle=true

@Nutomic
Copy link
Contributor

Nutomic commented Jun 21, 2014

Ah great!

Any idea where to look for releases? (once they're up)

@jpjp
Copy link
Author

jpjp commented Jun 21, 2014

No idea yet, sorry!

@Nutomic
Copy link
Contributor

Nutomic commented Jun 21, 2014

Alright, just comment if you find out something new ;)

@ferongr
Copy link

ferongr commented Jun 30, 2014

Since the document mentions the 1.4 cycle, it probably means it will be in the 1.4 stable release of Go. Judging for releace cadence until now, that will be around the end of 2014. Note that the document mentions the NDK bindings regarding graphic APIs so I'm not sure if Syncthing's use case is applicable here.

@Nutomic
Copy link
Contributor

Nutomic commented Jun 30, 2014

Well one thing that we can definitely use is fixed DNS resolving. Currently, we have to hardcode IPs for announce and statistics servers.

Edit: Note to self: This could make it possible to run syncthing via NDK (calling main() directly), and thus might fix various problems with the current way of executing syncthing via shell, where the binary is left running after the app has been killed.

@Nutomic Nutomic mentioned this issue Jul 4, 2014
@k4vej
Copy link

k4vej commented Sep 22, 2014

@Nutomic
Copy link
Contributor

Nutomic commented Sep 22, 2014

@c1432666 It doesn't say anything about Android support, and seems to be pretty big, so not sure if @calmh wants to use that.

@Nutomic
Copy link
Contributor

Nutomic commented Oct 1, 2014

@Nutomic
Copy link
Contributor

Nutomic commented Oct 8, 2014

Okay the Go builder supports this now, using cgo and Android NDK

issue link

@Nutomic
Copy link
Contributor

Nutomic commented Dec 11, 2014

Go 1.4 is out.

However, all the Android examples I've seen use makefiles, not gradle, and I don't know how this works together.

In the mean time, using Go 1.4 with the current build setup should already improve things.

@AudriusButkevicius
Copy link
Member

I wonder if they fixed the DNS issue.

@Nutomic
Copy link
Contributor

Nutomic commented Dec 11, 2014

@AudriusButkevicius The issue is closed as fixed ;)

@AudriusButkevicius
Copy link
Member

It's closed because it got moved: golang/go#8877

@Nutomic
Copy link
Contributor

Nutomic commented Dec 11, 2014

Ah I misread that. But it says DNS works with cgo, so that should be fine for us, right?

@AudriusButkevicius
Copy link
Member

It all depends how you compile. We are trying to avoid cgo, and as far as I understand you also used a go compiler so far?

@calmh
Copy link
Member

calmh commented Dec 12, 2014

We do have working cgo for many of the builds currently (using gonative). We could probably get it working for Android as well, in a slightly more painful way by using the android SDK's compiler etc. It just needs to be set up once in the Dockerfile and we should be good to go.

(Of course, knowing how the SDK works, what the compiler is, and having an Android device to test with makes all of that easier, so it's not something I'm going to start pulling on immediately. But I would like it to happen.)

@Nutomic
Copy link
Contributor

Nutomic commented Dec 13, 2014

I've never worked with the NDK myself, let alone Docker. So I'll probably just wait for some kind of guide for now.

The current build script is here.

@AudriusButkevicius
Copy link
Member

So it seems that Android 5 has /etc/resolv.conf

@Nutomic
Copy link
Contributor

Nutomic commented Dec 20, 2014

Nope:

# ls /etc/res*                                                                   
/etc/res*: No such file or directory

@AudriusButkevicius
Copy link
Member

Ok my phone is probably like a can of worms full of hacks... that's why...

Zillode added a commit to Zillode/syncthing-android that referenced this issue Apr 29, 2015
@Nutomic
Copy link
Contributor

Nutomic commented May 18, 2015

Closing this, #57 should be all we need.

@syncthing syncthing locked and limited conversation to collaborators Nov 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants