I need help setting up ADB - myTouch 4G Q&A, Help & Troubleshooting

I've had the SDK on my computer for months but never really got into ADB. When I go into tools and click on ADB it opens up and closes within a second. I'm trying to root my MT4G but the terminal method just isn't working for me so I'm going to try ADB. What do I have to do to get ADB setup and working with my MT4G?

Let me get home (be about 30 to 45 min) and I will try and walk you thru it.
My MyGlacier 4G MINE!!!

Arcadia310 said:
I've had the SDK on my computer for months but never really got into ADB. When I go into tools and click on ADB it opens up and closes within a second. I'm trying to root my MT4G but the terminal method just isn't working for me so I'm going to try ADB. What do I have to do to get ADB setup and working with my MT4G?
Click to expand...
Click to collapse
ADB is a tool that needs to be ran from CMD Prompt. Just a quick example to make sure your seeing your phone and assuming you have already extracted the SDK package. FYI, I moved the tools folder into the sdk folder, makes it easier to access. I would open cmd promt and type:
Note: Hit enter at the end of each line.
cd \
cd sdk/tools
adb devices (this will start deamon and then show you your device if ADB drivers are installed.
To install the drivers plug your phone in and let it auto mount your sdcard then run HTCDriver.exe. Unplug your phone and plug it back in, it should now install the driver needed for ADB. To verify everything is installed right go to your Devices and look for Android USB Devices and under that should be My HTC.
Check out this link. Its kinda a how to typed up back in the G1 days.

YOu get this working?

Related

How to push files through ADB

Prerequisites have...
A:android-sdk-windows installed
B: (on your phone) go to menu>settings>applications>developement and make sure usb debugging is checked.
C: the file you are pushing must be placed in the tools folder of adb so if you are pushing file "build.prop.txt" this needs to be downloaded/copy and pasted in C:\android-sdk-windows\tools
1: go to run and type cmd (or just open your command prompt)
2: cd C:\android-sdk-windows\tools
3: adb remount
4: adb devices *if everything is set up right this should output a serial number*
5: adb push FFFFFFF.FFF /#####/###### *i hope my notes help here you need to put the file name in for the F(s) and in the pound signs you put the destination on the devices example adb push build.prop.txt /system/bin
6. repeat step 3 for multiple files
7. adb reboot this is how you finish
usadevil7193 said:
hi mate...i m new to android..i own a nexus1..hav rooted without unlockin d bootloader..i am tryin to push d track ball to wake mod...evry time i type adb remount it says permission denied..any ideas to get things workin...???????
Click to expand...
Click to collapse
Welcome to XDA and Android! Are you trying to get help for your Nexus One? This forum here is specifically for the HTC Hero CDMA.
You will probably find better and more specific help in the Nexus One forums which are here: http://forum.xda-developers.com/forumdisplay.php?f=556
Great post, very easy to follow, thank you.
yea I'm trying to do this, over and over, but with not luck. i have sdk on my pc and im running the cmd prompt to run adb remount & devices and its not picking up the phone, wth is going on, plz help
this also works for the samsung Galaxy S in recovery mode.
mikeybonez28 said:
yea I'm trying to do this, over and over, but with not luck. i have sdk on my pc and im running the cmd prompt to run adb remount & devices and its not picking up the phone, wth is going on, plz help
Click to expand...
Click to collapse
mine shows up but then says error, device offline
hi, i have adb recognizing my phone, but i still can't seem to push the files over.... every time i try, i get 'cannot stat 'su' : No such file or directory'. i have made sure over and over to put the files in the same folder where adb is.... actually i have tried placing the files in the tools folder, as well as the platform-tools folder, and i keep getting that error when i try to push anything.
any suggestions? thx
yogi2010 said:
hi, i have adb recognizing my phone, but i still can't seem to push the files over.... every time i try, i get 'cannot stat 'su' : No such file or directory'. i have made sure over and over to put the files in the same folder where adb is.... actually i have tried placing the files in the tools folder, as well as the platform-tools folder, and i keep getting that error when i try to push anything.
any suggestions? thx
Click to expand...
Click to collapse
i had the same issue with something i was trying to push. I think you need to make sure you have exactly the same file name like caps and all. i was trying to push rootexplorer.apk and i got the same message but i then changed it to RootExplorer.apk and it work.(notice the difference in caps)
just watch this and it'll explain everything.
http://www.youtube.com/xdadevelopers
Does it matter where sdk is installed my file path is
C:\Program Files\Android\android-sdk\tools
instead of
C:\android-sdk-windows\tools.
I just installed it in the default location.
I type adb remount and get the not recognised command.....
Thanks.
I don't think my phone is being picked up?
{LCD}Stelios said:
Does it matter where sdk is installed my file path is
C:\Program Files\Android\android-sdk\tools
instead of
C:\android-sdk-windows\tools.
I just installed it in the default location.
I type adb remount and get the not recognised command.....
Thanks.
I don't think my phone is being picked up?
Click to expand...
Click to collapse
Make sure your have the drivers for your phone installed first of all.....Then, in your command prompt you have to change directories to the sdk (which you made harder by not installing to C:\
Try: cd Program Files\Android\android-sdk\tools
Then type: adb devices
That should return "xxxxxxdevice" connected....Then you know you have it set up.
Look in kyouko sig he has all the commands for adb
Sent from my HERO200 using XDA App
Bierce22 said:
just watch this and it'll explain everything.
http://www.youtube.com/xdadevelopers
Click to expand...
Click to collapse
great video arse....thanks for the help donkey
Flashing fresh ROM via ADB in Linux
Hello there.
M volumeUp and VolumeDown buttons are broken on my rooted Desire HD, so I cannot go through CWM any longer.
With regard to this post, I would ask the followings:
1) can this method be used to flash a new ROM (i.e. Coredroid, Leedroid..) without the need of those 2 buttons ?
2) My PC runs Linux. How does it work with this O.S. ?
Thanks
paolo
pacut said:
Hello there.
M volumeUp and VolumeDown buttons are broken on my rooted Desire HD, so I cannot go through CWM any longer.
With regard to this post, I would ask the followings:
1) can this method be used to flash a new ROM (i.e. Coredroid, Leedroid..) without the need of those 2 buttons ?
2) My PC runs Linux. How does it work with this O.S. ?
Thanks
paolo
Click to expand...
Click to collapse
There is a thread somewhere on how to flash without a SD card and flashed using adb I believe, but don't take my word for it. Adb works fine with Linux, just have to set it up differently. Look in my sig and select the compile aosp on Ubuntu one and follow instructions on getting the USB set up.
Sent from Dorian's HTC Hero CDMA
Yes, I saw it. It's http://forum.xda-developers.com/showthread.php?t=911228
The fact is...still have to navigate through menu via VolumeUp/volumeDown buttons
Maybe through ROM manager, premium, I can install ROM direclty.
I am gonna trying
YES ! It works !
Hi I need help. I accidentally wipped my phone in CWM and now I'm trying to use adb push to push the update.zip into my phone sd everything seems to work but then in CMW it says there are no files..
any suggestions?
[Edit]
nevermind
I kept trying different locations
not sure which one did the trick but I'll list the one's I tried
so \update.zip /sdcard/
.... /sdcard/update.zip
(note I put "/update.zip" thinking maybe it needed to be reallocated to the same file/destination
Can i use adb push *.apk /system/app to push several files at once, and then repeat but using *.odex instead of *.apk? I keep ending up getting the same error, and i want to find out which app is messing with me...
rulermon said:
Prerequisites have...
A:android-sdk-windows installed
B: (on your phone) go to menu>settings>applications>developement and make sure usb debugging is checked.
C: the file you are pushing must be placed in the tools folder of adb so if you are pushing file "build.prop.txt" this needs to be downloaded/copy and pasted in C:\android-sdk-windows\tools
1: go to run and type cmd (or just open your command prompt)
2: cd C:\android-sdk-windows\tools
3: adb remount
4: adb devices *if everything is set up right this should output a serial number*
5: adb push FFFFFFF.FFF /#####/###### *i hope my notes help here you need to put the file name in for the F(s) and in the pound signs you put the destination on the devices example adb push build.prop.txt /system/bin
6. repeat step 3 for multiple files
7. adb reboot this is how you finish
Click to expand...
Click to collapse
Hey guys ...
I have also rooted my phone , everything was OK until one day i tried to write something to /system/app and i recieve this error:
in Addition , i am writing "adb shell" and it shows me $
if i am doing adb shell --> $ --> su --> it shows #
Can some1 knows what is the problem?

Having trouble rooting on Windows 7 64bit

I am having a bit of difficulty rooting my g2. I am not sure if its related to my os or not but i can not get it to work.
I have followed this and tried it all kinds of different ways.
addictivetips.com/mobile/what-is-adb-and-how-to-install-it-android/[/url]
I can get to my run command after doing all of that and it shows my serial number after typing adb devices but after that i can't enter any info in the sdk run command promt.
I have not been able to gain temp root yet because it won't let me enter the commands. I went to try to re-install java/sdk manager yet again and now it says java is not in the right path.
Any help?
If you're having troubles with ADB, why use it? You don't need ADB anymore to root the G2. It can all be done by placing the files on the SD card and running Terminal Emulator on the phone. You can run any of the prompts from ADB in the phone instead. I rooted my first G2 this way. It took some getting used to coming from a phone with a 1-click root, but it wasn't hard.
Check the Wiki, pretty sure it outlines this method as well.
martonikaj said:
If you're having troubles with ADB, why use it? You don't need ADB anymore to root the G2. It can all be done by placing the files on the SD card and running Terminal Emulator on the phone. You can run any of the prompts from ADB in the phone instead. I rooted my first G2 this way. It took some getting used to coming from a phone with a 1-click root, but it wasn't hard.
Check the Wiki, pretty sure it outlines this method as well.
Click to expand...
Click to collapse
Do you have a link for that method i would be glad to try it but i am not sure what to search for, cant find it under rooting g2 with sd card
Also i am trying to gain permanent root if possible
901-Memphis said:
Do you have a link for that method i would be glad to try it but i am not sure what to search for, cant find it under rooting g2 with sd card
Also i am trying to gain permanent root if possible
Click to expand...
Click to collapse
Yep let me grab a link for you (theres actually a video tutorial I wanna try and find). But basically instead of using ADB to push the files to the correct location, you just have to manually put the files in the right locations on the SDcard, which is where ADB pushes them anyways.
K so I followed this method: http://www.youtube.com/watch?v=tU9zn_BEth4
The files he refers to are in this thread: http://forum.xda-developers.com/showthread.php?t=833965
Now different people have had different issues with this. I personally had some issues where it tells you to run #sync, because my perm root wouldn't stick properly after reboot. If this doesn't work properly, I'm sure someone can help you with your drivers to get ADB working.
I should also say that you don't necessarily have to do this method with the initial temp root via visionary, you can simply do the one outlined in the Wiki for rooting (aka http://forum.xda-developers.com/showthread.php?t=834228 ), but just place the files manually and run the commands in terminal emulator.
If you got the adb devices command to work you are actually in good shape. You are supposed to enter all of the commands from what you are calling the "run command" prompt anyway (the one you used for adb devices).
martonikaj said:
I should also say that you don't necessarily have to do this method with the initial temp root via visionary, you can simply do the one outlined in the Wiki for rooting (aka http://forum.xda-developers.com/showthread.php?t=834228 ), but just place the files manually and run the commands in terminal emulator.
Click to expand...
Click to collapse
Unfortunately this won't work (if you don't want to use ADB, Visionary must be used to get temp root). ADB is needed in order to push the files directly to the phone. If you try copying the files to the SD card first, you won't have the correct permissions to copy the files to the phone in Terminal. You are also not allowed to execute programs directly from the SD card (mounted as noexec), so you can't try to obtain temp root from there. If you want to use the gfree method of rooting without using ADB, I made a guide using Visionary for the temp root here: http://forum.xda-developers.com/showthread.php?t=928160.
But the OP actually has ADB working, so he should be able to use any of the guides.
This is the error i get now if i try to enter anything in the sdk manager run prompt box. Is there some place else i should be entering the commands?
Uploaded with ImageShack.us
901-Memphis said:
This is the error i get now if i try to enter anything in the sdk manager run prompt box. Is there some place else i should be entering the commands?
Click to expand...
Click to collapse
You are supposed to be using the regular command prompt (I think you referred to it as the "run command prompt" earlier). It is the prompt in which you successfully ran the "adb devices" command. That is the only prompt you need to use.
Do i enter commands 1 at a time or all at once?
901-Memphis said:
Do i enter commands 1 at a time or all at once?
Click to expand...
Click to collapse
First off, Yes you enter each line as you see it.
Second just to make sure you are in the right area to enter these commands, to get to command prompt you can either search for it from the start menu or hold the "windows button + R".
That opens your run command from there type in "cmd" and that opens command prompt.
Next make sure your current directory is the one you installed adb into. To get to that you can type "cd C:/...... whatever folder you installed it to."
To make sure my adb is working I usually type "adb devices" and see if my phone shows up.
Good luck
Glad to see someone else from the good ole 901 around here =)
Sent from my HTC Vision using XDA App
Okay does anyone have a better guide to rooting?
I got all the way to pushing all the files on the sd card and running the terminal emulator where it shows forked children, reboots the terminal emulator and then i can not enter /data/local/gfree -f
sync
It wont find that file
901-Memphis said:
Okay does anyone have a better guide to rooting?
I got all the way to pushing all the files on the sd card and running the terminal emulator where it shows forked children, reboots the terminal emulator and then i can not enter /data/local/gfree -f
sync
It wont find that file
Click to expand...
Click to collapse
try pushing the file to that folder again
Re-Tried everything at least 3 times, including pushing the files that didn't go.
I give up Ive spent so much time on this only to have it fail at the most unlikely times.
Will wait for another method to root come available
You could try downloading and installing Droid Explorer. It installs adb and fastboot files in its install folder.
Are you sure you actually pushed all of the needed files to your phone correctly (i.e., no errors appeared when doing so)? Which guide are you following and what were the specific errors you are getting? Once you have temp root, running gfree and obtaining permanent root only takes a few more minutes...
Also, did you try any other guides (like the one I linked to earlier)? If you are waiting for a new method of rooting, you might be waiting for a while (since the existing methods work, I don't know how actively people are working on new methods).
ianmcquinn said:
Are you sure you actually pushed all of the needed files to your phone correctly (i.e., no errors appeared when doing so)? Which guide are you following and what were the specific errors you are getting? Once you have temp root, running gfree and obtaining permanent root only takes a few more minutes...
Also, did you try any other guides (like the one I linked to earlier)? If you are waiting for a new method of rooting, you might be waiting for a while (since the existing methods work, I don't know how actively people are working on new methods).
Click to expand...
Click to collapse
Using this guide
http://wiki.cyanogenmod.com/index.php?title=TMobile_G2:_Rooting
I get an error when i attempt to enter this into the emulator on my phone
adb shell chmod 777 /data/local/gfree
and it doesn't do anything
901-Memphis said:
Using this guide
http://wiki.cyanogenmod.com/index.php?title=TMobile_G2:_Rooting
I get an error when i attempt to enter this into the emulator on my phone
adb shell chmod 777 /data/local/gfree
and it doesn't do anything
Click to expand...
Click to collapse
You are supposed to do that command from your computer. (The instructions state "On the computer, open terminal and type the following commands".) Here, terminal means the command prompt that you've been running all of you other ADB commands from.
If you wanted to run the command from terminal on your phone, you would just type "chmod 777 /data/local/gfree".
You don't need ADB for G2s.
trance2315 said:
You don't need ADB for G2s.
Click to expand...
Click to collapse
Can someone link me a better guide for my G2 so that i can try this 1 more time ?
Maybe a link to the top choices for versions of android to run once i get it rooted?

ADB/SDK?!?!?!

ok, just got a new laptop because the old one died and im trying to get adb working on it...i spend multiple hours trying to get it to work, can someone please point me to a guide that works with windows 7 ultimate...i have followed many and then go to command prompt and type adb and it basically says that it doesnt recognize the command...sorry for the noob question, i had it before, i tried multiple guides and im still adb-less
Sent from my Transformer TF101 using XDA Premium App
Are you in the same directory you installed all your sdk stuff?
keroppilee said:
Are you in the same directory you installed all your sdk stuff?
Click to expand...
Click to collapse
+1
cd C:\wherever\your\sdk\is\located\
Lets start off with a simple question: do you have the sdk installed?
If you wish to use ADB first you have to run it from the directory that it is via the command prompt (start -> run -> type cmd). The easiest way to get it to work by just typing adb at the command prompt it by putting adb.exe in c:\windows.
Sorry if anything is slightly off, I use the Linux version of ADB.
Good post
http://forum.xda-developers.com/showthread.php?t=1071584&highlight=adb

Trying to root but can't get ADB working

I've finally decided to try to root my G2 but can't get past the ADB setup. I downloaded the SDK, but when I open the manager and try to install platform tools it goes through the motions and then tells me nothing was installed. When I open a command prompt and type "ADB devices" it doesn't recognize anything. What am I doing wrong??
EDIT: specifically, when I try to install platform-tools it tells me it couldn't create a directory and nothing was installed.
66 people have read this and nobody has any suggestions to help?
i think you miss the 1st procedure....
you must have the unknown resources and the usb debbuging enabled.....
then you can proceed to your super one click rooting.....
I have a problem after rebooting my PC: <Java not found...> Reinstalling doesn't help, adding environment variables too. Any idea?
Just root using the rage/visionary method. No adb needed and very easy to do. Here is the linkhttp://forum.xda-developers.com/showthread.php?t=834228
Sent from my SilverBullet 'HTCDesireZ running CM7'
juvanni said:
i think you miss the 1st procedure....
you must have the unknown resources and the usb debbuging enabled.....
then you can proceed to your super one click rooting.....
Click to expand...
Click to collapse
I don't understand? I'm trying to root following the recommended wiki instructions, and I haven't been able to get adb to work so I haven't gotten past that step.
Are you running windows x64? Cause the android installer has issues detecting java on x64 systems.
When it says 'Can't find java' or whatever the error is, click back, then next again, it should find it the second time around. Well thats what happened for me anyway.
-Nipqer
If you're on froyo just use the app z4 root or universal androot
You can also use superoneclick root 2.11
Its very easy and it only take about 3 minutes
Stewie just said that!
I appreciate the help so far, but my problem is I have gingerbread and everything I've read requires froyo for root, and the only way I've read to downgrade uses ADB, so any non-ADB rooting method still won't work for me. I've followed the "ADB for dummies" thread and the other instruction thread and everything seems fine, but when I type in the first command for the downgrading it says adb isn't a recognized command. Am I in the wrong command prompt? I feel like its probably something really dumb I'm doing or not doing but for the life of me I can't figure it out.
Navigate to the folder adb is in.
Hold shift, right click in the folder (make sure nothing is selected)
select 'Open command window here' (or something along those lines)
Adb should work.
-Nipqer
OK, so I'm definitely in the right folder, I read and followed ADB for Dummies thread. Trying to follow this direction:
"Run the following command to verify the exploit has access to what it needs. (Only the first line is the command. The second line should be the result returned if all goes well.)
Code:
$ adb shell cat /dev/msm_rotator
/dev/msm_rotator: invalid length"
When I type that in, should there be spaces between the "adb" and "shell"? Should there be a space after the command prompt and before "adb"? I've tried several variations of it and it keeps telling me "adb is not recognized as an internal or external operable program or batch file."
ok you need to run the command from the folder with adb.exe in it, type it as adb<space>shell<space>cat<space>/dev/msm_rotator
If you are getting an error search for adb.exe and once found try the command again from this folder,if as you say you are in the right folder then I think you will have to reinstall adb as I just ran the command in the form above and it works so if you still get an error then something has gone wrong with the install
P.S Another way to make sure that adb is working and recognises your phone is to type adb devices, if your phone is attached and recognised then it will return a number
Thank you! I had to uninstall and reinstall the package, I don't know what was wrong but it seems to be working now. Also, I knew I was probably doing something stupid, and I was. I wasn't in the platform-tools directory for my command prompt, I was in the TOOLs directory. Just so I'm clear, every command I type into the terminal should be in the Platform-tools directory, correct?
Now, assuming I can follow all the other directions with no problems, once I get to the downgrade pushing steps, I will lose all my current settings, right? It will be a fresh froyo 2.2 like it came to me originally? Other than using Appbrain to back up my current apps, how else should I make a backup?
Final question, do I need to follow the temp root directions and push the downgrade all at one time? Or can I do the temp root and come back at a later time to push the downgrade?
First problem solved then!
Yes but follow this Step 4
Now we need to update your Path variable. This lets you run adb on your PC from a command window no matter which directory you are in (which makes things a lot easier). If you don't setup your Path, then every time you want to run adb, you will either have to type the whole long pathname where you put adb, or cd to where you've put adb and run it from there (which could be inconvenient if you are transferring files to/from your phone).
On your PC, right-click on "My Computer" and select "Properties". (on Vista, click on "Change Settings"). Go to the "Advanced" tab, then select "Environment Variables". Find the "Path" variable in the list of variables that it shows (you might need to scroll), and then double-click on that entry to edit it. Add the full path of the "tools" and "platform-tools" folders of the SDK to your path. e.g. if the SDK has been installed in "c:\Program Files\android-sdk-windows", then add to your Path "c:\Program Files\android-sdk-windows\tools;c:\Program Files\android-sdk-windows\platform-tools" (Please Note - don't put any spaces between the semi-colon and pathname, otherwise it won't work !)if you want to.
Once done you can use ADB from the command prompt in ANY folder,very handy IMO.
If I was you I would set aside enough time and see it through,no point to temp rooting alone.
Get Titanium backup from the market an absolute essential app with this you can backup,upload to dropbox(Another essential app) uninstall apps and a host of other useful tools.
Read the guide first as well,good luck.

Use adb, no PC or root required!

Hey guys i stumbled on this today and thought I would share. I always found having adb installed on my rooted phone to be handy when it came to installing things on my FireCube. Turns out a rooted phone is not required. I was able to connect to my FireCube wirelessly using "adb connect". You only need to install Termux from the app store and copy and paste this if you can, then hit enter. Or click the link then copy it there.
apt update && apt install wget && wget https://github.com/MasterDevX/Termux-ADB/raw/master/InstallTools.sh && bash InstallTools.sh
This may be old news but I find it impressive we can have adb on our phones. It most likely works with most phones I have a Pixel 3a.
Pretty great
vquennehen said:
Pretty great
Click to expand...
Click to collapse
I thought this was amazing because I thought you needed root to get adb on your phone.
I found out that if install this then connect to a PC with a USB cable, open adb on the pc, type 'tcpip 5555'. You can then disconnect it, open Termux, type adb connect "your phone ip" From there you can use adb on your phone with your phone!...........Mind Blown. Android 10 no root
No one cares but I thought I'd share. It will always work until you restart your phone. Then you need to do the pc again if you want to use it again. Why not just use the pc for adb while you have it connected, you ask?.......I don't know, lol. I guess I like to do things that were not intended. I miss Root
Good stuff here. I have always just used osm0sis's adb fastboot enabler/magisk module. I've unlocked several bootloaders using that and terminal emulator and a otg cable. $5 on eBay is what I paid for mine.. (edit)
Does it still allow you to sudo -or- su and run command as root or no? I tried a while back to install fastboot and adb from termux using their directions from the app and I couldn't get it to work but that's been a while. If you ever need a quick fix and can't get to your laptop or whatever a quick search in magisk manager will bring up the adb fastboot module created by Surge and Osm0sis. Take like 2 secs to install reboot and you have adb and fastboot. Just do "su" for root though and not sudo. su (enter) then fastboot boot recovery.img or whatever you want to do. Works like a charm. I'm going to go venture in to this now here and tinker a bit. Thanks for sharing your find.
For some reason it won't load.

Categories

Resources