Working with ADB - Droid Incredible General

Does anybody have any good info or a list of commands we can use in ADB without root access? I am not clear if this is strictly an App developer tool when root access is not allowed or if there are still commands we can use to interact with our phones. Thanks for any commands posted in advance!

Just type adb and it will give you a list of commands, if you try to do anything that requires root it will tell you that you can't do it.
I think this should be in general also.
Sent from my ADR6300 using Tapatalk

Actually this has to do with Android development. Thank you for the refresh I forgot you could just type that in to get the commands.

Related

[Problem] Can't use su in ADB.

I've got a problem with my Wildfire.
I've rooted it with unrevolked 3, and in Android itself I've got root access for applications, but if I access the phone using ADB and type in su I only get permission denied.
Why does that happen?
Shouldn't a fully rooted phone provide access as su over ADB too?
And why can't I use Titanium to delete the HTC shipped apps, doesn't unrevolked unlock the NAND?
Thanks in advice
ChrBeck
What UID you have on adb shell ?
Use
Code:
adb shell
then
Code:
whoami
the wildfire atm only has full root via recovery, not full root access to the whole phone, soon it will get full root acess when alpharev releases their working patch for the wildfire.
Ok guys thanks for your answers.
I just found out the recovery thing yesterday evening too.
In ClockworkMod I mounted /system.
Then I was able to delete files.
After that I installed Wildpuzzle and now I have full root in the normal system too.
Anyways thanks for your help.
I rooted my wildfire with unrevoked and it worked good. In the shell: whoami
Root
Make sure the terminal is accepted by superuser
Sent from my Milestone using XDA App
And if you use adb from linux you need to setup android.rules add the vendorId, kill adb server, restart then type. /adb devices
Sent from my Milestone using XDA App
OK, I used adb under Linux and of course haven't added the Vendor ID.
So maybe that was my problem, but WildPuzzle is better anyways and doesn't cause these problems.
Has nothing to do with that. If Linux has no defined rules it will not be able to see your device.
http://menodev.com/mobile/debugging-your-android-device-on-linux/
Sent from my Milestone using XDA App
OK, then that wasn't my problem because I was able to see the device and access it, only su in adb wasn't working, but the simple things like cd and ls have been fine.
As far as i recall you need a rooted phone to su in the adb shell
Sent from my Milestone using XDA App

[Q] Can I root and obtain S-OFF without ADB?

