A couple linux commands - Droid 2 Global General

I have a rooted my phone. I have the sdk shell all is OK, but I sure could use a couple of simple linux commands. To start. "find", "grep" and "more" would be very useful. Are they in android and I can't find them or can they be add from some repository?

if you installed busybox, using a standard root method, you can do
'busybox find ... blah'
if you were motivated (i haven't been so far) you could create links to 'find' 'grep' etc in path somewhere, and link them to busybox...

Use busybox installer from market, it will do everything including the links. Takes 10 seconds to set it all up
Sent from my DROID2 GLOBAL using Tapatalk

Related

Request-- Busybox install howto

I have read numerous posts listing the ways to get busybox installed on the phone. My problem is commands work under adb shell in recovery but do not work while the phone is booted w/out using a path or putting busybox in front. Ok so to the request. Will someone that has a stock rom still. Write instructions on how to get busybox installed. I need to be able to open terminal and run simple commands like uname as root. Thank you!

[DEV][WIP][TOOL] One-click root

I have no idea why there's no tool for that yet, so I decided to make one myself, but I need your feedback to make it good for everyone. So, my current goals are:
1) As simple as possible, all required files should be packaged with the app or downloaded dynamically
2) Cross-platform compatibility (Windows, Linux, Mac)
3) Minimal user interaction, as automated as possible
I see two solutions:
* X11-less console Linux LiveCD image to be booted in VirtualBox or on real hardware.
Pros: completely controlled environment, no drivers required, bash scripting, all libs and binaries bundled.
Cons: large image size, sometimes difficult to use, no GUI so less user friendly
* GUI Qt app
Pros: flexible language (C++), nice GUI, simple to use, allows for small size and on-the-fly downloads
Cons: have to compile and test separately on 3 platforms, different libs/binaries, Linux dependency hell, probably no Mac support because I don't have one.
So, what do you guys say? I'm open for ideas now and won't start coding until Monday.
I only joined the android world a little while ago when the moto olympus/atrix came out but isn't getting root on this as easy as
a)make sure you have a microSd card inserted
b)make sure unknown sources is enabled
c)install the gingerbreak apk, openeng the app and clicking on "root device"?
I'm no developer and haven't a clue what it takes but this would be epic.
Windows GUI
Sent from my HTC Vision using XDA Premium App
Vigneshd said:
I only joined the android world a little while ago when the moto olympus/atrix came out but isn't getting root on this as easy as
a)make sure you have a microSd card inserted
b)make sure unknown sources is enabled
c)install the gingerbreak apk, openeng the app and clicking on "root device"?
Click to expand...
Click to collapse
Okay, I meant root+blob+CWM
Sent from my HTC Desire using XDA Premium App
smellmyfingers said:
I'm no developer and haven't a clue what it takes but this would be epic.
Windows GUI
Sent from my HTC Vision using XDA Premium App
Click to expand...
Click to collapse
Still think a livecd could be the best way... A GUI app can only come if you guys help me with the testing.
Sent from my HTC Desire using XDA Premium App
K900 said:
Still think a livecd could be the best way... A GUI app can only come if you guys help me with the testing.
Sent from my HTC Desire using XDA Premium App
Click to expand...
Click to collapse
I don't even know what these "blob" things are yet.But if you need testers, thats what the rest of us here are for. Count me in.
Hmm... I wonder how a plugin system could work... So, a core library that handles adb, device identification and plugin loading, plugins dynamically linked to the library (needs a stable API though) and a manifest that lists compatible devices and plugins to be used for them... Could be something like that (YAML inspired);
device:
info:
vendor: 'ASUS'
model: 'Eee Pad Transformer'
pciid:
uses:
- gingerbreak
- tf101
And libgingerbreak.so to push and run gingerbreak (a generic one) and then a device specific libtf101.so to take care of blob flashing action.
P.S. It's night here and I'm tired as hell. Sorry if I wrote some nonsense... If anyone is interested in making it big, PM me here or on github.
Sent from my HTC Desire using XDA Premium App
K900 said:
Still think a livecd could be the best way... A GUI app can only come if you guys help me with the testing.
Sent from my HTC Desire using XDA Premium App
Click to expand...
Click to collapse
A livecd would probably be too complicated for people who can`t follow the rooting guide.What you need is a program to download on to computer.....in large red letters...connect Transformer to pc.....click obvious button.....rooted
ttav said:
A livecd would probably be too complicated for people who can`t follow the rooting guide.What you need is a program to download on to computer.....in large red letters...connect Transformer to pc.....click obvious button.....rooted
Click to expand...
Click to collapse
Yeah, that's just the thing. What's good about a livecd is that you are 100% sure it works everywhere, cause nothing changes. But if you make it native, you need drivers on Windows, udev rules or root privileges on Linux and a Mac to make it run on a Mac...
Sent from my HTC Desire using XDA Premium App
K900 said:
Yeah, that's just the thing. What's good about a livecd is that you are 100% sure it works everywhere, cause nothing changes. But if you make it native, you need drivers on Windows, udev rules or root privileges on Linux and a Mac to make it run on a Mac...
Sent from my HTC Desire using XDA Premium App
Click to expand...
Click to collapse
To make it simple isn`t going to be easy I`ll say it again best of luck.
ttav said:
A livecd would probably be too complicated for people who can`t follow the rooting guide.What you need is a program to download on to computer.....in large red letters...connect Transformer to pc.....click obvious button.....rooted
Click to expand...
Click to collapse
Yup essentially like one-click rooting app for the Galaxy phones.
It is ***UHHH... get the software and d/l on the computer.....ummm.... click to open
Click the flashing neon sign that SAYS: "click here dummy !!" ...........you are rooted...........
Anything you coud put together would be an absolute god send. I managed to root my X10 okay, and my other half's Vega..... but the guides for the transforemer may as well be in mandarin for all I understand them. I really need a click here, install this, type that, press this, turn round three times and throw salt over your shoulder sort of guide..... or any of your lovely proposed one click solutions
The best I have is a pair of batch files that go through the pre and post root process that I've modded with directions. This assumes you have ADB setup from the Android SDK install and have the ADB drivers installed and working. You need to have USB Debugging enabled via Settings > Applications > Development. If you do not, get the Android SDK and read up on how to setup ADB. There's tons of posts on XDA about how to do just that.
Download tf101-root.zip here
md5: 57f22712625fe75f685499b60b189aa8
Firstly, run root-prep.bat from where ever you extracted tf1010-root.zip (preferably in your platform tools folder for your Android SDK install).
This is the batch file content of the root-prep.bat:
Code:
adb push gingerbreakBB /data/local/
adb shell chmod 777 /data/local/gingerbreakBB
adb push CWM_BLOB_V5 /data/local/
@echo off
echo Now do "adb shell" from another command window. In the shell, do "/data/local/gingerbreakBB" without quotes. DO NOT CLOSE THAT COMMAND WINDOW, EXIT THE SHELL, OR REBOOT AFTER GINGERBREAK IS DONE! THE ROOTING PROCESS MAY WIPE YOUR SD CARD SO BACK IT UP BEFOREHAND!
pause
Go to your Android SDK folder in explorer and (if you're on Vista/7) shift+right-click the platform tools folder and click "open command window here" for a new command window already set to that folder. XP users will have to do it manually or download the PowerToy from this page. Download the "Open Command Window Here" tool and it works exactly the same as on Vista/7. GINGERBREAK MAY OR MAY NOT WIPE YOUR SD CARD SO BACK IT UP BEFORE DOING IT JUST IN CASE!
Rooting process:
Code:
C:\aSDK\platform-tools>adb shell
$/data/local/gingerbreakBB
<you'll see all the gingerbreak stuff here>
#
DO NOT CLOSE THIS COMMAND WINDOW AND DO NOT EXIT THE SHELL WHEN IT'S DONE! If you don't get the # symbol in the shell after running gingerbreak, you'll have to run the root-fail-fix.bat then do the above again after the reboot.
This is the batch file content of the root-fail-fix.bat:
Code:
adb shell rm /data/local/tmp/boomsh
adb shell rm /data/local/tmp/sh
adb reboot
If you get the # symbol after gingerbreak is done, run post-root.bat from the same command window as you did root-prep.bat or a new command window. After the reboot you should be fully rooted!
This is the batch file content of the post-root.bat:
Code:
adb remount
adb shell dd if=/data/local/CWM_BLOB_V5 of=/dev/block/mmcblk0p4
adb push su /system/xbin
adb push busybox /system/xbin
adb shell chmod 6755 /system/xbin/su
adb shell chmod 6755 /system/xbin/busybox
adb push Superuser.apk /system/app/
adb reboot
You can do the commands manually just to make sure everything works properly (encouraged) or just run the batch files from a command window if you're lazy.
ttav said:
A livecd would probably be too complicated for people who can`t follow the rooting guide.What you need is a program to download on to computer.....in large red letters...connect Transformer to pc.....click obvious button.....rooted
Click to expand...
Click to collapse
That would be a godsend
I can appreciate how many would look at the rooting guide and say "WTF?" Think about it, unless you are command line savvy, the process can be daunting. Not including the linux users we have a generation (or two) who never had the "pleasure" of running DOS so they have not had the experience of a flashing cursor just waiting for the human to tell it EXACTLY what you want in PRECISE commands.
Ahhh...the good old days. (kidding....really...or so says my pet rock...with the mood ring)
Guess I'll hack together windows batch and linux shell scripts tomorrow and start working on the app later, cause I have no free time now.
Sent from my HTC Desire using XDA Premium App
have talked to the guy in Xoom section that created the various 1-Click Root proggies. Check them out here . Maybe he can give you a hand or some suggestions
Here are the threads
http://forum.xda-developers.com/showthread.php?t=1093126
http://forum.xda-developers.com/showthread.php?t=1011196
I am for whatever, even livecd is easier for you to make.
I think it is less work and with simple instruction it allways works.
Sent from my HTC Desire using XDA Premium App
I think with the key now out and the ability to modify any Asus TF ROM it might be wise to wait and make something that works with NVFlash? But I don't know a lot about this stuff so ignore me if you think I am an idiot
I vote for a GUI QT App. The point of One Click Root is to make rooting as painless as possible. A live CD doesn't seem to follow that...

