[ROM][N4][NMF26O] Fake nexus rom for Nexus 4. [Dec/06/2016]

bassbox

Senior Member
Feb 27, 2009
541
28
0
I just installed the new Google Camera v 3.1 for Android 6. I can take photos but the camera crashes 100% when I try to swap over to video. Do something experience the same?
 

a3Dman

Senior Member
Sep 17, 2011
54
17
0
I just installed the new Google Camera v 3.1 for Android 6. I can take photos but the camera crashes 100% when I try to swap over to video. Do something experience the same?
Probably everyone. Here's the log:

Code:
11-19 00:17:17.232  7845  7845 I CAM_SimpleModuleAgent: Creating module: VideoModule
11-19 00:17:17.256  7845  7845 E SoundPool: error loading /system/media/audio/ui/VideoStop.ogg
11-19 00:17:17.259  7845  7845 I CAM_Video2Module: resume
11-19 00:17:17.259  7845  7845 I CAM_Video2Module: openCamcorderDevice
11-19 00:17:17.259  7845  7845 I CAM_ViewfinderSV1: Stop and remove viewfinder.
11-19 00:17:17.266  7845  7845 I CAM_Vid2CdrDevOpener: Selected capture rate: NORMAL
11-19 00:17:17.266  7845  7845 I CAM_Vid2CdrDevOpener: Selected video resolution: RES_1080P
11-19 00:17:17.269  7845  7845 I CAM_Vid2CdrDevOpener: Selected preview size: 1280x720
11-19 00:17:17.281  7845  7845 I CAM_Vid2CdrDevOpener: isVideoStabilizationSupported: false
11-19 00:17:17.284  7845  7845 I CAM_Vid2CdrDevOpener: maxRecordingDurationSeconds: 0
11-19 00:17:17.287  7845  7845 I CAM_Vid2CdrDevOpener: maxTorchRecordingDurationSeconds: 0
11-19 00:17:17.287  7845  7845 I CAM_Vid2CdrDevOpener: CamcorderManager.openCamcorder
11-19 00:17:17.290  7845  7845 I OMXClient: Using client-side OMX mux.
11-19 00:17:17.290  7845  7845 E MediaCodec: Failed to get encoder input buffer count!
11-19 00:17:17.291  7845  7845 D AndroidRuntime: Shutting down VM
11-19 00:17:17.296  7845  7845 E AndroidRuntime: FATAL EXCEPTION: main
11-19 00:17:17.296  7845  7845 E AndroidRuntime: Process: com.google.android.GoogleCamera, PID: 7845
11-19 00:17:17.296  7845  7845 E AndroidRuntime: java.lang.NullPointerException
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:213)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at com.google.common.base.Optional.of(Optional.java:85)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at com.android.camera.camcorder.media.PersistentInputSurfaceFactoryMncImpl.createPersistentInputSurface(PersistentInputSurfaceFactoryMncImpl.java:15)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at com.android.camera.camcorder.CamcorderManagerImpl.openCamcorder(CamcorderManagerImpl.java:284)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at com.android.camera.module.video2.Video2CamcorderDeviceOpener.openCamcorderDevice(Video2CamcorderDeviceOpener.java:247)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at com.android.camera.module.video2.Video2Module.openCamcorderDevice(Video2Module.java:383)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at com.android.camera.module.video2.Video2Module.resume(Video2Module.java:360)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at com.android.camera.module.ForwardingModuleController.resume(ForwardingModuleController.java:36)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at com.android.camera.app.CameraActivityControllerImpl.openModule(CameraActivityControllerImpl.java:3153)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at com.android.camera.app.CameraActivityControllerImpl.onModeSelected(CameraActivityControllerImpl.java:1115)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at com.android.camera.app.CameraAppUI.onPhotoVideoSwitchStarted(CameraAppUI.java:3108)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at com.android.camera.ui.PhotoVideoSwipeTutorial.switchMode(PhotoVideoSwipeTutorial.java:331)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at com.android.camera.ui.PhotoVideoSwipeTutorial$5.onAnimationEnd(PhotoVideoSwipeTutorial.java:295)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at android.animation.AnimatorSet$AnimatorSetListener.onAnimationEnd(AnimatorSet.java:855)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1239)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:766)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at android.animation.ValueAnimator$AnimationHandler$1.run(ValueAnimator.java:801)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at android.view.Choreographer.doCallbacks(Choreographer.java:670)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at android.view.Choreographer.doFrame(Choreographer.java:603)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:739)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:95)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:148)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:5417)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-19 00:17:17.296  7845  7845 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
11-19 00:17:17.298   649   659 W ActivityManager:   Force finishing activity com.google.android.GoogleCamera/com.android.camera.CameraLauncher
11-19 00:17:17.331  7845  7969 E Legacy-CameraDevice-JNI: LegacyCameraDevice_nativeGetSurfaceId: Could not retrieve native Surface from surface.
11-19 00:17:17.331  7845  7969 E CameraDeviceGLThread-0: Received exception on GL render thread: 
11-19 00:17:17.331  7845  7969 E CameraDeviceGLThread-0: java.lang.IllegalArgumentException: Surface had no valid native Surface.
11-19 00:17:17.331  7845  7969 E CameraDeviceGLThread-0: 	at android.hardware.camera2.legacy.LegacyCameraDevice.nativeGetSurfaceId(Native Method)
11-19 00:17:17.331  7845  7969 E CameraDeviceGLThread-0: 	at android.hardware.camera2.legacy.LegacyCameraDevice.getSurfaceId(LegacyCameraDevice.java:658)
11-19 00:17:17.331  7845  7969 E CameraDeviceGLThread-0: 	at android.hardware.camera2.legacy.LegacyCameraDevice.getSurfaceIds(LegacyCameraDevice.java:667)
11-19 00:17:17.331  7845  7969 E CameraDeviceGLThread-0: 	at android.hardware.camera2.legacy.SurfaceTextureRenderer.drawIntoSurfaces(SurfaceTextureRenderer.java:715)
11-19 00:17:17.331  7845  7969 E CameraDeviceGLThread-0: 	at android.hardware.camera2.legacy.GLThreadManager$1.handleMessage(GLThreadManager.java:105)
11-19 00:17:17.331  7845  7969 E CameraDeviceGLThread-0: 	at android.os.Handler.dispatchMessage(Handler.java:98)
11-19 00:17:17.331  7845  7969 E CameraDeviceGLThread-0: 	at android.os.Looper.loop(Looper.java:148)
11-19 00:17:17.331  7845  7969 E CameraDeviceGLThread-0: 	at android.os.HandlerThread.run(HandlerThread.java:61)
11-19 00:17:17.331  7845  7969 I CameraDeviceState: Legacy camera service transitioning to state ERROR
11-19 00:17:17.334  7845  7883 E CAM_Camera2Act: onError(id: 0, errorId: 1)
11-19 00:17:17.335  7845  8001 I OMXClient: Using client-side OMX mux.
11-19 00:17:17.337  7845  8001 E linker  : readlink('/proc/self/fd/61') failed: Permission denied [fd=61]
11-19 00:17:17.337  7845  8001 E linker  : warning: unable to get realpath for the library "libstagefrighthw.so". Will use given name.
11-19 00:17:17.339  7845  8001 E linker  : readlink('/proc/self/fd/61') failed: Permission denied [fd=61]
11-19 00:17:17.339  7845  8001 E linker  : warning: unable to get realpath for the library "libOmxCore.so". Will use given name.
11-19 00:17:17.340  7845  8001 E OMXMaster: A component of name 'OMX.qcom.audio.decoder.aac' already exists, ignoring this one.
11-19 00:17:17.341  7845  8001 E linker  : readlink('/proc/self/fd/61') failed: Permission denied [fd=61]
11-19 00:17:17.341  7845  8001 E linker  : warning: unable to get realpath for the library "libstagefright_soft_vorbisdec.so". Will use given name.
 

