Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi!
I'm on Fedora 28. Running adb as root.
When using command 'adb logcat' the output usually stops at random point and I need to ctrl+C it and run it repeatedly until it gets to current time and keeps updating as events on android happen.
Even with first going 'adb shell' and then using 'logcat' the same thing happens. Though this way ctrl-C doesn't work if it stops output halfway.
Any ideas why it does that, or how can I make it work?
Or where should I report this bug, if it can't get fixed?
don't.
it's probably the reason why thinks are getting messed up (i speak from experience).
Didn't make any difference.
Are there some other errors I should expected if I run adb as root? Without root I need to change devices connection mode to mtp/file sharing, or it won't see the device.
before you wrote that, did you make sure you killed ALL adb processes, and deleted ALL adbkeys (in $HOME/.android - for all users affected)?
Quote:
Are there some other errors I should expected if I run adb as root? Without root I need to change devices connection mode to mtp/file sharing, or it won't see the device.
i don't understand, i think you need to provide more info there.
much more info.
there's so many different android versions, and also adb versions. it could well be different for you than for me.
before you wrote that, did you make sure you killed ALL adb processes, and deleted ALL adbkeys (in $HOME/.android - for all users affected)?
Didn't do this, since if there were problem, the device shouldn't allow any commands at all. But I'm sure adb wasn't run as root.
Quote:
Originally Posted by ondoho
i don't understand, i think you need to provide more info there.
much more info.
there's so many different android versions, and also adb versions. it could well be different for you than for me.
Android Debug Bridge version 1.0.39
Revision e7195be7725a
Android is version 7.1.2
Adb run as root situation:
Connect phone to pc -> type 'adb devices' and devices is seen.
Adb run without root situation: Doesn't work.
Connect phone to pc -> type 'adb devices' and devices is not seen. Works
Connect phone to pc -> In phone choose "Transfer files" as usb mode(or whaterver it is called) -> type 'adb devices' and devices is seen.
(Main reason for me to use adb is to be able to push and pull files from phone while sharing net through USB. That's why I ran it as root)
I'm starting wonder if this isn't problem with phone or adb, but with things that run terminal.
Didn't do this, since if there were problem, the device shouldn't allow any commands at all.
ok.
it seems you already know where the problem is, and therefore do not need to follow any advice given.
i wonder why you asked at all?
Quote:
Adb run without root situation: Doesn't work.
Connect phone to pc -> type 'adb devices' and devices is not seen. Works
Connect phone to pc -> In phone choose "Transfer files" as usb mode(or whaterver it is called) -> type 'adb devices' and devices is seen.
adb cannot see the device unless it is connected to the computer AND debug mode is enabled AND it is active.
Often the phone also needs to be unlocked.
this is the normal and expected behavior.
Quote:
I'm starting wonder if this isn't problem with phone or adb, but with things that run terminal.
unclear. please clarify.
do you mean your terminal emulator? have you tried a different one?
ok.
it seems you already know where the problem is, and therefore do not need to follow any advice given.
i wonder why you asked at all?
I'm willing to bet a lot that this isn't the problem. It is just an authorization thing, right? (My other device has had problems with adb keys before, so I prefer to avoid touching them if not absolutely necessary.)
At same time as I write this I realized folder can be moved.
Tried it and nothing changed. It asked permission like it should. Ran as root and non-root. Logcat still fails same way.
I was mainly hoping that someone else has had this problem and found solution.
Could you test if your adb logcat works. If you do, please run command few times to make sure it works.
Quote:
Originally Posted by ondoho
adb cannot see the device unless it is connected to the computer AND debug mode is enabled AND it is active.
Often the phone also needs to be unlocked.
this is the normal and expected behavior.
This way I can connect when adb is run as root. But with those steps I can't connect if adb isn't run as root.
Without root I need to choose in the "charging/Transferfile/<otheroptions>" pop-up menu the fileshare option.(Menu is in phone.)
Quote:
Originally Posted by ondoho
unclear. please clarify.
do you mean your terminal emulator? have you tried a different one?
I didn't had actually any specific question, since my knowledge about linux is ~0.
I don't actually know anything about how bash or terminal or shell works. Just starting to wonder could there be something that can cause this.
I've tried gnome terminal and xterm, but same error with both.
if xterm & gnome-terminal show the same error, i'd say it can't be the terminal emulator itself.
adb logcat works on my system; it stays in monitoring mode as new messages come in, i guess that's the expected behavior.
unless you start actually working on the problem and sharing your research efforts, i don't see how i can help.
i wonder why you use fedora, if you're linux level is "~0".
are you aware it is a bleeding edge distro? do you like cutting yourself?
Fedora was only distro that was simple enough for me. Bleeding edge doesn't mean you need skills/knowledge to use it.
What distro are you on, I could try to run adb with it on VM.
I mean "just" authorization in a way that it's very simple, either it works or it doesn't, there is no between with it.
I'm willing to research, but I have no idea how can I get more info about it.
PowerManagerService: Waking up from sleep (uid 1000)...
EDIT:
With command "adb logcat *:W" it gets to end much more often.
Now it stops most often to this, though it stops much more rarely than with default logcat output.
Code:
E ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ LISTEN id=32, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ]
define "often" - how often? does it also happen with other events?
i had the logcat running for about 10 mins and nothing happened.
maybe it's your phone.
Phone hasn't done this kind of thing when I ran adb on windows(~5 months ago).
Could you tell me which distro you tested adb. This way I can see is it a phone or pc that causes this problem.
Often is something like >60% of the stops are for that line. Or it's clearly noticeable that it stop much more on that line.
EDIT:
Also if logcat gets to current time (so that it actually starts actively updating) it seems to keep working like it should.
Tested on debian in virtual machine and on it adb logcat works like expected.
So it's Fedora problem I guess.
Don't really know how I should continue from this point. Any ideas what can I test or where to report this bug?
i wonder why you use fedora, if you're linux level is "~0".
are you aware it is a bleeding edge distro? do you like cutting yourself?
edit:
actually i'm not so sure it's a fedora problem.
as i have pointed out several times, you have been messing about with adb with different users, how can you be sure you can reproduce the exact same situation on a vm?
edit:
actually i'm not so sure it's a fedora problem.
as i have pointed out several times, you have been messing about with adb with different users, how can you be sure you can reproduce the exact same situation on a vm?
I did (almost) same steps. (On fedora systemd starts adb, shouldn't make difference).
I haven't modified any adb settings in neither(I don't even know are there any settings).
Issue is with my pc anyway.
I'll try to install fedora to confirm is it my current installation or Fedora.
(Do you actually have some faint ideas what I could do or are you just being a** for fun? Though still thankful for keeping this thread alive.)
EDIT: It worked on fedora virtual machine like it should, adb ran as root and started by systemd. Now only idea for fix that I have is to clean install Fedora.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.