Julia on iOS and Android

Check out my guide here. I found ti searching for Android in this forum

2 Likes

Thank even I found the same guide but I want to connect it a jupyter app and run from browser

Up to now julia can be built for iSH but unfortunately freezes on executing code. One reason could be unimplemented syscalls related to memory management and tracing (e.g. gdb doesn’t work as iSH doesn’t support ptrace syscalls). Anyway, performance wouldnt bee too nice due to emulation.

As a heads up to users of Termux, it looks like Android has had some changes to their security model in Android 10 which may affect (and possible eliminate) Julia functionality:

1 Like

I’ve linked a pretty huge github issue below, but the tl;dr is this: Native code which is not packaged in an .apk may not be executed by the user or non-system applications.

The solution they are currently employing is to repackage everything as .apks, which will be downloaded and installed by the pkg utility in termux. Many applications will still work, including interpreted languages like Python or Ruby. The same cannot be said for compiled languages.

One proposal is to compile code as an apk and installed by the user, but for a language like Julia with as much metaprogramming as it contains may not be compatible with that model.

It may be possible that Julia can still run under proot, albeit with performance penalties.

Have you checked this? I ran Julia some time ago on my Pixel 3, and I’m pretty sure I was running Android 10 at the time?

I haven’t checked it, but at present (and in the near future) it should continue working. Google is enforcing this based on the targetSdk, so even if your device is API 29+ but the app uses API 28 it continues to function, and should do so for at least a few years.

There are two sides to this issue, both of which are relevant to ways in which Google is removing the method on which Termux relies in Android API 29.

  1. Enforcement: Google Play stops accepting app updates which do not target API 29. Currently apps must target API 28 to be accepted on Google Play, and API 28 is what Termux targets. While this will become a problem, it can easily be bypassed by simply installing the Termux apk from elsewhere. This is expected to happen toward the end of 2020.

  2. Technical: This will be the case if a future Android release enforces this security rule for all apps, no matter which API level they target, breaking backwards compatibility (including for Termux). This would affect all apps on a device, including those installed via sources outside of Google Play.

    Google’s handling of security rules for target API 28 in conjunction with Google Play update policy indicates that such a technical change is indeed coming, but likely not for a few years.

2 Likes

That means Android 9. This is easy to misunderstand. I fell into the trap of thinking that non-old Android versions are no longer supported, reading Google’s docs, but actually targetSdk must be set at some level for the app, while minSdkVersion can be much lower.

E.g. Firefox supports very old (discontinued by Google) “Android Jelly Bean or later” by setting minSdkVersion appropriately, I believe.

As Google can’t change already release Android versions (only Google Play policy on apps allowed; or allowed for updates), are you saying, old versions can use Termux forever (and even get updates), but on recent Android versions you get a new API, which, for you is worse?