adb vs ./adb - Android Q&A, Help & Troubleshooting

Just looking to understand why adb commands now must be run using ./adb as opposed to adb? When did this change?

Note: Questions go in Q&A Forum
If you are posting a Question Thread post it in the Q&A forum. Technical discussion of Android development and hacking. No noobs, please. Device-specific releases should go under the appropriate device forum...
forum.xda-developers.com

xprncdn00b said:
Just looking to understand why adb commands now must be run using ./adb as opposed to adb? When did this change?
Click to expand...
Click to collapse
Depends on shell you use: In Windows Powershell you prefix adb with ./ whereas in Windows CMD not.

Related

[Q] adb.exe problems

I cannot get adb.exe to terminate. I have been using the task manager. Is there any other way?
you have to "cd" to the directory adb is in using command prompt. So go to your start menu and search "cmd" and once you have it open you have to navigate to the folder with adb in it with the command "cd". For example, my directory is c:\sdk\tools.
So I would type in,
Code:
cd c:\sdk\tools
does that help a little?
Adb kill server or somethin like that I believe
Sent from my PG86100 using Tapatalk 2 Beta-2
Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Moving to Q&A
alainater said:
you have to "cd" to the directory adb is in using command prompt. So go to your start menu and search "cmd" and once you have it open you have to navigate to the folder with adb in it with the command "cd". For example, my directory is c:\sdk\tools.
So I would type in,
Code:
cd c:\sdk\tools
does that help a little?
Click to expand...
Click to collapse
you don't need to change the directory to use taskkill but adb.exe comes right back on. what is going on?
cinnamngrl said:
you don't need to change the directory to use taskkill but adb.exe comes right back on. what is going on?
Click to expand...
Click to collapse
You probably have some kind of utility running in the background that uses adb. There is nothing in adb that would make it persistent on its own.
whoops, ok. I was doing it out of order
exit htc on computer> start pda.net on phone >kill. adb.exe>connect pdanet
(pdanet auto starts on win startup)
it is fine now, thanks. dos reminds me of highschool

[Q] Kernel dev,

Can kernel dev be done using virtualbox on windows ?
coz when i connect usb to set up adb, it gets detected in windows and not ubunt,
please help
Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Moving to Q&A
What's the reply from adb on Ubuntu?? You need to add permissions in /etc/udev/rules.d/51-android.rules and in $HOME create .android/android_usb.ini and put there the VendorID of your device starting with "0x". Check it with lsusb. Also please check is your USB enabled in VirtualBox.
BR,
RhineBryu

[Q] ADB inside Android?

I'm sorry If I'm missing something really obvious, or if this question has been asked before, but I didn't find anything in the search, so here goes:
Firstly, as the title suggests, I'm wondering whether it would be possible to run ADB (Android Debug Bridge) inside an existing Android device. I saw this, but what I want is to be able to compile an ADB binary (plus any necessary libraries) for Android, put it on my sdcard, and run ADB commands from within a terminal emulator.
Secondly, I'm wondering whether, after installing ADB on one device (device #1), I could connect that device and another device (device #2) together, and use device #1 to perform ADB commands on device #2 (for example, rooting device #2 without needing a PC).
So..... Would it be possible?
This would fare better in the Android Q&A forum. I'll flag it to the forum mod and ask them to move it
Done, and Thank You Sir.
adb
pokepal101 said:
I'm sorry If I'm missing something really obvious, or if this question has been asked before, but I didn't find anything in the search, so here goes:
Firstly, as the title suggests, I'm wondering whether it would be possible to run ADB (Android Debug Bridge) inside an existing Android device. I saw this, but what I want is to be able to compile an ADB binary (plus any necessary libraries) for Android, put it on my sdcard, and run ADB commands from within a terminal emulator.
Secondly, I'm wondering whether, after installing ADB on one device (device #1), I could connect that device and another device (device #2) together, and use device #1 to perform ADB commands on device #2 (for example, rooting device #2 without needinig a PC).
So..... Would it be possible?
Click to expand...
Click to collapse
I want to start by saying I'm no expert, but to the best of my knowledge, this is how it works.
adb runs native on android, the android property is ro.secure=1 this is found in the default.prop file. ADB is run in user privilege mode with this property setting. Not all of the adb shell commands will work with the device in this mode. With ro.secure=0 property setting, adb will run with root user privileges and all adb shell commands will function. There is an adb comand that when issued will return the value of the setting, but off the top of my head I could not tell you it. The file default.prop is part of the boot.img and will load every time the device is booted, so to edit the file the boot.img would have to be unpacked, edited, repacked, and pushed to the device boot partition.
I don't know why you would want to connect two smartphones using adb and don't know if it is even possible. It is probably best to run the binary with a script on the device where you want it installed. Good Luck with your project.
Sorry, I don't think I quite understand....
fdaconta said:
Not all of the adb shell commands will work with the device in this mode
Click to expand...
Click to collapse
I'm sorry if I'm not making myself clear, but I'm talking about running the ADB client/server on an android phone (normally done on a development computer), not the ADB daemon.
fdaconta said:
It is probably best to run the binary with a script on the device where you want it installed
Click to expand...
Click to collapse
That's also not possible, as the script involves running some complicated ADB-ish things like "adb restore" and running while device #2 is turned off - hence the need for device #1.

Manual Casual?

I don't have enough posts yet to ask in the developer forum so asking here. I can not get Casual to work on either Ubuntu or Mac and I'm tired of dealing with it. On Mac it's in a loop thinking that Heimdall needs installing yet heimdall is install in /usr/bin and executes just fine from the command line. Seems several people have had the same problem.
Ubuntu
I forgot to say that the issue on Ubuntu is that it throws an exception for Unsupported major/minor version even though I followed the instructions and ran apt-get install openjdk-7-jdk gksu dpkg
Questions go in Q&A
Thread moved
Friendly Neighborhood Moderator

Windows 10 Powershell root permissions

I'm coming from a long time being on Windows 7 and regular shell. I'm trying to transition to powershell but cannot find a way to get root permission to android /system via ADB script. This worked formally:
adb shell su -c "mount -o rw,remount /system"
This no longer works. When trying to set chmod or copy systemui.apk to system I get "Read Only file system".
Any help with this would be extremely helpful and I would be grateful. I've googled and googled and nothing seems to work.
Tulsadiver said:
I'm coming from a long time being on Windows 7..........
Click to expand...
Click to collapse
I'm not a huge Guru regarding the ADB besides a general/basic working knowledge.
The ADB command you provided is for the Command Prompt and won't work in Powershell since Powershell uses cmdlets instead but, ADB is possible using Powershell.
The following link is very good at providing you with the differences between the Command Prompt and Powershell.
https://www.howtogeek.com/163127/how-powershell-differs-from-the-windows-command-prompt/
The following is helpful regarding the use of ADB in Powershell.
https://superuser.com/questions/1251078/adb-command-for-powershell-windows
I hope that this was helpful for you and that I had explained it okay via text.
Good Luck!
~~~~~~~~~~~~~~~
UNLESS asked to do so, PLEASE don't PM me regarding support. Sent using The ClaRetoX Forum App on my Enigma Machine {aenigma = Latin for "Riddle"}.
Ibuprophen said:
I'm not a huge Guru regarding the ADB besides a general/basic working knowledge.
The ADB command you provided is for the Command Prompt and won't work in Powershell since Powershell uses cmdlets instead but, ADB is possible using Powershell.
The following link is very good at providing you with the differences between the Command Prompt and Powershell.
https://www.howtogeek.com/163127/how-powershell-differs-from-the-windows-command-prompt/
The following is helpful regarding the use of ADB in Powershell.
https://superuser.com/questions/1251078/adb-command-for-powershell-windows
I hope that this was helpful for you and that I had explained it okay via text.
Good Luck!
~~~~~~~~~~~~~~~
UNLESS asked to do so, PLEASE don't PM me regarding support. Sent using The ClaRetoX Forum App on my Enigma Machine {aenigma = Latin for "Riddle"}.
Click to expand...
Click to collapse
That was very helpful. Unfortunately, nobody seems to address the specific mount problem I'm having.
Tulsadiver said:
That was very helpful. Unfortunately, nobody seems to address the specific mount problem I'm having.
Click to expand...
Click to collapse
I had performed a Google search using the following 3 words together (With and then Without Quotes)...
"Powershell" "ADB" "Mount"
I had located the following thread that may be a bit dated but, should still be valid since Powershell commands hasn't really changed much (if at all) besides the addition to them and such.
https://forum.xda-developers.com/showthread.php?t=2384206
You should also find that the following links will help you with either an answer to or clarification of what your in search for.
https://www.jesusninoc.com/04/05/adb-shell-commands/
https://stackoverflow.com/questions/44094188/access-mtp-storage-with-system-io-from-powershell
https://stackoverflow.com/questions/39948451/batch-script-for-adb-commands
I hope this was helpful in some way and I wish you the best of luck!
~~~~~~~~~~~~~~~
UNLESS asked to do so, PLEASE don't PM me regarding support. Sent using The ClaRetoX Forum App on my Enigma Machine {aenigma = Latin for "Riddle"}.

Categories

Resources