Need Android Terminal Command Reference - Asus Transformer TF700

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

Related

Terminal commands

Is there a list somewhere for the commands because i tired to do the "dir" to get a list of files in the folder but it work. (on terminal or adb shell).
* Also what is the best file manager? Is there anything that has a password so that other people cant get into it?
'ls' is the unix command to list contents in a folder
Ok thanks. just been a long time since i messed with Linux shells i guess i should get my books out and start reading again
Android's Linux commands
although he got the wrong command for list files, he raises a good point, the android linux is far from having all commands other linux system have - does anyone have these documented somewhere? what it has and what it doesn't have?
eladkatz said:
although he got the wrong command for list files, he raises a good point, the android linux is far from having all commands other linux system have - does anyone have these documented somewhere? what it has and what it doesn't have?
Click to expand...
Click to collapse
if you are running jf 1.31 then you have busybox installed.. google busybox and you will find out all the terminal commands you can run from your phone terminal or over adb shell.....
eladkatz said:
although he got the wrong command for list files, he raises a good point, the android linux is far from having all commands other linux system have - does anyone have these documented somewhere? what it has and what it doesn't have?
Click to expand...
Click to collapse
ls /system/bin
ls /system/xbin
ls /system/xbin/bb
that should give you a fairly complete listing of the commands available.
korndub said:
if you are running jf 1.31 then you have busybox installed.. google busybox and you will find out all the terminal commands you can run from your phone terminal or over adb shell.....
Click to expand...
Click to collapse
I just noticed this myself. I need to remove a symbolic link and recreate it by "unlink" and "rm" dont' seem to work. Is there a busybox command that will do it?
A quick google search brought up this annotated list for those new to these commands:
http://www.busybox.net/downloads/BusyBox.html
JF Thanks for that, I was looking for that folder earlier and could not find it for the life of me. Blame it on drowsiness ...or just plain not wanting to be at work.
That list is only valid for modified Android. Stock Android runs toolbox, which has a much neutered list. Aside from JF's method, you can also look at the tpolbox links in update-script of an official update.zip
Hmmm.. does this mean overclocking is possible? Not that we "REALLY" need it right now but.....
adjtimex [-q] [-o offset] [-f frequency] [-p timeconstant] [-t tick] Read and optionally set system timebase parameters. See adjtimex(2).
Options:
-q Quiet
-o offset Time offset, microseconds
-f frequency Frequency adjust, integer kernel units (65536 is 1ppm)
(positive values make clock run faster)
-t tick Microseconds per tick, usually 10000
-p timeconstant
If you read any manpages on the command you would see that it's for correcting system clock drift.
If you type in "busybox" (without quotes) it will give you the list of commands. Enter "<enter command here> -d" for a description of the command you entered. Hope this helps...
"busybox --help" anybody? i thought the bb we had on our androids was not supposed to be the full busybox?
File manager
The Best file manager i found
https://play.google.com/store/apps/...lt#?t=W251bGwsMSwxLDEsImNvbS5yaG1zb2Z0LmZtIl0.
ha root explorer as well...
ca use app lock to protect it!

[HOWTO] Guide to running ADB under Fedora 11 (and equivalent distros)

Ok, I have fedora 11 installed on most of my computers, since i love this distro to death. My big thing was trying to get adb to work. This is my guide to get it to work, for now.
First things first. Navigate to /etc/udev/rules.d as root. Create a rules file called 50-android.rules (touch 50-android.rules). NOTE: You are better off looking at the contents and picking a rules number set other than what is listed. Sometimes udev is picky. For the newbies, so if any rules start with '50', then change the number by one or two, like 51 or 52. Paste this into the file:
Code:
SUBSYSTEM=="usb",ATTRS{idVendor}=="0bb4",SYMLINK+="android_adb",MODE="0666"
Make sure you use ATTRS, not ATTR or SYSFS, since this is a newer updated udev system.
After that, run udevadm control --reload-rules to reload your rules files. Now just run ./adb devices as root to make sure it recognized your HTC dream. I am working on this fix right now so you don't need to be root, keep patient. Now you can adb shell into your device either as root OR normal user, just as long as you start the server as root. This is a permissions problem, and hopefully I can fix this and/or find a fix soon.
I wrote this because i searched high and low through google, and only found a few good parts as far as a fix. Hopefully this helps a few people out there.
Just wondering if this has helped anyone. If not, delete this thread or do whatever with it....
I have adb on my eeepc 900 with f11 I believe this method works too as well. although it says it has been tested with ubuntu, it works pretty well with f11.
http://www.talkandroid.com/android-sdk-install-guide/
Installing The Android SDK
First you will need to download the Android SDK pack .zip archive, once downloaded find a suitable installation location on your machine and extract the zipped files.
Please note: This installation location will be referred to as $SDK_ROOT from now on through this tutorial
Alternatively you can add /tools to your root path which will prevent the need to specify the full path to the tools directory along with enabling you to run Android Debug Bridge (adb) along with other command line tools.
To add /tools:
Linux
1. Edit the ~/.bash_profile or ~/.bashrc files looking for a line that sets the PATH variable.
2. Add the full path location to your $SDK_ROOT/tools location for the PATH variable.
3. If no PATH line exists you can add the line by typing the following:
4. export PATH=${PATH}:<path to your $SDK_ROOT/tools>
Click to expand...
Click to collapse
It helped me, since the creation of the file my OpenSuSE 11.0 recognizes the phone perfectly
Thanks a lot for your hint.
thanks it helped me. ill be looking forward to getting it to work without root
just use sudo instead
Just a heads up for user's using Ubuntu 9.10, this isn't needed. I connected my G1 to it and ran ADB with no adjustments to udev or anything else.
Pretty much it works out of the box.
Here is my version
download the .tgz file from googlecode
http://developer.android.com/sdk/index.html
sudo tar -xzvf android-sdk_r3-linux.tgz
Click to expand...
Click to collapse
Code:
sudo gedit ~/.bash_profile
heres my bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH=$PATH:/android-sdk-linux/tools
Click to expand...
Click to collapse
logout
login
connect android g1 device via usb to pc
open a terminal
Code:
adb devices
if you cant get a device try it with superuser.
Don't you think that this is all just a little bit excessive?
To make it work in F11, just do this;
Download SDK, extract.
To use, type:
/path/to/sdk/tools/adb
Another option is to edit the /etc/profile and add
PATH=$PATH:/<Path to android-sdk>/tools
This option will allow any user to use the adb tools when logged in or if you
su -
into another user
I wrote a short guide as well for Windows and Ubuntu. Might help others.
Unfortunately, as anyone with a passing acquaintence with ADB knows, the scrolling issue can be a killer. I swear the other day I pressed "up" twice and it composed "rm /sdcard/rootfs.img /sdcard/system.ext2" and executed it. We run Android on our SD's btw.. Was not cool. Instead, I use ADB via telnet and it works beautifully. Here's how:
Code:
adb shell telnetd &
adb forward tcp:9999 tcp:23
Now type this: "telnet localhost 9999"
Enter "root" and hit enter
Finally update PATH: "export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/system/sbin:/system/bin:/system/xbin:/system/xbin/bb:/data/local/bin"
Okay, so 4 lines to enter and you have a "regular, sane" shell connection to the phone and you can actually scroll through history and text without it jumbling the text and executing random code. Enjoy.
lbcoder said:
Don't you think that this is all just a little bit excessive?
To make it work in F11, just do this;
Download SDK, extract.
To use, type:
/path/to/sdk/tools/adb
Click to expand...
Click to collapse
that works too as well but i would rather open up a terminal and type
sudo adb devices
sensimila said:
that works too as well but i would rather open up a terminal and type
sudo adb devices
Click to expand...
Click to collapse
WHY would you want to make it *MORE COMPLICATED*??
There is NO NEED for root.
/path/to/adb ...
THATS ALL.
This is kind of funny... i wrote this because i had trouble with it, so i am just sharing my fix...
In case this is interesting to someone:
The fix mentioned in the first post has to be applied to open SuSE x86 and x64 edition to make the G1 work. The external device works without it, but not the adb device.
Thanks again!
Just wanted to come and post that this does work with OpenSUSE 11.2 x86. Did this hoping to get adb to work with my LG Ally and it does. Thanks!
(Still) works for me on 64bit SUSE 11.4.
Before adding this file, I could not access my device with adb, received permissions errors.
Added this file, and I can shell into my device.
Permissions on adb itself was not the problem, it was access to the device when udev found it.
[edit]Actually used the lines from http://developer.android.com/guide/developing/device.html[/edit]

[Q] ADB doesn't work on Mac

When I CD to the platform-tools folder and type
Code:
adb devices
it says "adb: command not found" If anyone could help me that would be wonderful. I am on the Inspire/DesireHD running AOSP Gingerbread. Thanks!
You have two choices. You can either run the command prefixed with ./ (dot slash), which allows for executing an executable in the current directory:
Code:
./adb devices
Or, the other choice (which will be better if you intend to use adb a lot) is to add the platform-tools folder to your path by editing or creating the file .bashrc in your home folder (~/.bashrc).
Let's suppose your platform tools folder is: ~/.android-sdk/platform-tools
Then, you would want to add something along the lines of the following to your bashrc:
Code:
export PATH="$PATH:$HOME/.android-sdk/platform-tools"
Save the file, the run this or log out/in:
Code:
source ~/.bashrc
Et voila, you should now be able to run adb from any folder without issue.
Explanation: adding the new path (folder) to your PATH environment variable tells BASH to include that folder in its search for an executable. The reason $PATH is added at the beginning of the new string is so that your default path does not get overwritten. $HOME will simply expand to /home/your_user_name when BASH interprets it.
GENIUS! IT WORKED! Thank you! Now, one more question- how do I get superuser privileges using ADB? (device is rooted, of course)
No problem.
On my G1 you were root as soon as you adb'd in. Just tested on my Defy and '$' - shocking. So once you have run adb shell, just run 'su' (without quotes of course) and accept the permission on your phone screen as usual for root programs and you should be good to go.
Sorry to keep asking questions, but when I typed
Code:
su
into adb, it asked for a password. No popup on device screen. I do have superuser installed on the device.
That is odd. I'm not sure why that would be. I'll see if I can think of something though. Hopefully someone else can make a suggestion.
Thanks! You have been very helpful.
Don't think I can hit the thanks button from the app, sorry
Sent from my Inspire 4G using XDA App

Android Command Line Tools

Hi all, here is a package of command line tools I've put together, here's the readme with a few of the tools listed.
Android Command Line Tools
This Is Working Prefectly On Samsung Galaxy S3 'GT-I9305'
Your Phone Should Be Rooted To Perform These Steps!!!
Installation:
1. Copy The android-tools.zip To Your SD Card (Internal Or External) And Extract It
You Should Now Have A Directory Called 'android-tools'.
2. Open A Terminal On Your Phone And Type The Following
su
mkdir /data/tmp
cat /sdcard/android-tools/busybox > /data/tmp/busybox
cat /sdcard/android-tools/busybox-installer > /data/tmp/busybox-installer
cat /sdcard/android-tools/pkgs.tar > /data/tmp/pkgs.tar
cat /sdcard/android-tools/install.sh > /data/tmp/install.sh
cd /data/tmp
chmod 755 *
./install.sh
3. In Android Terminal Emulator Preferences, Set The Shell Path to '/system/bin/bash'
And Leave The Initial Command Blank.
4. Quit Terminal Emulator And Restart.
OpenSSH: ssh-keygen Save To '/data/local/home/root/.ssh/id_rsa'.
'ssh' And 'scp' Binaries Will Look For Keys In '/data/local/home/root/.ssh/'
So You Dont Need The '-i' Option, 'ssh-copy-id' Gets It From There Too.
Arduino:
There Is A Build Environment To Build And Upload Arduino Sketches With A Script Called 'arduino' To Wrap It Up
Type 'arduino --help' In Terminal To See Its Options, It Uses The Arduino-1.0 Core Library And I have Tested
Every Board And Can Confirm It Builds For All Boards Including 'micro' And 'leonardo'. It Uses 'avrdude'
'avr-libc-1.6.7' 'gcc-avr-4.5.1', I Wrote A 'arduino.nanorc' File For Writing Sketches Which Has All The
Functions And Constants Of The Arduino Core Library With The Same Colours As In The IDE.
Other Tools:
Some Other Binaries I Have Added Or Modified Are 'tar' With All Options Enabled, 'iwconfig', 'grep egrep fgrep'
With Colour And PCRE Enabled, '7zip', 'ipctool', 'shc' For Compiling Shell Scripts, 'ssh-copy-id', 'sed' With All Options
Enabled, 'macchanger', 'bootimg_baseaddr' In bash/sh, Compiled GNU 'core-utils', 'ncurses-hexedit', 'nmap', 'ngrep', 'nano'
'strace', 'gcc', 'g++', 'unpack-bootimg' In bash, 'unrar' And 'vim'.
Backtrack 5 ARM Is Configured And Ready To Go, Just 'mkdir /sdcard/Chroot'
And Copy Your bt5.img File Into It And Type 'bootbt', Then Edit The Scripts
For VNC Server 'startvnc' And 'stopvnc' To Reflect Your Screen Size, These
Are In The pkgs.tar
Replacing '/system/etc/mkshrc' With The One Included In This Package Enables Bash As Default In ADB Shell
If The Bash Binary Is Found In '/system/bin/bash' Else The Default Shell Will Drop Back To mksh.
Nano Does Not Save Through ADB Shell Using ^O Or '^X Then y' Method, Works Fine In Terminal Emulator App On Device.
There are more tools than listed above, here's the link> https://www.dropbox.com/s/yjumfljy7e1yoyc/android-tools.zip
If you're on an custom ROM and can't use the terminal emulator when you restart terminal emulator, get /system/lib/libncurses.so from stock ROM and use adb to copy it into /system/lib on your current ROM, I will fix this tomorrow.
Sent from my GT-I9305 using xda app-developers app
Please post the right link... this one is malformed.
sciurius said:
Please post the right link... this one is malformed.
Click to expand...
Click to collapse
op just updated the link, package is now ready for download again!
thank you, andreotti09!!!
greetz,
sUsH

[Vulnerability] Bluestacks root access via adb

On GitHub: https://github.com/KDVB/BlueStacks-ADB-root-access​​Disclaimer​For informational purposes only. The author does not call for further actions. Created to warn users who use this product
Background​ADB (Android Debug Brigde) - is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps. adb provides access to a Unix shell that you can use to run a variety of commands on a device.
Research Walkthrough​For default, in Bluestacks, ADB port is open, but we can't to use shell command (output "error: closed")
Searching for information in the emulator files found the following file ".adbcmd" in Root.vnhd image. Path to file "dataFS\downloads". In this file we can see adb commands that we can run without connection to shell
For example, "getprop" command, that gives us information about android propetries
As we can see, interaction with android shell is working. So, I think "if I can interact with unix shell, maybe tryed to use pipe operators" and pwn i can interact with file system, but with shell-user privilage.
As a result i continue my search to find su command to get root access. SU file is in "/boot/android/android/system/xbin/bstk/su". I tryed pipe operator to get root access, but get error and shell didn't open(
After that i tryed list terminator ";" and it works. I get root shell
Result​Bluestacks have this vulnerability and people involved in its development know about it and are engaged in its elimination.
The real test is to see if you can actually do anything. Sure, you've ID'd as root, but will it actually let you change anything?
V0latyle said:
The real test is to see if you can actually do anything. Sure, you've ID'd as root, but will it actually let you change anything?
Click to expand...
Click to collapse
Thanks for your reply. Actually you can change in current session, but when emulator reboot, all changes remove. If we speak about system folders. In sdcard folders changes save. Sorry, I didn't mention it in the post.
When i searched information on the virtual disk, i found some scripts that build a system. That takes information from .conf files, but that works only for local work. For example, when you using OpenVPN Connect that port still open and you can interact with it.

Categories

Resources