Running linux apps in android

Can you run Linux command line apps on Android?

I’m brand new to Android; in fact I’ve never owned one. But I’m traveling all this summer, and I’m very interested in doing some programming while I’m on the run. QUESTION: Is it possible to run a full Ruby development environment with Emacs on Android? How? And does «rooting» give you anything close to a real Linux system?

Try this method. Basically any c, C++ compiled for ARM will work geeknizer.com/install-run-linux-applications-on-android

As a new user as well, Jackpal looks like it ticks the boxes as a reworking of the Android Terminal Emulator.

4 Answers 4

«Rooting» allows you access to the internal Android environment, which of course consists of more than just the Linux kernel. So you are running Linux, but you should consider it as though you are running under a different distribution than say Debian or Redhat.

There’s a different set of standard libraries and some files are in different locations. At least on my Droid ext2 support is not built-in by default. There is also no init or cron . The full set of Linux modules is not available unless you compile them yourself and put then in /system/lib/modules . Important ones you may miss on standard ROMs are cifs , ext2 , tun , and others.

Most, if not all, phones running Android are ARM CPUs. So the binaries you run on them must be ARM «EABI» «soft-float» binaries. If you have the source you can cross-compile whatever utilities you need, but read on.

There are many standard commands and utilities available in the /system/bin directory such as grep , ps , cp , rm , mv , ls , ip , even vi . You have enough to get by until you.

. use the «Linux Installer» utility to install a chroot ‘ed Debian environment. Debian has supported ARM for a while. It takes some work, but if you can root your phone, and have a sizeable enough SD card, this is the way to go.

This is close to a standard Linux system and under it you can install and run Ruby. Of course CPU and RAM limitations come into play.

Источник

UserLAnd – Run Linux Distros and Apps on Android Easily

In my article on What is the Difference Between Android and Linux, I (commenters too) pointed out that a major difference between Linux distros and Android is that Android can’t run Linux applications; at least not without painstaking hacks.

Читайте также:  Proxy programs for linux

Today, I introduce you to a cool tool that is worth writing home about and it goes by the name of UserLAnd.

UserLAnd is a free, open-source tool that enables you to install and manage Linux applications on your Android device like you would a native app and to also run full Linux distributions e.g. Ubuntu, Kali Linux, Debian, etc. – all the need to root your device. It has an inbuilt terminal for connecting to shells and you can connect it to VNC sessions if you want a graphical experience.

UserLAnd is made possible by the same team behind GNURoot Debian and it was created as a replacement for the original GNURoot Debian app with the aim to enable developers to experiment with Linux and its common software from the convenience of their palms.

You will go through a series of prompts when you launch UserLAnd for the first time after which it will download its dependencies based on the setup choices you made and it is smooth sailing thereafter.

Features in UserLAnd

  • Open-source with source code available on GitHub.
  • Exclusive to Android devices.
  • Run full Linux distros on Android.
  • Install and run Linux apps on Android like a regular app.
  • No root required.
  • Can connect to VNC sessions for a graphical UX.
  • Contains an inbuilt terminal with SSH support.
  • Available for free on Google Play Store and F-Droid.

How to Use UserLAnd

You can use UserLAnd in either of 2 ways, single-click apps, and user-defined custom sessions. Here are the steps involved:

Single-click apps:

User-defined custom sessions:

  1. Define a session – A session is what describes the filesystem you will use and the service (SSH or VNC) that you will use to connect to it.
  2. Define a filesystem – A filesystem describes the Linux distro that you want to install.
  3. Start the session.

Managing Packages

Debian, Ubuntu, and Kali:

#Update packages: $ sudo apt-get update && sudo apt-get dist-upgrade #Install packages: $ sudo apt-get install #Remove Packages: sudo apt-get remove
#Update: $ sudo pacman -Syu #Install packages: $ sudo pacman -S #Remove Packages: $ sudo pacman -R

Installing a Desktop

Debian, Ubuntu, and Kali:

Install Lxde with the command:

Install X Server Client from Google Play store.

Launch XSDL and in UserLAnd, enter the command:

export DISPLAY=:0 PULSE_SERVER=tcp:127.0.0.1:

Go back to XSDL and the desktop will show.

Archlinux

For Arch Linux, only the first step is different as the command is