bdasmith

Senior Member
Oct 18, 2011
443
145
0
Watrous
I found same problem, and I'll spend this weekend to solve this.
Did you happen to notice as well, that Google maps is actually not turning on the GPS? Other navigation apps do. This can be seen by checking the battery details graph and looking at GPS on. I don't have any kind of logs....I am back on lollipop. I've reported this to zephik (chroma) and xenyz but nobody's looked into it as far as I know. I wnat to use marshmallow but rely on accuracy.
 

MasterJam882

Senior Member
Jan 26, 2011
628
156
0
Frankfurt
Did you happen to notice as well, that Google maps is actually not turning on the GPS? Other navigation apps do. This can be seen by checking the battery details graph and looking at GPS on. I don't have any kind of logs....I am back on lollipop. I've reported this to zephik (chroma) and xenyz but nobody's looked into it as far as I know. I wnat to use marshmallow but rely on accuracy.
But you gave Maps the permission to use your location right? For me "location" was deactivated for Maps in permission manager. Just want to make sure.

Sent from my Nexus 4 using Tapatalk
 

gbetous

Senior Member
Dec 14, 2010
61
2
8
Hi !
Thanks a lot for this work !

Loving the full GIT concept, that's exactly what I was looking for. But let me ask : how do you manage the different binary blobs which are needed ? Are they in your GIT repo ?

