The purpose of this post is to teach a way to use the Julia language on an Android smartphone.
PS. Sorry for my English
Step 1
Download these apps:
- UserLAnd (Linux emulator)
- CodeBoard (Optional. A custom keyboard for programming.)
- Via (Pluto.jl has a bug when typing in a indented code block in a mobile browser. Via emulates a PC browser while maintaining the mobile layout.)
Step 2
Open UserLAnd and download the Debian distro. Select the SSH option, enter the username and password, then wait for the download to finish.
Step 3
When the installation of Debian is finished, a terminal will appear. Enter your user password. Click enter.
Now we are going to update Debian’s dependencies. Paste the command below into the terminal and click enter.
sudo apt-get update && sudo apt-get upgrade -y
Having finished the update, let’s download the wget. Paste the command below into the terminal and click enter.
sudo apt-get install wget -y
Now let’s download Julia. Paste the command below into the terminal and click enter.
wget https://julialang-s3.julialang.org/bin/linux/aarch64/1.6/julia-1.6.0-linux-aarch64.tar.gz
Next step, extract the downloaded file. Paste the command below into the terminal and click enter.
tar -xvzf julia-1.6.0-linux-aarch64.tar.gz
Having extracted the file, it is no longer needed. To delete the file, paste the command below into the terminal and click enter.
rm julia-1.6.0-linux-aarch64.tar.gz
Last step, create a symbolic link to the Julia language. Paste the command below into the terminal and click enter.
cd
mkdir bin
echo "export PATH=\$HOME/bin:\$PATH" >> ~/.bashrc
. ~/.bashrc
After that last command, paste the command below into the terminal and click enter.
ln -s "$HOME"/julia-1.6.0/bin/julia "$HOME"/bin
Run Julia!
Run Julia with the julia
command. Enter PKG mode, and install Pluto.jl.
After installing Pluto.jl, start a Pluto.jl server and copy the link.
using Pluto; Pluto.run()
For a better experience with Pluto.jl use the Via browser. Open Via, on the toolbar click the options icon > tools > user agent. Select the “Chrome PC” option.
Now paste the Pluto.jl link in the Via address bar and start programming!
Obs.: Plots.jl does not run.