FORUMS
Remove All Ads from XDA

[WIP] AOSP 7.1.1 (Nougat)

4,365 posts
Thanks Meter: 7,312
 
By zaclimon, Recognized Contributor on 26th August 2016, 03:23 PM
Post Reply Email Thread
What's up guys, even though this Nexus 4 is 4 years old, (pun not intended XD) it's still holding up strong and in time for some Nougat treatment.

Note: Most of the components are working and I believe that it is enough for daily tasks. However, YOU see whether it fits your needs or not.

Working:
- Audio
- Wi-Fi
- Bluetooth
- RIL
- H/W Acceleration
- USB
- GPS
- NFC
- Sensors

Semi-Working:
- Camera (Video recording stutters sometimes with some apps)

Not Working:

How to Flash:
1. Download Zip
2. Flash zip
3. Flash GApps
4. Wipe Data (If coming from anything other than 7.0)
4. Flash SuperSU (Optionnal, Uses systemless as a root method)
5. Profit

Note: You will see Fc's all along the setup, just skip them if shown. Also if Google Play Services is crashing, grant it the location permission in the settings.

Download:
AOSP 7.0 download folder
Mirror

Quanta:
Quanta V19 Test

GApps:
OpenGApps
Banks GApps

SuperSU: SuperSU Stable

Sources:
Device Tree
Kernel Source
The Following 271 Users Say Thank You to zaclimon For This Useful Post: [ View ] Gift zaclimon Ad-Free
 
 
26th August 2016, 03:35 PM |#2  
zaclimon's Avatar
OP Recognized Contributor
Flag Montréal
Thanks Meter: 7,312
 
Donate to Me
More
Changelog, other stuff
Code:
V10 (18/12/16):
- Updated to Android 7.1.1
- Patched kernel with the latest security fixes.

V9: (14/10/16)
- Video recording on Camera2 partially fixed (Video shakes sometimes) 
- Fixed stack trace for native processes
- Updated to October's Security patches
- Misc fixes

V8: (18/09/16)
- Kernel patched accordingly to September security fixes (Patches all Quadrooter exploits up to now)
- Fixed Torch

V7: (11/09/16)
- Updated to September security fixes (For real this time)
- Enabled H/W encoding for video recording
- Re-enabled navigation bar tweaks and night mode in SystemUI
- Fixed Google Play Services FC's using OpenGApps (For real also)
- Add possibility to change WebView provider

V6: (09/09/16)
- Updated to September security patches
- Fixed freezing while watching YouTube
- Attempt to enable LTE
- Hidden misc battery drain as it causes some misinterpretations

V5: (05/09/16)
- Enabled Doze for real this time
- Reverted a change that may have broke Camera

V4: (02/09/16)
- Fixed H/W video decoding for the most part
- Kernel: SDCard FS enabled
- Attempt to fix permissions for GApps
- Enabled Navigation Bar tweaks and Night mode in SystemUI Tuner. 

V3: (30/08/16)
- Fixed Sensors
- Semi-Fixed camera
- Fixed MPDecision
- Enabled Doze
- Used Flo's developper preview N GPU drivers

V2: (28/08/16)
- Fixed audio
- Fixed GPS
- Fixed data connectivity
- Disabled the power toggle widget which caused Settings to crash on every boot

V1 (26/08/16):
- Initial release


Here's a video showing how to install the ROM. (Thanks @Swapnil Soni)




Here's another one with a little overview of it. (Thanks @DaKoin)




Build instructions:


Since some of you guys asked me how to build from scratch, I will give a walkthrough of what I mostly did.

Note that this is in no way a walkthrough in how to compile
(there are several guides for that on XDA) but more a guide
on how I did my setup so you can replicate the AOSP builds on your device.

Here's what I did:

1. Download the latest AOSP revision for android-7.1 which is r6 at the time of this writing (replace with whatever required branch necessary)
Code:
repo init -u https://android.googlesource.com/platform/manifest -b refs/tags/android-7.1.1_r6
repo sync
2. Download the kernel source used for the build:
Code:
git clone https://github.com/zaclimon/android_kernel_google_msm -b mako_nougat
3. Once both sources has been downloaded, compile the kernel. Note that AOSP do have a kernel toolchain that you can use to compile
Code:
export CROSS_COMPILE "/path/to/aosp/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-"
make mako_defconfig
make -j$(grep -c processor /proc/cpuinfo)
4. Copy the arch/arm/boot/zImage file to the Android source into device/lge/mako-kernel
Note: You must create the said directories if they don't exist. You also must rename the file to kernel after copy.

5. Go back to the AOSP source, and download/update/replace the following repositories for each component (relative path):

Code:
device/lge:
git clone https://github.com/zaclimon/android_device_lge_mako mako

hardware/qcom:
git clone https://github.com/zaclimon/android_hardware_qcom_audio audio
git clone https://github.com/zaclimon/android_hardware_qcom_display display
git clone https://github.com/zaclimon/android_hardware_qcom_gps gps
git clone https://github.com/zaclimon/android_hardware_qcom_media media