Need Android Terminal Command Reference

Does anyone have a list or link to the android terminal command set? I found a few for Unix/Linux but some commands don't work and others I know work on Android aren't even listed. Who has a complete list of terminal commands for say the market app "Android Terminal Emmulator"
Sent from my ASUS Transformer Pad TF700T using xda app-developers app
elfaure said:
Does anyone have a list or link to the android terminal command set? I found a few for Unix/Linux but some commands don't work and others I know work on Android aren't even listed. Who has a complete list of terminal commands for say the market app "Android Terminal Emmulator"
Click to expand...
Click to collapse
The terminal emulator only emulates a terminal. The commands available depend on the programs installed on your device.
You can use the busybox documentation as a guide for the common Unix commands implemented in busybox:
http://www.busybox.net/downloads/BusyBox.html
For some commands which have a more limited implementation in Android (look into /bin), e.g. chmod, run "busybox chmod" instead of "chmod" to get the more capable version.
But you can also install more programs, or advanced versions of the commands busybox provides.
_that
Thks. With as many emails as you entertain daily, I really appreciate you taking the time to always give a detailed and educating explanation with great links.
I like Jack's explanation on wiki for his market app "Android Terminal Emulator". He says you can:
echo $PATH
then
ls -al /PATH for each PATH in $PATH to list all the commands available on your device

[How To][Linux] Optware + ssh + samba + transmission + flexget

Yep, you read that correctly. I have optware, ssh, samba, transmission, and flexget working on my Minix X5 Mini. This should work for any rooted device which has an adb connection enabled. This will work on the original ROM. In fact, I use the stock ROM. For those not using a Minix device this should work on any ARM device. Sorry but all the binaries are built on ARM.
JUST AS EVERY OTHER DEVELOPER: I AM NOT RESPONSIBLE IF YOU BRICK YOUR DEVICE! MAKE A BACKUP!
Requirements:
Linux box with adb (don't ask me about windows, I don't support bad habits)
clockworkmod (for a backup)
root
internet connection
Process:
Make a backup of your ROM!
Download files (gitHub)
You have two options here:
Download the zip via https://github.com/erichlf/AndroidSeedBox/archive/master.zip and unzip it.
Clone the repo using git via 'git clone [email protected]:erichlf/AndroidSeedBox.git'
Make script executable
chmod +x optware-etc.sh
Obtain adb connection to device (covered in another thread)
Gain root access on local machine (adb seemed to require this for things to work)
sudo su
Run script and follow directions
./optware-etc.sh
Use SManager to run /opt/home/root/sysinit at every restart.
Notes:
The script can be modified to change the various programs that I install. You could exchange transmission for deluge for example.
Transmission can be accessed from the minix through localhost:9091 or from some other machine using your ip-address and the port 9091. If that doesn't work you should edit the config file located at /opt/home/root/.config/transmission-daemon/settings.json
username: root
password: you provided this in the install script
Without SManager nothing will start automatically. However, if you have a ROM which has init.d support you can move the scripts in /opt/etc/init.d to /etc/init.d I would suggest maybe linking the two instead of just moving the scripts or possibly adding a script to /etc/init.d which runs the items in /opt/etc/init.d The reason is because when installing things using ipkg the startup scripts will be placed in /opt/etc/init.d and not /etc/init.d However, it is extremely important that optware is started, and this is partly what sysinit accomplishes.
To list available packages
ipkg list
To install a new package use the command
ipkg install <new package>
To remove a package use the command
ipkg remove <package to remove>
cron is weird and I couldn't get it to work like it should, but I got it to work
While on the Android device (ssh or terminal emulator)
Create a .crond file in the home directory of your device (/opt/home/root/) with some schedule in it. Remember to leave a blank line at the end of the file.
Tell cron about the .crond file
crontab -u root /opt/home/root/.crond
Make sure cron sees the cron file
crontab -l
If you want to edit your cronfile use a text editor and edit the file directly and then tell cron about the file again.
Many things are installed in what seem like strange places, so use
which <binary you are looking for>
Feel free to help develop the code. I think what would be best is an update.zip or a CWM flashable zip. Right now I don't know how to do this, but once I get more time I will look into it. So, any help on this front is welcomed.
Enjoy!
I really wish you would have kept the repo up. It seems kind of pointless to go through all that trouble just to delete the repo and leave people wondering what you did.
I have been busy and didn't update this particular post, since there had been no activity on it.
git clone [email protected]:erichlf/androidseedbox.git
https://bitbucket.org/erichlf/androidseedbox/get/master.zip
Sorry, I didn't need to be rude. I was just excited to find this and then sad when it was gone. Thanks for pointing me in the right direction!

how to copy over busybox config file? (completelinuxinstaller)

Hello everyone.
I have been wanting to get to grips with linux for a while now and decided linux decided to try completelinuxinstaller as i was having some problems with linux deploy.
i set up everything as the app asked. Downloaded .img files, extract, rename file and launch.. but in the android terminal i get a error which said:
chroot: can't execute '/root/init.sh': Permission denied
After days of searching and trying minor fixes i got no where until i found a list of instructions on how to fix this error.
(This error is becoming common on Samsung devices running android version 4.4.2, and can be expected to happen with some other devices, or newer versions of android. Although I haven't yet found the exact cause of the error, an effective workaround has been found:
The error seems to be coming from something in the busybox executable installed by the Complete Linux Installer app; many have reported that using other versions of busybox removed this problem, and the following version (free download on Google Play) has been confirmed to work: BusyBox
After using that app to install an updated busybox binary, simply copy the new binary over the existing busybox binary at /data/data/com.zpwebsites.linuxonandroid/files/busybox
Finally, in a rooted terminal window, type chmod 0755 /data/data/com.zpwebsites.linuxonandroid/files/busybox (see the more detailed instructions in the How do I install the most up-to-date version of bootscript.sh on my device? section of this FAQ)
Now you should be able to start linux using your Complete Linux Installer app on your device.)
But the problem is no matter what explorer i use i am not able to find the busybox config file. Where they said it would be doesnt exist. Even if i go to android/data its not there. Just the .com for all other apps. do you know where the busybox might be ?. On the busybox installer it says it is in /system/xbin but again i cant find it on my device.
And if i may chew your ear off for one more moment. How can i change the .config file ?
Thank you for your time

Categories

Resources