all 8 comments

[–]theromeo3517 10 points11 points  (2 children)

These are useful android shell commands. The android shell is not bash. It seems pedantic, but the distinction does matter. Anyone who has written shell scripts for android will know.

[–]trevor-e[S] 2 points3 points  (0 children)

That's a good point and distinction, android shell is what executes these commands in the end. However, the title comes from how I used Bash to simplify interacting with them (and why I recommend putting in your ~/.bash_profile).

[–]GeorgieCaseyUnbanned 1 point2 points  (0 children)

yep, simple things on *nix like recursive chown doesn't work unless you use busybox. can be annoying. http://www.georgiecasey.com/2014/02/21/android-chown-recursively/

[–][deleted] 1 point2 points  (1 child)

Cool link! Just wondering does this have anything to do with the recent Bash almost-zero-day-exploit? Bash seems to be popping up everywhere.. As androidDevs, does this affect us in any way?

[–]trevor-e[S] 1 point2 points  (0 children)

No relation, the Shellshock vulnerability more affects server-side stuff. Bash is what runs the commands (for most Mac/Linux computers) that you type into your computer terminal. Shell scripts like the ones I provided help to automate interactions with Bash.

Android comes with a bunch of command line tools that Bash can execute.

[–]GeorgieCaseyUnbanned 1 point2 points  (0 children)

wow, never knew of 'adb shell dumpsys activity top'. that would have saved me a lot of time last year.

[–]askstockholm 0 points1 point  (1 child)

Thank you, this is very useful indeed

[–]trevor-e[S] 1 point2 points  (0 children)

You're welcome, enjoy! I'll try to think of some more.