Octave for Android: Difference between revisions

From Octave
Jump to navigation Jump to search
(add that it is specific to samsung)
mNo edit summary
 
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== GNURoot Octave ==
== Termux ==
 
[https://termux.com Termux] is a Terminal Emulator for Android. You can install it from [https://f-droid.org/repository/browse/?fdid=com.termux F-Droid] (preferred) or [https://play.google.com/store/apps/details?id=com.termux Play store] (deprecated). You don't need a rooted device to use Octave with Termux.
 
=== Direct Octave installation ===


The Android app [https://play.google.com/store/apps/details?id=com.gnuroot.octave GNURoot Octave] in the Google play store is built and maintained by Corbin Champion. However, note that these repositories have not been updated for several years. It is not part of the GNU Octave project. Thus please use the following GitHub pages for questions and bug reports:
You can directly install Octave in Termux using the repository by [https://github.com/its-pointless/gcc_termux its-pointless].


* https://github.com/corbinlc/GNURootDebian
<syntaxhighlight lang="shell">
* https://github.com/corbinlc/octave4android
pkg install wget
wget https://its-pointless.github.io/setup-pointless-repo.sh
sh setup-pointless-repo.sh
pkg install octave
</syntaxhighlight>


The implementation has been done in close cooperation with the Octave developers and makes use of the Octave source code without essential changes. Thus, it is fully compatible with the versions of Octave on other platforms.
[https://www.openblas.net/ OpenBLAS] is installed as a dependency, and this method provides much better performance compared to Octave installed inside a GNU/Linux distro running in Termux. By default, Octave only plots with ASCII characters in the terminal.  


Some probably outdated build instructions for the older "octave4android" app:
For graphical plots, [https://wiki.termux.com/wiki/Graphical_Environment#Desktop_environment_.28XFCE.29 install] a graphical environment like xfce, and use octave with a vnc server. Only the graphics toolkit "gnuplot" is known to work in this method.


* https://lists.gnu.org/archive/html/octave-maintainers/2013-10/msg00406.html
[[File:Octave in Termux.png|thumb|GNU Octave running directly in Termux]]


== Octave for Linux on Dex (Specific to certain Samsung Android devices) ==


[https://www.linuxondex.com/ Linux on Dex (LoD)] is an application (beta testing status) that runs on some Samsung Android devices.
=== Via some GNU/Linux distribution ===


To build Octave on LoD, do the following. This assumes you have LoD working. If not, follow the instructions on the LoD website.
Inside Termux in Android, you can install a GNU/Linux distribution like Debian, Ubuntu, Arch or Alpine. Note that Alpine consumes relatively less disk space. Octave can be installed as described in [[Octave for GNU/Linux]] from the distribution's respective package manager.


# Many of the packages that Octave needs are not in the default Ubuntu installation. You will need to install them using <code>sudo apt install <package></code>. First, you need the compilers gcc, and gfortran. There are other packages that are essential to download: "libblas", "liblapack", "libatlas" and their development counterparts with the "-dev" extension.
To use Octave's graphical capabilities, one needs to install a desktop environment, and a VNC server in the GNU/Linux distro, and one also needs to install a separate VNC viewer app in the Android phone (can be installed from Play Store/F-Droid). On many android devices, only the graphics toolkit "gnuplot" is known to work. Several apps (e.g. [https://github.com/EXALAB/AnLinux-App Anlinux], [https://andronix.app/ Andronix]) are available to easily install the Linux distribution of your choice, and setting up the desktop environment. Refer to the [https://docs.andronix.app/vnc/vnc-basics Andronix docs] for an overview of setting up the VNC server.
# Remove all "libopenblas" packages with <code>sudo apt remove libopenblas*</code>. The OpenBLAS library from the default Ubuntu distribution does not work with Octave. You have to remove it. For details see bug {{bug|56900}}.
# Unpack the Octave source code and enter the directory. Create a build directory <code>mkdir my_build</code>, enter that directory and issue <code>../configure</code>. This will start the configure script. Look at the output at the end of the configure process to see what packages are not found by the script. Many of these will be things you want/need in terms of functionality. You can search for the packages available using the command "apt search", and install the ones you want using <code>sudo apt install <package></code> before compiling. If you want to install Octave in "my_build" be sure to issue <code>../configure --prefix=`pwd`</code> from this directory.
# In the {{Path|my_build}} directory issue <code>make</code> and <code>make install</code>.


Now you should have a working installation in, e.g., {{Path|/home/dextop/path_to/octave-5.1.0/my_build/}}.
'''Optimizing performance''': Installing [https://github.com/xianyi/OpenBLAS/wiki/Precompiled-installation-packages/ OpenBLAS] (with the distribution's package manager) to replace the system's BLAS libraries may tremendously increase the performance of Octave.


Graphics:
== GNURoot Octave ==


# If you set the graphics toolbox to "gnuplot", Octave should generate plots correctly. If it does not, set the environment variable GNUTERM to x11. The default shell in LoD is bash, and you can either issue <code>export GNUTERM=x11</code> in the bash terminal or in your octave session issuing "setenv GNUTERM x11". You can also add <code>setenv GNUTERM x11</code> to your {{Path|.octaverc}} file to do this automatically.
The Android app [https://play.google.com/store/apps/details?id=com.gnuroot.octave GNURoot Octave] in the Google play store is built and maintained by Corbin Champion. However, note that these repositories have not been updated for several years. It is not part of the GNU Octave project. Thus please use the following GitHub pages for questions and bug reports:
# If you want to use Qt graphics it will take some work, and may or may not be possible. It has not been tested by anyone. You will need to download the package [https://github.com/termux/libandroid-shmem libandroid-shmem], get it working, and then recompile Octave linking to this library. There are more detailed instructions regarding the compilation on the github website.


== Octave on Termux ==
* https://github.com/corbinlc/GNURootDebian
* https://github.com/corbinlc/octave4android


[https://termux.com Termux] is a Terminal Emulator for Android. You can install it from [https://play.google.com/store/apps/details?id=com.termux Play store] or [https://f-droid.org/repository/browse/?fdid=com.termux F-Droid].
The implementation has been done in close cooperation with the Octave developers and makes use of the Octave source code without essential changes. Thus, it is fully compatible with the versions of Octave on other platforms.
You can directly install Octave in Termux using the repository by [https://github.com/its-pointless/gcc_termux its-pointless].


<code>
Some probably outdated build instructions for the older "octave4android" app:
wget https://its-pointless.github.io/setup-pointless-repo.sh
</code>


<code>
* https://lists.gnu.org/archive/html/octave-maintainers/2013-10/msg00406.html
sh setup-pointless-repo.sh
</code>


<code>
== Octave app in Google Play==
apt install octave
</code>


However, graphics capabilities are not available in this.
'''Unlike the other methods, this requires buying an app (released under GPL-3) from Google Play'''.


== Octave running in a Distro in Termux ==
The Octave app built and maintained by Userland Technologies [https://play.google.com/store/apps/details?id=tech.ula.octave] in the Google Play Store is the full featured and professionally supported GNU Octave running on your phone.  It runs off of their UserLAnd platform which does not require root to your device.  Userland Tech has pre-installed GNU Octave so the user has a seamless "desktop" experience on their phone.  The application is open source and any bug reports or questions can be posted at their github at: https://github.com/CypherpunkArmory/octave


You can [https://github.com/EXALAB/AnLinux-App install a distro] like Debian, Ubuntu, Arch or Alpine (this consumes less disk space), and then install Octave from the package manager of that distro. You can also install desktop environments with the Anlinux app, and use VNC Server to use Octave's graphical capabilities.  In many android devices, only the graphics toolkit "gnuplot" works.


[[Category:Installation]]
[[Category:Installation]]

Latest revision as of 21:10, 30 April 2022

Termux[edit]

Termux is a Terminal Emulator for Android. You can install it from F-Droid (preferred) or Play store (deprecated). You don't need a rooted device to use Octave with Termux.

Direct Octave installation[edit]

You can directly install Octave in Termux using the repository by its-pointless.

pkg install wget
wget https://its-pointless.github.io/setup-pointless-repo.sh
sh setup-pointless-repo.sh
pkg install octave

OpenBLAS is installed as a dependency, and this method provides much better performance compared to Octave installed inside a GNU/Linux distro running in Termux. By default, Octave only plots with ASCII characters in the terminal.

For graphical plots, install a graphical environment like xfce, and use octave with a vnc server. Only the graphics toolkit "gnuplot" is known to work in this method.

GNU Octave running directly in Termux


Via some GNU/Linux distribution[edit]

Inside Termux in Android, you can install a GNU/Linux distribution like Debian, Ubuntu, Arch or Alpine. Note that Alpine consumes relatively less disk space. Octave can be installed as described in Octave for GNU/Linux from the distribution's respective package manager.

To use Octave's graphical capabilities, one needs to install a desktop environment, and a VNC server in the GNU/Linux distro, and one also needs to install a separate VNC viewer app in the Android phone (can be installed from Play Store/F-Droid). On many android devices, only the graphics toolkit "gnuplot" is known to work. Several apps (e.g. Anlinux, Andronix) are available to easily install the Linux distribution of your choice, and setting up the desktop environment. Refer to the Andronix docs for an overview of setting up the VNC server.

Optimizing performance: Installing OpenBLAS (with the distribution's package manager) to replace the system's BLAS libraries may tremendously increase the performance of Octave.

GNURoot Octave[edit]

The Android app GNURoot Octave in the Google play store is built and maintained by Corbin Champion. However, note that these repositories have not been updated for several years. It is not part of the GNU Octave project. Thus please use the following GitHub pages for questions and bug reports:

The implementation has been done in close cooperation with the Octave developers and makes use of the Octave source code without essential changes. Thus, it is fully compatible with the versions of Octave on other platforms.

Some probably outdated build instructions for the older "octave4android" app:

Octave app in Google Play[edit]

Unlike the other methods, this requires buying an app (released under GPL-3) from Google Play.

The Octave app built and maintained by Userland Technologies [1] in the Google Play Store is the full featured and professionally supported GNU Octave running on your phone. It runs off of their UserLAnd platform which does not require root to your device. Userland Tech has pre-installed GNU Octave so the user has a seamless "desktop" experience on their phone. The application is open source and any bug reports or questions can be posted at their github at: https://github.com/CypherpunkArmory/octave