[mks_button size=”medium” title=”Download UserLAnd from Google Play” style=”squared” url=”https://play.google.com/store/apps/details?id=tech.ula” target=”_blank” bg_color=”#529b30″ txt_color=”#FFFFFF” icon=”fa-download” icon_type=”fa” nofollow=”1″]

[mks_button size=”medium” title=”Download UserLAnd from F-Droid” style=”squared” url=”https://f-droid.org/packages/tech.ula/” target=”_blank” bg_color=”#529b30″ txt_color=”#FFFFFF” icon=”fa-download” icon_type=”fa” nofollow=”1″]

Читайте также:  Linux format low level format tool

Today is the first time I’m covering an app that lets you run Linux on Android. Perhaps, you want to do the reverse and run Android apps on your Linux distro instead, the most convenient way exists in the form of Anbox.

UserLAnd’s tagline is “Empowering with Linux” – do you feel empowered when you use it? Drop your two cents in the comments section below.

Источник

How to Use Termux to Run Command Line Linux Apps in Android

This article covers a guide on the “Termux” Android app that allows you to run command-line programs and scripts on Android devices.

Termux is an open-source terminal emulator application that works on Android devices. It also works as a sort of mini Linux OS, packed with many tools and utilities you commonly see in desktop Linux distributions. You can use Termux to install and run numerous command-line apps through its own package manager. No root access is required to install and run Termux on Android. You can even use a lightweight desktop environment GUIs without hardware acceleration through Termux (via VNC), but they may be slow and not exactly usable on small screen touch devices. Termux is extremely popular among developers and other users who want to access CLI Linux apps on Android. It is the closest thing you get to a Linux OS on Android, and it is a pleasure to use with its touch-optimized interface suitable for small screen devices. Termux features additional keyboard actions making it easy to input symbols, and also features auto-completion through the action key located in the top row of the on-screen keyboard.

Use Cases

Some things you can do with Termux:

  • Run Python scripts
  • Run Bash scripts
  • Play command-line games
  • Access Vi editor
  • Make SSH connections
  • Create Python virtualenv
  • Develop apps as long as you don’t need GUI access
  • Install additional packages with pip, npm, cpan, gem, tlmgr, and other such package managers
  • Basically, anything that an installed package allows you to do through its command-line interface

Installing Termux on Android

You can download and install Termux through Google Play or from F-Droid. Launch Termux through the launcher, and you should be greeted with the following screen:

Enabling Storage Access on Termux

To access files in the Termux terminal or to save files from the Termux terminal, you will first need to setup the Termux storage and provide storage access permissions to Termux when prompted. You can do so by executing the following command:

Once you are through the storage setup, you will be able to find Termux files stored in the “shared” folder in the internal storage of your Android device. If the “shared” folder doesn’t exist, you can manually create one. Usually, the full path to this “shared” folder is “/storage/emulated/0/shared”.

Читайте также:  Linux bash ping check

Installing and Managing Official Termux Packages

Once you have installed Termux, run the command below to update and upgrade repositories:

Now you can install your desired packages using the following command:

After installation, you will be able to run the command for the installed package in the Termux terminal (just like you would do on a desktop Linux OS):

You can get a list of installable Termux packages from here. You can also search and look for packages in Termux itself. To do so, run a command in the following format:

You can also list all packages using the following command:

Installing Deb Packages in Termux

You can install certain “.deb” packages from Ubuntu or Debian repositories as long as they are made for your mobile’s architecture (these days, mobiles mostly have aarch64 and aarch32 architectures). Note that some packages may refuse to work on Termux. To install a “.deb” package, run a command in the following format:

To remove a manually installed “.deb” package in Termux, run a command in the following format:

To list all manually installed “.deb” packages, you will need to run the following command:

Any “.deb” package from any package source can be installed as long as it meets compatibility requirements. As always, you should be careful when picking up third party packages to prevent the installation of suspicious packages.

Enabling Additional Repositories in Termux

You can also enable extra repositories in Termux to enable the installation of additional packages. To find more repositories, visit this page and click on repositories having names ending with “-packages”. You will find the command for enabling these repositories in their “README” files. The command for enabling extra repositories looks like this:

Below are some examples that have I have tested and found working on Termux:

Some third-party community repositories can also be enabled. You will find a list of these repositories available here.

Installing Termux Add-ons

Termux provides some useful add-ons that can be installed on an Android device through the Play Store. Some of these extra add-ons are free, while others are paid. You can find a list of these add-ons available here.

Conclusion

Some apps on the Play Store allow you to install and run full Linux environments on Android. However, a few of them require root access, and they are not exactly easy to use. As far as user-friendliness is concerned, there is nothing else like Termux on the Play Store.

About the author

Nitesh Kumar

I am a freelancer software developer and content writer who loves Linux, open source software and the free software community.

Источник

Оцените статью
Adblock
detector