androidStudio log doesn't work

2

I cannot get log to work on my phone. I only get this error in Android Studio:

11-01 03:28:56.427 24227-24375/com.example.segall.caveofprogcourse E/GED: Failed to get GED Log Buf, err(0)

Android studio 2.1.3
Ubuntu 16.04 LTS
Sony Xperia M5
android 6.0 api 23

I have USB Debugging on.

Edit

This code in onCreate method

Log.d("mylog", " LOG WORKS ");  
Log.e("mylog", "onCreate called really?"); // I added this Log

gets the following results:

11-01 21:51:23.561 7820-7820/com.example.segall.caveofprogcourse E/mylog: onCreate called really?  
11-01 21:51:23.619 7820-7873/com.example.segall.caveofprogcourse E/GED: Failed to get GED Log Buf, err(0)

surprisingly, the Log.e works. Anyone know why this might have happened?

Edit 2 I created new project only with two logs in onCreate

    Log.d("mylog","Log.d on create this  is not working");
    Log.e("mylog","Log.e surprisingly this works");

I put a few empty line so it's easy to spot

log filter from app:

11-02 02:24:08.858 24802-24802/com.example.segall.logapp W/ResourceType: Found multiple library tables, ignoring...
11-02 02:24:08.863 24802-24802/com.example.segall.logapp W/System: ClassLoader referenced unknown path: /data/app/com.example.segall.logapp-1/lib/arm64
11-02 02:24:08.885 24802-24811/com.example.segall.logapp I/System: FinalizerDaemon: finalize objects = 1
11-02 02:24:09.038 24802-24802/com.example.segall.logapp W/System: ClassLoader referenced unknown path: /data/app/com.example.segall.logapp-1/lib/arm64
11-02 02:24:09.180 24802-24802/com.example.segall.logapp W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable

11-02 02:24:09.366 24802-24802/com.example.segall.logapp E/mylog: Log.e surprisingly this works

11-02 02:24:09.435 24802-24833/com.example.segall.logapp E/GED: Failed to get GED Log Buf, err(0)

11-02 02:24:09.439 24802-24833/com.example.segall.logapp I/OpenGLRenderer: Initialized EGL, version 1.4
11-02 02:24:09.448 24802-24833/com.example.segall.logapp I/OpenGLRenderer: Get enable program binary service property (1)
11-02 02:24:09.448 24802-24833/com.example.segall.logapp I/OpenGLRenderer: Initializing program atlas...
11-02 02:24:09.449 24802-24833/com.example.segall.logapp I/OpenGLRenderer: Program binary detail: Binary length is 360191, program map length is 152.
11-02 02:24:09.449 24802-24833/com.example.segall.logapp I/OpenGLRenderer: Succeeded to mmap program binaries. File descriptor is 38, and path is /dev/ashmem�.
11-02 02:24:09.449 24802-24833/com.example.segall.logapp I/OpenGLRenderer: No need to use file discriptor anymore, close fd(38).
11-02 02:24:09.452 24802-24833/com.example.segall.logapp W/libEGL: [ANDROID_RECORDABLE] format: 1
11-02 02:24:09.569 24802-24802/com.example.segall.logapp I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@aec4c2c time:73133463

log filter no filter:

