How to display log in adb logcat?

94 views
Skip to first unread message

Alberto González

unread,
Jul 4, 2011, 8:55:40 AM7/4/11
to android-platform
Hi,
I have a Google Nexus S. Using this guide:
http://forum.androidcentral.com/t-mobile-nexus-s-rooting-roms-hacks/48675-how-compile-nexus-s-kernel-source.html

When I compile kernel I added some LOGD to cpp files. But when I do
"adb logcat" I don't see it in console.

I'm triying to enable smart card feature of Google Nexus S modifying
this sources:
http://groups.google.com/group/android-developers/browse_thread/thread/d5fc35a9f16aa467/dec4843abd73d9e9?lnk=gst&q=secure+element+diff%27s#dec4843abd73d9e9

I think that when I re-compile kernel, the process doesnt clean old
code and shows me the old code.

Any ideas?
Thanks!

Tim Bird

unread,
Jul 6, 2011, 2:35:09 PM7/6/11
to android-...@googlegroups.com
On 07/04/2011 05:55 AM, � wrote:
> Hi,
> I have a Google Nexus S. Using this guide:
> http://forum.androidcentral.com/t-mobile-nexus-s-rooting-roms-hacks/48675-how-compile-nexus-s-kernel-source.html
>
> When I compile kernel I added some LOGD to cpp files. But when I do
> "adb logcat" I don't see it in console.

This is quite confusing. The kernel has no cpp files. The kernel uses
a completely separate message buffer from the Android logging system.
You don't use LOGD in the kernel, and you don't access kernel messages
with logcat.

To create a kernel message, use printk, and to see kernel messages, use dmesg.

> I'm triying to enable smart card feature of Google Nexus S modifying
> this sources:
> http://groups.google.com/group/android-developers/browse_thread/thread/d5fc35a9f16aa467/dec4843abd73d9e9?lnk=gst&q=secure+element+diff%27s#dec4843abd73d9e9
>
> I think that when I re-compile kernel, the process doesnt clean old
> code and shows me the old code.

I'm not sure what this means either. Are you saying that the make
doesn't rebuild some of the code, even though it's modified by a patch?
If so, then do a 'make clean' then 'make'. (or, save of your .config,
then do a 'make distclean', then restore your .config and do a 'make')

-- Tim

=============================
Tim Bird
Architecture Group Chair, CE Workgroup of the Linux Foundation
Senior Staff Engineer, Sony Network Entertainment
=============================

Alberto González

unread,
Jul 7, 2011, 9:26:23 AM7/7/11
to android-platform
Hi

Thanks for your reply! =)

My idea is to modify this files:


They aren't in android kernel? So what I have to do to modify and use
it?

The commands I use to compile the kernel are this:
cd ~/mydroid/samsung
export PATH=$PATH:/home/<your username>/mydroid/prebuilt/linux-x86/
toolchain/arm-eabi-4.4.3/bin/
make ARCH=arm clean
make ARCH=arm herring_defconfig
make -j4 ARCH=arm CROSS_COMPILE=arm-eabi-


~/mydroid/samsung/arch/arm/boot/zImage

And I packed it to boot.img and flash it.

cd ~/NS-bootwork
./unpack-bootimg.pl boot.img
cd boot.img-ramdisk/
find . | cpio -o -H newc | gzip > /home/<your username>/NS-bootwork/
boot.img-ramdisk/ramdisk-repack.cpio.gz
cd ..
./mkbootimg --kernel zImage --ramdisk /home/<your username>/NS-
bootwork/boot.img-ramdisk/ramdisk-repack.cpio.gz --base 0x30000000 --
pagesize 4096 -o newtestboot.img


Am I missing something?

Thanks!

On Jul 6, 2:35 pm, Tim Bird <tim.b...@am.sony.com> wrote:
> On 07/04/2011 05:55 AM, wrote:
>
> > Hi,
> > I have a Google Nexus S. Using this guide:
> >http://forum.androidcentral.com/t-mobile-nexus-s-rooting-roms-hacks/4...
>
> > When I compile kernel I added some LOGD to cpp files. But when I do
> > "adb logcat" I don't see it in console.
>
> This is quite confusing.  The kernel has no cpp files.  The kernel uses
> a completely separate message buffer from the Android logging system.
> You don't use LOGD in the kernel, and you don't access kernel messages
> with logcat.
>
> To create a kernel message, use printk, and to see kernel messages, use dmesg.
>
> > I'm triying to enable smart card feature of Google Nexus S modifying
> > this sources:
> >http://groups.google.com/group/android-developers/browse_thread/threa...

Alberto González

unread,
Jul 7, 2011, 9:34:01 AM7/7/11
to android-platform
Sorry I forgot the files path:

/mydroid/packages/apps/Nfc/jni/com_android_nfc.cpp
/mydroid/external/libnfc-nxp/src/phDal4Nfc.h


Thanks and see you!
Reply all
Reply to author
Forward
0 new messages