[LG Optimus 4X HD] Adam77Root:
Status (beware, long post :P)

There was silence here in the recent days about status and updates. This of course doesn't mean there won't be any. ;)

NFC: Today I enabled all remaining features from grouper and they all function properly, no issues. So this is ready now I think.

Camera: Still this is the most concerning issue. I expect fixing video recording would not be a problem, just a bit of manual work. As you know, it can be fixed by using old OMX, but that breaks HW acceleration in gallery and such apps. Idea is to use both OMX systems parallelly, I think this is feasible now that we have an open-source libstagefrighthw that handles OMX loading. So use the old encoders for video recording and the new decoders for video playing. This would involve manually editing all references to the codec names, but would not be that big work.

The bigger issue is QR reader and such apps. These apps (I tested with QR Droid) throw the following error:

D/NvOmxCamera( 158): enableMsgType => 0x10
D/NvOsDebugPrintf( 158): NVMEM_IOC_READ failed: Operation not permitted
D/NvOsDebugPrintf( 158): NVMEM_IOC_READ failed: Operation not permitted
D/NvOsDebugPrintf( 158): NVMEM_IOC_READ failed: Operation not permitted
D/NvOmxCamera( 158): Event handler got PreviewFrameCopy event
D/NvOmxCamera( 158): disableMsgType => 0x10

Message type 0x10 is CAMERA_MSG_PREVIEW_FRAME (source). Interesting is that it first enables and then almost immediately disables it. Also, I can see preview in the app, it just doesn't recognize any barcode or QR code.

I debugged the 'Operation not permitted' error as well. Error on camera open (with all camera apps):

<4>[14:02:06 11:27:27.838] misc nvmap: nvmap_pin_ids: mediaserver pinning unreferenced handle daaf6cc0
<4>[14:02:06 11:27:27.838] misc nvmap: nvmap_pin_ids: mediaserver pinning unreferenced handle d7426be0

On camera close (with all camera apps):

<3>[14:02:06 11:27:29.958] misc nvmap: nvmap_unpin_ids: mediaserver unpinning invalid handle daaf6cc0
<3>[14:02:06 11:27:29.958] misc nvmap: nvmap_unpin_ids: mediaserver unpinning invalid handle d8145320

I made the kernel log nvmap handle id's where the permission issue happens. Here is the reverted test code. It shows the above two addresses and a third one. Also, these addresses are both used by mediaserver and surfaceflinger. This is very likely caused by the incompatibilities of the old and new libraries. Today I tried using One X libraries for new things, same issue persists.

Kernel: There's an issue sometimes that the device is stuck on 1 core at 102 or 204 MHz. I occasionally encounter it every day and my observation shows that it happens when there is very high memory usage, for example when I open a bigger GitHub commit in built-in browser. Almost the whole 1 GB memory is used when this happens. Today I made a log and the issue seems to happen after the following line:

<4>[14:02:06 09:19:28.856] boost load shaper triggered!

Few CPUs get enabled, then they are disabled again and don't come back online till the end of the high load period, i.e. I have to manually kill the memory-hungry app and then everything is fine. This 'boost load shaper' is an LGE addition, see here. [MENTION=1149134]Demetris[/MENTION], [MENTION=4716493]laufersteppenwolf[/MENTION]: Any idea? Maybe we should disable it and try.

Official support: If I wanted, I could submit this for official support even today, the build is rock stable (, except this kernel issue, but it's not that significant). It would be very easy to switch to old blobs, options are already partially uploaded at P880-dev repo. Main reason for this is in the next paragraph. Anyway I'm doing a new build today still with hybrid blobs.

Why I really want this:

First reason is what I already wrote a few times: future. Maintaining support for old blobs will be gradually becoming harder and harder. This doesn't mean we won't have next Android version, I'm almost certain that we will (Don't quote me on this later if not. :D). Still, if we use grouper blobs, that would mean a long-time support until grouper is officially or either unofficially supported and considering how many users have an original Nexus 7, this will be a long time. Of course nobody knows what will happen in the upcoming months.

The second reason is built around a somewhat deeper thought. Almost all OEM customization include some change in native code, some libraries, especially those of Samsung's TouchWiz are pretty much modified. These are mainly adding new functionality, like fine-tuning external display parameters, extended Wi-Fi display support, HDMI, advanced memory management (ION, FIMC) or media capabilities (native subtitle support for example). Reverse engineering that code, even function signatures is extremely hard. Especially guessing return values is the most tricky part. This is needed, because we need that extra supporting code in our libraries for old blobs. However, if we have new blobs that are fully compatible with these libraries, we can just easily replace that whole library and have all original OEM implementation of those additions (, most of the which of course have no effect, e.g. Samsung's HDMI support fails at the very early stages, but SurfaceFlinger still continues initialization and gives no graphics issues). Again, this is of no guarantee, but gives a very bigger chance to port OEM roms. Having LG G Flex rom or TouchWiz running on our phone would be a pretty good thing. ;)