--------- beginning of system
11-02 02:29:48.790 1014-2030/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.segall.logapp/.MainActivity} from uid 2000 from pid 29625 on display 0
11-02 02:29:48.790 1014-2030/? W/PackageManager: checkUidPermission(): android.permission.START_ANY_ACTIVITY of 2000 is denied.
11-02 02:29:48.792 1014-1231/? I/libPerfService: 1: set freq: 1950000
11-02 02:29:48.792 1014-1231/? I/libPerfService: 1: set: 4
11-02 02:29:48.793 1014-2030/? I/PowerManagerService: setBrightness mButtonLight 0.
11-02 02:29:48.798 1014-2036/? W/PackageManager: checkUidPermission(): android.permission.WRITE_MEDIA_STORAGE of 10014 is denied.
11-02 02:29:48.798 1014-2036/? W/PackageManager: checkUidPermission(): android.permission.READ_EXTERNAL_STORAGE of 10014 is denied.
11-02 02:29:48.800 330-330/? I/BufferQueue: [unnamed-330-1869](this:0x7fae55d400,id:1869,api:0,p:-1,c:-1) BufferQueue core=(330:/system/bin/surfaceflinger)
11-02 02:29:48.800 330-330/? I/BufferQueueConsumer: [unnamed-330-1869](this:0x7fae55d400,id:1869,api:0,p:-1,c:330) connect(C): consumer=(330:/system/bin/surfaceflinger) controlledByApp=false
11-02 02:29:48.800 330-330/? I/BufferQueueConsumer: [unnamed-330-1869](this:0x7fae55d400,id:1869,api:0,p:-1,c:330) setConsumerName: unnamed-330-1869
11-02 02:29:48.800 330-330/? I/BufferQueueConsumer: [Starting com.example.segall.logapp](this:0x7fae55d400,id:1869,api:0,p:-1,c:330) setConsumerName: Starting com.example.segall.logapp
11-02 02:29:48.800 330-330/? I/BufferQueueConsumer: [Starting com.example.segall.logapp](this:0x7fae55d400,id:1869,api:0,p:-1,c:330) setDefaultBufferSize: width=1 height=1
11-02 02:29:48.803 330-330/? I/BufferQueueConsumer: [Starting com.example.segall.logapp](this:0x7fae55d400,id:1869,api:0,p:-1,c:330) setDefaultBufferSize: width=1080 height=1920
11-02 02:29:48.803 330-330/? I/SurfaceFlinger: [Built-in Screen (type:0)] fps:1.709773,dur:4094.11,max:3980.13,min:16.10
11-02 02:29:48.807 330-443/? I/BufferQueueProducer: [Starting com.example.segall.logapp](this:0x7fae55d400,id:1869,api:2,p:1014,c:330) connect(P): api=2 producer=(1014:system_server) producerControlledByApp=false
11-02 02:29:48.807 330-1043/? I/BufferQueueProducer: [Starting com.example.segall.logapp](this:0x7fae55d400,id:1869,api:2,p:1014,c:330) new GraphicBuffer needed
11-02 02:29:48.809 29645-29645/? I/art: Late-enabling -Xcheck:jni
11-02 02:29:48.809 1014-2036/? I/ActivityManager: Start proc 29645:com.example.segall.logapp/u0a14 for activity com.example.segall.logapp/.MainActivity
11-02 02:29:48.810 1014-1032/? W/PackageManager: checkUidPermission(): android.permission.INTERNET of 10014 is denied.
11-02 02:29:48.815 1014-1036/? I/WindowManager: Focus moving from Window{da2cb0d u0 com.android.systemui/com.android.systemui.recents.RecentsActivity} to null
11-02 02:29:48.815 1014-1036/? I/WindowManager: Losing focus: Window{da2cb0d u0 com.android.systemui/com.android.systemui.recents.RecentsActivity}
11-02 02:29:48.825 1014-1378/? I/libPerfService: perfSetFavorPid - pid:29645, 73cd
11-02 02:29:48.839 29645-29645/com.example.segall.logapp W/ResourceType: Found multiple library tables, ignoring...
11-02 02:29:48.844 330-443/? I/BufferQueueProducer: [com.android.systemui/com.android.systemui.recents.RecentsActivity](this:0x7fae55e800,id:1867,api:1,p:-1,c:330) disconnect(P): api 1
11-02 02:29:48.844 330-443/? I/BufferQueueConsumer: [com.android.systemui/com.android.systemui.recents.RecentsActivity](this:0x7fae55e800,id:1867,api:1,p:-1,c:330) getReleasedBuffers: returning mask 0xffffffffffffffff
11-02 02:29:48.849 330-1043/? I/BufferQueueProducer: [com.android.systemui/com.android.systemui.recents.RecentsActivity](this:0x7fae55e800,id:1867,api:1,p:-1,c:330) disconnect(P): api 1
11-02 02:29:48.851 29645-29654/com.example.segall.logapp I/System: FinalizerDaemon: finalize objects = 1
11-02 02:29:48.853 29645-29645/com.example.segall.logapp W/System: ClassLoader referenced unknown path: /data/app/com.example.segall.logapp-1/lib/arm64
11-02 02:29:48.975 29645-29645/com.example.segall.logapp W/System: ClassLoader referenced unknown path: /data/app/com.example.segall.logapp-1/lib/arm64
11-02 02:29:48.977 1014-2030/? W/PackageManager: checkUidPermission(): android.permission.INTERACT_ACROSS_USERS_FULL of 10014 is denied.
11-02 02:29:48.977 1014-2030/? W/PackageManager: checkUidPermission(): android.permission.REAL_GET_TASKS of 10014 is denied.
11-02 02:29:48.977 1014-2030/? W/PackageManager: checkUidPermission(): android.permission.GET_TASKS of 10014 is denied.
11-02 02:29:48.998 330-330/? I/BufferQueueProducer: [FrameBufferSurface_0](this:0x7fb0759000,id:0,api:1,p:330,c:330) queueBuffer: fps=2.00 dur=5985.78 max=5805.78 min=14.24
11-02 02:29:49.063 330-330/? I/BufferQueueConsumer: [com.android.systemui/com.android.systemui.recents.RecentsActivity](this:0x7fae55e800,id:1867,api:1,p:-1,c:-1) disconnect(C)
11-02 02:29:49.064 330-330/? I/BufferQueue: [com.android.systemui/com.android.systemui.recents.RecentsActivity](this:0x7fae55e800,id:1867,api:1,p:-1,c:-1) ~BufferQueueCore
11-02 02:29:49.128 29645-29645/com.example.segall.logapp W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
11-02 02:29:49.143 1014-2075/? W/PackageManager: checkUidPermission(): android.permission.INTERACT_ACROSS_USERS of 10014 is denied.
11-02 02:29:49.143 1014-14701/? W/PackageManager: checkUidPermission(): android.permission.INTERACT_ACROSS_USERS_FULL of 10014 is denied.
11-02 02:29:49.213 1014-4093/? I/PowerManagerService: setBrightness mButtonLight 0.
11-02 02:29:49.217 1014-1377/? I/PowerManagerService: setBrightness mButtonLight 0.
11-02 02:29:49.217 1014-1378/? I/PowerManagerService: setBrightness mButtonLight 0.
11-02 02:29:49.219 1014-30758/? I/PowerManagerService: setBrightness mButtonLight 0.


