How to enable logger in Android x86 4.4

220 views
Skip to first unread message

Humberto Politi

unread,
Oct 1, 2015, 9:42:25 PM10/1/15
to Android-x86
Hi, I'm building Androix x86 4.4 and I noticed that I can't use logcat. The following message appears:

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

Is there any way to enable the logger in the source files. I've tried to set the ANDROID_LOGGER=y inside kernel/drivers/staging/android/Kconfig, but the log is still not working.
Is there a way to enable the log so I can use logcat?

Thanks in advance,
Humberto Politi.

Chih-Wei Huang

unread,
Oct 2, 2015, 12:06:40 AM10/2/15
to Android-x86
2015-10-01 23:56 GMT+08:00 Humberto Politi <humbert...@gmail.com>:
> Hi, I'm building Androix x86 4.4 and I noticed that I can't use logcat. The following message appears:
>
> Unable to open log device '/dev/log/main': No such file or directory.

Don't know what you did exactly.
The logcat should just work in the 4.4-r3
and any older release.

> Is there any way to enable the logger in the source files. I've tried to set the ANDROID_LOGGER=y inside kernel/drivers/staging/android/Kconfig, but the log is still not working.
> Is there a way to enable the log so I can use logcat?

Did you sync the code completely
and follow the instructions to build
the target (android_x86) correctly?

ANDROID_LOGGER=y should just be set
in the kitkat-x86 branch.
(Note it's unnecessary for lollipop-x86)
You don't need to change anything.
Or what you have changed to break it?


--
Chih-Wei
Android-x86 project
http://www.android-x86.org

Humberto Politi

unread,
Oct 2, 2015, 7:56:49 AM10/2/15
to Android-x86
I don't really know what I did to break the logger. I haven't modified much the source, yet logcat was never available for me. All I did was to create a new device for my build. Anyway, I'll re-sync the repo for android-x86 and try again.

Thank you.
Humberto Politi.

Chih-Wei Huang

unread,
Oct 2, 2015, 10:36:09 AM10/2/15
to Android-x86
2015-10-02 19:56 GMT+08:00 Humberto Politi <humbert...@gmail.com>:
> I don't really know what I did to break the logger. I haven't modified much
> the source, yet logcat was never available for me. All I did was to create a
> new device for my build. Anyway, I'll re-sync the repo for android-x86 and
> try again.

Have you tested the 4.4-r3 release?
Can you see logcat?

Humberto Politi

unread,
Oct 2, 2015, 11:37:21 AM10/2/15
to Android-x86
Are you referring to the pre-build image in the website? If so, then yes, I am able to use logcat in that image. Only when I'm the one building the code that I can't use it.

Thanks,
Humberto Politi.

Chih-Wei Huang

unread,
Oct 2, 2015, 1:03:25 PM10/2/15
to Android-x86
2015-10-02 23:37 GMT+08:00 Humberto Politi <humbert...@gmail.com>:
> Are you referring to the pre-build image in the website? If so, then yes, I
> am able to use logcat in that image. Only when I'm the one building the code
> that I can't use it.

I suspect you didn't build the only valid
target named android_x86.
Did you define and build your own target?

Note the kernel config for kitkat-x86 was
combined by the two files:
kernel/arch/x86/configs/android-x86(_64)_defconfig
device/generic/x86/android-x86_diffconfig

CONFIG_ANDROID_LOGGER=y was defined in the latter.

If you defined your own target,
you need to add a similar diffconfig by
TARGET_KERNEL_DIFFCONFIG
in the BoardConfig.mk.
Or just add CONFIG_ANDROID_LOGGER=y
to the defconfig if you don't mind the hackish.
Message has been deleted

Chih-Wei Huang

unread,
Oct 2, 2015, 1:56:42 PM10/2/15
to Android-x86
2015-10-03 1:26 GMT+08:00 rbg <rbg.hp...@gmail.com>:
> ??? is this contrary when I asked that question in july, and you answered
>
> re:
> 2015-07-27 0:03 GMT+08:00 rbg <rbg.hp...@gmail.com>:
>> doesn't this need to be merged also???
>>
>>
>> http://git.android-x86.org/?p=device/generic/x86.git;a=commitdiff;h=54dc7be59dbe986d2fc59def895c82b3a17c3def
>
> No.
> The current defconfig is correct for lollipop-x86.
> The diffconfig is specified for kitkat-x86
> since it's different than lollipop-x86.
> (that's why it needs diffconfig)

What's contradiction?

kitkat-x86 needs CONFIG_ANDROID_LOGGER=y
lollipop-x86 doesn't need.

The defconfig of kernel 4.0 was designed for
lollipop-x86 (without CONFIG_ANDROID_LOGGER=y)
kitkat-x86 get the diffconfig at build time.

Is it clear?
> --
> You received this message because you are subscribed to the Google Groups
> "Android-x86" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-x86...@googlegroups.com.
> To post to this group, send email to andro...@googlegroups.com.
> Visit this group at http://groups.google.com/group/android-x86.
> For more options, visit https://groups.google.com/d/optout.

rbg

unread,
Oct 2, 2015, 2:04:32 PM10/2/15
to Android-x86
it was clear when I re-read what you said...that's why the question was deleted from the post - thanks

Humberto Politi

unread,
Oct 3, 2015, 12:20:10 PM10/3/15
to Android-x86
Are you referring to the pre-build image available in the website? If so, then yes, I am able to see logcat. It's only when I'm compiling from source that logcat seems disabled.


Em sexta-feira, 2 de outubro de 2015 11:36:09 UTC-3, Chih-Wei Huang escreveu:

Humberto Politi

unread,
Oct 20, 2015, 1:06:42 PM10/20/15
to Android-x86
Sorry for the delay in responding. You were correct. Building the valid target named android_x86 fixed logcat.


Thank you for your help,
Humberto Politi.
Reply all
Reply to author
Forward
0 new messages