Help with Phone-to-Phone ADB Authorization - Android Q&A, Help & Troubleshooting

---------------
My Question is:
How do I go about using the "adb keygen" command to generate a key pair for each device. AND where do I move those keys so that the devices can connect to each other via the ADB command line interface?
---------------
Currently, my PC is out of order. So I have no way to use ADB via a PC. What I have managed to accomplish so far is rooting my Galaxy Tab 3 [Magisk], Galaxy S5 [SuperSu], and Galaxy S3 [SuperSu]. The devices are running Resurrection Remix Oreo , Lollipop, and Kitkat 4.4, respectively.
***
*** I want to use my tablet [Galaxy Tab 3] as the ADB Host for all my other androids to connect to. This way I can issue ADB commands over the network from my tablet's Termux environment. And I know my current issue has to deal with the ADB_VENDOR_KEYS, as well as "Step 5/6" in connection handshake outlined in the screenshot from "cstyan's adb documentation" on github.
Now each device is equipped with a Terminal Emulator or Termux, and an ADB binary compiled for the ARM architecture. [Android Debug Bridge version 1.0.36
Revision e25a9312d628-android]
I can connect to ADB over the network. I've already gotten the GS5 to connect to Tab3's ADB server. I can run the "adb devices" command after successfully connecting to a specific IP address, but the command always lists the device as "unauthorized". This is shown in my screenshot from my CLI. I'm being tripped up by oversight here because this is typically done automatically, not manually.
Do I need to keygen a pair on the tablet and copy that key-pair to my other devices? Or does each device need a copy of each other device's adb key? This should work. I should just have to do the legwork manually, since this isn't the standard way. On normal Linux/Windows the adb key is stored in the User's profile root in the ".android" folder, but where is the counterpart on the device itself? I already have my Tablet's private key in "/data/misc/adb/adb_keys"
I feel I am on the last step here. Where do I place the public keys on the device? All I need to do is authorize the device using my manually generated adb key. Everything else works, and then I wouldn't need to have my PC so high on my priority list. Can someone please help clarify the step or two that I am missing here please?

Related

[GUIDE] ADB - Usage, Tips, Tricks and More!

