2

I've managed to root Google Nexus 7 (2013 Wi-Fi) and now I have CyanogenMod 10.2-20130919-NIGHTY-grouper running on it and Clockworkmod recovery v6.0.1.9 following this guide.

Then I downloaded and installed Thinktube image-file to allow ad-hoc networking.

I am now able to create ad-hoc network in my tablet (not yet tested with other same-model tablets) and I can see the adhoc network from other iOS phones and adnroid 2.1 only. However, I want to make sure that:

does Thinktube image-file actually support OLSR rooting protocol or not ?

if not, then I am already following this guide to download, install and enable OLSR mode.

But, when I am in the Recovery-mode in my tablet, and when i open the adb-shell from my PC, I can list files and browse folders in my tablet normally. But I cannot run any other command on the adb-shell. it always gives me this error:

/sbin/sh: "any-command-rather-than-ls-&-cd": not found

what is this error ? what did I do wrong ? and what I should do to fix it?

  • What commands have you tried? – Dan Hulme Sep 20 '13 at 15:46
  • @DanHulme: make .. su (but I understood I don't need to do this because I am already in the superUser account when I am inside the adb-shell).. scan_results and any other commands – McLan Sep 20 '13 at 16:16
2

Unlike a desktop GNU/Linux system, Android isn't designed for command-line use, so it doesn't come with the full set of command-line programs that a GNU system would have. It only has the most basic commands (like the ones you've already seen working), and Android-specific utilities such as am, pm, bmgr.

You can get access to the basic POSIX commands (such as less and grep) by installing Busybox. There are several installers for it on Google Play. For any more specialist programs like make, you'll need to find an Android port of the particular program and install it.

  • I don't have google-play app in my tablet after installing CyanogenMod which means I cann't install Busybox-app.. I don't have even SuperUser-app after unlocking .. – McLan Sep 24 '13 at 15:11
  • @Rania-Boy You can install Busybox from another source, or install Google Play first. – Dan Hulme Sep 24 '13 at 19:22
1

The shell on Android is placed in /system/bin/sh instead of the regular /bin/sh – I wonder where you’d see /sbin/sh which I’ve never encountered in the wild on any Unix (and violates the POSIX standard), but in this place you should just change the script/invocation involved.

Most commands are in the $PATH anyway, so calling them with explicit paths is not necessarily needed.

That being said, Android Unix userland is very minimal – it didn’t even include a cat(1) implementation until recently – so you may be disappointed a bit.

Some people suggest using busybox on it. If you do, make sure to not replace the system shell, as Android’s default mksh(1) is much more powerful than busybox’ ash.

Disclaimer: I’m the mksh maintainer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.