[Defy Android Development] YetAnotherForumUser:
Last adjustment to get repo to build and run; how to silence auditd

The repo builds with the patch set I posted earlier. The patch to frameworks/av (which built upon Quarx' earlier patch) can be dropped in lieu of Quarx' patch which completely drops the Froyo-compatible interface. If it so happens the backward compatibility is needed for some reason my patch can be used to provide it.

More important is that you'll notice the screen stays 'lit but black' when you boot the device. Connect it through adb and you'll see why:

D/libEGL ( 2171): loaded /system/lib/egl/libEGL_POWERVR_SGX530_125.so
D/libEGL ( 2171): loaded /system/lib/egl/libGLESv1_CM_POWERVR_SGX530_125.so
D/libEGL ( 2171): loaded /system/lib/egl/libGLESv2_POWERVR_SGX530_125.so
E/HAL ( 2171): load: module=/system/lib/hw/gralloc.omap3.so
E/HAL ( 2171): dlopen failed: cannot locate symbol "_ZNK7android9CallStack4dumpEPKc" referenced by "gralloc.omap3.so"...
W/libEGL ( 2171): eglInitialize(0x1) failed (EGL_NOT_INITIALIZED)
E/HAL ( 2171): load: module=/system/lib/hw/gralloc.omap3.so
E/HAL ( 2171): dlopen failed: cannot locate symbol "_ZNK7android9CallStack4dumpEPKc" referenced by "gralloc.omap3.so"...
E/SurfaceFlinger( 2171): gralloc module not found
E/SurfaceFlinger( 2171): hwcomposer module not found
E/SurfaceFlinger( 2171): ERROR: failed to open framebuffer (Invalid argument), aborting

The missing symbol (_ZNK7android9CallStack4dumpEPKc) is normally provided by libutils.so but the interface has changed recently. Quarx has implemented the older interfaces under a different class name (CallStac2). Since gralloc.omap3.so is a prebuilt library there could only be one reason for Quarx' build to work where a fresh homebrew fails: the version of gralloc.omap3.so in Quarx' build is different. He used a binary editor to change the symbol names to _ZNK7android9CallStac2... The homebrew build fails because this edited library is not in the repo. You can grab it from a recent Quarx build or download the version I added to this message - don't forget to gunzip it before use though! The file lives in /system/lib/hw/gralloc.omap3.so on the device, vendor/motorola/jordan-common/ti_sgx_es5.x/gralloc.omap3.so in the repo.

One annoying aspect of these current builds (Quarx and homebrew) is the steady stream of complaints about audit-related protocol errors:

I/auditd ( 7929): Starting up
I/audit_log( 7929): Previous audit logfile detected, rotating
E/libaudit( 7929): Could net set pid for audit events, error: Protocol error
E/auditd ( 7929): Failed on audit_set_pid with error: Connection refused
I/auditd ( 7929): Exiting
E/libaudit( 7929): Could net set pid for audit events, error: Protocol error
I/auditd ( 7932): Starting up
I/audit_log( 7932): Previous audit logfile detected, rotating
E/libaudit( 7932): Could net set pid for audit events, error: Protocol error
E/auditd ( 7932): Failed on audit_set_pid with error: Connection refused
I/auditd ( 7932): Exiting
E/libaudit( 7932): Could net set pid for audit events, error: Protocol error

These errors are generated because the AUDIT subsystem is not enabled in the kernel. The easiest way to get rid of these errors (apart from fixing the kernel by enabling CONFIG_AUDIT=y; CONFIG_AUDITSYSCALL=y) is to rename the audit daemon:

# mount -o remount,rw /system
# mv /system/bin/auditd /system/bin/auditd.org
# sync
# mount -o remount,ro /system