vendor:
git clone https://github.com/zaclimon/android_vendor_lge lge
6. Apply the following patches to each of their respective repositories:

Code:
bionic:
https://github.com/LineageOS/android_bionic/commit/81af26a3a033723fb34ddf280e33a9d4a6ce82c4.patch

frameworks/base:
https://gist.github.com/zaclimon/bb39d7f5059b63e3add3b5cad15e87db
https://android-review.googlesource.com/#/c/147266/

system/sepolicy:
https://github.com/LineageOS/android_system_sepolicy/commit/10dd0402ab62aa1a6416d7ea549a6a3eea1c6ae4.patch
7. Increase RAM usage for Jack (Only if you have 6/8GB of RAM in your system)
Code:
export ANDROID_JACK_VM_ARGS="-Xmx4g -Dfile.encoding=UTF-8 -XX:+TieredCompilation"
8. Once all the patches have been applied, we can now proceed to compile the system.
Code:
. build/envsetup.sh && lunch aosp_mako-userdebug
make -j$(grep -c processor /proc/cpuinfo) otapackage
9. The build should be in out/target/product/mako
10. Flash and enjoy!!
The Following 83 Users Say Thank You to zaclimon For This Useful Post: [ View ] Gift zaclimon Ad-Free
26th August 2016, 03:36 PM |#3  
Gu$houn*'s Avatar
Senior Member
Flag Prague
Thanks Meter: 431
 
More
You're the king, buddy! 👍

P.
[sntfrmnxs⁴]
The Following User Says Thank You to Gu$houn* For This Useful Post: [ View ] Gift Gu$houn* Ad-Free
26th August 2016, 03:40 PM |#4  
nitin.chobhe's Avatar
Recognized Contributor
Flag Pune
Thanks Meter: 9,465
 
Donate to Me
More
first

oops, second

Thanks @zaclimon and BTW wiping data is needed?

Nitin
The Following 3 Users Say Thank You to nitin.chobhe For This Useful Post: [ View ] Gift nitin.chobhe Ad-Free
26th August 2016, 03:40 PM |#5  
dragos281993's Avatar
Recognized Contributor
Flag IASI
Thanks Meter: 3,714
 
More
Quote:
Originally Posted by nitin.chobhe

first

Nitin

Ha ha ! Almost.

Sent from my Nexus 4 using Tapatalk
The Following User Says Thank You to dragos281993 For This Useful Post: [ View ] Gift dragos281993 Ad-Free
26th August 2016, 03:46 PM |#6  
Member
Flag Tangerang
Thanks Meter: 13
 
More
You're great!!
26th August 2016, 03:46 PM |#7  
zaclimon's Avatar
OP Recognized Contributor
Flag Montréal
Thanks Meter: 7,312
 
Donate to Me
More
Quote:
Originally Posted by nitin.chobhe

first

oops, second

Thanks @zaclimon and BTW wiping data is needed?

Nitin

It's not necessary per se because it should boot fine. That said, as always, it's recommended to wipe so random issues are less prone to happen.
The Following 7 Users Say Thank You to zaclimon For This Useful Post: [ View ] Gift zaclimon Ad-Free
26th August 2016, 03:56 PM |#8  
Senior Member
Thanks Meter: 26
 
More
Merci infiniement !!!
Just downloaded, and works, I think we need to changes the permission so that google play service not crashing
26th August 2016, 04:02 PM |#9  
Junior Member
Thanks Meter: 2
 
More
Its people like you who make this world a better place, thank you very much!
The Following 2 Users Say Thank You to funthomasz For This Useful Post: [ View ] Gift funthomasz Ad-Free
26th August 2016, 04:02 PM |#10  
nitin.chobhe's Avatar
Recognized Contributor
Flag Pune
Thanks Meter: 9,465
 
Donate to Me
More
Quote:
Originally Posted by zaclimon

It's not necessary per se because it should boot fine. That said, as always, it's recommended to wipe so random issues are less prone to happen.

Thanks man! One last question - I need N gapps for this, right?

Open gapps should be fine?
@cqloveqc what gapps did you use? And what permissions need to be modified?

Nitin
26th August 2016, 04:07 PM |#11  
zaclimon's Avatar
OP Recognized Contributor
Flag Montréal
Thanks Meter: 7,312
 
Donate to Me
More
Quote:
Originally Posted by funthomasz

Its people like you who make this world a better place, thank you very much!

Quote:
Originally Posted by nitin.chobhe

Thanks man! One last question - I need N gapps for this, right?

Open gapps should be fine?
@cqloveqc what gapps did you use? And what permissions need to be modified?

Nitin

Please everybody read the note (I should make it bold so people can see it)

"Note:You will see Fc's all along the setup, just skip them if shown. Also if Google Play Services is crashing, grant it the location permission in the settings. I'm also surprised to say that even with your data not wiped, it's working."
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes