[Q] Integrating ADB into Windows? - Android Q&A, Help & Troubleshooting

Forgive me if something like this has already been asked. I was wondering if I took the adb.exe and the other files from the developer kit and put them in system32 on Windows, would I be able to access adb without having to cd to the folder with adb saved? It's not always optimal to have a folder of apk's and other things I've been sideloading to different devices. Thoughts?

Create a CMD shortcut on your desktop. Properties > Start In > Enter your Fastboot/ADB directory.

Yes that would work but its not optimal, best to create a path in environmental variables
Sent from my Nexus 4 using xda premium

Related

Quick ADB help!

I rooted and now I keep losing su permissions and I can't boot into cwm recovery. I figure something messed up during the process. I guess I should unroot and then try the process again. I'm trying to use the HOWTO Return to stock properly and safely process.
I have adb installed and when I try to do the first step:
(adb push misc.img /data/local/)
It says this:
adb server is out of date. Killing....
* daemon started successfully *
cannot stat 'misc.img': no such file or directory
I'm sure I have a file in the wrong directory? Any help is appreciated!
From your pc before you run adb push did you:
cd c:\path\to\downloads\
?
I cannot the 100 percent certain that is what you need from your description but I however am 80 percent sure.
this is not a signature I type it in every time maybe sent from my phone or my computer
In the newer ADB version you need to have your command promt directed to the platform-tools directory. So, whatever you are trying to push also needs to be within that directory.
Even if you add it to your $PATH?
I haven't updated my sdk in a long long time so I'm not sure
this is not a signature I type it in every time maybe sent from my phone or my computer
If you have an old version of the Android SDK then misc.img should be placed in the tools directory. Personally I have the SDK version 7 and I had to place the files in Platform-tools.
rizzomegav said:
Even if you add it to your $PATH?
I haven't updated my sdk in a long long time so I'm not sure
this is not a signature I type it in every time maybe sent from my phone or my computer
Click to expand...
Click to collapse
It depends which directory path you have in your $PATH variable. If you have the latest SDK and $PATH is still pointing to "tools" then ADB will not be there... you need to update your $PATH variable to point wherever ADB is located.
stedrocklp said:
In the newer ADB version you need to have your command promt directed to the platform-tools directory. So, whatever you are trying to push also needs to be within that directory.
Click to expand...
Click to collapse
How can I see what version I'm using? I'm new to ADB and was just trying to follow the instructions on the HOWTO so I didn't have to ask a bunch of questions.
My adb is in C:\sdk\platform-tools\
if that helps any. That is also the file that the misc.img file is in
If your adb is in C:\sdk\platform-tools\ did you cd C:\sdk\platform-tools\ first?
Thanks to everyone for the help. I got it figured out last night!

[N00B FRIENDLY] [FIX] [HOWTO] Lockscreen, Search button, Menu button not working.

This guide attempts to solve the following problems encountered while either updating CM7(afaik) without wiping data/system or while restoring the system settings using TB:
1. The menu and search buttons' keypresses are detected but the respective actions aren't executed.
2. The lockscreen doesn't get activated.
3. The power menu has only reboot and power off as options. The rest of the options like Airplane Mode and Profiles.
NOTE:
This guide is based on Ubuntu. The procedure in other OSes is the same. You just need to add an entry called device_provisioned" to /data/data/com.android.providers/databases/settings.db with a value 1. The problem was due to this entry being missing. Use a SQLite Database manager to add it. I'm just sharing what I had to do in order to solve the problem.
PREREQUISITES:
1. ADB
2. SQLITE3
FIX:
1. Install sqlite3 if it is not present already on your computer.
2. Copy /data/data/com.android.providers.settings/databases/settings.db from your device to a folder on your computer using ADB.
[Newbie friendly steps]
a. Navigate to where your sdk is installed in Terminal.
b. Then execute this command:
Code:
./adb pull /data/data/com.android.providers.settings/databases/settings.db ~/
3. In the terminal, navigate to the folder where you have copied the file and paste the following code.
Code:
sqlite3 settings.db "INSERT INTO secure (name,value) VALUES ('device_provisioned','1');"
[Newbie friendly steps]
Type this in terminal.
Code:
cd ~
sqlite3 settings.db "INSERT INTO secure (name,value) VALUES ('device_provisioned','1');"
4. Then put the modified settings.db back in its folder.
[Newbie friendly steps]
a. Navigate to where the SDK is installed in the Terminal on your computer.
b. Type this in the terminal
Code:
./adb remount
./adb push ~/settings.db /data/data/com.android.providers.settings/databases/settings.db
./adb reboot
5. Thank me and H:S from the CM forums. This guide is based on his post. ENJOY!
This method is surely better than doing a full wipe, reinstalling all the applications from the market and reconfiguring all the settings.
vlt96 said:
You just need to put provision.apk from the rom's zip, set permissions to rw-r--r-- and reboot...
Click to expand...
Click to collapse
Hope this helps
Reserved
--Reserved--
will this work on htc hero (gsm)?
rajathvsm said:
This guide attempts to solve the following problems encountered while either updating CM7(afaik) without wiping data/system or while restoring the system settings using TB:
1. The menu and search buttons' keypresses are detected but the respective actions aren't executed.
2. The lockscreen doesn't get activated.
3. The power menu has only reboot and power off as options. The rest of the options like Airplane Mode and Profiles.
NOTE:
This guide is based on Ubuntu. The procedure in other OSes is the same. You just need to add an entry called device_provisioned" to /data/data/com.android.providers/databases/settings.db with a value 1. The problem was due to this entry being missing. Use a SQLite Database manager to add it. I'm just sharing what I had to do in order to solve the problem.
PREREQUISITES:
1. ADB
2. SQLITE3
FIX:
1. Install sqlite3 if it is not present already on your computer.
2. Copy /data/data/com.android.providers.settings/databases/settings.db from your device to a folder on your computer using ADB.
[Newbie friendly steps]
a. Navigate to where your sdk is installed in Terminal.
b. Then execute this command:
Code:
./adb pull /data/data/com.android.providers.settings/databases/settings.db ~/
3. In the terminal, navigate to the folder where you have copied the file and paste the following code.
Code:
sqlite3 settings.db "INSERT INTO secure (name,value) VALUES ('device_provisioned','1');"
[Newbie friendly steps]
Type this in terminal.
Code:
cd ~
sqlite3 settings.db "INSERT INTO secure (name,value) VALUES ('device_provisioned','1');"
4. Then put the modified settings.db back in its folder.
[Newbie friendly steps]
a. Navigate to where the SDK is installed in the Terminal on your computer.
b. Type this in the terminal
Code:
./adb remount
./adb push ~/settings.db /data/data/com.android.providers.settings/databases/settings.db
./adb reboot
5. Thank me and H:S from the CM forums. This guide is based on his post. ENJOY!
This method is surely better than doing a full wipe, reinstalling all the applications from the market and reconfiguring all the settings.
I'm sure there might be easier ways of doing this but this method is what I got by googling and by my own experiments. I'm a n00b myself, so any help is appreciated. If you know a better, simpler way, let me know and I'll update this guide or link to your thread/post, with due credits of course.
Hope this helps
Click to expand...
Click to collapse
This has been my issue after restoring via Titanium backup, haven't been able to get this to work either though.
sorry just needed one more post
I really wish this worked for me, but, alas, it doesn't and it drives me nuts.
I did as described on my local system and I double checked the change of contents of settings.db, making sure the respective entry has actually been changed. However, this had no effect Still no lockscreen, no home button and both calendar and clock stop after some time, just as other users described this, too.
I have now spent hours googling for a solution, but other than this posting I have found nothing.
Galaxy S3 with ReVolt 4.1.2 ROM
You just need to put provision.apk from the rom's zip, set permissions to rw-r--r-- and reboot... You complicated tooo much
Sent from my LG-P500
vlt96 said:
You just need to put provision.apk from the rom's zip, set permissions to rw-r--r-- and reboot... You complicated tooo much
Sent from my LG-P500
Click to expand...
Click to collapse
You might wipe system and re-install as well
A few people would like to know why they are doing whatever that is that they are told to do.
Thank you for the guide, but I'm having trouble with step 3. When I try to pull the file from my incredible I get a ton of text in the terminal but no file shows up on my computer in the specified location. Any idea what I could be doing wrong?
How hard is for you to backup data and avoid all of that with a clean flash?
Sent from my LG-P500 using xda app-developers app
Work flawlessly. Thnx
Don't know how to do this- please help!
Hi all,
I may be giving a whole new dimension to being a noob.... well I just have no idea about this command code stuff- I never used terminal until today and I damn sure hope I will not need to anymore in the future I have to say.
so basically I fail at following the "for noobs" instructions. Well I managed to download an install this ADB thing for Mac and was able to confirm in terminal that ADB works. I also have downloaded the SQLite3 on my Mac- not sure though this thing works on Macs.
Well, when following the procedure I get stuck at 2.a. "Navigate to where your sdk is installed in Terminal." what is an SDK and how do i navigate to it in Terminal?
I suppose I will get stuck at the other steps starting with "Navigate to.." as well.
It would be just great if someone could give me a step by step guide litterally saying what I need to do where to get rid of this darn bug that keeps me from using my phone (a sony ericsson arc).
Thanks for your help!
Cheers,
Bert
For more recent versions of CM, there is another key, user_setup_complete, that must also be set

