0

on cm 12.1 (I know the nightlies) I experienced something very curious. at first, if I start a terminal emulator, I'm not root. I'm just the user the app is running in. so if I do

echo $USER

it shows me I'm not root. everything is fine, I cannot use root features, I get <command>: Permission denied

everything is fine so far. but if i choose su, it asks for root access (graphically) and if yes, I'm root@A0001, If no, Permission denied. everything is also fine here, I am fully root.

but my issue is, I want to use bash and can't use it I a usable way. because if I use bash, I'm neither root nor a standard user. this is very crappy, because I'm something between that,

echo $USER

displays sometimes root, sometimes nothing (' '). Also, I can use most commands which needs root access, but not all. sometimes commands just die with unknown error, permission denied or sometimes without any error message. Also some commands never work in bash. others nearly at any time, which are mostly non-root commands. I am pretty angry about that, because I rooted my device and use the command line pretty much, so I want to use bash features, because my bash is installed natively and I don't just use sh, which is, btw, also installed natively and not just a symlink.

so my question is, did someone experience something similar or is there any way to fix that without refusing to use bash.

ps: one of the command, which never works with bash, is dumpsys. it dies with unknown errors.

  • 1
    How are you using bash? Via adb/a terminal emulator/etc.? – keepcalm Sep 10 '15 at 3:13
  • mainly via a local terminal emulator. I just tried it out with another terminal emulator (the built in) and it's the same. you have root access but you can't do everything (of course, if you have a partition mounted read only, the you can't write, but that's not what I mean) – Schwertspize Sep 10 '15 at 5:04
  • How did you install bash and how, specifically, are you executing it? su from a standard shell/terminal then bash should work. – Matthew Read Sep 10 '15 at 5:53
  • both su -c bash and su bash don't work – Schwertspize Sep 10 '15 at 5:54
  • What about su -c "sh -c 'exec bash'"? – keepcalm Sep 10 '15 at 8:45

Your Answer

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

Browse other questions tagged or ask your own question.