Thanks :)
 

iainfm

Senior Member
Nov 20, 2015
51
8
0
Yes Land
Hi @genachoco First, thank you for the rom.
Second, I found a strange bug. When anyone calls me and after we finished to talk I want to stop the call I can't because screen is disabled. It seems that proximity sensor stays on. I read this bug in some nexus 5 threads about Stock rom. Is it normal that I have this behavior on Nexus 4 too? Or am I the only one with this problem?
Thanks

Ps: I installed 03112015 build after flashing factory image so it is a clean flash.
I had this problem with my N4 shortly after I got it. Turned out to be the screen protector I fitted covered up the proximity sensor (top left of screen, mirror image of where front camera is, on the N4, not sure about the N5).

You can try an app such as https://play.google.com/store/apps/details?id=com.tigermonster.proxfinder&hl=en_GB to check the sensor is working correctly.

---------- Post added at 10:06 AM ---------- Previous post was at 09:49 AM ----------

Hi,

Just wanted to thank the author for this great ROM. I've been stock android since I got my N4 at launch, and was really disappointed that it wasn't going to get the M release.

I flashed last night (from stock 5.1.1), and all good so far. Observations to date:-

I had to go through the apps (especially the google ones) to set permissions. eg Hangouts didn't have perms for SMS

My SMS messages weren't retained during the upgrade, but that may be due to the above.

The battery meter gave me a scare this morning - it dropped from 100% at 7.30am to 70% at 9.30am. The screen was the highest usage at about 6%, wifi disabled (I'm at work), location off. I think most of this was due to me using the phone more than usual (investigating, doing the permissions, rebooting etc), and since it's been dozing it's only dropped another percent or so in the last 40-odd minutes.

All-in-all I'm very happy with it. I love stock android, and I think this is the closest I'm going to get to it without upgrading to a new phone (Google: Make an N4 Mk2. Pleeeease!)
:)
 
  • Like
Reactions: Stalkermight

prithvic

Senior Member
Oct 21, 2014
257
100
73
Mυмвαι
I found same problem, and I'll spend this weekend to solve this.
Hey, As you are dealing with the camera, can you also have a look at this problem?(the link is to AOSP Issue Tracker)
The camera flashlight sync bug, that's on Nexus 4 since Camera 2.5 it's also on Camera 3.1 Some people say it's the Google Camera APK, some say its device drivers. If the issue is fixable then great but if not, can we get an idea to what is it related to?
 

iainfm

Senior Member
Nov 20, 2015
51
8
0
Yes Land
Wow, I was wondering why my camera shots were really dark recently!

Still early days, but it does seem that battery usage (or at least reporting of it) is a bit wrong on my N4. When dozing the drain is very light, but when using the device it drops rapidly.

