10

I'm trying to develop an Android application but when I try to connect to logcat I get the following error:

Unable to open log device '/dev/log/main': No such file or directory

I already installed a new SDK, rebooted my phone... nothing seems to solve the problem. Anyone has any solution?

Samsung Galaxy S (Darky's v9.1)

Apple OSX

ADB 1.0.26

Octavian Helm
  • 39,405
  • 19
  • 98
  • 102
ferdyh
  • 1,355
  • 2
  • 11
  • 29
  • By connecting to logcat you mean issuing a `add logcat` command? – Octavian Helm Feb 01 '11 at 21:12
  • What does the output of `adb shell ls -l /dev/log` look like? – Octavian Helm Feb 01 '11 at 21:20
  • /dev/log: No such file or directory... I tried creating the files using the terminal, but after reboot they were gone... – ferdyh Feb 01 '11 at 21:23
  • Those are special system files which can't just be created. Very weird tho. So the entire log directory is missing? – Octavian Helm Feb 01 '11 at 21:39
  • Indeed... I read something about it has to be enabled in the kernel, however i talked to Darky and he said its no kernel problem... (His words, not mine...) – ferdyh Feb 01 '11 at 21:40
  • It seems this is related to kernel of the rom. Is there any solution to this `Unable to open log device '/dev/log/main` error with Franco kernel? – NoBugs Mar 22 '13 at 01:36
  • http://stackoverflow.com/questions/6941710/unable-to-open-log-device-dev-log-main-no-such-file-or-directory#comment26412708_17516198 – Rizwan Sohaib Aug 05 '13 at 07:13

3 Answers3

10

I had used the Speedmod kernel; This has default Logging disabled. Re-enabled it in the TWEAKS menu.

Thanks for making me realise this Octavian Damiean

ferdyh
  • 1,355
  • 2
  • 11
  • 29
7

I found the following method on XDA:

adb shell
su
mount -o remount,rw /system
echo ANDROIDLOGGER >> /system/etc/tweaks.conf
mount -o remount,ro /system

and reboot.

Nurbldoff
  • 311
  • 3
  • 4
2

For a rooted Galaxy Note 7000, run insmod /lib/modules/logger.ko in the shell (this is missing from the rootfs' init.rc), assuming you can boot up sufficiently far to access adb / some terminal like terminal-ide. The module mounts in /dev/log and provides the missing files.

jakobi
  • 21
  • 2