*****To all newebies(as quite a few new people are at this forum because they got their first device! (TFP)) any anyone who wants to learn, let’s get educated about our devices!*****
ADB (Android Debug Bridge) is an extremely useful tool that WILL help you in all of your customizing needs! You may see the need to use ADB commands to help root your device, change ROMS, or send your device a fix. Without the knowledge here, you could easily be left in the dark.
ADB is a necessity for developers and general consumers alike. Knowing this tool is a great advantage to you to help your device at the best quality possible.
Installation
Download Google SDK
Choose the correct operating system and install!
The installation REQUIRES Java JDK which can be downloaded from Here
If during installation it asks for JDK (and you have installed it) Press the back button and next again, sometimes that will fix the error.
**Note** The SDK installs to C:\Program Files (x86)\Android\android-sdk standard, chose any directory for you
Start the SDK and immediately, you will notice a few checkboxes. For the standard user, just make sure Android SDK Platform-tools (under Tools) and Google USB Driver package (under Extras) – the drivers are always good to have, latest ADB drviers.
Click install 2 packages and wait. Once installed go to your installation directory and find the platform-tools folder. This directory is your ADB and will be your lifeline!
**Do you want ADB accessible through any command prompt directory?**
You are in luck. (For Windows 7)
Right click on My Computer > Properties > Advanced System Settings >Advanced (Tab) > Environment Variables > Under System Variables scroll and dbl click on Path
TO THE END of the Variable value line add
Code:
;C:\Program Files (x86)\Android\android-sdk\platform-tools
Or whatever the directory you installed to + platform-tools
Open CMD and type ADB, if you did it right, you will see proper ADB jargon regardless if you are in the correct directory or not!
Congratulations! ADB is installed!
**Make sure your device is using the latest drivers (that you just downloaded) or other ADB drivers provided by ASUS to access ADB. When connected in Debugging mode, device manager will have: ASUS Android Composite ADB Interface**
ADB Usage
**I will be talking mainly about commands/arguments that the general end-user may use or come across**
**Make sure your tablet is in USB Debugging Mode to be able to connect to ADB (Settings > Applications)**
ADB Devices : This command shows all connected android devices that will respond to an ADB command. It is useful for making sure your device is connected.
ADB Connect [IPORT] : This command will connect to your device over personal WIFI connection if your device is setup for ADB over WIFI (Requires root and NOT recommended)
ADB Push [local_file] [remote_file] : This command will push any local file to the device (only if the device is Read/Writable. Stock /system/ folders are only Readable.
ADB Pull [Remote_file or Directory] [Save file or Directory] : This command take files or an entire directory and save it to your desired location. This command only works when directory is read/Writable.
ADB Shell [command] : This command will perform most UNIX commands on the device. Without a command, you can enter several shell commands before you ‘exit’. Most will not work unless SU is applied (# instead of $). Must be rooted for SU. Only play with these commands if they are known by you or exactly copied from instructions.
ADB Logcat [ > file.txt ] : This command will display (or save per > file.txt) a log of what’s happening on the device. If you are receiving errors, turn on logcat, reproduce error, turn off, and send logcat to the developer.
ADB Install [-r][-s] [local_apk] : This command force installs (or reinstalls –r or –s installs on SD-Card) any APK provided.
ADB Uninstall [-k] [APK_Name] : This command uninstalls any APK Name provided (app.apk) and will even keep cache and other data with the –k tag.
ADB start-server : This command will start the server if the server is off or killed. (Normally server will auto-start when ADB command is used)
ADB kill-server : This command will close ADB server. Useful if ADB server is acting up or not connecting to any devices.
ADB remount : This command will mounts the /system/ partition Read/Writable pending the device is allow to. Stock TFP will NOT.
ADB root : This command will restart ADB with root permissions if the build allows for it. Stock TFP will NOT.
ADB usb : This command will restart ADB on device to use USB connection for ADB communication.
ADB tcpip [port] : This command will restart ADB on device to use TCPIP connection for ADB. Standard port is 5555. Again, this connect not recommended for file transfers.
ADB reboot [recovery/bootloader] : This command will restart your device. If either of the two options are given, the device will boot into that mode (sadly TFP does not support the two options.. yet)
ADB Tips/Tricks
When following ADB instructions, follow them WORD-BY-WORD in the EXACT ORDER GIVEN. If copy and pasting their commands (one line at a time) makes it easier, then do so.
If you have root access, do not mess around in ADB shell unless you know what you are doing
Connecting over IP can be beneficial for you for quick ADB access, but for file transfers, speed is slow and you ALWAYS risk corruption (check the md5!) One bad file and you have boot-loops!
ADB Logcat is an amazing command. If anything is wrong with your device, 9/10 you can see it in logcat. If you can find the exact problem, fixes can happen much easier. USE LOGCAT TO YOUR ADVANTAGE!
ADB reboot can be a quick reboot, sometimes you don’t feel like waiting!
Use the environmental variables! It helps exponentially, and keeps from having multiple instances of ADB running.
When multiple instances of ADB are running (different directories) ADB can get messed up! (ADB not up-to-date restarts, and connect problems). ASUS Sync service has and ADB setup. Turn it off if you are not using it. Try to stick to only ONE instance of ADB
Eventually, we may have root access in our recovery kernel. Then and only then can our devices be truly customizable!
The GUIDE is not finite. Please post anything you feel should be added/corrected to the guide. Please take notice from this, as the understanding of these simple commands could help save your device(s)!
Thanks and 5 star would make me feel good inside too!
Wow... Nice post. Lots of time went into this lol. Thanks can't give the five stars in the app though:-(
Sent from my Transformer Prime TF201 using xda premium
The link in step #1 is whack - I think you want tis? http://developer.android.com/sdk/index.html
Lock-N-Load said:
The link in step #1 is whack - I think you want tis? http://developer.android.com/sdk/index.html
Click to expand...
Click to collapse
hmm thats what was in there, i re-saved and it works now ... maybe xda error
thanks tho!
biggem001 said:
hmm thats what was in there, i re-saved and it works now ... maybe xda error
thanks tho!
Click to expand...
Click to collapse
before you fixed it, it was trying to use this http://http://developer.android.com/sdk/index.html"
note the extra parens at the end and the double http call
i noticed that too, all i did was re-save and it worked. how weird.
Thanks! I've seen a few tutorials on this but this one was by far the easiest to follow and best organized. Short and sweet. Worked on my desktop great, I've never managed to install it right D:
Re posting to give 5 stars. Thanks again OP
Quick question: Is it normal for PTP mode to be required for adb to work? Because as soon as I switch to MTP I can no longer use adb.
cmat1120 said:
Quick question: Is it normal for PTP mode to be required for adb to work? Because as soon as I switch to MTP I can no longer use adb.
Click to expand...
Click to collapse
i can do either at once.. thats weird
GPS, Wifi and BT Testing
Could someone write some basic tutorials on how to verify/test GPS, wifi and BT funtions? For those of us who are new to Android it would helpful in verifying which problems are truly present. Also perhaps show how to find the serial number - for example: some don't know you have to click status - because there are a some erroneous posts out there. There may be users who assume something works or doesn't work, based on limited knowledge and these inaccurate findings only serve to muddy up the works.
There's a lot of animosity about the influx of newbies (and trust me, as a newbie it doesn't feel good). I think the first step is to educate. If some of these troubleshooting steps are laid out, more people can contribute in an intelligent way.
I thought this would be a good thread for the Guides thread, but it is closed and I cannot send PMs.
Thanks - Great Info
One thing you can add for all us amateurs is how to use ADB to install off market apps, stuff like that. Things the non-power user can benefit from. Some simple command line structure would be great.
theandies said:
One thing you can add for all us amateurs is how to use ADB to install off market apps, stuff like that. Things the non-power user can benefit from. Some simple command line structure would be great.
Click to expand...
Click to collapse
i wont add it to the guide, because adb install is pretty self explanatory but this
make sure you can install non-market apps
Code:
adb install app.apk
jonalisa said:
Could someone write some basic tutorials on how to verify/test GPS, wifi and BT funtions? For those of us who are new to Android it would helpful in verifying which problems are truly present. Also perhaps show how to find the serial number - for example: some don't know you have to click status - because there are a some erroneous posts out there. There may be users who assume something works or doesn't work, based on limited knowledge and these inaccurate findings only serve to muddy up the works.
There's a lot of animosity about the influx of newbies (and trust me, as a newbie it doesn't feel good). I think the first step is to educate. If some of these troubleshooting steps are laid out, more people can contribute in an intelligent way.
I thought this would be a good thread for the Guides thread, but it is closed and I cannot send PMs.
Click to expand...
Click to collapse
for GPS, use GPS Test app on the market
for BT and wifi testing, i'll just connect my device via BT or adhoc wifi and do the testing on my PC itself, more accurate and better programs
Excellent howto, thanks
I have trouble connecting to my prime with adb. In the Win7 Device Manager the correct device shows up, no exclamation mark at all, but adb just won't see the Prime.
USB debugging mode is on, no Asus Sync software on the PC. I have no clue why ADB won't see my device.
Now many of us can really shoot ourself in the foot.
by far the best and quickest adb install/setup ever. thanks OP!
neo1738 said:
by far the best and quickest adb install/setup ever. thanks OP!
Click to expand...
Click to collapse
aw shucks!
THANKS!
biggem001 said:
ADB Devices : This command shows all connected android devices that will respond to an ADB command. It is useful for making sure your device is connected.
ADB Connect [IPORT] : This command will connect to your device over personal WIFI connection if your device is setup for ADB over WIFI (Requires root and NOT recommended)
ADB Push [local_file] [remote_file] : This command will push any local file to the device (only if the device is Read/Writable. Stock /system/ folders are only Readable.
ADB Pull [Remote_file or Directory] [Save file or Directory] : This command take files or an entire directory and save it to your desired location. This command only works when directory is read/Writable.
ADB Shell [command] : This command will perform most UNIX commands on the device. Without a command, you can enter several shell commands before you ‘exit’. Most will not work unless SU is applied (# instead of $). Must be rooted for SU. Only play with these commands if they are known by you or exactly copied from instructions.
ADB Logcat [ > file.txt ] : This command will display (or save per > file.txt) a log of what’s happening on the device. If you are receiving errors, turn on logcat, reproduce error, turn off, and send logcat to the developer.
ADB Install [-r][-s] [local_apk] : This command force installs (or reinstalls –r or –s installs on SD-Card) any APK provided.
ADB Uninstall [-k] [APK_Name] : This command uninstalls any APK Name provided (app.apk) and will even keep cache and other data with the –k tag.
Click to expand...
Click to collapse
Just a small suggestion, adb won't accept commands if they are capitalized.
For example "ADB devices" will work perfectly, but "ADB Devices" won't.
So, in order to help the newest of newbies, you might want to put the commands in lowercase in the first post.

[Q] How to setup Sony S Tablet for Eclipse Debugging?

I have bought a Sony S tablet for development purpose but i'm having difficulties setting everything up.
I have enabled debugging on the tablet and installed adb driver, firt using the official method and them the automated method.
I have followed all the steps: setup,reboot etc... I have already run the echo method to setup the file C:\Users\user.androidadb_usb.ini with the 0x54c code. neither the versions work. I call adb devices and i see the following lines
c:\Program Files (x86)\Android\android-sdk\platform-tools>adb devices
List of devices attached
c:\Program Files (x86)\Android\android-sdk\platform-tools>
if i run my application on eclipse i get a windows to choose the device but no device is listed.
how can i install adb to be able to debug my application?
Hi, I also had some problems to put it to work.
I've followed the official method.
Go to device manager and update the drivers, to make sure that both entries are updated. I did this and noticed that one of the entries wasn't updated in the first setup. With this update that problem was corrected.
So far, I've connected my tablet to 2 laptops with Windows 7, and for some reason, on one of them it worked fine the first try, but on the other even the echo command did not update the adb_usb.ini, so I had to edit it in notepad++ and added 0x54c to the file.
After a reboot, the command adb devices showed the tablet as it should, and then the tablet started to work ok in eclipse.
mteodoro said:
I have bought a Sony S tablet for development purpose but i'm having difficulties setting everything up.
I have enabled debugging on the tablet and installed adb driver, firt using the official method and them the automated method.
I have followed all the steps: setup,reboot etc... I have already run the echo method to setup the file C:\Users\user.androidadb_usb.ini with the 0x54c code. neither the versions work. I call adb devices and i see the following lines
c:\Program Files (x86)\Android\android-sdk\platform-tools>adb devices
List of devices attached
c:\Program Files (x86)\Android\android-sdk\platform-tools>
if i run my application on eclipse i get a windows to choose the device but no device is listed.
how can i install adb to be able to debug my application?
Click to expand...
Click to collapse
Not sure what the actual problem you're having might be, but unless your device is actually listed in the output of adb devices, then its never going to work. There has to be at least one device (emulator or device) listed in adb devices for Eclipse to use it.
I had a little trouble with my Tablet S and ADB, so I just gave up and used the SDK's AVD Emulator. Works very well and Eclipse never has a problem anymore.

[Guide] Fix adb - device is offline error

With the new secure adb I had an issue:
(I was transferring data to a new harddrive and in the process
I deleted my /home/me/.android/ (somewhere in \Users\me\AppData\ on windows) folder because I thought I didnt need anything in it.
Then I wanted to pull some files from my CM10.1 nightly device per adb.
It said: "error: device offline" when trying to access it.
Now, the computers adb key was gone with the userdata folder of the sdk (the .android folder) and access was denied. But somehow whatever manages the authorization questions thought that this computer was still trusted and did not ask for a new authorization.
To fix that I did the following:
delete the computers adb key: rm /data/misc/adb/adb_key on device
(I have no idea if in case of multiple authorized computers the additional keys are in a new line of the file or if they are in new files. I have only 1 computer.)
stop all adb processes "killall adb" in linuxoids and "taskkill /IM adb.exe" in windows or simply the taskmanager in both.
restart the phone
toggle usb debugging off and on
connect
use adb
click authorize
works
In my case it was even nastier because my sdk userdata folder ~/.android (on small ssd) was a symlink to /data/home/me/.android (on a huge drive for the emulators, android-sources and stuff)
and the symlink pointed to a nonexisting path which prevented saving any sdk settings.
On deleting the symlink or recreating the folder it should work.
Thanks. Very useful! :good:
for me and the HTC One X it wont work.....
-Happy Feet- said:
for me and the HTC One X it wont work.....
Click to expand...
Click to collapse
Did work previously?
maybe restart the adbd on the phone.
Can you test in Recovery, Cwm has an extra button for restarting.
Maybe Stock too.
Illidan Pornrage said:
With the new secure adb I had an issue:
(I was transferring data to a new harddrive and in the process
I deleted my /home/me/.android/ (somewhere in \Users\me\AppData\ on windows) folder because I thought I didnt need anything in it.
Then I wanted to pull some files from my CM10.1 nightly device per adb.
It said: "error: device offline" when trying to access it.
Now, the computers adb key was gone with the userdata folder of the sdk (the .android folder) and access was denied. But somehow whatever manages the authorization questions thought that this computer was still trusted and did not ask for a new authorization.
To fix that I did the following:
delete the computers adb key: rm /data/misc/adb/adb_key on device
(I have no idea if in case of multiple authorized computers the additional keys are in a new line of the file or if they are in new files. I have only 1 computer.)
stop all adb processes "killall adb" in linuxoids and "taskkill /IM adb.exe" in windows or simply the taskmanager in both.
restart the phone
toggle usb debugging off and on
connect
use adb
click authorize
works
In my case it was even nastier because my sdk userdata folder ~/.android (on small ssd) was a symlink to /data/home/me/.android (on a huge drive for the emulators, android-sources and stuff)
and the symlink pointed to a nonexisting path which prevented saving any sdk settings.
On deleting the symlink or recreating the folder it should work.
Click to expand...
Click to collapse
Fraid it didn't work. End up with various errors and randomly appearing devices. Plus, the original error reappears eventually. Please help!
If you give me some Info around the issue, like what you intended to do and if it worked previously, I could help you.
FIX adb offline problem
When you connect a device running Android 4.2.2 or higher to your computer, the system shows a dialog asking whether to accept an RSA key that allows debugging through this computer.
This security mechanism protects user devices because it ensures that USB debugging and other adb commands cannot be executed unless you're able to unlock the device and acknowledge the dialog.
This requires that you have adb version 1.0.31 (available with SDK Platform-tools r16.0.1 and higher) in order to debug on a device running Android 4.2.2 or higher.
If you haven't this pop-up mesage in your device, there is the solution :
1) Install SDK in your PC
It may asks you to install JAVA, if so, do it.
2) make sure that your adb is 1.0.31 or upper, to know the version, tape : adb version in your commande window
------------------------------------
After that you every thing will be OK
this solved my problem
problem was i had ran this command
sudo apt-get install android-tools-adb
which installed Android Debug Bridge version 1.0.29 in /usr/bin
the system was using this by default even tho i added the platform-tools directory with the newest adb (Android Debug Bridge version 1.0.31) to my environment path.
This solved this problem (running old adb) on LinuxMint:
Method 1:
sudo apt-get remove android-tools-adb
Method 2: (if the first doesn't work)
unplug device
adb kill-server
adb version
Android Debug Bridge version 1.0.29
cd to android sdk dir
cd /home/XXX/adt-bundle-linux-x86_64/sdk/platform-tools/
copy new adb to /usr/bin
sudo cp adb /usr/bin/
adb version
Android Debug Bridge version 1.0.31
adb kill-server
adb devices
daemon not running. starting it now on port 5037 *
daemon started successfully * List of devices attached
plug in the device, and on the device dialog about RSA appeared
accept on device
adb devices
hope this helps...
credit for this solution goes to CoPLaS @ this URL
http://stackoverflow.com/questions/15305725/i-cant-upgrade-from-adb-version-1-0-29
I've ADB problem in bootloader mode: devices not found, list empty. It works fine with phone in normal mode
I've upgraded to adb .31, upgraded drivers but no solution, BTW fastboot devices corectly displays device
Any help ?
Thanks
ciano865 said:
I've ADB problem in bootloader mode: devices not found, list empty. It works fine with phone in normal mode
I've upgraded to adb .31, upgraded drivers but no solution, BTW fastboot devices corectly displays device
Any help ?
Thanks
Click to expand...
Click to collapse
as far as I know adb doesn't work in bootloader mode.
MadMan29729 said:
as far as I know adb doesn't work in bootloader mode.
Click to expand...
Click to collapse
How can I push file to phone it doesn't boot ?
I think thats intentional, bootloader mode is the mode corresponding to fastboot for directly flashing, deleting, formatting, stuff like that in the most basic environment. Try recovery or normal boot for adb, which is for debugging, shell access, backup, filetransfer and so on.
(More info for more specifics)
Thanks, my mistake not using recovery
from Nexus 4 with Tapatalk
took me a bit to get into the thing myself after > 4.2 update
i'm on ubuntu
i had to use the terminal command
Code:
android update sdk --no-ui
a couple of times to get the thing actually updated. using just
Code:
android update sdk
wasn't cutting it for some reason. probably because i'm stupid and didn't fiddle with it enough.
then, realized when i STILL couldn't access the device (even after accepting the computer's RSA key on my n7),
it was because i had previously put a now deteriorated version of adb in /usr/bin. so, i rm'd it (navigate to /usr/bin and
Code:
sudo rm adb
then navigate over the folder whereeveryouputyoursdk/platform-tools/ and
Code:
sudo cp adb /usr/bin
that should be the new version of adb into /usr/bin. remember, do all that after running the
Code:
android update sdk --no-ui
a few times
peace
Long time I play with adb (1.0.31) from Linux without problem.
Today I flash new kernel (GT-I9505_AdamKernel.V1.6 then try Abyss-GT-I9505-1.6.1)
Got abd "device offline"
I come back on KT-SGS4.
adb works.
Can anyboby explian be why adb down't work with some kernels?
MadMan29729 said:
problem was i had ran this command
sudo apt-get install android-tools-adb
which installed Android Debug Bridge version 1.0.29 in /usr/bin
the system was using this by default even tho i added the platform-tools directory with the newest adb (Android Debug Bridge version 1.0.31) to my environment path.
This solved this problem (running old adb) on LinuxMint:
Method 1:
sudo apt-get remove android-tools-adb
Method 2: (if the first doesn't work)
unplug device
adb kill-server
adb version
Android Debug Bridge version 1.0.29
cd to android sdk dir
cd /home/XXX/adt-bundle-linux-x86_64/sdk/platform-tools/
copy new adb to /usr/bin
sudo cp adb /usr/bin/
adb version
Android Debug Bridge version 1.0.31
adb kill-server
adb devices
daemon not running. starting it now on port 5037 *
daemon started successfully * List of devices attached
plug in the device, and on the device dialog about RSA appeared
accept on device
adb devices
hope this helps...
credit for this solution goes to CoPLaS @ this URL
http://stackoverflow.com/questions/15305725/i-cant-upgrade-from-adb-version-1-0-29
Click to expand...
Click to collapse
ah great i thought there was an issue with my adb and you wrote the solution
MadMan29729 said:
problem was i had ran this command
sudo apt-get install android-tools-adb
which installed Android Debug Bridge version 1.0.29 in /usr/bin
the system was using this by default even tho i added the platform-tools directory with the newest adb (Android Debug Bridge version 1.0.31) to my environment path.
This solved this problem (running old adb) on LinuxMint:
Method 1:
sudo apt-get remove android-tools-adb
Method 2: (if the first doesn't work)
unplug device
adb kill-server
adb version
Android Debug Bridge version 1.0.29
cd to android sdk dir
cd /home/XXX/adt-bundle-linux-x86_64/sdk/platform-tools/
copy new adb to /usr/bin
sudo cp adb /usr/bin/
adb version
Android Debug Bridge version 1.0.31
adb kill-server
adb devices
daemon not running. starting it now on port 5037 *
daemon started successfully * List of devices attached
plug in the device, and on the device dialog about RSA appeared
accept on device
adb devices
hope this helps...
credit for this solution goes to CoPLaS @ this URL
http://stackoverflow.com/questions/15305725/i-cant-upgrade-from-adb-version-1-0-29
Click to expand...
Click to collapse
Thanx man you saved me !!!
Sent from my Micromax A57 using xda app-developers app
Thanks
I still had this problem on OSx and Ubuntu in cli.
what i've done on both to address it is, update the SDK to get the newest adb. (i'm suing 1.0.31)
killall adb
then turn off USB debugging on device.
start new adb (doesn't work nothing to connect to)
then turn on USB debugging and suddenly you get the pop up on the android device that says "always allow this computer at xxx"
test adb devices and should show 'device' instead of 'offline'
or try sudo, unplug the device, run adb under sudo on the desktop (sudo adb kill-server; sudo adb start-server), then plug the device back in.
yay!
svs57 said:
Long time I play with adb (1.0.31) from Linux without problem.
Today I flash new kernel (GT-I9505_AdamKernel.V1.6 then try Abyss-GT-I9505-1.6.1)
Got abd "device offline"
I come back on KT-SGS4.
adb works.
Can anyboby explian be why adb down't work with some kernels?
Click to expand...
Click to collapse
When it does that, go to Developer Options and Revoke Permissions and replug it back in. If that isn't it, then make sure you have the newest version of adb. Have had that happen on a couple of times on newer Samsungs.

Help extracting data from Android Device

Hi, I hope I am posting in the right section? I found the site really difficult to navigate having never used the site before. If its in the wrong place please can a mod move it.
Ok so I have an Android Set Top Box (STB) and I am trying to extract all the data from it. It is an mxp pro 4k. I don't want a backup of the data I want to extract full images of the device for analysing with forensic tools. The problem is I can't seem to communicate with it. I have the full SDK that is up to date, once navigated to the platform tools folder I opened a command line and typed
Code:
adb devices
after plugging in a USB cable to the OTG port. No prompts appeared on the screen to trust any connections like my iPhone does when I connect it. Adb devices returns no results. So I tried wireless adb, I typed
Code:
adb connect 192.168.x.x
and it said connected. Then when running the devices command I had the ip and port then the word device. I then get a shell by using
Code:
adb shell
Which i then elevate to root by using
Code:
su
. Then when i try an adb pull or adb backup I get a message saying error device offline.
Im new to Android so not even sure I am doing it right. I have done a lot of reading and research but seem to be stuck with the basics. To confirm USB debugging is turned on.

Connect Android phone over Wi-Fi using ADB

(Many will consider this question a duplicate of similar questions but I don't think this question should be marked as duplicate because the answer requested here is different than others.)
I am searching for the solutions since many years and read a lot of pages on internet and StackOverflow but hasn't found any solution.
Once an non-rooted Android phone is authorized over USB using ADB then how to connect it over Wi-Fi every time without ever connecting the phone over USB?
I know that executing
Code:
adb start-server
then
Code:
adb tcpip 5555
and then
Code:
adb connect <IP.address.of.phone>
will connect the phone over Wi-Fi IF it is connected using USB when issuing these commands.
According to the answers/forums, there are 2 ways to connect Android phone over Wi-Fi:
The user has to first connect to USB even though the device is already authorized.
The phone needs to be rooted.
But I think, what I want to achieve, as per the question, must be possible because if ADB can connect over USB and then Wi-Fi, then there must be some way to accomplish with directly connecting over Wi-Fi if computer is already authenticated. The missing thing is to know what exactly ADB is doing when switching from USB to Wi-Fi. I think, it could be getting authorization again. But what if we store the authorization information (finger print? or encryption key?) once and use it every time to connect over Wi-Fi? (Please note that when first time authenticating the computer over USB, its finger print is showed in the Android phone, and it never asks again until the authorization is revoked/invalidated somehow. So, I think the requirement here is to revalidate the computer.)
I viewed the ADB repository and read the text files mentioning how ADB works. In one txt file I read that
Code:
adbd
(ADB Daemon) is started on port 5555 on the Android phone/emulator when
Code:
adb connect ___
command is executed. Is there anyway to manually start the daemon through a terminal app on the installed on phone? I tried 'adb', 'adbd' and 'setprop' commands in the Termux app but these commands doesn't exist. According to the txt files of the repository, the ADB on computer is sending the commands to the Android device/emulator and can start 'adbd' or set/open the port 5555 using
Code:
setprop service.adb.tcp.port 5555
command. Is there a way to do this on Android phone using a terminal app on a non-rooter phone?
Somebody who has knowledge of networking, Android and C/C++ language may be able to answer. One can look in the GitHub repo of ADB source code if they want to know what is happening during the connection process.
I'm a little late to answer your question at the time you asked it, but if it still helps the OP, non-rooted Android 10 and below allowed wireless adb connections AFTER a USB connection was first established (adb start-server && adb tcpip 5555 && adb connect [IP]:5555), but that changed (for the better) in Android 11 and above with the new new Developer options Wireless debugging random port assignments (adb connect [IP]:[PORT] or adb pair [IP]:[PORT] [PIN]) such that the adb wireless connection never needs USB cable ever again.
Given Android 11 allows Developer options Wireless debugging via a random port, and Android 12 new Developer options Wireless debugging allows that to be accessed even easier with a new Developer options Wireless debugging tile, the only thing missing is a way to get, after the fact, the random port assignment that Android uses for the adb wireless connection to your PC.
Here are some related posts about that subject which may help the OP.
[adb,scrcpy,vysor] What ports does Android 12 randomly set when Wi-Fi connecting via Wireless debugging adb "pair" or "connect" commands?
(PSA) Using the new Android 12 TILE for 'Developer options' 'Wireless debugging' to establish adb connection over Wi-Fi without USB
What's the difference between Windows/Android adb "connect" versus adb "pair" when mirroring Android 12 over Wi-Fi onto a Windows PC?
The only question that's missing an answer preventing a perfect solution is...
Does anyone know how to obtain that random Android port address from the PC?

Categories

Resources