[Galaxy S II Q&A, Help & Troubleshooting] tripex2k:
Ok, I read through several threads here and there and everything I found out here and there was, well, we do not have these tools/commands, but the discussion went into other directions and where never really answered.

My situation:

I do several thing every day, some of them are fun, others are not. The funny things I mostly do myself by hand. The not so funny things, well, shell scripts are funny. ;)

I startet a terminal on my Android (After 2 days of work to get nslookup and dig running on iOS 5.1.1 together with crontab.) and tested some functions/tools I daily need for some of my shell script:

- chown -> works

- chmod -> works

- nslookup -> works

- dig -> up and running

- simple rm, mv, mkdir, rmdir -> check

- crontab -> WTF?! You serious, I LOVE IT!

- zip -> error <- Ouch, that hurts. Sure, gzip, tar and others are there I hope.

- sudo -> even bigger error

- login -> error <- Don't get me wrong, but when there is root, there are other users, ls -la gives me at least 3 users: root, system, radio, and 4 groups: sdcard_r, cache, system, root

passwd -> Ok, I get it, different usermanagment, but the rightsmanagment seems to be the same than in std. linux. I chowned a dir and chmoded some things for testing purpose and I got no access to these files unless I use a file explorer/manager with root, so there is basicly the same rights managment behind it. Switching chown and chmod back to original state, everything works without root access file manager. Oh and "w" doesn't work, not even "who". lsof returns many things, every app is its own user, well, normal behaviour. ;)

I than tested some variables, that are standard, even on iOS (Without doing more than jailbreaking and installing a terminal.)

sudo echo $SUDO_USER -> error <- clear, we have no sudo.

su echo $SUDO_USER -> empty <- Yep, no sudo, no $SUDO_USER

su echo $SU_USER -> empty <- I guessed it, because, well, we have nothing else to guess.

Since variables return empty even when they are not set or do not exist, we can't say that this will work in any way unless we know every damn variable set in the whole system. $SUDO_USER in a normal *nix enviroment returns empty when no sudo is in use currently. If in use, it will return the current user that is running sudo, normaly the logged in user or the corresponding worker taskname that is set in the system. lsof on Android shows many app_XX entries, so like normal under *nix.

Ok, my question:

Would it be possible to get sudo, zip and the $SUDO_USER running on Android? I don't mind the possible security issues that could come with this, I have several SGS2 and 2 of them have no SIM card, these are only gadget tools for command line and other stuff. There is no data on these SGS2 that are important.

Discussion about pro and cons are not welcome. This is just a possibility question. My Linux skill is to low to get these things done myself, so I ask you people who know more about this. And yes, I try to get some shell scripts running on my androids, why not use these wonderful gadgets for productity when most of the people waste time with FB, twitter and co on their mobiles. ;)