Common Linux Tools On Android Without Root By Installing BusyBox

[Adam Outler] shows us how to expand the Linux tools available on Android without rooting the device. He does this by installing BusyBox. The binary is copied to the device using the Android Developer Bridge. He then opens an ADB shell, adds execution permissions to the binary, and runs it. BusyBox calls itself the Swiss Army Knife of Embedded Linux. It provides a set of very common tools which you’ll find useful in your tinkering. The one that [Adam] shows off in his video is the vi editor, but the basics that make a shell work are all there like: ls, mkdir, grep, dmesg, mount… you get the point.

So what are you going to do with your unrooted device now that you have these commands at your disposal? That’s really for you to figure out. [Adam] continues his demonstration by installing a package that does require root access. It’s BotBrew Basil, which adds apt-get and a few more complex packages. He then uses vi to write a C++ Hello World program, then compiles it and runs it. So if you’re looking to do some development on your phone this is one way.

http://www.youtube.com/watch?v=L_bVC0x4l-g

26 thoughts on “Common Linux Tools On Android Without Root By Installing BusyBox

  1. Awesome! Thanks for this!

    I’ve definitely been missing out on some Linux tools while mobile, especially the network-related ones. And I haven’t really been wanting to root.

    @AndroidCat – What do you mean? My GS3 has 8.3GB available space on internal phone storage. Total internal storage is reported as 11.95GB.

  2. busybox is fairly limited though. i’m surprised that android doesn’t actually ship with it. get GNU tools on a phone and I’m interested again (speaking as a former N900 user)

        1. You just can’t beat the N900, as far as hacking, freedom, Linux tools, etc.

          I still have mine handy, thought without a SIM. That went into my GS3 this year.

          I’m actually considering keeping the N900 plugged in to USB power somewhere tucked away, and have it authenticate VPN connections for me. It’s on the WiFi the whole time, and I’ve got EasyDebian, so it should work.

  3. “He then uses vi to write a C++ Hello World program, then compiles it and runs it.”

    He needed vi to write hello world? If he had half a beard, he would have typed the program directly into the compiler.

  4. What would be way cold is if someone had compiled User Mode Linux (UML) for ARM. UML is an executable, like busybox. It does not require root. Once running, UML is a linux kernel running as an executable in userspace. When started UML “boots” up and runs /sbin/init which kicks everything off like a normal distribution.

    https://en.wikipedia.org/wiki/User-mode_Linux

    (Sorry, 2nd post — added [x] Notify me of follow-up via email.)

  5. that return an error
    like
    busybox: /system/bin/which: Invalid cross-device link
    busybox: /system/bin/who: Invalid cross-device link
    busybox: /system/bin/whoami: Invalid cross-device link
    busybox: /system/bin/xargs: Invalid cross-device link
    busybox: /system/bin/xz: Invalid cross-device link
    busybox: /system/bin/xzcat: Invalid cross-device link
    busybox: /system/bin/yes: Invalid cross-device link
    busybox: tem/bin/zcat: No such file or directory
    busybox: tem/sbin/zcip: No such file or directory

    1. Of course. I don’t know why the autor said that about –install. That command just creates symlinks in /system/bin and others folders that are not accesible for non-root. The same reason that avoids you to install busybox normally and to to push the binary into the rigth place is the same reason that avoids to create symlinks to system folders. TLDR; you cannot create symlinks into system dirs without root, but lucky you still can push binaries to /data/local/tmp and make them executable.

  6. Hey Mike,
    It’s really interesting. I recently bought a Pixel mobile and I am trying this on it. I get an error like “Operation not permitted”. Could you help me overcome this error? And also I need to know whether I can root my Redmi Note 3 with this tool?

    Thanks in advance.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.