Ive just ordered a desire z and have been reading a bit on the uber root method.....
What i want to know is can I use a file manager to install the visinary.apk and then the terminal emulator from the phone to run all the adb commands?
Reason i ask is cos A) ADB freaks me out....just the install instructions make my head spin and B) i havent got any space on my even if i wanted to install it....
Im aware that you need to install the gscript to /data/local but can this be done just by dropping it into the relevant place rather than pushing it using ADB?
and assuming I can?
Which bits of the commands do i run ? looking at the following.....
adb push gfree /data/local
adb shell
su
cd /data/local
chmod 777 gfree
./gfree
sync
do i just pick this up from the point of SU?
oh and errr if ive completely got the wrong end of the stick then please say.....id sooner look stupid than have a £420 brick
cheers peeps
Yes, if you want you can copy the gfree program to your SD card via some other method, and then pick up the instructions from the su onwards.
An alternative is to run the "rage" method of rooting, but if you don't like adb (it's a lot easier than it might look) then maybe that's not for you.
steviewevie said:
Yes, if you want you can copy the gfree program to your SD card via some other method, and then pick up the instructions from the su onwards.
An alternative is to run the "rage" method of rooting, but if you don't like adb (it's a lot easier than it might look) then maybe that's not for you.
Click to expand...
Click to collapse
TBH its not the ADB commands that i struggle with its the setup of ADB itself.....ADB, SDK, HBOOT drivers, issues with windows 7 etc....
Im happy running the commands and sort of understand what im asking my phone to do so if i can get by without ADB i will try
Thanks for clarifying though
rtorbs said:
TBH its not the ADB commands that i struggle with its the setup of ADB itself.....ADB, SDK, HBOOT drivers, issues with windows 7 etc....
Im happy running the commands and sort of understand what im asking my phone to do so if i can get by without ADB i will try
Thanks for clarifying though
Click to expand...
Click to collapse
I suggest you to read the Easy root / flashing tutorial and FAQ post located at android development subforum
And regarding ADB, if you daownload qpop's "uber root" package, everything required is inside the zip, even ADB is inside
i used gtrab's guide...
super easy and no adb necessary.
http://forum.xda-developers.com/showthread.php?t=835777
bradleymor said:
i used gtrab's guide...
super easy and no adb necessary.
http://forum.xda-developers.com/showthread.php?t=835777
Click to expand...
Click to collapse
Things evolve quicky, problem with this guide is hBoot step was very risky, and it was sort of a "false" S-OFF
The newer method is easyer, safer, and doesn't require manually flashing hBoot
The guide has been reestructurated accordingly
gtrab said:
I suggest you to read the Easy root / flashing tutorial and FAQ post located at android development subforum
And regarding ADB, if you daownload qpop's "uber root" package, everything required is inside the zip, even ADB is inside
Click to expand...
Click to collapse
I've already read them pal, that's why im here...I was just clarifying that I could use the terminal emulator rather than adb.....I'm pretty sure what i need to do now so its cool
Cheers peeps
Sent from my HTC Hero using XDA App
rtorbs said:
I've already read them pal, that's why im here...I was just clarifying that I could use the terminal emulator rather than adb.....I'm pretty sure what i need to do now so its cool
Cheers peeps
Sent from my HTC Hero using XDA App
Click to expand...
Click to collapse
The reason the guide is all ADB is that its much easier to get right with adb...seriously there's no install needed, just open up a command prompt in windows seven (or use the packaged cmd.bat from my zip) and follow instructions. No install needed, no complexities, no messing around with a very limited terminal clone.
But yea, as long as you get the gfree file onto your phone it should be ok
qpop said:
The reason the guide is all ADB is that its much easier to get right with adb...seriously there's no install needed, just open up a command prompt in windows seven (or use the packaged cmd.bat from my zip) and follow instructions. No install needed, no complexities, no messing around with a very limited terminal clone.
But yea, as long as you get the gfree file onto your phone it should be ok
Click to expand...
Click to collapse
Ok cool....sounds a bit more promising....will give it a bash....at least I know I now have a plan b with the term emulator if I have problms
Cheers
Sent from my HTC Hero using XDA App
As someone who had never even heard of ADB and is on his first Android phone..believe me when I tell you that all these different instructions and methods made my head spin! What I ended up doing was (can't remember which "method" it was called) just downloading the VISIONary program onto my SD card, and then running it right from the phone to achieve my ROOT. Once I was rooted, I used the UBERROOT method for S-OFF. I simply downloaded the ADB program (and whatever else it was that came with it)..let it go thru it's updates and made sure the computer recognized my phone (by making sure drivers were installed). Plug your phone into the computer..open up the gfree program you downloaded...and inside there is two main programs..and exe and the cmd. I ran the exe, then simply opened up the cmd program..entered the necessary commands..and viola! It really was simple once I finished it.

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

Can someone please tell me the correct ADB commands for:
1.) Get a list of the apps on my phone
2.) Remove an app identified in that list
I will be using ADB from my PC. I know how the commands through here:
cd C:\AndroidSDK\platform-tools
adb shell
I have searched through so many forms thrying to find this and nothing has seemed to work. I want to find the ls command that shows the list of the apps, not the package name. Then I want to be able to uninstall via the app name I identified in the app list, again, not the package name.
Thanks for the help
I think you want this?
http://wiki.cyanogenmod.com/index.php?title=Barebones
Perfect. It kills me to know why I never found this through my searches.
Sent from my Liberty using XDA App

ADB Pull Error

I am getting the following error when I try to pull a TWRP backup from my Nexus 4. Can anyone please help?
Code:
remote object '/sdcard/TWRP' does not exist
It doesn't exist there. /sdcard/ is really a symlink. The actual location is /data/media/0/TWRP, but try /storage/emulated/0/TWRP as well.
Next time type "adb shell" to go into the phone, then type:
find / -type d -iname twrp
this will search the entire phone for folders with the name TWRP and list their path.
/ is the root folder of the phone to search in
-type d means search for folders only, leave it out if you want to search for file names
-iname means to search for terms case insensitive
sent from xda premium app
Thanks for the help eksasol. I've tried to pull many different paths and they all return the same remote object does not exist error. I've even tried sudo adb pull, with the same result. I've tried this, find / -type d -iname twrp but, all I get is Permission denied. If anyone else has got some ideas I'd be happy to hear them. Thanks. :good:
If you are using Ubuntu or linux, typing 'find' only search what is in your PC. You get permission denied because you want to search in a root directly that required root permission.
To search for files in your phone, you need to log into your phone by typing "adb shell". TWRP give you root by default, then you can use the find command.
Since you have root by default in TWRP, you don't need to use sudo, also Android do not have "sudo" installed. The correct way to gain root privilege in linux (Android) is by typing: su -
To tell if you have are root, you should see # where your user name is in the command window.
Once you are done finding the path, you need to exit the adb shell in order to make contact with your PC, so just type exit. Only then you can start using "adb pull".
by the way, its "adb pull /data/media/0/TWRP/ \home\username\backup\"
Rememer in linux (Android), it's case sensitive.
OK, I see my mistakes now. I was not exiting adb shell when typing adb pull. Anyway, thanks to your help, everything is working correctly now. Thank you again, I really appreciate it. Now I can flash the 4.4 update safely.
eksasol said:
If you are using Ubuntu or linux, typing 'find' only search what is in your PC. You get permission denied because you want to search in a root directly that required root permission.
...
by the way, its "adb pull /data/media/0/TWRP/ \home\username\backup"
Rememer in linux (Android), it's case sensitive.
Click to expand...
Click to collapse
Thanks for helping me re-learn that linux (Android) is case sensitive

Categories

Resources