I'm not convinced that it is being reported correctly though. The phone's stone cold, which wouldn't tally with high CPU usage, and it's always the screen that's top of the stats, using 2-6% or so. I've turned the brightness down sightly, but it's not made much difference.

Could it be that the M rom doesn't have the correct profile (or something) for the N4 battery?
 

ganachoco

Senior Member
Oct 28, 2014
165
871
0
Seoul
I found same problem, and I'll spend this weekend to solve this.
I looked to support Google Camera 3, and I found something.

  • Google Camera 3 does not support 1080p video recoding on small(under 1080p resolution) screen devices. When recoding 1080p video, Google Camera 3 requires 1080p preview surface when recoding 1080p video, But nexus 4 can provide only 720p preview surface.
    So 1080p video recoding is not supported on Nexus 4.
    And someone says Android One device running MM also crash when try to switch video recoding mode.
    It is not rom or hardware issue, it is a bug in Google Camera3 App.
  • When try to switch camera mode, I found another problem. When switch camera mode from picture to video, there is timeout error for preparing preview surface.
    And I added small delay while switching camera mode, this issue disappeared.
  • And another issue is remained. Sometimes, camera orientation is set invalid in video preview. I have no idea in this case. :(
  • I performed CTS 6.0 releated camera features, and I can see that pass most of them. (some items are failed, but that items are not supported on nexus 4. so can ignore)
  • I recommend that don't use Google Camera 3. Most of new features in Google Camera 3 is depended on Android Camera Hal 3.2. but that is not supported by Nexus 4.
 
Last edited:

ganachoco

Senior Member
Oct 28, 2014
165
871
0
Seoul
Hi !
Thanks a lot for this work !

Loving the full GIT concept, that's exactly what I was looking for. But let me ask : how do you manage the different binary blobs which are needed ? Are they in your GIT repo ?

Thanks :)
Some binary blobs are on git repository such as qcom proprietary.

I managed Android.mk only for Gapps and they are not manged on git repository, because it is updated very frequent.

And Android.mk is generated by my own script.
 

ganachoco

Senior Member
Oct 28, 2014
165
871
0
Seoul
Hey, As you are dealing with the camera, can you also have a look at this problem?(the link is to AOSP Issue Tracker)
The camera flashlight sync bug, that's on Nexus 4 since Camera 2.5 it's also on Camera 3.1 Some people say it's the Google Camera APK, some say its device drivers. If the issue is fixable then great but if not, can we get an idea to what is it related to?
I can see same problem on Nexus 5 with Camera 3.1.
 
  • Like
Reactions: prithvic

dragos281993

Recognized Contributor
Mar 29, 2014
2,844
4,002
203
IASI
Does anyone have any problems with locating the equaliser? I can't seem to find it in Play Music anymore :\
If you want the ultimate experience with a music player, forget a Play Music, and get PowerAmp from the the Play Store. It's cheap and probably one of the best things I spent my money on. And the equalizer is extremely amazing, no delays, etc. IMO it's simply the best one out there.
 

alexandreantunez

Senior Member
Oct 7, 2011
88
60
0
Cotia
Some thoughts about 21/11 build:

- fast, smooth, stock feeling, in other words, stable.

- GPS on high accuracy isn't reliable sometimes. Switching to Battery Saving fixes it.

- Google Camera 3.1 keeps "force closing"

- No more issues at all

Outstanding work! @ganachoco
 

MasterJam882

Senior Member
Jan 26, 2011
628
156
0
Frankfurt
Some thoughts about 21/11 build:

- fast, smooth, stock feeling, in other words, stable.

- GPS on high accuracy isn't reliable sometimes. Switching to Battery Saving fixes it.

- Google Camera 3.1 keeps "force closing"

- No more issues at all

Outstanding work! @ganachoco
Just set video resolution to 720p and it will work now!

Sent from my Nexus 4 using Tapatalk
 

iainfm

Senior Member
Nov 20, 2015
51
8
0
Yes Land
Quick update on my battery usage...

I had my N4 on a wireless charger last night, and got the sleep of death (first time with this rom, so a vast improvement). After rebooting battery life seems much more normal. No idea why though!