11-02 02:29:49.317 29645-29645/com.example.segall.logapp E/mylog: Log.e surprisingly this works


11-02 02:29:49.320 330-443/? I/SurfaceFlinger: EventThread Client Pid (29645) created
11-02 02:29:49.323 330-443/? I/SurfaceFlinger: EventThread Client Pid (29645) created
11-02 02:29:49.334 330-1043/? I/SurfaceFlinger: [SF client] NEW(0x7fae011a80) for (1014:system_server)
11-02 02:29:49.367 1014-1986/? W/PackageManager: checkUidPermission(): android.permission.STATUS_BAR of 10014 is denied.
11-02 02:29:49.368 330-330/? I/BufferQueue: [unnamed-330-1870](this:0x7fae55e800,id:1870,api:0,p:-1,c:-1) BufferQueue core=(330:/system/bin/surfaceflinger)
11-02 02:29:49.368 330-330/? I/BufferQueueConsumer: [unnamed-330-1870](this:0x7fae55e800,id:1870,api:0,p:-1,c:330) connect(C): consumer=(330:/system/bin/surfaceflinger) controlledByApp=false
11-02 02:29:49.368 330-330/? I/BufferQueueConsumer: [unnamed-330-1870](this:0x7fae55e800,id:1870,api:0,p:-1,c:330) setConsumerName: unnamed-330-1870
11-02 02:29:49.368 330-330/? I/BufferQueueConsumer: [com.example.segall.logapp/com.example.segall.logapp.MainActivity](this:0x7fae55e800,id:1870,api:0,p:-1,c:330) setConsumerName: com.example.segall.logapp/com.example.segall.logapp.MainActivity
11-02 02:29:49.368 330-330/? I/BufferQueueConsumer: [com.example.segall.logapp/com.example.segall.logapp.MainActivity](this:0x7fae55e800,id:1870,api:0,p:-1,c:330) setDefaultBufferSize: width=1 height=1
11-02 02:29:49.376 330-330/? I/BufferQueueConsumer: [com.example.segall.logapp/com.example.segall.logapp.MainActivity](this:0x7fae55e800,id:1870,api:0,p:-1,c:330) setDefaultBufferSize: width=1080 height=1920
11-02 02:29:49.379 1014-1036/? I/WindowManager: Focus moving from null to Window{4f3b63c u0 com.example.segall.logapp/com.example.segall.logapp.MainActivity}
11-02 02:29:49.379 1014-1036/? I/WindowManager: Gaining focus: Window{4f3b63c u0 com.example.segall.logapp/com.example.segall.logapp.MainActivity}


11-02 02:29:49.380 29645-29672/com.example.segall.logapp E/GED: Failed to get GED Log Buf, err(0)


