[Guide] Fix adb - device is offline error

Search This thread

Illidan Pornrage

Senior Member
Jul 4, 2011
74
61
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.
 
Last edited:

jedimaster01

New member
Jul 21, 2013
1
0
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.

Fraid it didn't work. End up with various errors and randomly appearing devices. Plus, the original error reappears eventually. Please help!
 

nouvelle_adr

New member
Dec 8, 2010
3
22
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
 
Last edited:

ciano865

Senior Member
Jun 10, 2013
327
103
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
 
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

as far as I know adb doesn't work in bootloader mode.
 
Last edited:

Illidan Pornrage

Senior Member
Jul 4, 2011
74
61
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)
 
  • Like
Reactions: ciano865

timothydonohue

Senior Member
Oct 2, 2007
1,583
128
Portland, Maine
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
 

svs57

Senior Member
Sep 4, 2012
445
52
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?
 
L

LastStandingDroid

Guest
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

ah great i thought there was an issue with my adb and you wrote the solution :)
 

WaveMaster1406

Senior Member
Nov 6, 2007
327
31
New York
www.master225.hexat.com
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

Thanx man you saved me !!!
 

edounn

Senior Member
Dec 6, 2010
97
16
Austin, TX
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!
 
Last edited:

es0tericcha0s

Senior Member
May 6, 2010
4,417
878
mobilemojo5280.com
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?

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.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 40
    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.
    21
    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
    14
    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
    2
    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

    as far as I know adb doesn't work in bootloader mode.
    1
    If you give me some Info around the issue, like what you intended to do and if it worked previously, I could help you.