Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adb hell command (not a typo)

Tags:

android

adb

I have a question about ADB, does anyone know what is the difference between:
adb shell & adb hell commands?

I'm wondering if except the "hellish" terminal color(only on Linux, in Windows you just get some prefixes) there are any other differences?
Seriously check yourself.

enter image description here

like image 844
EvZ Avatar asked Aug 07 '13 07:08

EvZ


People also ask

How do I fix the adb command not found?

One of the major causes of this error is the missing Android SDK Platform Package. Before you can run the adb command, you need to ensure that you have the necessary prerequisites installed in your system. Step 2: Once downloaded, extract the zip file into a specific location.

What are adb shell commands?

Android Shell Commands. ADB is Android Debug Bridge which is a command line utility included with Google's Android SDK. It provides a terminal interface to control your Android device connected to a computer using a USB. ADB can be used to run shell commands, transfer files, install/uninstall apps, reboot and more.


2 Answers

Reading the source:

if(!strcmp(argv[0], "shell") || !strcmp(argv[0], "hell")) {
    int r;
    int fd;

    char h = (argv[0][0] == 'h');

    if (h) {
        printf("\x1b[41;33m");
        fflush(stdout);
    }

    if(argc < 2) {
        D("starting interactive shell\n");
        r = interactive_shell();
        if (h) {
            printf("\x1b[0m");
            fflush(stdout);
        }

...

            if (h) {
                printf("\x1b[0m");
                fflush(stdout);
            }

This code confirms that if the shell or hell command starts with an h, extra control sequences for changing terminal colors are output but nothing else.

like image 176
laalto Avatar answered Oct 05 '22 09:10

laalto


As far as i know there is no other difference between the two.

like image 40
pshegger Avatar answered Oct 05 '22 10:10

pshegger