Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
357 views
in Technique[技术] by (71.8m points)

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

I am new to Android development and bought a cheap Huawei Sonic (U8650 apparently) so I could test my first attempts at making an app on an actual device.

However, whenever I try to use 'adb logcat' or 'adb shell' then 'logcat' on the device I get:

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

I have already enabled Usb debugging in Settings -> Developer.

I just don't know enough about Android to know if this is something I can even fix.

I have found two other questions with similar problems:

/dev/log/main not found

??-?? ??:??:??.???: INFO/<unknown>(<unknown>): Unable to open log device '/dev/log/main': No such file or directory

...but they both turned out to be using some kind of non standard kernel that had logging disabled. Mine is a stock phone out of the box.

It's a very cheap but snappy Android 2.3 phone, so hopefully it wasn't a total waste of money.

Any help would be greatly appreciated.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Dial this: *#*#2846579#*#*
Service menu will appear.
Go to "ProjectMenu" -> "Background Setting" -> "Log Setting"

Open "Log switch" and set it to ON.
Open "Log level setting" and set the log level you wish.

Reboot the phone.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...