Check out my guide here. I found ti searching for Android in this forum
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:
https://github.com/termux/termux-packages/wiki/Termux-and-Android-10
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.
https://github.com/termux/termux-app/issues/1072#issuecomment-474385386
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.
-
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.
-
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.
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?
Since Julia doesnāt seem to work yet in iSH, I tried compiling Scimark with GCC 9.2, and performance does seem to be bad, with a composite score of 17 on an iPhone SE (the new one). This is about two orders of magnitude lower than one might expect for real numerical work, though GCC seemed to compile everything reasonably fast so maybe itās ok for some workloads.
Can Julia work in iPad or Android devices now ? Are there any future plan since iPad are becoming more and more powerful with m-chips ?
Running Julia on Android is not hard. I have not heard about success on iOS.
If I needed to use the Julia programming language on iOS, I would probably try this first:
- https://getutm.app/ ( GitHub - utmapp/UTM: Virtual machines for iOS and macOS ) ( āRun virtual machines on iOSā)
- And try to install Julia
Of course, I donāt know if it would work.
termux
is probably your best bet to get Julia running on Android at this point
The fundamental issue remains: Julia depends on JIT, and apple is a bunch of dystopian control-freaks who only pretend to transfer ownership of iphones and ipads to ābuyersā.
Unless political change is enacted on that, it will probably remain impossible to run things like julia without joining the apple developer program, which is paid in money, PII and dignity (e.g. follow above links to end up at jitterbug, which is a pretty cool hack!).
That makes the target audience for an iphone-julia pretty small.
(for those who are less in the know: On ios, the kernel checks signatures when marking a page executable. You donāt control the kernel on āyourā device, apple does. Farewell, von Neumann architecture. Apple has chosen a side in the war on general computation, and it sure aināt ours)
There is also iSH app that simulates a lightweight linux kernel. I have not tried it on M series iPads but few years ago couldnāt get Julia to work on some iPad mini. Donāt know if it works now.
I tried running the current Julia x86-32 binary under iSH recently on an iPad Pro (2018 10.5", not an M-series chip), and ran into the same old issue of it failing to load. Bigger picture: I would really love to be able to run something like Pluto natively on the device, but I donāt see how it would be possible. Iāve been playing around with JuliaHubās Pluto service recently but havenāt tried using it from iPadOS/Safari yet. The included 20 hours/month free usage is pretty generous, so if it works well that would probably be a pretty reasonable 80% solution.
Shouldnāt it be possible to set up Pluto on a remote server with specific port to be accessible through safari etc. ?
EDIT: Actually in this case, for iSH, I see you want a i386 build, but I do see two potential problems:
It used JIT so i386 should work on Arm (just not Apples Rosetta implementation of emulation), but while Julia supports 32-bit, itās not i386, i.e. not quite that old. Julia targets about 10 year old 32-bit chips, but maybe can be compiled for older 32-bit.
Another thing is I see Alpine mentioned, and if you need that type of Linux userland, then it needs musl, and the Julia musl build is only for 64-bit.
What I wrote before that didnāt take iSH into account:
Iām not sure the iPad ever had Rosetta [2], i.e. emulation, since it doesnāt have any history of non-Arm chips used there.
So you should use an Arm build of Julia on the iPad, and it might work?
I believe this is possible on a LAN but havenāt tried it yet. If Iām at home Iāve got a desktop and laptop available, so no big desire to try running it from the iPad Pro. I take it with me on-the-go for note-taking where Iād need to have a personal VPN setup to remote into.