[ONE Original Android Development] updateing:
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/

Hello guys, this is an unofficial build of AOSP Nougat (with tag android-7.0.0_r6). Kernel is based on CM13's, with some recent commits in kernel/common in AOSP. Sources and patches are available at the end of the post.

Note: this ROM is just for having the first taste of Nougat, and thus missing a lot of key features.

I may not be able to update it regularly.

Basic hardware functionality:

Almost everything works, except video hardware encoding, which causes camcorder to fail. HW decoding works though.

Everything should be working since 20160903.

I didn't find more hardware failures, but there can be more.

And remember, the proprietary firmwares and blobs are still in the age of Marshmallow, and a system won't be complete without corresponding firmwares and blobs.

Known bugs:

1. HW disk encryption is likely broken. I reverted some commits to make cryptfs_hw build, but I'm not sure if that works. Do not try it.

2. SELinux is permissive, and init allows service without a SELinux domain to start.

3. GPS may take longer to obtain a position fix. (yes it's working... sorry for the misunderstanding)

4. Only Launcher2 is included. You may install a new one as you like.

5. No LiveDisplay and gestures except DT2W (DT2W can not be turned off via Settings app for now) Color calibration is possible, see FAQ below.

6. Default input method could be broken. Be ready to "pm install your_ime.apk" in adb shell. Fixed in 20160828

7. com.qti.dpmserviceapp may produce continous FC. You can disable it via adb shell ("su -c pm disable com.qti.dpmserviceapp"). Removed in 20160828

8. Rotating screen while playing video can cause the display to "split" Fixed in 20160903

9. Camera service and media codecs all run in the same process, eliminating one of the security enhancements of Android N. May not be fixed until new HAL and blobs are available.

So the security improvements in Nougat are not making much difference in this only-a-taste ROM. If you rely on this, it would be better to wait for official releases.

FAQs:

Screenshot spoiler

Flashing Guide by @The Dork Knight Rises

In the 3rd post. Direct link: http://xdaforums.com/showpost.php?p=68397804&postcount=3

Video hands-on by [MENTION=4570192]savadam[/MENTION]

https://www.youtube.com/watch?v=r54vWk-Azh8

Thanks for all your support!

Download:

20160919: Mirror 1: https://drive.google.com/open?id=0BwkmhbR5VHpAYWRKd1owSUNudEU Mirror 2: https://mega.nz/#!fEk1CTyJ!F8rdnqT_oiipP-tHCuzFGFvsQGmUV6LRaD2t81N2WIA

You can still use HALs from 20160906 if you want.

(And if you are posting this somewhere else, please include the HALs in your post)

Older versions:

20160918: Mirror 1: https://drive.google.com/open?id=0BwkmhbR5VHpAMWZ4OEx6Unp5bU0 Mirror 2: https://mega.nz/#!rdlkgboI!LQuFDtcppbizC_7Tfww1uWAmhw-lYuxjAlrhg9Z0tuQ

20160910: Mirror 1: https://drive.google.com/open?id=0BwkmhbR5VHpAdGVTV3V0ekZaWHM Mirror 2: https://mega.nz/#!XEsTESpR!QDa7he2jdPCeIsbMY1vJAlCZ0RokAKV0IdtyuB0R-yc

20160906: Mirror 1: https://drive.google.com/open?id=0BwkmhbR5VHpAWHNFb0xyYlBZM3c Mirror 2: https://mega.nz/#!zBVX1DTZ!S-LnpIEgJqn1r7So6QmEoD_APUqDnp93XbP-Ug__XBk

CAF and original AOSP HALs: https://drive.google.com/open?id=0BwkmhbR5VHpAaGdCQmxDUWgxQlU

Note on the HALs:

AOSP HALs (msm8996 display + msm8974 media) can not record screen, but they "seem" to make the system smoother. (msm8974 display HAL cannot be used because it corrupts the display when rotating screen with video playing)

CAF HALs (both based on vanilla CAF LA.BF.1.1.3_rb1.13) can record screen but "seem" not to be so efficient as AOSP ones.

The HAL included in the ROM are the AOSP variant.

20160903: Mirror 1: https://drive.google.com/open?id=0BwkmhbR5VHpATlN5T29WTS01Qkk Mirror 2: https://mega.nz/#!OcFlTDDK!EYiNpfE-9Pxx2wu4Oto7kO_oevfe0bMkXOTdhP1HDZc

20160831: Mirror 1: https://drive.google.com/open?id=0BwkmhbR5VHpAVE1WR2xYd180MzA Mirror 2: https://mega.nz/#!jE92iSAD!pl0NMU6PPY3UNXE5DTDBKLUd4sFLG6fNTaUUMI0xdzg

20160828: Mirror 1: https://mega.nz/#!XdlXFDBQ!p7E0N64IEkGHn4GBzOZQDTCgR4KdD00O0dRwJlEnvcw Mirror 2: https://drive.google.com/open?id=0BwkmhbR5VHpAczA2T2g0RUZRS3c

20160827: https://drive.google.com/open?id=0BwkmhbR5VHpAUVdWUHNlc0lHZWs

Note: please read "known bugs" section before flashing! Also you can read the guide below.

When updating the ROM, just dirty-flash new build and Gapps (if you use them).

In order to prevent your recovery from being replaced by the stock one, flash SuperSU along with the ROM.

Sources:

Kernel: https://github.com/updateing/android_kernel_oneplus_msm8974/tree/nougat

Device: https://github.com/updateing/android_device_oneplus_bacon/tree/nougat

Build system: https://github.com/updateing/platform_build/tree/custom-kernel

And there are a lot more repos I didn't fork. The changes there as well as local_manifest are here:

20160918+ Check GitHub

20160910 https://drive.google.com/open?id=0BwkmhbR5VHpAcmo1RjhPd0N1c3c

20160906 No new patches except the HALs. For AOSP HALs, check previous patch archive and Sony's guide. For CAF HALs, just cherry-pick "Fix clang build" from CM.

20160903 https://drive.google.com/open?id=0BwkmhbR5VHpAQXFqZEJCT21UNDA

20160831 https://drive.google.com/open?id=0BwkmhbR5VHpASW54QnR4eGFlR1E

20160828 https://drive.google.com/open?id=0BwkmhbR5VHpAOEx2OWNYcE1xU2s

20160827 https://drive.google.com/open?id=0BwkmhbR5VHpALXdkNkptRnBLMkU

Changelog:

Notes on the sources:

1. Build system produces correct boot.img in $OUT, but the boot image in OTA zip still has no DT included. Fixed in 20160828

2. Some fixes are really "dirty" (as I'm not able to find a proper way)...

3. Some JNIs fail to build (lots of C++ symbols no found). You may try linking C++ libs dynamically (c++_static -> c++_shared) to avoid this. See 20160828 patches, packages/inputmethods/LatinIME for example.

4. Some apps require android-8 ndk, but the earliest version in the tree is android-9. A symlink will do (or you can change the Android.mk in app) but I'm not really sure this will not introduce any bug.

5. Android N split mediaserver into multiple processes to improve security, such as cameraserver, mediacodec, etc. But camera blobs and old HALs were not designed like this. They assume they run in the same process, thus a buffer created by blobs are being used everywhere, which will cause illegal memory access under Android N. I reverted lots of patches about this, forcing camera and codec services to run in the mediaserver process as before - security compromised with functionality, again.

Hope you enjoy this.