LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 08-23-2018, 07:11 AM   #1
keikari
LQ Newbie
 
Registered: May 2018
Posts: 19

Rep: Reputation: Disabled
Adb logcat stops output at random points


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?

Here's a video of what happens, current time was ~12:39.
https://drive.google.com/file/d/19K2...p7OhuU5cB/view
 
Old 08-25-2018, 01:35 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by keikari View Post
Running adb as root.
don't.
it's probably the reason why thinks are getting messed up (i speak from experience).
 
Old 08-25-2018, 03:06 AM   #3
keikari
LQ Newbie
 
Registered: May 2018
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
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.
 
Old 08-25-2018, 04:07 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by keikari View Post
Didn't make any difference.
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.
 
Old 08-25-2018, 04:31 AM   #5
keikari
LQ Newbie
 
Registered: May 2018
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
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 View Post
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.

Last edited by keikari; 08-25-2018 at 06:11 AM.
 
Old 08-26-2018, 05:48 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by keikari View Post
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?

Last edited by ondoho; 08-26-2018 at 05:49 AM.
 
Old 08-26-2018, 06:38 AM   #7
keikari
LQ Newbie
 
Registered: May 2018
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
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 View Post
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 View Post
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.

Last edited by keikari; 08-26-2018 at 06:42 AM.
 
Old 08-26-2018, 07:47 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by keikari View Post
I'm willing to bet a lot that this isn't the problem. It is just an authorization thing, right?
"just"?

it's all still very confusing.

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?
 
Old 08-26-2018, 08:32 AM   #9
keikari
LQ Newbie
 
Registered: May 2018
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
"just"?

it's all still very confusing.

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.

Last edited by keikari; 08-26-2018 at 09:03 AM.
 
Old 08-26-2018, 08:48 AM   #10
keikari
LQ Newbie
 
Registered: May 2018
Posts: 19

Original Poster
Rep: Reputation: Disabled
It also seems to stop most often after this line
Code:
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] ]

Last edited by keikari; 08-26-2018 at 08:57 AM.
 
Old 08-26-2018, 09:15 AM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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.
 
Old 08-26-2018, 09:22 AM   #12
keikari
LQ Newbie
 
Registered: May 2018
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
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.

Last edited by keikari; 08-26-2018 at 10:54 AM.
 
Old 08-26-2018, 02:59 PM   #13
keikari
LQ Newbie
 
Registered: May 2018
Posts: 19

Original Poster
Rep: Reputation: Disabled
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?
 
Old 08-27-2018, 12:34 AM   #14
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by keikari View Post
So it's Fedora problem I guess.
Quote:
Originally Posted by ondoho View Post
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?

Last edited by ondoho; 08-27-2018 at 12:36 AM.
 
Old 08-27-2018, 03:57 AM   #15
keikari
LQ Newbie
 
Registered: May 2018
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post


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.

Last edited by keikari; 08-27-2018 at 04:56 AM.
 
  


Reply

Tags
adb, fedora 28, logging



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Potential Exploit? Potential Backdoor? Strange code in '/usr/android/adb' Package: android-tools-adb slicktrail Linux - Security 1 12-05-2016 05:05 AM
Mouse stops working at random times. Seeker0 Ubuntu 5 03-30-2011 06:19 PM
using /dev/random to output random numbers on a text file guguma Programming 4 04-02-2007 01:42 PM
Installation Freezes at random points during copy. idrise Fedora - Installation 1 11-02-2005 04:27 AM
9.1 installation freezes at seemingly random points mustardseed Slackware - Installation 2 03-02-2004 05:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration