Octave for Android: Difference between revisions

From Octave
Jump to navigation Jump to search
No edit summary
m (added screenshot)
(21 intermediate revisions by 5 users not shown)
Line 1: Line 1:
The Android app [https://play.google.com/store/apps/details?id=com.octave Octave] in Google play is built and maintained by Corbin Champion and not part of the GNU Octave project.
== Termux ==


The source and some build instructions for the installer can be found here
[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]. You don't need a rooted device to use Octave with Termux.
* https://github.com/corbinlc/octave4android/
* http://octave.1599824.n4.nabble.com/Octave-on-Android-td4658392.html


In changeset [https://github.com/corbinlc/octave4android/tree/6687c0b2826c1ee35496c1679ae756e34fe0d953 6687c0b282], there were 27,904 deletions which makes the repo in 23.Mai 2014 almost empty. You can use the its parent [https://github.com/corbinlc/octave4android/tree/b3bb7f6de607a99840f8b4e6dd40ae12460d2563 b3bb7f6de6] instead.
=== Direct Octave installation ===


Because the app urges you to donate a fee some users asked on the mailing list if this is a GPL violation. One example [http://octave.1599824.n4.nabble.com/Octave-fior-Android-Requires-Payment-td4664157.html Octave for Android Requires Payment]
You can directly install Octave in Termux using the repository by [https://github.com/its-pointless/gcc_termux its-pointless].


There is nothing wrong with distributing binaries to only those people who pay for them. The GPLv3 requires some form of source distribution if you distribute binaries, but it doesn't require that you distribute binaries free of charge. If you're offended by Corbin charging money for his work in getting Octave working on Android, the source above makes it possible for you to duplicate his work and avoid paying him by undertaking the chore of building Octave for Android yourself. Any person with enough skill could take the Octave sources, Corbin's GitHub repository, and the Android SDK to reproduce his work without the need to pay for anything. Here is the donation dialog [https://github.com/corbinlc/octave4android/blob/b3bb7f6de607a99840f8b4e6dd40ae12460d2563/octave/src/com/octave/octaveMain.java#L375]
<syntaxhighlight lang="shell">
wget https://its-pointless.github.io/setup-pointless-repo.sh
sh setup-pointless-repo.sh
apt install octave
</syntaxhighlight>
 
However, graphics capabilities are not available with this approach. It would only plot with ASCII characters in the terminal.
[[File:Octave in Termux.png|thumb|GNU Octave running directly in Termux]]
 
Openblas is automatically installed as a dependency of Octave, so one does not need to manually install it.
 
=== Via some GNU/Linux distribution ===
 
Inside Termux in Android, you can install a 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. [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.
 
'''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.
 
== GNURoot Octave ==
 
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:
 
* https://github.com/corbinlc/GNURootDebian
* https://github.com/corbinlc/octave4android
 
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:
 
* https://lists.gnu.org/archive/html/octave-maintainers/2013-10/msg00406.html
 
[[Category:Installation]]

Revision as of 10:16, 19 February 2021

Termux

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

Direct Octave installation

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

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

However, graphics capabilities are not available with this approach. It would only plot with ASCII characters in the terminal.

GNU Octave running directly in Termux

Openblas is automatically installed as a dependency of Octave, so one does not need to manually install it.

Via some GNU/Linux distribution

Inside Termux in Android, you can install a 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

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: