[Tutorial] x10mini Linux helpers - Sony Ericsson XPERIA X10 Mini

Hello
Like some other guys i use linux on my PC. If you want to change your x10mini via shell you can do it but its not very confortable.
I made a few tools so it's easier to use.
Note: This "tricks" are only usefol to you if you are a little advanced with linux and want to "work" with your x10i via shell. I tested it all on a Debian 64bit but think most parts are universal.
1. Putting adb to /etc/bin
First of all you should put the adb-binary in /etc/bin/ so you can access it like every other cmd. You can use the binary in my attached tar or the one from SDK. use "sudo cp adb /system/bin/adb" (if you have a system with sudo, eg debian & ubuntu)
2. adb: error insufficient permissions for device
If you plug in the phone and want to connect via "adb shell" it may says that you don't have permissions for device. There is a workaround:
- Create file /etc/udev/rules.d/51-android.rules
- Put the following in the file:
Code:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0fce", ATTRS{idProduct}=="2137", MODE="0666"
- restart udev "sudo service udev restart" (again this is debian&ubuntu-only)
if you still got "insufficient permissions", i made a little shell-script "adb-fix-permissions" attached in tar-file
3. bash-completition for adb
Bash is really annoying whitout completion. That means you can just start to type a word, then press [tab] and bash complets it for you. For example you type "adb ki[tab]" and bash complets it to "adb kill server"
To get this you need "adb_completition" from my attached zip or from here. Put this file in /etc/bash_completion.d/ and you got it.
example command to copy it:
"sudo cp adb_completition /etc/bash_completion.d/adb_completition"
4. Some keys not work in adb shell
This is a known and annoying bug. Eg in nano text editor you cant use the [enter]-key. There is a (little unclean) workaround for it: start a telnet-service on the phone, forward ports via adb and connetc to your phone via telnet. You will need telnetd from the attached tar. And your phone needs to be rooted.
- Remount system writable:
Code:
adb remount
- Put telnetd on your phone
Code:
adb push telnetd /system/bin/telnetd
- Make it executable:
Code:
adb shell chmod +x /system/bin/telnetd
for usage i have a little made a little script (in attached tar) "adb-shell".
Or you can do it manual:
Code:
adb telnetd &
adb forward tcp:9999 tcp:23
telnet localhost 9999
.. to be continued...
if you have one, please share your linux-android-tricks with me

thanks

Related

ADB Push Nautilus Script?

Is there an ADB push nautilus script out there?
That'll be handy, but i'm no scripting expert. I suspect it'll be bit tricky since adb is terminal only, I'm sure someone will have to figure out a way to pipe the output from terminal to GUI pop up dialog box to display progress bar, with success or failure message.
this one seem to work but no progress bar or success/fail message tho. YMMV
Code:
#/bin/sh
adb push $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS /sdcard
save this as adb_push.sh
be sure to set this file with permission:
Code:
chmod a+x adb_push.sh
think of this as rough draft, not perfect. Above code will push straight to sdcard. Suppose you could create few scripts like this..
ADB - Push to System APP
Code:
#/bin/sh
adb remount
adb push $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS /system/app
ADB - Install APK
Code:
#/bin/sh
adb install $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
EDIT: Forgot to mention this, it'll work only if you've already set path to Android's SDK tools folder in .bashrc
awesome, thanks! I'll test it in a minute
Simple scrip to push files to your android device.
Just put it in your Nautilus script dir (HOME/.gnome2/nautilus-scripts) and make it executable (chmod +x Push\ sdcard). also set path for ADB inside script (ADB=...)
I did something similar a while back for both Konqueror and Dolphin in KDE, but I realized, I just don't use a file manager since I prefer the command line instead. I had a working ADB zsh completion script, but somehow forgot to back it up before my previous hard drive failure.
https://code.google.com/p/send-to-android/
this is interesting

adb / push /pull not found help

Hi guys, I am trying to move some files into ext partition. I want to do it via adb but ...
It came to my attention that adb shell isn't the solution for adb push or adb pull. I need to do it via windows but whenever I do adb remount or adb kill-server and adb pull or adb push . When I input and press enter it shows an arrow I press enter cuz I dont know what I could input. It just tells me "push not found" or "adb not found" if I say adb push.
Please don't ask me what I do exactly just tell me the exact steps ^^
I would like to move Htc ime mod by jonasl by example.
Hope you will help me out guys
copy tools adb.exe, AdbWinApi.dll and AdbWinUsbApi.dll to the .../windows/system32/
Thank's but doesn't seem to work
I tried doing : cd C:\Program Files\Android SDK
adb push C:\Program Files\Android SDK\tools\su-2.1-e-signed\system\xbin\su \system\xbin\
but this just gives me all adb commands.
Doing this inside adb shell gives me the adb : not found
Any idea/ workaround? (< only adb plz I dont want to install linux)
Code:
cd C:\Program Files\Android SDK
adb remount
adb push tools\su-2.1-e-signed\system\xbin\su \system\xbin\
Give that a try.
You can't use push or pull with shell.
The biggest problem you sill face is having spaces in the PC side path names, try moving the SDK to c:\Android_SDK if the above fails
Try this:
Code:
cd C:\Program Files\Android SDK\tools
adb remount
adb push C:\Program Files\Android SDK\tools\su-2.1-e-signed\system\xbin\su /system/xbin/
AH great, by removing the space beetwin android and sdk I managed to get out but now I am facing Out of memory error
Damn I have like 1.5 gb of memory on my ext2 partition
Where can I check the remaining memory?
EDIT : su is 22ko so I dont think memory is the big deal. However I would still like to know what is left
Maybe my microSD is dying... Any idea?
Mister-Tea said:
yy whatever, if you don't want to answer then don't but don't look high on me.
lol......
Click to expand...
Click to collapse
1/ he already answer your question
2/ it's android DEV section, your question if far away from DEV
3/ You have to learn how to use command-line application (Windows suck at this, so you should try on a linux OS)
BTW: a little how-to
cd: a great command, you'll be able to change directory (yes you have "adb" on your harddrive, but you have to tell your computer where is it)
cp : copy
mv: move
ls: list content of working directory
pwd: print current working directory
Now: let say "adb" (adb.exe) is located here: /home/carbonyle/androidSDK/tools/
launch a terminal (WindowsKey + r on windows host, then type "cmd")
Yyour working directory maybe "C:" , or whatever (/home/carbonye/ for me)
now use "cd"
Code:
cd /home/carbonyle/androidSDK/tools/
<. of course adapt this to your environnment
(use ls / pwd to convince you what you're doing)
Code:
./adb reboot recovery
<- for linux user
Code:
adb reboot recovery
<- for Win**** users
Of course this will reboot your phone into recovery mode, just adapt command to your need
Right, this thread has gone far enough with enough flaming for today.
To all of you, im disappointed and you should all know better.
PLease refrain from further flames, tidy up in progress. I am also moving this to QnA.
@ Mister-Tea
You are equally responsible for the flaming by flaming yourself.
@ you all, quit it or i will take further action.
THanks.

[HOWTO] Archos Gen8 2.0.71 ADB in Ubuntu 10.10

I've been struggling with this for about six hours. Now, I have finally worked out a solution.
Hopefully it works for you. I will do my best to tell you exactly what I did so that if you don't entirely understand how to do stuff (for lack of a better phrase) in Linux, you can get this working.
Step 1: Go download the android SDK
http://developer.android.com/sdk/index.html
When it is done downloading, unzip the file into your home directory. Make sure to rename the folder androidsdk
Open up the newly unzipped folder and go into the tools directory. run the android shell script.
NOTE: WHEREVER IT SAYS "androidsdk" AS A DIRECTORY IN THIS GUIDE, YOU WILL HAVE TO REPLACE THAT WITH WHATEVER YOU NAME THE FOLDER. (I would suggest just naming it androidsdk)
Go to "available packages" and select all of the boxes. Once they are all selected, click on "Install" in the bottom right corner.
Go grab a cup of hot chocolate. That is an order.
Go into the platform-tools directory in the sdk directory (androidsdk) and right click on adb. Go to "properties" then the "permissions" tab and make sure the box that reads "allow executing file as program" is checked.
Go to the "open with" tab and add "autorun prompt."
Step 2: Get your paths in order
Go to your home folder and hit ctrl H to show all of the hidden folders and files.
Find bashrc and open it with the text editor. Copy and paste the following text at the very top.
#AndroidDev PATH
export PATH=${PATH}:/androidsdk/tools
Open up your terminal and type:
export PATH=$PATH:/androidsdk/tools
gksudo gedit /etc/udev/rules.d/51-android.rules
#When it opens up the file 51-android.rules, copy and paste this into it, then save the file:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
ENV{PRODUCT}=="0e79/*", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0e79", MODE="0666"
Plug in your Archos Gen8 Tablet via USB.
https://dl-web.dropbox.com/get/AndroidFiles/LINUX_SDK_ADB_INSTALLER.zip?w=b4bd354e&dl=1
(The credit is in the code)
Download that and extract the zip to your home directory.
Go to the home directory and run the LINUX_SDK_ADB_INSTALLER shell script
It will download and install the drivers for ADB.
Step 3: Nautilus-ize it
Open up another terminal and type in:
sudo nautilus
(If you don't have nautilus like i didn't, just type in: sudo apt-get install nautilus)
once a window pops open that says "root", go ahead and navigate back to the filesystem (one folder up)
navigate to /usr/local/androidsdk/tools and make sure that adb is still an executable and is set to open with the "autorun prompt" (like in step 2)
close the window that nautilus opened up and shut down the terminal to end the root session.
Step 4: Finishing touches.
Go to the .Android directory in Home (it is hidden, you will have to put ctrl H to make it show) and find a file called adb_usb.ini ( if there isn't one, then you just have to create a text file and save it as adb_usb.ini )
Copy and paste
"0x0e79" >> ~/.android/adb_usb.ini
Into the adb_usb.ini file
Step 5: Run ADB.
Open up a terminal and type:
cd /usr/local/androidsdk/tools/
Type:
echo "0x0e79" >~/.android/adb_usb.ini
./adb kill-server
./adb start-server
type in ./adb devices
your Gen8 Tab should show up now as A70-3FAXXXXX-XXXXX-XXXXX device (the X's are your serial number. Don't freak out if you don't get a bunch of X's)
you can now run all of the adb commands by typing:
./adb kill-server
./adb reboot
./adb etc... etc...
(Those are examples. you dont have to actually type them in)
Voila. You are now all connected via ADB.
If you have any questions or something isn't working, we can troubleshoot in the comments.
I hope i was able to help those using Ubuntu 10.10 that need ADB.
(Hopefully if we get this working, it will be easier for developers to pull/ push files and get things working better.)
~ClothoBuer6293
~PokeJake2002
I get error 403 when i try to download the file.
http://forum.xda-developers.com/attachment.php?attachmentid=448536&d=1290585848
There. That is the link to the original location of the file.
I guess i need to work on making dropbox links.
There's a couple of things wrong, since it's mixing terminal commands with doing things entirely via the GUI (Step 4 more precisely). It also seems it's mixing guides from different sources, there's a couple of redundant steps. I don't think you've done these steps as they stand, they wouldn't have worked
This is my suggestion:
Step 1. Download SDK and extract it
Step 2. Run android shell script in extracted_folder/tools (just double click and choose run in Ubuntu). If you just want adb then it's sufficient to mark only "Android SDK Platform-tools revision 1" for installation. The adb executable ends up in extracted_folder/platform-tools, and already has the exacutable bit set.
Step 3. For the device to show up with adb you need to do the udev step above, that is:
gksudo gedit /etc/udev/rules.d/51-android.rules (in a terminal) and paste this in the file
Code:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
ENV{PRODUCT}=="0e79/*", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0e79", MODE="0666"
In the same terminal, enter
gedit ~/.android/adb_usb.ini
and paste this in the file (or add at the bottom, if you already have it)
Code:
0x0e79
Step 4. Enable USB Debugging on the Archos (Settings -> Applications -> Development) and connect it to the computer
Step 5. Navigate to extracted_folder/platform_tools and run
./adb devices
(if nothing shows up, run ./adb kill-server followed by ./adb start-server and then ./adb devices again)
So what needs to be fixed in the guide is:
* the redundant step of downloading adb separately
* step 4 is really messed up, it's pasting terminal commands in the adb_usb.ini file and if it worked for you, it's because after pasting the terminal command you actually in Step 5 also echo the vendor ID to the end of file. Also, step 4 uses relative paths (./) to the adb executable, which indicates that the path step hasn't been done. Actually, come to think of it you get "no such file or directory" error if you enter ./adb if you don't happen to be in the right directory, so adding the adb folder to PATH isn't going to help.
Personally, I think the path step can be skipped altogether, but if people really want to be able to enter the adb command when they open a terminal window they should make sure the put the folder somewhere they plan to keep it. The best thing is for people to know how the basic terminal command works, as that is what they are using for adb anyway.
Thanks. This is pretty much my first walkthrough so i appreciate your assistance.
Sent from my A70S using Tapatalk
It's a good first attempt, you're detailed in your steps which is good. One thing which is nice though, is describing why something is done too, for example the case with adding the udev rule etc. Speaking of that, thanks a bunch for the info on that, wouldn't have gotten my Archos to show up without it
Thanks. Haha.
I was really confused and I think most of what I did to get it to work was on accident.
I just didnt see any particular howtos on getting ADB for Archos Gen8 working in Ubuntu so I thought I would type one up based on how I got it to work and hope that smarter developers would correct me and help me to polish it.
The only way I have been able to connect to the Archos is to run as "root". Is this the purpose of the "nautilus" instruction? I thought the MODE="0666" would make the device accessible to all users. If I try this as a normal user, the device appears with "no permissions".
How do you fix this?
pokejake2002 said:
I've been struggling with this for about six hours. Now, I have finally worked out a solution.
Hopefully it works for you. I will do my best to tell you exactly what I did so that if you don't entirely understand how to do stuff (for lack of a better phrase) in Linux, you can get this working.
Step 1: Go download the android SDK
http://developer.android.com/sdk/index.html
When it is done downloading, unzip the file into your home directory. Make sure to rename the folder androidsdk
Open up the newly unzipped folder and go into the tools directory. run the android shell script.
NOTE: WHEREVER IT SAYS "androidsdk" AS A DIRECTORY IN THIS GUIDE, YOU WILL HAVE TO REPLACE THAT WITH WHATEVER YOU NAME THE FOLDER. (I would suggest just naming it androidsdk)
Go to "available packages" and select all of the boxes. Once they are all selected, click on "Install" in the bottom right corner.
Go grab a cup of hot chocolate. That is an order.
Go into the platform-tools directory in the sdk directory (androidsdk) and right click on adb. Go to "properties" then the "permissions" tab and make sure the box that reads "allow executing file as program" is checked.
Go to the "open with" tab and add "autorun prompt."
Step 2: Get your paths in order
Go to your home folder and hit ctrl H to show all of the hidden folders and files.
Find bashrc and open it with the text editor. Copy and paste the following text at the very top.
#AndroidDev PATH
export PATH=${PATH}:/androidsdk/tools
Open up your terminal and type:
export PATH=$PATH:/androidsdk/tools
gksudo gedit /etc/udev/rules.d/51-android.rules
#When it opens up the file 51-android.rules, copy and paste this into it, then save the file:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
ENV{PRODUCT}=="0e79/*", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0e79", MODE="0666"
Plug in your Archos Gen8 Tablet via USB.
https://dl-web.dropbox.com/get/AndroidFiles/LINUX_SDK_ADB_INSTALLER.zip?w=b4bd354e&dl=1
(The credit is in the code)
Download that and extract the zip to your home directory.
Go to the home directory and run the LINUX_SDK_ADB_INSTALLER shell script
It will download and install the drivers for ADB.
Step 3: Nautilus-ize it
Open up another terminal and type in:
sudo nautilus
(If you don't have nautilus like i didn't, just type in: sudo apt-get install nautilus)
once a window pops open that says "root", go ahead and navigate back to the filesystem (one folder up)
navigate to /usr/local/androidsdk/tools and make sure that adb is still an executable and is set to open with the "autorun prompt" (like in step 2)
close the window that nautilus opened up and shut down the terminal to end the root session.
Step 4: Finishing touches.
Go to the .Android directory in Home (it is hidden, you will have to put ctrl H to make it show) and find a file called adb_usb.ini ( if there isn't one, then you just have to create a text file and save it as adb_usb.ini )
Copy and paste
"0x0e79" >> ~/.android/adb_usb.ini
Into the adb_usb.ini file
Step 5: Run ADB.
Open up a terminal and type:
cd /usr/local/androidsdk/tools/
Type:
echo "0x0e79" >~/.android/adb_usb.ini
./adb kill-server
./adb start-server
type in ./adb devices
your Gen8 Tab should show up now as A70-3FAXXXXX-XXXXX-XXXXX device (the X's are your serial number. Don't freak out if you don't get a bunch of X's)
you can now run all of the adb commands by typing:
./adb kill-server
./adb reboot
./adb etc... etc...
(Those are examples. you dont have to actually type them in)
Voila. You are now all connected via ADB.
If you have any questions or something isn't working, we can troubleshoot in the comments.
I hope i was able to help those using Ubuntu 10.10 that need ADB.
(Hopefully if we get this working, it will be easier for developers to pull/ push files and get things working better.)
~ClothoBuer6293
~PokeJake2002
Click to expand...
Click to collapse
I thought the instructions from Archos were pretty clear. I've never had an issue with ADB in Linux.
Code:
Add Archos vendor ID (0x0e79) to adb_usb.ini in .android folder in your home directory:
Windows: echo 0x0e79 >> "%USERPROFILE%\.android\adb_usb.ini"
Macos: echo "0x0e79" >> ~/.android/adb_usb.ini
Linux: echo "0x0e79" >> ~/.android/adb_usb.ini
For Linux users only: You need to add a udev rule if ADB only works as root:
Create a file /etc/udev/rules.d/51-android.rules that contains the following lines:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
ENV{PRODUCT}=="e79/*", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="e79", MODE="0666"
Make the rule known to udev with the following command:
udevadm control --reload-rules (or udevcontrol reload_rules on older systems)
foh1981 said:
There's a couple of things wrong, since it's mixing terminal commands with doing things entirely via the GUI (Step 4 more precisely). It also seems it's mixing guides from different sources, there's a couple of redundant steps. I don't think you've done these steps as they stand, they wouldn't have worked
This is my suggestion:
Step 1. Download SDK and extract it
Step 2. Run android shell script in extracted_folder/tools (just double click and choose run in Ubuntu). If you just want adb then it's sufficient to mark only "Android SDK Platform-tools revision 1" for installation. The adb executable ends up in extracted_folder/platform-tools, and already has the exacutable bit set.
Step 3. For the device to show up with adb you need to do the udev step above, that is:
gksudo gedit /etc/udev/rules.d/51-android.rules (in a terminal) and paste this in the file
Code:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device",
ENV{PRODUCT}=="0e79/*", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0e79", MODE="0666"
In the same terminal, enter
gedit ~/.android/adb_usb.ini
and paste this in the file (or add at the bottom, if you already have it)
Code:
0x0e79
Step 4. Enable USB Debugging on the Archos (Settings -> Applications -> Development) and connect it to the computer
Step 5. Navigate to extracted_folder/platform_tools and run
./adb devices
(if nothing shows up, run ./adb kill-server followed by ./adb start-server and then ./adb devices again)
So what needs to be fixed in the guide is:
* the redundant step of downloading adb separately
* step 4 is really messed up, it's pasting terminal commands in the adb_usb.ini file and if it worked for you, it's because after pasting the terminal command you actually in Step 5 also echo the vendor ID to the end of file. Also, step 4 uses relative paths (./) to the adb executable, which indicates that the path step hasn't been done. Actually, come to think of it you get "no such file or directory" error if you enter ./adb if you don't happen to be in the right directory, so adding the adb folder to PATH isn't going to help.
Personally, I think the path step can be skipped altogether, but if people really want to be able to enter the adb command when they open a terminal window they should make sure the put the folder somewhere they plan to keep it. The best thing is for people to know how the basic terminal command works, as that is what they are using for adb anyway.
Click to expand...
Click to collapse
It's important to ad ADB to your PATH. Many aapt tools and the like use it. And you can't just put ADB in every directory you want to work in. I do framework stuff in a framework folder, os stuff in others, etc. I'm not going to use the full path every time I type.
pokejake2002:
All that is really needed in this tutorial is "Download the SDK, extract, run ./tools/android and download the ADB driver. Add vendor id to .android/adb_usb.ini, then create udev rule /etc/udev/rules.d/51-android.rules. Add export PATH=$PATHdownloaded directory)/android-sdk/platform-tools to bash.rc"
That's it. I'm not sure what all that extra stuff is. You've done almost every step twice, and some are incorrect, such as the export path, you did it twice, and the actual path should be platform-tools, not just tools, and you echoed the vendor ID twice as well.
Also, nautilus is included by default in ubuntu > 7.0, so i'm not sure how it wasn't installed on 10.10.
Also, all the "./adb" lines should just be "adb" if you exported the path correctly, which like i said, is supposed to be platform-tools, not just tools.
Just FYI, not trying to flame, I can tell you don't have much experience, it's not a bad thing. But also, "(Hopefully if we get this working, it will be easier for developers to pull/ push files and get things working better.)" I don't know any developers who haven't had adb working from day one.

[HOW-TO] Install & Use ADB tool | Android Debug Bridge | Drivers - Videos - Tutorial

[HOW-TO] Install & Use ADB tool | Android Debug Bridge | Drivers - Videos - Tutorial
WHAT DO I NEED?
FIRST: You need drivers, you should have them already if you are rooted eather with Indirect or Cfoesch methods.
If you don't have them then download ADB + Fastboot + Drivers.zip [There is NO need to install SDK on Windows]
To install Nook Tablet USB and ADB drivers correctly please watch the following video:
1. Windows
2. Ubuntu Linux
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
SECOND: In order to use "adb remount" you need to install [App]: ADB Root Hijack [ADB Runs as Root now] by Indirect
LET'S START...
*All the examples refers to /data/app path you can change to /system/app or any other path you need in your NOOK tablet
- Plug your Nook tablet to your computer
- Open a CMD terminal on Windows:
Start>>run>> type cmd>> click OK (WinXP)
Start>> in search box type cmd>> right click Run as Administrator (Win7)
- Once opened type:
*Let's say your adb tools are in C:\nookroot folder
cd C:\nookroot
adb devices (If you get a code of numbers and letter means your device is recognized, if not then something is wrong with your drivers > Troubleshoot)
adb remount (to change from r/o to r/w)
-----------------------------------------------------
Commands to Fix Permissions: (There is no need of this, when you push files it gives right permissions)
adb shell chmod 644 /system/app/appname.apk (for a specific application)
adb shell chmod 644 /data/app/appname.apk
adb shell chmod 644 /system/app/*.apk (for all the applications)
adb shell chmod 644 /data/app/*.apk
-----------------------------------------------------
Commands to Change Owner to Root:
adb shell chown root /system/app/appname.apk
Click to expand...
Click to collapse
Installing an Aplication .apk
Put the .apk file into C:\nookroot folder and type
Code:
adb install [B]appname[/B].apk
Uninstalling an Aplication
There is an uninstall adb commans that always shows failure!!!
So we are going to use Adb Shell:
Code:
adb shell
# cd data/app
# ls
# rm -r appname.apk
# ls (You will not find this application, you just removed it!)
Ctrl+c to exit shell mode
Push & Pull commands
Pull:
Code:
adb pull /data/app/appname.apk
If you want to PULL all the files located in a folder then:
Code:
adb pull /data/app test
to pull all the .apk's located /data/app and save them into a folder that it will create in C:\nookroot named test
Push:
Code:
adb push appname.apk /data/app
If you want to PUSH all the files located in a folder then:
Code:
adb push test /data/app
to push all the .apk's located in C:\nookroot\test folder to /data/app
Close ADB
Code:
adb reboot (to reboot your Nook Tablet)
--------------------------
adb kill-server (to stop adb server)
exit
good! is there a menu that contains full adb commands?
Nicely done. This is the best write up of how to use basic adb commands I have seen. Thanks for posting..
ms2003 said:
good! is there a menu that contains full adb commands?
Click to expand...
Click to collapse
type adb help to get the full list of them
Where's the troubleshooting FAQ? My Nook shows up as an Android phone in Device Manager, and adb doesn't list it.
Nevermind, got the drivers installed right. Stupid Windows.
Update april/10!!!
Added video to install SDK and ADB tools in Ubuntu Linux
~ Veronica
How do you change the name of a file??
Thank you
coolfreebies
coolfreebies said:
How do you change the name of a file??
Thank you
coolfreebies
Click to expand...
Click to collapse
If you refer to the .ini file ln windows, right click then edit. If on Ubunto, right click then open with the a text editor (i dont remember the name - just woke up lol).
~ V
Sent from my Nook Tablet using xda premium
Excellent. This will come in handy once I get time to start rooting the NT. Thanks
I am trying to create a batch file to run the ADB pull command so I can have my PC task scheduler run an Android backup automatically.
The one thing that is stumping me, though, is how to succesfully have the batch file auto date stamp the folder. I have this:
adb pull /sdcard/ /Galaxy Nexus Auto Backup/sdcard %date:~-10,2%-%date:~-7,2%-%date:~-4,4%/
which displays correctly in the CMD prompt, but doesn't run. It instead brings up the list of commands and switches.
If I use the standard:
adb pull /sdcard/ /sdcard/
it works correctly. Any suggestions on how to get the date stamp idea to work?
Thanks!!!
-David
Hello, a link took me here because i want to know how to use "adb".
I've read your instructions on how to use adb and i search it in youtube to see it in action.
Now i want to know the difference of these commands:
adb install
and
adb push
because im confused. but i believe they're both the same,am i right? to install an app.
and same as the adb pull and adb shell? uninstalling the app.
please, correct me if im wrong
This is a bit confusing... I bricked my Infinity and I need it back ASAP, but whenever I try to push a custom ROM into the SD, it always says "protocol failure", what could this be? I got the adb drivers installed...
Win 8 Driver Signature Enforcement Fix
Well, this is my first post on xda. BTW I am a noob, regular schlub, loser user but I do try to take xda's "find it before you ask an idiotic question" policy to heart. I was able to find this solution before asking for help and thought i would share it here. All I have done is summarize the original post and updates. I hope y'all find this helpful.
the problem i ran into was the drivers in the attached .zip file could not be installed on a Windows 8 machine. The error was a failure to install b/c of an error in reading the has of one of the catalog files. I found a site that gives you a solution to this error.. Here's a summary:
Go to cmd prompt and enter "| shutdown -o -r -t 0"
Wait for bit...
Click TROUBLESHOOT
Click ADVANCED OPTIONS
Click WINDOWS STARTUP SETTINGS
Click RESTART
The computer will restart and list of options will appear before logging in.
Select the Disable driver signature enforcement option. It was number 7 on the list i got.
To reenable the driver signature enforcement, just restart your computer normally.
Since this is my first post xda won't let me link the source site, so here it is below in case you would like to visit it. All credit goes to this guy.:good:
laslow.net/2012/03/14/disable-driver-signature-enforcement-in-windows-8/​
Can you developers help me please!!
I've been doing just fine with ADB, etc. I have been flashing for a long time and now all of a sudden ADB is not working. I've installed SDK twice, unistalled and installed drivers. Did everything. I get it that this just won't work on Windows 7 so I'm back on XP where I never had a problem and currently am. Yes, debugging is on on the phone too. I'm above the basics. When I plug in an LG it just says sooner ADB (something like that and I know your familiar). When I plug in a Samsung device manager says Samusng Android Composite ADB interface. And when I direct the driver install to winsub inf I always get "the specified location does not contain information about your device". Also ADB devices is not recognizing anything either. I event tried this with the Samsung in download mode.
Thanx
Good tutorial, it´s help me a lot. Thanks!!!
How do I know where adb install ?
PalAlexander said:
How do I know where adb install ?
Click to expand...
Click to collapse
On Windows, typically C:\Program Files\Android\android-sdk\platform-tools\
ADB use instructions clearly formatted for referenxce
Hi, this is a post I just hope will be helpful. When I started using ADB I would look at the internal Help and the formatting was so screwed up it was hard to understand. Fighting with this for the umpteenth time last night I got mad, pulled out a code editor (too bad it wasn't emacs because that's probably the way the file was made-- either that or it was created as a man page) and spent a half hour straightening things out. The help is so much more useful now I'm putting it here in the hope it may help you, too. Now let's see if I should have formatted this as Code rather than a Quote to keep lines from breaking, etc.
Android Debug Bridge version 1.0.31
-a - directs adb to listen on all interfaces for a c onnection
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r unning.
-s <specific device> - directs command to the device or emulator with the given
serial number or qualifier. Overrides ANDROID_SERIAL environment variable.
-p <product name or path> - simple product name like 'sooner', or a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT environment variable is used,
which must
be an absolute path.
-H - Name of adb server host (default: localhost)
-P - Port of adb server (default: 5037)
devices [-l] - list all connected devices
('-l' will also list device qualifiers)
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devic es.
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward --list - list all forward socket connections.
the format is a list of lines with the following format:
<serial> " " <local> " " <remote> "\n"
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only) adb forward --no-rebind <local> <remote>
- same as 'adb forward <local> <remote>' but fails
if <local> is already forwarded:
adb forward --remove <local> - remove a specific forward socket connection
adb forward --remove-all - remove all forward socket connections
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] [--algo <algorithm name> --key <hex-encoded key> -- iv <hex-encoded i
<file>
- push this package file to the device and instal l it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data )
('-s' means install on SD card instead of inter nal storage)
('--algo', '--key', and '--iv' mean the file is encrypted already)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories )
adb bugreport - return all information from the device
that should be included in a bug report.
adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all] [-system|-nosystem]
[<packages...>]
- write an archive of the device's data to <file> .
If no -f option is supplied then the data is written to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks themselves
in the archive; the default is noapk.)
(-obb|-noobb enable/disable backup of any installed apk expansion
(aka .obb) files associated with each application; the default
is noobb.)
(-shared|-noshared enable/disable backup of the
device's
shared storage / SD card contents; the default is noshared.)
(-all means to back up all installed applications)
(-system|-nosystem toggles whether -all automatically includes
system applications; the default is to include system apps)
(<packages...> is the list of applications to be backed up. If
the -all or -shared flags are passed, then the package
list is optional. Applications explicitly given on the
command line will be included even if -nosystem would
ordinarily cause them to be omitted.)
adb restore <file> - restore device contents from the <file> backup archive
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb get-devpath - prints: <device-path>
adb status-window - continuously print device status for a specifie d device
adb remount - remounts the /system partition on the device re ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or
recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on th e specified
port networking:
adb ppp <tty> [parameters] - Run PPP over USB. Note: you should not automatically
start a PPP connection.
---<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1 [parameters]
- Eg. defaultroute debug dump local notty usepeerdns
adb sync notes:
adb sync [ <directory> ] <localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list of the following values
1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes priority over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these debug tags are printed.
Click to expand...
Click to collapse
Best wishes,
Leon Malinofsky
lavero.burgos said:
WHAT DO I NEED?
FIRST: You need drivers, you should have them already if you are rooted eather with Indirect or Cfoesch methods.
If you don't have them then download ADB + Fastboot + Drivers.zip [There is NO need to install SDK on Windows]
To install Nook Tablet USB and ADB drivers correctly please watch the following video:
1. Windows
2. Ubuntu Linux
SECOND: In order to use "adb remount" you need to install [App]: ADB Root Hijack [ADB Runs as Root now] by Indirect
LET'S START...
*All the examples refers to /data/app path you can change to /system/app or any other path you need in your NOOK tablet
- Plug your Nook tablet to your computer
- Open a CMD terminal on Windows:
Start>>run>> type cmd>> click OK (WinXP)
Start>> in search box type cmd>> right click Run as Administrator (Win7)
- Once opened type:
*Let's say your adb tools are in C:\nookroot folder
Installing an Aplication .apk
Put the .apk file into C:\nookroot folder and type
Code:
adb install [B]appname[/B].apk
Uninstalling an Aplication
There is an uninstall adb commans that always shows failure!!!
So we are going to use Adb Shell:
Code:
adb shell
# cd data/app
# ls
# rm -r appname.apk
# ls (You will not find this application, you just removed it!)
Ctrl+c to exit shell mode
Push & Pull commands
Pull:
Code:
adb pull /data/app/appname.apk
If you want to PULL all the files located in a folder then:
Code:
adb pull /data/app test
to pull all the .apk's located /data/app and save them into a folder that it will create in C:\nookroot named test
Push:
Code:
adb push appname.apk /data/app
If you want to PUSH all the files located in a folder then:
Code:
adb push test /data/app
to push all the .apk's located in C:\nookroot\test folder to /data/app
Close ADB
Code:
adb reboot (to reboot your Nook Tablet)
--------------------------
adb kill-server (to stop adb server)
exit
Click to expand...
Click to collapse
When I run "adb devices" in command prompt, it says "list of devices attached" then a blank line.
The drivers for my tablet are fine because in 'My computer' my drive is listed as 'Xolo TW800' along with other HDD drives, without me installing any drivers for the tablet.
What to do?
Thanks

[GUIDE][HOWTO] How to push files using ADB Desire V

Hello guys today I am going to show you how to use a program called quick adb pusher, it is a great starting point for new android users who want to copy modified system files, without flashing update Zip’s all the time, it will also let member do things manually instead of relying on update ZIP's all the time. Besides of explaining how to use a simple program such a quick ADB Pusher, i will also explain in depth the commands of ADB through the actual command line interface, so here we go:
First of all we will start with The command line ADB, the quick adb pusher tutorial is further down the post.
Before we start explaining some of the code what is used in ADB, it is important you know what it is, it is called the Android-Debug-Bridge.
In order to even get ADB to wokr you need to follow these procedures:
Settings -> Developers options -> USB-de bugging
Then check that box, it will make you feel like a boss.
Now once you have done that your android device, is now setup for both development and ADB. Next you are going to plug your device into your computer, via a usb cable.
Once you have done that you need to go to the directory of your ADB interface, this is where you have the android SDK installed too, on a linux or mac based system this could be:
Code:
cd /home/yourusername/android-sdk-mac/tools
Once you have the ADB interface loaded into your terminal, if you type help it will show something similar to this:
Code:
Android Debug Bridge version 1.0.25
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <serial number> - directs command to the USB device or emulator with
the given serial number. Overrides ANDROID_SERIAL
envivornment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>:<port> - connect to a device via TCP/IP
disconnect <host>:<port> - disconnect from a TCP/IP device
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> <local> - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] <file> - push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recovery program
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition
is updated.
Now that you have ADB running here are some simple commands on how to use it:
How identify that your device is being recognised by ADB:
Code:
adb devices
Once this has been typed it should show something like this:
Code:
C:\Users\Daniel\Android development\ADB, Fastboot\adt-bundle-windows-x86_64\adt-
bundle-windows-x86_64\sdk\platform-tools>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
HT26GW507639 device
C:\Users\Daniel\Android development\ADB, Fastboot\adt-bundle-windows-x86_64\adt-
bundle-windows-x86_64\sdk\platform-tools>
If there is a line what says "HT26GW507639" with "device" at the end your devices is successfully recognised by ADB!
How to pull data from your device:
Code:
adb -s [yourdeviceADBNUMBERHERE] pull /system /the directory you want it saved too
This command will pull all the files from your devices system directory, to the directory you told it to be saved too.
I did the pull command on a PC and I was able to get all the data from following directories on my Desire C:
/data
/system
How to push data to your device:
Code:
adb -s [yourdeviceserialnumberhere] push /system/app/whatever.apk
This command will push the files you wish to your phone, though this command.
The most basic ADB commands
ADB push, as explained before this command is used to send files to your device
Code:
adb push
ADB pull, as explained before it pulls files from your phone, and makes a copy of them.
Code:
adb pull
ADB Install and example of this code would be "adb install c:\users\app.apk"
Code:
adb install c:\users\app.apk
ADB Shell, this command begins a shell connection to the device on the other end.
Code:
adb shell
ADB reboot, it does what it says
Code:
adb reboot
ADB reboot recovery, this also does what it says
Code:
adb reboot recovery
ADB reboot bootloader, this also does what is says, like the ones above.
Code:
adb reboot bootloader
ADB remount, this remounts the devices file system for editing etc...
Code:
adb remount
ADB Shell commands:
cd, this command changes directories in your devices filesystem.
Code:
cd /system/app
is, this command listes all of the file present in the directory you are at.
Code:
is /system/app
rm, this command removes file from your device.
rm /system/app/whatever.apk​cp, this command copies files, and is very similar to the cat command below.
Code:
cp /system/app/whatever.apk /sdcard/whatever.apk
cat, this command is also used to copy files to your device.
Code:
cat /system/app/whatever.apk > /sdcard/whatever.apk
exit, this command exits the ADB shell.
Code:
exit
If any of you are having any problems, read the FAQ first before posting a question in this thread, happy pushing!
If you think any other commands should me added to this section, PM me about it.
As explained above, the quick ADB pusher is an interface over the code based ADB. I will be a much easier approach for new user of android to get to grips to, that is why I am including it.
Hello guys today I am going to show you how to use a program called quick adb pusher, it is a great starting point for new android users who want to copy modified system files, without flashing update Zip’s all the time, so here we go:
First of all you want to download the quick adb pusher program, this is in both this thread and the revolution Rom thread on XDA, the link for the program is listed below:
Quick ADB Pusher​
Now you want to make sure your phone is plugged into your computer, but do not put it into USB storage mode. Make sure your USB de-bugging option is enabled it is located at:
Settings --> Developer options --> USB De-bugging​
Now you will start the quick ADB pusher program, once it has started it should detect your phone. If it does not then post a comment in the thread below and we will resolve the issue.
Watch the video below to clarify a few things, such as how to copy system apps etc...
Again I hope this tutorial helps some people out, remember to read the FAQ first before posting,, to prevent the same questions being asked time and time again.
FAQ
Do you guys want a guide on how to build roms for your device?
Sent from my HTC Desire C using xda premium
russell664 said:
Do you guys want a guide on how to build roms for your device?
Sent from my HTC Desire C using xda premium
Click to expand...
Click to collapse
Yes please I think it would be very interesting.
And thanks for your time in doing this :good:
AW: [GUIDE][HOWTO] How to push files using ADB Desire V
Me too
Sent from my HTC Desire V using xda premium
I will when I have time guys, if you want more guides and stuff, surely you can smash the thanks button right in the face for me. To show your support, and that you appreciate my work.
Creating our own custom roms
Yup. It really would be a great tutorial for newbies to get started to make things, which once they could only appreciate. I am myself good at programming and algorithms, but Android development is quite alien to me. I consider myself a potential developer, if only would I get a kick start at ROM making. Also we could be able to support unknown or local market devices. I think that would be really beneficial for the entire Android community to see new budding developers with their innovations. :angel:
Hit thanks if you agree.
russell664 said:
As explained above, the quick ADB pusher is an interface over the code based ADB. I will be a much easier approach for new user of android to get to grips to, that is why I am including it.
Hello guys today I am going to show you how to use a program called quick adb pusher, it is a great starting point for new android users who want to copy modified system files, without flashing update Zip’s all the time, so here we go:
First of all you want to download the quick adb pusher program, this is in both this thread and the revolution Rom thread on XDA, the link for the program is listed below:
Quick ADB Pusher​
Now you want to make sure your phone is plugged into your computer, but do not put it into USB storage mode. Make sure your USB de-bugging option is enabled it is located at:
Settings --> Developer options --> USB De-bugging​
Now you will start the quick ADB pusher program, once it has started it should detect your phone. If it does not then post a comment in the thread below and we will resolve the issue.
Watch the video below to clarify a few things, such as how to copy system apps etc...
Again I hope this tutorial helps some people out, remember to read the FAQ first before posting,, to prevent the same questions being asked time and time again.
Click to expand...
Click to collapse
It told me my devices wasn't rooted?
When trying to push a file to my internal storage on my Moto X does the file need to be located in a specific location? I am trying to root my device and need to push a file to my device. I am very new to this, and have adb working and my device showing up when i run "adb devices". I have a folder on my desktop titled "android" which contains adb, fastboot, sdk, and eclipse. Do I need to save the files I want to push to the root of this folder on my desktop? Thanks for the help!
stavebomb said:
When trying to push a file to my internal storage on my Moto X does the file need to be located in a specific location? I am trying to root my device and need to push a file to my device. I am very new to this, and have adb working and my device showing up when i run "adb devices". I have a folder on my desktop titled "android" which contains adb, fastboot, sdk, and eclipse. Do I need to save the files I want to push to the root of this folder on my desktop? Thanks for the help!
Click to expand...
Click to collapse
So push whole folder by
Code:
adb push <path on PC> <path on Moto X>
How to push this command
Please help me:
http://forum.xda-developers.com/showthread.php?t=2708466
dd if=/dev/zero of=/dev/block/platform/msm_sdcc.1/by-name/laf
on my LG G2 (D802 ver 20B without root indian version)
My tablet is stuck in the recovery mode on a permanent loop. Please help
I'm just learning to code and honestly as of 6 months ago I didn't even know how to turn a computer on although I practice and take classes I'm petrified I'm going to screw up my computer. Anyway, my tablet is stuck in the recovery mode on a permanent loop so I can't put it in debug development mode. Please help me fix it. I can't afford a new one and I use it for work when I'm at a job site. I downloaded the Android Suite bundle zip (the one that said recommended) also the sdk tools zip, the quick adb pusher and the lollipop image file, lollipop rom file. I've tried every one of the commands from your site and many many other sites and it's not fixing my tablet. I know you guys don't like stupid questions but I'm feeling like a moron because I can't figure it out. Could someone please please help me fix me tablet.
russell664 said:
Hello guys today I am going to show you how to use a program called quick adb pusher, it is a great starting point for new android users who want to copy modified system files, without flashing update Zip’s all the time, it will also let member do things manually instead of relying on update ZIP's all the time. Besides of explaining how to use a simple program such a quick ADB Pusher, i will also explain in depth the commands of ADB through the actual command line interface, so here we go:
First of all we will start with The command line ADB, the quick adb pusher tutorial is further down the post.
Before we start explaining some of the code what is used in ADB, it is important you know what it is, it is called the Android-Debug-Bridge.
In order to even get ADB to wokr you need to follow these procedures:
Settings -> Developers options -> USB-de bugging
Then check that box, it will make you feel like a boss.
Now once you have done that your android device, is now setup for both development and ADB. Next you are going to plug your device into your computer, via a usb cable.
Once you have done that you need to go to the directory of your ADB interface, this is where you have the android SDK installed too, on a linux or mac based system this could be:
Code:
cd /home/yourusername/android-sdk-mac/tools
Once you have the ADB interface loaded into your terminal, if you type help it will show something similar to this:
Code:
Android Debug Bridge version 1.0.25
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <serial number> - directs command to the USB device or emulator with
the given serial number. Overrides ANDROID_SERIAL
envivornment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>:<port> - connect to a device via TCP/IP
disconnect <host>:<port> - disconnect from a TCP/IP device
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> <local> - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] <file> - push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recovery program
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition
is updated.
Now that you have ADB running here are some simple commands on how to use it:
How identify that your device is being recognised by ADB:
Code:
adb devices
Once this has been typed it should show something like this:
Code:
C:\Users\Daniel\Android development\ADB, Fastboot\adt-bundle-windows-x86_64\adt-
bundle-windows-x86_64\sdk\platform-tools>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
HT26GW507639 device
C:\Users\Daniel\Android development\ADB, Fastboot\adt-bundle-windows-x86_64\adt-
bundle-windows-x86_64\sdk\platform-tools>
If there is a line what says "HT26GW507639" with "device" at the end your devices is successfully recognised by ADB!
How to pull data from your device:
Code:
adb -s [yourdeviceADBNUMBERHERE] pull /system /the directory you want it saved too
This command will pull all the files from your devices system directory, to the directory you told it to be saved too.
I did the pull command on a PC and I was able to get all the data from following directories on my Desire C:
/data
/system
How to push data to your device:
Code:
adb -s [yourdeviceserialnumberhere] push /system/app/whatever.apk
This command will push the files you wish to your phone, though this command.
The most basic ADB commands
ADB push, as explained before this command is used to send files to your device
Code:
adb push
ADB pull, as explained before it pulls files from your phone, and makes a copy of them.
Code:
adb pull
ADB Install and example of this code would be "adb install c:\users\app.apk"
Code:
adb install c:\users\app.apk
ADB Shell, this command begins a shell connection to the device on the other end.
Code:
adb shell
ADB reboot, it does what it says
Code:
adb reboot
ADB reboot recovery, this also does what it says
Code:
adb reboot recovery
ADB reboot bootloader, this also does what is says, like the ones above.
Code:
adb reboot bootloader
ADB remount, this remounts the devices file system for editing etc...
Code:
adb remount
ADB Shell commands:
cd, this command changes directories in your devices filesystem.
Code:
cd /system/app
is, this command listes all of the file present in the directory you are at.
Code:
is /system/app
rm, this command removes file from your device.
rm /system/app/whatever.apk​cp, this command copies files, and is very similar to the cat command below.
Code:
cp /system/app/whatever.apk /sdcard/whatever.apk
cat, this command is also used to copy files to your device.
Code:
cat /system/app/whatever.apk > /sdcard/whatever.apk
exit, this command exits the ADB shell.
Code:
exit
If any of you are having any problems, read the FAQ first before posting a question in this thread, happy pushing!
If you think any other commands should me added to this section, PM me about it.
Click to expand...
Click to collapse
I Want to Thank Russell664. I followed your instructions and my tablet works again.
Thank you very much. You do not know how appreciative I am for your help. I hate feeling so stupid about these things. Your detailed guide was so informative and so so helpful. Debbie from Handyman-Girl
:good:
russell664 said:
Hello guys today I am going to show you how to use a program called quick adb pusher, it is a great starting point for new android users who want to copy modified system files, without flashing update Zip’s all the time, it will also let member do things manually instead of relying on update ZIP's all the time. Besides of explaining how to use a simple program such a quick ADB Pusher, i will also explain in depth the commands of ADB through the actual command line interface, so here we go:
First of all we will start with The command line ADB, the quick adb pusher tutorial is further down the post.
Before we start explaining some of the code what is used in ADB, it is important you know what it is, it is called the Android-Debug-Bridge.
In order to even get ADB to wokr you need to follow these procedures:
Settings -> Developers options -> USB-de bugging
Then check that box, it will make you feel like a boss.
Now once you have done that your android device, is now setup for both development and ADB. Next you are going to plug your device into your computer, via a usb cable.
Once you have done that you need to go to the directory of your ADB interface, this is where you have the android SDK installed too, on a linux or mac based system this could be:
Code:
cd /home/yourusername/android-sdk-mac/tools
Once you have the ADB interface loaded into your terminal, if you type help it will show something similar to this:
Code:
Android Debug Bridge version 1.0.25
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <serial number> - directs command to the USB device or emulator with
the given serial number. Overrides ANDROID_SERIAL
envivornment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>:<port> - connect to a device via TCP/IP
disconnect <host>:<port> - disconnect from a TCP/IP device
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> <local> - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] <file> - push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recovery program
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition
is updated.
Now that you have ADB running here are some simple commands on how to use it:
How identify that your device is being recognised by ADB:
Code:
adb devices
Once this has been typed it should show something like this:
Code:
C:\Users\Daniel\Android development\ADB, Fastboot\adt-bundle-windows-x86_64\adt-
bundle-windows-x86_64\sdk\platform-tools>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
HT26GW507639 device
C:\Users\Daniel\Android development\ADB, Fastboot\adt-bundle-windows-x86_64\adt-
bundle-windows-x86_64\sdk\platform-tools>
If there is a line what says "HT26GW507639" with "device" at the end your devices is successfully recognised by ADB!
How to pull data from your device:
Code:
adb -s [yourdeviceADBNUMBERHERE] pull /system /the directory you want it saved too
This command will pull all the files from your devices system directory, to the directory you told it to be saved too.
I did the pull command on a PC and I was able to get all the data from following directories on my Desire C:
/data
/system
How to push data to your device:
Code:
adb -s [yourdeviceserialnumberhere] push /system/app/whatever.apk
This command will push the files you wish to your phone, though this command.
The most basic ADB commands
ADB push, as explained before this command is used to send files to your device
Code:
adb push
ADB pull, as explained before it pulls files from your phone, and makes a copy of them.
Code:
adb pull
ADB Install and example of this code would be "adb install c:\users\app.apk"
Code:
adb install c:\users\app.apk
ADB Shell, this command begins a shell connection to the device on the other end.
Code:
adb shell
ADB reboot, it does what it says
Code:
adb reboot
ADB reboot recovery, this also does what it says
Code:
adb reboot recovery
ADB reboot bootloader, this also does what is says, like the ones above.
Code:
adb reboot bootloader
ADB remount, this remounts the devices file system for editing etc...
Code:
adb remount
ADB Shell commands:
cd, this command changes directories in your devices filesystem.
Code:
cd /system/app
is, this command listes all of the file present in the directory you are at.
Code:
is /system/app
rm, this command removes file from your device.
rm /system/app/whatever.apk​cp, this command copies files, and is very similar to the cat command below.
Code:
cp /system/app/whatever.apk /sdcard/whatever.apk
cat, this command is also used to copy files to your device.
Code:
cat /system/app/whatever.apk > /sdcard/whatever.apk
exit, this command exits the ADB shell.
Code:
exit
If any of you are having any problems, read the FAQ first before posting a question in this thread, happy pushing!
If you think any other commands should me added to this section, PM me about it.
Click to expand...
Click to collapse

Categories

Resources