Can you access bash on Android?

4

I'm not a Linux expert. But if Android uses the Linux Kernel, it is understood that it must have some similarities. Would the terminal be one of them?

    
asked by anonymous 25.09.2015 / 15:51

3 answers

4

A great way is adb, but it's external to android

to use embedded in android: You have 'bash shell x' for android:

link

When you download you will use the #root shell button.

But for you to actually have access to a larger set of linux tools, you could rotate your mobile, and add busybox

'BusyBox is a software application that provides many standard Unix tools as well as the largest (but most capable) GNU Basic Utilities. BusyBox is designed to be a small executable for use with the Linux kernel, making it ideal for use with embedded devices. It has been nicknamed "the Swiss pocketknife of embedded Linux." " ( link )

abs

    
25.09.2015 / 16:10
4

Hello,

Yes it is possible using adb See the here more infos about it.

In short, adb shell opens prompt and you can run the commands, but remember that they are restricted.

    
25.09.2015 / 15:58
2

Complementing the answers already posted here in the question, a cool way to use adb is defining you as an environment variable. So you can use commands adb shell , adb devices , or any other that adb makes available in the directory where you are.

How to proceed:

  • Right-click My Computer > Properties > Advanced System Settings > Environment Variables > Click New under System Variables.

  • Set the name of the variable to ADB_HOME or whatever you prefer and the value of the variable that is the path of the Android SDK. In my case the SDK is located at: D:\Android . Save.

  • Look for the system variable named Path and click to change it.

  • At the end of the line, place the previously created environment variable in this way: %ADB_HOME%/platform-tools; , separating with semicolons always the declarations in this environment variable between different environment variables.

  • >

    Example of an excerpt from my environment variable Path :

    %JBOSS_HOME%\bin;%ANDROID_HOME%\platform-tools;%PHP_HOME%
    

    Understand how it works? The adb.exe is located in the platform-tools folder of my D:\Android folder, I set this root folder as an environment variable named ADB_HOME and in Path I will declare it and put the bar with the platform-tools folder name % where adb.exe is.

    On Linux, edit your file ~/.bashrc , example:

    nano ~/.bashrc
    #AndroidDev PATH 
    export PATH=${PATH}:/root/android-sdk-linux/tools 
    export PATH=${PATH}:/root/android-sdk-linux/platform-tools
    

    Log off, log in again, and open the Terminal by entering the following command:

    adb version
    

    If you return correctly the adb version has been properly configured.

        
    25.09.2015 / 16:55