11-02 02:29:49.384 29645-29672/com.example.segall.logapp I/OpenGLRenderer: Initialized EGL, version 1.4
11-02 02:29:49.394 29645-29672/com.example.segall.logapp I/OpenGLRenderer: Get enable program binary service property (1)
11-02 02:29:49.394 29645-29672/com.example.segall.logapp I/OpenGLRenderer: Initializing program atlas...
11-02 02:29:49.395 29645-29672/com.example.segall.logapp I/OpenGLRenderer: Program binary detail: Binary length is 360191, program map length is 152.
11-02 02:29:49.395 29645-29672/com.example.segall.logapp I/OpenGLRenderer: Succeeded to mmap program binaries. File descriptor is 38, and path is /dev/ashmem�.
11-02 02:29:49.395 29645-29672/com.example.segall.logapp I/OpenGLRenderer: No need to use file discriptor anymore, close fd(38).
11-02 02:29:49.398 330-440/? I/BufferQueueProducer: [com.example.segall.logapp/com.example.segall.logapp.MainActivity](this:0x7fae55e800,id:1870,api:1,p:29645,c:330) connect(P): api=1 producer=(29645:com.example.segall.logapp) producerControlledByApp=true
11-02 02:29:49.398 29645-29672/com.example.segall.logapp W/libEGL: [ANDROID_RECORDABLE] format: 1
11-02 02:29:49.399 330-1044/? I/BufferQueueProducer: [com.example.segall.logapp/com.example.segall.logapp.MainActivity](this:0x7fae55e800,id:1870,api:1,p:29645,c:330) new GraphicBuffer needed
11-02 02:29:49.406 330-443/? I/BufferQueueProducer: [StatusBar](this:0x7fb075a400,id:8,api:1,p:1335,c:330) queueBuffer: fps=0.15 dur=6482.88 max=6482.88 min=6482.88
11-02 02:29:49.460 1014-1036/? I/ActivityManager: [AppLaunch] Displayed Displayed com.example.segall.logapp/.MainActivity: +661ms
11-02 02:29:49.460 1014-1036/? I/Timeline: Timeline: Activity_windows_visible id: ActivityRecord{548a061 u0 com.example.segall.logapp/.MainActivity t1972} time:73473354
11-02 02:29:49.460 1014-1231/? I/libPerfService: 1: set: 1
11-02 02:29:49.460 1014-1231/? I/libPerfService: 1: set freq: 0
11-02 02:29:49.460 1014-1231/? I/libPerfService: 1: set vcore level: 0
11-02 02:29:49.515 330-1043/? I/BufferQueueProducer: [com.example.segall.logapp/com.example.segall.logapp.MainActivity](this:0x7fae55e800,id:1870,api:1,p:29645,c:330) new GraphicBuffer needed
11-02 02:29:49.531 2491-2496/? I/PerfService: PerfServiceNative_getPackName
11-02 02:29:49.532 1014-1378/? I/libPerfService: perfGetPackName com.example.segall.logapp
11-02 02:29:49.532 1014-1378/? I/libPerfService: perfGetPackName com.example.segall.logapp
11-02 02:29:49.532 1014-1378/? E/PerfService: com.example.segall.logapp
11-02 02:29:49.534 1014-1378/? I/libPerfService: perfGetPackName com.example.segall.logapp
11-02 02:29:49.534 1014-1378/? I/libPerfService: perfGetPackName com.example.segall.logapp
11-02 02:29:49.534 1014-1378/? E/PerfService: com.example.segall.logapp
11-02 02:29:49.534 2491-2496/? I/PerfService: com.example.segall.logapp
11-02 02:29:49.534 2491-2496/? I/PerfService: PerfServiceNative_getPackName
11-02 02:29:49.534 1014-14701/? I/libPerfService: perfGetPackName com.example.segall.logapp
11-02 02:29:49.534 1014-14701/? I/libPerfService: perfGetPackName com.example.segall.logapp
11-02 02:29:49.534 1014-14701/? E/PerfService: com.example.segall.logapp

screen of logcat

android
android-studio
logging
asked on Stack Overflow Nov 1, 2016 by segall • edited Jun 20, 2020 by Community

3 Answers

0
  1. Try to don't use filter on the top right of logcat
  2. Re-check your device is connected and logcat listen to the correct device
  3. Choose log type verbose
  4. You may need to download the configuration file from developer console and add it to your project. Second step of this link.File name is google-services.json
  5. check your lib configuration especially Firebase config.
answered on Stack Overflow Nov 1, 2016 by UmAnusorn
0

I had the same problem. Please update your Android Studio. It was a bug

answered on Stack Overflow Jul 3, 2018 by user3563950
-1

With Linux(Ubuntu), you have Set up your system to detect your device. You may check these Google guidelines

You need to add a udev rules file that contains a USB configuration for each type of device you want to use for development.

Before doing this, Verify that your application is "debuggable" in your manifest or build.gradle file.

 android {
        buildTypes {
            debug {
                debuggable true
            }

In the AndroidManifest.xml file, add android:debuggable="true" to the <application> element.

Now set up your system to detect your device using a udev rules file. Add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property. So you have to know Sonys vendor id in your case: 054c

  1. Log in as root and create this file: /etc/udev/rules.d/51-android.rules

i.e

sudo gedit /etc/udev/rules.d/51-android.rules

Use this format to add each vendor to the file: 054c is sonys vendor id.

SUBSYSTEM=="usb", ATTR{idVendor}=="054c", MODE="0666", GROUP="plugdev"

If you add SUBSYSTEM=="usb", ATTR{idVendor}=="054c", MODE="0666", GROUP="plugdev" Android studio will detect Sony.

  1. Now execute: chmod a+r /etc/udev/rules.d/51-android.rules

Close and start Studio. Then run run your project. Studio will detect it

answered on Stack Overflow Nov 1, 2016 by user3563950

User contributions licensed under CC BY-SA 3.0