[Q] Trying to unlock, stuck

I keep getting an error when trying to run fastboot. Any idea's?
c:Android>fastboot oem get_indentifier_token
'fastboot' is not recognized as an internal or external command, operable program or batch file.
Do you have adb and fastboot in the c:\android folder?
Yep they are both there. In my tools folder it says that he adb tool has moved to platform-tools/
If you don't see this directory in your SDK,
launch the SDK and AVD Manager (execute the android tool)
and install "Android SDK Platform-tools"
Please also update your PATH environment variable to
include the platform-tools/ directory, so you can
execute adb from any location.
Would this have any effect?
Yes. So you would have to point to the platform-tools folder or move adb into your android folder. Easier to just put it in your android folder so you don't have to navigate to it with the cmd prompt. Or do the PATH thing which I don't know how to do.
All you need in there is:
adb
AdbWinApi.dll
fastboot
Then after you get your Unlock_code.bin emailed to you copy that into there too.
I just keep all that as is and then anything I want to flash later I just copy in and then delete after I'm done flashing it. Except for the Amon Ra recovery, I've been keeping the current version of that in there too.

[Q] using adb in any directory

what i want to do is to be able to use adb in any directory in windows instead of having to "cd" to the platform-tools directory and then using it, it makes it easier for when i want to copy a certain file to my tablet, i can just go where the file is at and use adb there. i know how to do it in linux, all i have to do in linux is make a shortcut of the adb file and copy it to the /usr/bin/ directory but when i tried that with windows, making the shortcut to adb and copying it to the c:\windows\system32\ directory, it didn't work. any help would be awesome!!! thanks in advance!

Root folder

Hey guys,
I am trying to get the the "up-most" folder of my HTC Droid DNA. On the phone itself I can get to a folder titled "/" which I'm assuming is the root folder of the phone. I want to get into the "/data" partition on my PC to try to fix a game file that is loading incorrectly. But when I plug the phone into my PC all I can see is the internal storage folder. I tried to enable hidden folders as well but no such luck. Any ideas?
Thanks in advanced!
Swannyman17 said:
Hey guys,
I am trying to get the the "up-most" folder of my HTC Droid DNA. On the phone itself I can get to a folder titled "/" which I'm assuming is the root folder of the phone. I want to get into the "/data" partition on my PC to try to fix a game file that is loading incorrectly. But when I plug the phone into my PC all I can see is the internal storage folder. I tried to enable hidden folders as well but no such luck. Any ideas?
Thanks in advanced!
Click to expand...
Click to collapse
You need to ADB pull it and do what you need to change and then ADB push it. However I would do only the folder like /data/Game-O-Pornstar or /data/com.your_game_name
So an example if I wanted to pull the /data/data folder I would run the command (go to android-sdk on your computer where you unlocked your phone and find platform tools or the folder that adb.exe is inside of. Hold shift, right click, choose "open command window here")
Assume first I made a new folder in platform tools and named it calculator.
"adb pull /data/data/com.android.calculator2 > C:\Android SDK\platform-tools\calculator"
It would put the contents of the com.android.calculator2 directory (folder) into my new folder that I created and called calculator. Then when I'm finished I would do the opposite to push it back
I was just trying to put the directions into more common language but here's the link to actually get the commands
http://developer.android.com/tools/help/adb.html
There's an app called Droid Explorer for the PC that will do this with an interface but the program will often wreak havoc on your adb and fastboot drivers and services.
Swannyman17 said:
Hey guys,
I am trying to get the the "up-most" folder of my HTC Droid DNA. On the phone itself I can get to a folder titled "/" which I'm assuming is the root folder of the phone. I want to get into the "/data" partition on my PC to try to fix a game file that is loading incorrectly. But when I plug the phone into my PC all I can see is the internal storage folder. I tried to enable hidden folders as well but no such luck. Any ideas?
Thanks in advanced!
Click to expand...
Click to collapse
Androidcommander
Thanks man. Ill give it a try.
Sent from my HTC6435LVW using xda app-developers app

Categories

Resources