[WIP] [ROM] [8.1.x] LineageOS 15.1 [Sumire] - Xperia Z5 Original Android Development

I'm posting this now and hope in doing so some new input can be reached. Due to recent new and old exploits we need this, I have hardened the kernel some, from CopperheadOS, and put in place full "Harden usercopy", updated it to 3.10.108, and before I go any further in breaking the kernel i release this WIP. I refer to this post ( https://forum.xda-developers.com/showpost.php?p=80265757&postcount=50 ) for the current state of mobile calls etc.
Fastboot images:
190919: https://drive.google.com/open?id=1OAzYc_D_FHbbmIyFiSVtGLolB2EfiE40
290819: https://drive.google.com/open?id=1d8FNiFlMN6Bey6xD606pBomqBgSiZ-MO
Features:
OS Version: 8.1.0 Oreo
Kernel: Linux 3.10.108
Important informations:
You should be familiar with general installation of custom roms.
Required for installation: fastboot
This ROM needs a clean install, old /data may cause problems!
Working:
WIFI
Bluetooth
OTG-USB
NFC
These things are NOT working.
Camera; is not included due to inconsistency in the build currently. But failed to connect to the camera last time it did.
GSM; this will require reworking some android code, making some progress i think.
Code:
Abort message: 'CANNOT LINK EXECUTABLE "/system/bin/netmgrd": cannot locate symbol "_ZN6google8protobuf8internal20RepeatedPtrFieldBase4SwapEPS2_" referenced by "/system/vendor/lib64/libcneapiclient.so"...'
FM-Radio (not included)
GPS
Bugs:
Installing apps freeze the phone for a while.
Basically, this release needs help.
Source:
https://github.com/threader/local_manifests
https://github.com/threader/kernel
https://github.com/threader/android_device_sony_sumire
https://github.com/threader/android_device_sony_kitakami-common
Patch for external/protobuf attached to this thread.
Modified libcneapiclient.so attached.
Credits:
Everyone involved with the Sony-msm8994 project ( https://github.com/sony-msm8994/android_device_sony_kitakami-common/commits/lineage-15.1 )
Mr. Open devices "jerpelea", for actually answering some of my stupid questions I should have realized myself.
Berni-0815 for trying to do this for the z5c and leaving useful resources.
And everyone posting and following the Guide to port to Lineage-16.0 thread by algui91 (https://forum.xda-developers.com/xperia-z5/general/guide-to-port-to-lineage-16-0-t3931428) and willing to participate, this is a community effort after all.
Please don't quote this thread, I will edit it as I release new builds and make progress.
I was unsuccessful in building a flashable zip image first time I tried some moons ago, I don't know if this was due to the need of a TWRP update or just my half arsed attempt, I would appreciate if someone could direct me to correctly doing so.
Cheers

How can i help including the fact that i am nearly noob in Linux / Unix and havent built any custom ROM at the moment?

DP

threader said:
BuzzerHead.
Click to expand...
Click to collapse
let me think on that, but there are two things that's needed, a libcneapiclient.so that is msm8996 perhaps and for Android 8.x, maybe we can decompile and figure out the differences. And a Qualcomm trust zone from from maybe 8996 to hack and plug the holes. I'm still reading up.on this though but if you Google "chipsec Qualcomm trust zone" or indeed just the first results for " Qualcomm trust zone" you certainly see the problem ( https://blog.quarkslab.com/introduction-to-trusted-execution-environment-arms-trustzone.html , https://www.blackhat.com/docs/us-14/materials/us-14-Rosenberg-Reflections-on-Trusting-TrustZone.pdf )
I'm re-working the external/protobuf modifications just now as I think that is why the bug i listes occurred.
Edit:
Right, great, after unhacking the hacks and returning the protobuf API to its original state I'm stuck an error before the quite impossible error i had earlier, so this is not going as quickly as i thought, either.
Code:
Abort message: 'CANNOT LINK EXECUTABLE "/system/bin/netmgrd": cannot locate symbol "_ZN6google8protobuf2io17CodedOutputStream13WriteVarint32Ej" referenced by "/system/vendor/lib64/libcneapiclient.so"..
This is a clearly defined symbol already but perhaps not behaving as intended and an error my previous attempt somehow worked around.
The following might be the reason it hangs during package install though;
Code:
09-16 18:46:55.875 865 956 W SchedPolicy: add_tid_to_cgroup failed to write '1947' (Permission denied); fd=3
09-16 18:46:38.393 865 1126 W NativeCrashListener: Couldn't find ProcessRecord for pid 2958

Any news?

Is this project dead? Seeing a newer version of LOS on this device would be nice.
Sent from my SM-T580 using XDA Labs

TALUAtXDA said:
Is this project dead? Seeing a newer version of LOS on this device would be nice.
Sent from my SM-T580 using XDA Labs
Click to expand...
Click to collapse
It's resting... My life up ended and screwed my peace and tranquility, I simply have not had the time to look at it, I'm having a look now as long as the peace lasts.
I see there is a 10.0 now, with some collaboration maybe we can get this all working, I argued a lot with the vendor libs, i just need to get a grip on what's going on there with the other project. As far as i can tell quickly looking at it I can merge some of those changes to the unified kernel 3.10.108 I'm using and see how things go, It will take a some time to get going again. As far as the kernel goes I ought get it up to 3.12, there are some pagetable ioslation patches that are required for safe operation etc, but I paused kernel work until i could get Android in shape, then life happened....

Related

[DEV][DEV-ONLY] Honeycomb Progress

[This is not the place to say "this is awesome" or "thanks!"]
[DEVS ONLY]
I want to start this thread to keep up the progress on the port.
the bad news is that the SDK is incomplete for now, so (like other devices)
we will have to write our own code for the OS, the nook community
has done a wonderful job writing their own libraries and stuffs, so we will have to do the same.
Instead of pursuing different goals, let's focus on one thing at a time.
since GSM and CDMA versions are already out, it seems we suffer the same bugs, so for now let's unite strength and knowledge to overcome these.
I propose that the first goal to fix is the SurfaceFlinger, so we could at least see the apps, the buttons and the notifications.
it is currently throwing this:
04-06 22:01:35.495: ERROR/Surface(2960): dequeueBuffer failed (Out of memory)
this could lead us that it might coudln't start because of some malloc malfunction or something.
also that pvrsrvinit bugs me a lot.
update:
8/APR/2011
since DiP7 could fix SurfaceFlinger and other things using a different build from the GSM kernel, we have to dig deeper
======================================
CURRENT GOAL
Rebuild Kernel
======================================​
Current approaches:
*none
Post any finding, guessing or anything, and please, please don't be afraid to ask anything you have a doubt, as a Dev you should not know everything, so we can help us each other
------------------------------------------
Google Easter egg:
while searching some info about the android.mk file , I put it on the chrome bar to search for that term, but instead I went to
http://android.mk
an easter egg web page from google lol
******TOOLS*********
How to send text and Keystrokes via ADB
http://bradchow.blogspot.com/2011/02/send-intent-and-key-event-by-adb.html
use DroidExplorer to easily access your device from your computer and makes changes from it
http://de.codeplex.com/
The Android Boot Process
http://www.androidenea.com/2009/06/android-boot-process-from-power-on.html
---Kernel Tools----
CPU Datasheet
http://forum.xda-developers.com/showthread.php?t=745877
Samsung GIT
http://android.git.kernel.org/?p=kernel/samsung.git;a=summary
PowerVR SDK
http://www.imgtec.com/powervr/insider/powervr-sdk.asp
Source code of samsung firmwares(keep and eye on this)
http://opensource.samsung.com/
Asus pad honeycomb Kernel Source
http://forum.xda-developers.com/showthread.php?t=1026528
ellokomen said:
======================================
CURRENT GOAL
Find why SurfaceFlinger is not working
======================================​
Click to expand...
Click to collapse
Mmmk.. Let me tell you a story.
A long time ago in a galaxy far away... No, that will take too long. In a nutshell, one third of the answer is here, another third is here and the rest is here. I'm not trying to be intentionally vague, I just haven't figured out how these three fit together yet.
Of course, there could also be some bit of code that I missed... some telling line in a debug log that I overlooked or some driver or library that I could have decompiled to sift through its juicy secrets. There could easily be a fix that would take seconds to add and make the whole thing fall in line...
Or we might have to work it from the ground up.
Either way it will happen. It's just a matter of whether it will happen next week, or next month.
(Watch it be a misplaced semi-colon, or a bad symlink... that's how these things go.)
updated approaches and new tools have been added
spacemoose1 said:
Mmmk.. Let me tell you a story.
A long time ago in a galaxy far away... No, that will take too long. In a nutshell, one third of the answer is here, another third is here and the rest is here. I'm not trying to be intentionally vague, I just haven't figured out how these three fit together yet.
Of course, there could also be some bit of code that I missed... some telling line in a debug log that I overlooked or some driver or library that I could have decompiled to sift through its juicy secrets. There could easily be a fix that would take seconds to add and make the whole thing fall in line...
Or we might have to work it from the ground up.
Either way it will happen. It's just a matter of whether it will happen next week, or next month.
(Watch it be a misplaced semi-colon, or a bad symlink... that's how these things go.)
Click to expand...
Click to collapse
The kernel source that you have linked to is 2.6.35.7 for the Nexus S gingerbread and is not fully maintained by samsung but rather by google.
However I do not think you are wrong that there is a problem somewhere in the kernel. The kernel that has been released for the galaxy tab is a mess of horrid code, I have had to re-write parts of kernel drivers just to get them to work under linux, I would not be surprised if similar patches are needed for honeycomb
lilstevie said:
The kernel source that you have linked to is 2.6.35.7 for the Nexus S gingerbread and is not fully maintained by samsung but rather by google.
However I do not think you are wrong that there is a problem somewhere in the kernel. The kernel that has been released for the galaxy tab is a mess of horrid code, I have had to re-write parts of kernel drivers just to get them to work under linux, I would not be surprised if similar patches are needed for honeycomb
Click to expand...
Click to collapse
you mean that you made a port of a Linux Distro into the tab?
ellokomen said:
you mean that you made a port of a Linux Distro into the tab?
Click to expand...
Click to collapse
yes click here for the thread on the port of ubuntu
Current kernel source
Do you guys have another link to the current spacemoose kernel source? The download link seems to be corrupted and won't untar. I want to get in on the fun
noobporter said:
Do you guys have another link to the current spacemoose kernel source? The download link seems to be corrupted and won't untar. I want to get in on the fun
Click to expand...
Click to collapse
here it is, bear in mind that this is for CDMA devices
Unfortunatey, we have 4 other honeycomb threads.
Not trying to be rude but spacemoose updates us in the cdma forums AND we have russian rom updates in the gsm forums.
I really dislike the idea of this thread, there is enough clutter amongst the other threads. Do we really need one more place to browse..
The first posts in the roms thread are kept updated by devs.. Is this not enough??
daml said:
Unfortunatey, we have 4 other honeycomb threads.
Not trying to be rude but spacemoose updates us in the cdma forums AND we have russian rom updates in the gsm forums.
I really dislike the idea of this thread, there is enough clutter amongst the other threads. Do we really need one more place to browse..
The first posts in the roms thread are kept updated by devs.. Is this not enough??
Click to expand...
Click to collapse
yeah but we need a place for the other devs to share their milestones, here is a place for technical discussion amongst us, to share the knowledge etc...
the other threads are flooded from non devs messages, so it´s kind of difficult to read 14 pages of information when the 80% is people complaining not making it boot
lilstevie said:
The kernel source that you have linked to is 2.6.35.7 for the Nexus S gingerbread and is not fully maintained by samsung but rather by google.
Click to expand...
Click to collapse
Yes, and it contains some support for our device (s5pc110), and some more that can be added (pvr) and the architecture necessary to fully support HC without patching the build itself. If we work only towards patching the system build to communicate with the hardware, we won't be able to run AOSP hc versions when the source drops without going through the same painstaking process of hacking the system to function (while creating numerous faults causing FCs in the process). If we build a new kernel, we can get the hardware to communicate in the way future android versions want it to and we can then do what we want with ease.
noobporter said:
Do you guys have another link to the current spacemoose kernel source? The download link seems to be corrupted and won't untar. I want to get in on the fun
Click to expand...
Click to collapse
D'oh! Nobody told me, LOL... I'll get another copy up.
spacemoose1 said:
D'oh! Nobody told me, LOL... I'll get another copy up.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=1026528
hey spacemoose! the first portion of honeycomb source... The kernel source of the Asus EEE Pad Transformer... maybe it helps you with a few kernel issues, even if it's for another device... It's honeycomb!
Flokey said:
http://forum.xda-developers.com/showthread.php?t=1026528
hey spacemoose! the first portion of honeycomb source... The kernel source of the Asus EEE Pad Transformer... maybe it helps you with a few kernel issues, even if it's for another device... It's honeycomb!
Click to expand...
Click to collapse
Digging through it now.
spacemoose1 said:
Yes, and it contains some support for our device (s5pc110), and some more that can be added (pvr) and the architecture necessary to fully support HC without patching the build itself. If we work only towards patching the system build to communicate with the hardware, we won't be able to run AOSP hc versions when the source drops without going through the same painstaking process of hacking the system to function (while creating numerous faults causing FCs in the process). If we build a new kernel, we can get the hardware to communicate in the way future android versions want it to and we can then do what we want with ease.
Click to expand...
Click to collapse
Not enough really, PVR kernel module sources have been released from samsung for our device, and is available in update1 zip.
The kernel panics and we have no framebuffer from the nexus s, believe me that is the kernel I want to be running for my project, it is cleaner nicer and things are implemented overall better. unless you know of a solution for kernel debuging over usb
lilstevie said:
Not enough really, PVR kernel module sources have been released from samsung for our device, and is available in update1 zip.
The kernel panics and we have no framebuffer from the nexus s, believe me that is the kernel I want to be running for my project, it is cleaner nicer and things are implemented overall better. unless you know of a solution for kernel debuging over usb
Click to expand...
Click to collapse
Kernel debugging over USB = adb shell cat /proc/kmsg
You can make any kernel work for any device as long as you add the **** it needs. Just takes time. Working on it now.
Goal and tools updated*
spacemoose1 said:
Kernel debugging over USB = adb shell cat /proc/kmsg
You can make any kernel work for any device as long as you add the **** it needs. Just takes time. Working on it now.
Click to expand...
Click to collapse
You don't know what a kernel panic is do you?
lilstevie said:
You don't know what a kernel panic is do you?
Click to expand...
Click to collapse
I thought that linux throws a dump log when it makes a kernel panic specifying the memory address and the cause of crash

[Q] [KERNEL] Apply realtime patches to kernel

Hi,
I am trying to apply the preempt_rt patches[2] in order to test the realtime performance of native code on an android device in a study project. The device I have for testing is the Galaxy Nexus.
People here seem to have managed to do that with a Xoom[1].
My starting point was the kernel of the current official (4.2.2) Android release (android-omap-tuna-3.0-jb-mr1.1). According to the version string it is based on linux 3.0.31, so I tried to patch it with the corresponding rt-patchset. Except for a few rejects that went fine. Most of them I could get fixed manually.
My problem atm is that there seem to be quite some backports from newer (3.3/3.4?) kernels, especially for the file "include/linux/plist.h" and "kernel/rtmutex.c" which change some function-declarations. Today I managed to compile the kernel with the "CONFIG_PREEMPT_BASIC" option set, but when I try to boot the phone it gets stuck during the Google-bootscreen. It does not show up as an adb device, so I can't get any output from the device.
For me the question is, how much of the Kernel is actually still 3.0.31, maybe it would be more suitable to use the rt_patches for more recent Linux-kernels?
I was also thinking about trying to patch the kernel the GNex was released with, because this one may be closer to the original Linux kernel (I checked, plist.h and rtmutex.c are not the original ones as well)?
Maybe someone else has a better idea what to test, because I am not overly familiar with all the different subbranches and development trees of Android yet. Any help or suggestions would be greatly appreciated.
Best regards,
Jan
PS: I would have posted this in the development section, but wasn't permitted to. Maybe a mod could move it?
PPS: It seems, I am also not allowed to include working links :-/
[1] Search for: "mauerer real time linux tag" to get the paper
[2] rt.wiki.kernel.org/index.php/CONFIG_PREEMPT_RT_Patch

[DISCUSSIONS][TESTING][ROM][UNOFFICIAL] CyanogenMod 13 ALPHA Build

This is a test build I take no responsibility for what this may or may not do to your device.
Click to expand...
Click to collapse
NEED TESTERS
currently i don't have the device to test i will be getting my device in the next week .
Click to expand...
Click to collapse
1. Install CWM Recovery
2. Do Full Wipe If coming from another ROM
3. Flash ROM
4. Flash Google Apps (my recommendation is to install minipal gapps due to /system partition size limits)
5. Reboot
Click to expand...
Click to collapse
]Not Booting
Click to expand...
Click to collapse
Code:
[B]Source[/B]
Here are the device tree :
Device Tree (from cm13 Nexus 9) : https://github.com/vickdu31/android_device_xiaomi_mocha
Kernel Tree (from Xiaomi KK) : https://github.com/vickdu31/android_kernel_xiaomi_mocha
Vendor Tree (old Xiaomi KK) : https://github.com/vickdu31/android_vendor_xiaomi_mocha
Thank you
@faust93 for cwm
XDA:DevDB Information
CM-13, ROM for the Xiaomi Mi Pad
Contributors
Rohit99, tank0412, vickdu31
ROM OS Version: 6.0.x Marshmallow
Based On: CyanogenMod
Version Information
Status: Testing
Created 2016-12-10
Last Updated 2016-12-13
Reserved
Edit 1:initial build didn't boot for me, no adb can't get log
Ok im gonna try it.
If you want, i can leave logcat for you
OoSTARTERoO said:
Ok im gonna try it.
If you want, i can leave logcat for you
Click to expand...
Click to collapse
Can get logcat? Try please.
Ofc, it doesn't boot. And don't create threads without testing.
Sudeep Duhoon said:
Can get logcat? Try please.
Click to expand...
Click to collapse
unfortunately....I couldn't get logcat too...
Sudeep Duhoon said:
Can get logcat? Try please.
Click to expand...
Click to collapse
we can't get logcat. It doesn't boot, i mean there are problems with kernel or init scripts or both. Kernel needs patches.
Nihhaar said:
Ofc, it doesn't boot.
Click to expand...
Click to collapse
As I thought
Prebuilt kernel from cm11
Sudeep Duhoon said:
As I thought
Click to expand...
Click to collapse
hey can i use prebuilt kernel from cm11 source @Nihhaar
Rohit99 said:
hey can i use prebuilt kernel from cm11 source @Nihhaar
Click to expand...
Click to collapse
Always try to build kernel with source. I think you can't, but you can try.
Please edit the link in OP, its me who miswrote it... : /android_device_xioami_mocha --> /android_device_xiaomi_mocha
You need to fix up SELinux and the init scripts. Taking a shield tablet device tree, renaming things to mocha and changing the fstab isn't enough. As far as I can tell the shieldtablet device tree also has dependency on a shield common tree. There's also no value in creating a new thread each time you push new commits
Our kernel from Xiaomi is also pretty useless without commit history. The device tree is also from shield tablet, not Nexus 9.
We also have a tree for building TWRP with OmniROM that you can compile TWRP 3.0.2.0 with.
What kernel repo is upstream one for tegra android? Like CAF for quallcom.
I've tried to merge xiaomi changes on l4t kernel https://github.com/HighwayStar/android_kernel_xiaomi_mocha
Merged dts files and arch/boot/march-tegra with some required drivers, but still cant boot it. Found somewhere here that l4t kernels is not for android, but for GNU/Linux, but what kernel is for android?
Cyanogenmod's shield kernel?
highwaystar_ru said:
What kernel repo is upstream one for tegra android? Like CAF for quallcom.
I've tried to merge xiaomi changes on l4t kernel https://github.com/HighwayStar/android_kernel_xiaomi_mocha
Merged dts files and arch/boot/march-tegra with some required drivers, but still cant boot it. Found somewhere here that l4t kernels is not for android, but for GNU/Linux, but what kernel is for android?
Cyanogenmod's shield kernel?
Click to expand...
Click to collapse
git://nv-tegra.nvidia.com/linux-3.10.git
I used rel-tn8-l-r7-shieldtablet8 to make a start on doing this. You could also use android_kernel_shield from CyanogenMod repo as it comes from the same place. But it will have a lot of extra commits for things not useful for mocha.
Here's what I have so far:
https://github.com/harrynowl/nvidia_tegra-3.10
Harrynowl said:
git://nv-tegra.nvidia.com/linux-3.10.git
I used rel-tn8-l-r7-shieldtablet8 to make a start on doing this. You could also use android_kernel_shield from CyanogenMod repo as it comes from the same place. But it will have a lot of extra commits for things not useful for mocha.
Here's what I have so far:
https://github.com/harrynowl/nvidia_tegra-3.10
Click to expand...
Click to collapse
Oh, intresting, cloned same url, but started other branch l4t/l4t-r21.5.
What status of your tree? Cant boot? We need minimal bootable kernel to be able to get dmesg and make further progress.
highwaystar_ru said:
Oh, intresting, cloned same url, but started other branch l4t/l4t-r21.5.
What status of your tree? Cant boot? We need minimal bootable kernel to be able to get dmesg and make further progress.
Click to expand...
Click to collapse
Untested, been doing device bring up. That kernel won't work yet anyway it's missing atmel, synaptic and battery firmware. (Plus the code that goes with it)
Some devs have one that gets to recovery but only 1 CPU core can come online and the CPU gets a bit hot. Unfortunately their commit history is hard to follow so I've not had a proper look at it yet
My my...it's been a while since I've seen a cringe-worthy dev thread on XDA. So OP just used the device tree from Nexus 9 (a 64-bit device with a different processor and nothing in common with the Mi Pad other than the fact that they use Nvidia SoCs and are both tablets), unmodified KITKAT kernel sources from Xiaomi (which takes work to make it boot, even on KK) and KITKAT userspace blobs to compile the ROM, and for some reason decided to share it without testing. The 10-post rule is meant to keep such people out of the development sub-forums, but obviously that's not working.
I do not understand why the moderators are allowing this thread to remain open. It's just a thread by a wannabe dev offering a non-bootable ROM that has the potential to brick the devices of many newbies who may decide to try this.
This thread is even more useless than the other "DEVS-ONLY" thread someone else made. Honestly, the entire Mi Pad forum is filled with people who either expect Android 7.1.1 to magically appear on their tabs just because Xiaomi released outdated kernel sources or just wanna create threads like this for the "thanks or whatever". The never ask for ETA rule seems to just float over their heads.
Now to some useful information. I believe, even if we patch the kernel enough for it to theoretically boot cm13, it probably won't, considering the outdated userspace blobs for the Mi Pad. Unless someone has the knowledge to take their tab apart and figure out how to get UART data, it will be virtually impossible for the mi pad kernel to boot any new version of Android. I heard another interesting approach taken by some russian devs at the Xiaomi forums. They've managed to port the kernel from the Nvidia shield (and apparently it's booting). Now this would mean we can use the userspace blobs from the Shield to at least get the ROM booting (most peripherals won't work, but that's step 2). I do not know whether they use GitHub or if they've even open-sourced their work, but now we know that it's possible, so that could be a possible method of approach.
EDIT: LOL. I just read the OP again. The "dev" expects donations to help him work harder. This from a person who posted his way into somehow compiling his first Android build without even having the damn device.
drakonizer said:
My my...it's been a while since I've seen a cringe-worthy dev thread on XDA. So OP just used the device tree from Nexus 9 (a 64-bit device with a different processor and nothing in common with the Mi Pad other than the fact that they use Nvidia SoCs and are both tablets), unmodified KITKAT kernel sources from Xiaomi (which takes work to make it boot, even on KK) and KITKAT userspace blobs to compile the ROM, and for some reason decided to share it without testing. The 10-post rule is meant to keep such people out of the development sub-forums, but obviously that's not working.
I do not understand why the moderators are allowing this thread to remain open. It's just a thread by a wannabe dev offering a non-bootable ROM that has the potential to brick the devices of many newbies who may decide to try this.
This thread is even more useless than the other "DEVS-ONLY" thread someone else made. Honestly, the entire Mi Pad forum is filled with people who either expect Android 7.1.1 to magically appear on their tabs just because Xiaomi released outdated kernel sources or just wanna create threads like this for the "thanks or whatever". The never ask for ETA rule seems to just float over their heads.
Now to some useful information. I believe, even if we patch the kernel enough for it to theoretically boot cm13, it probably won't, considering the outdated userspace blobs for the Mi Pad. Unless someone has the knowledge to take their tab apart and figure out how to get UART data, it will be virtually impossible for the mi pad kernel to boot any new version of Android. I heard another interesting approach taken by some russian devs at the Xiaomi forums. They've managed to port the kernel from the Nvidia shield (and apparently it's booting). Now this would mean we can use the userspace blobs from the Shield to at least get the ROM booting (most peripherals won't work, but that's step 2). I do not know whether they use GitHub or if they've even open-sourced their work, but now we know that it's possible, so that could be a possible method of approach.
EDIT: LOL. I just read the OP again. The "dev" expects donations to help him work harder. This from a person who posted his way into somehow compiling his first Android build without even having the damn device.
Click to expand...
Click to collapse
I agree, this device has no development threads. Only 2 give me thanks and here's my donation link threads.
They have indeed used GitHub, but I don't believe they want to share the repo just yet so I won't post it publicly. It has many problems to sort and also sadly, they didn't keep the commit history from Nvidia as it was initialised via zip DL. It does boot to recovery though.
Harrynowl said:
I agree, this device has no development threads. Only 2 give me thanks and here's my donation link threads.
They have indeed used GitHub, but I don't believe they want to share the repo just yet so I won't post it publicly. It has many problems to sort and also sadly, they didn't keep the commit history from Nvidia as it was initialised via zip DL. It does boot to recovery though.
Click to expand...
Click to collapse
Oh! I didn't realize we were talking about the same person/team. I'd love to start developing for this device. In fact, I'm working on KEXEC-hardboot and Multirom right now, but I'd like to follow what you guys are doing and contribute as much as I can. Is there an IRC channel/IM app you guys use for communication? If so, I'd appreciate it if you could PM the info.

[REFERENCE] Umbrella Kernel

WARNING:
This is not a post targeted to end users. It is a development reference. If you expect any installable download or even added features out of this thread, please close your browser. Thank you.
What is Umbrella?
Umbrella is a project that aims to make the kernel sources that HMD released for Nokia 8 Sirocco (A1N) compatible with the Nokia 8 (NB1). The idea behind this is to replace the outdated 8.0 kernel sources that HMD released for NB1 with more up to date ones that are used in the 9.0 builds for Nokia 8 Sirocco.
Why do this, you might ask. Well, the answer is simple: The devices are so similar that HMD / FIH already have their kernel sources in a shared source tree. You can validate that yourself, by downloading the kernel config from a stock NB1 kernel (under /proc/config.gz), unpacking it, and searching for the commended entry "CONFIG_FIH_A1N". What umbrella does is take the sources that were released for A1N, readd all device specific files for NB1 (they were pruned) from it's original kernel soure, and integrate the stock kernel config (also called defconf) from NB1.
Doing this also lead to some other small quality of life improvements that are not directly relevant to an end user.
Umbrella contains the latest changes from linux-stable (v4.4.179 at the time of writing, compared to the stock v4.4.153), and Qualcomms Codeaurora upstream
The WiFi driver from Qualcomm is compiled directly into the kernel, instead of being loaded as a module. This allows you to flash umbrella based kernels to every build version while keeping everything else working correctly. The stock kernels use signature enforcement, which means that the wifi module that is loaded from the system partition has to be signed against the kernel, which is not the case for every custom kernel or even the kernels that were built for a different security patch.
Unlike the officially released kernel sources, umbrella does not have stupid typos in it's device trees that cause the phone to display white bars on all of your screen etc.
Umbrella disables the block that FIH put in place to prevent users from rebooting into EDL mode from within android (using adb reboot edl).
Umbrella also includes a patch that causes the device to not reset it's entire memory when the kernel crashes, therefore retaining the last kernel output log, which can be used for debugging
You can compile the kernel with compilers newer than GCC 4.9 (not clang though), without having it immideately crash at boot.
It includes a tool that automatically sets up a crosscompiling environment for the kernel.
What Umbrella is not
Umbrella is not a project to add significant new features, or the ability to tweak things beyond what the stock kernel already offers (which is technically not that bad). It aims to be a reference kernel, a base for (potentially) other kernels that are based on it and add those features. I know that that is kind of a broad goal, considering I am the only one who seems to do actual development for this phone, but who knows. Having a lower entry level might help in case someone is curious and wants to get into kernel hacking. And I would certainly be happy if I wasn't the only one developing for this device.
If you want Umbrella to contain features like:
Overclocking
More governors / schedulers / whatever
Color / Sound / whatever control
Wakelock blocking
etc. etc. etc.
then please Alt-F4 your browser right now. Ok, don't do that but at least please don't request it because it will make you get ignored, nothing else.
Why the name Umbrella?
While I developed the initial prototype I watched through 3 Resident Evil movies, and this is kinda a zombie project, so I think the name fits quite well.
Why are you posting this?
I am posting this because I am hoping that it will be useful for anyone that would like to get into kernel development and tweaking without the hassle that comes with setting up the kernel sources that are released by HMD.
But, one disclaimer: I am not a kernel developer. I am a curious CS student suffering from a bad mix of too much time and stupid ideas that solve stupid problems. I am trying my best to produce something useful and be of help, but please don't expect wonders from me, thanks.
Links?
Source: https://github.com/resident-nokia/umbrella
Download: None, this is a development reference.
Looks promising
Sent from my NB1 using XDA Labs
Nice. this will likely be useful in the future
Updated the umbrella source to the latest 4.4.180 kernel, and May 07 CAF tag (LA.UM.7.4.r1-05100-8x98.0). Also readded some NB1 specific code where it was missing (discovered by doing a diff against the 5140 kernel source that Nokia recently released).
Just in case anyone actually cares about it
THMSP said:
Updated the umbrella source to the latest 4.4.180 kernel, and May 07 CAF tag (LA.UM.7.4.r1-05100-8x98.0). Also readded some NB1 specific code where it was missing (discovered by doing a diff against the 5140 kernel source that Nokia recently released).
Just in case anyone actually cares about it
Click to expand...
Click to collapse
I do. Who knows, in a year's time I might have enough knowledge to build a custom Rom for this phone
Kernel sources which is used on pie has been released officially. Finally, we have an "original" kernel and we've got closed one more step to custom roms.
https://www.nokia.com/phones/en_int/opensource/
techno_man000 said:
Kernel sources which is used on pie has been released officially. Finally, we have an "original" kernel and we've got closed one more step to custom roms.
https://www.nokia.com/phones/en_int/opensource/
Click to expand...
Click to collapse
@THMSP it would be interesting to let us know how different is your kernel mod from the newly released official pie kernel for Nokia 8
MDV106 said:
@THMSP it would be interesting to let us know how different is your kernel mod from the newly released official pie kernel for Nokia 8
Click to expand...
Click to collapse
As I described here: https://forum.xda-developers.com/nokia-8/development/official-source-code-releases-nokia-8-t3930324, they are identical. The only difference are the device tree files (which still contain typos that break the display), and of course all modifications I made to the sirocco kernel source that Umbrella is based on (wifi driver, EDL mode reactivation, upstreaming, etc.)
THMSP said:
As I described here: https://forum.xda-developers.com/nokia-8/development/official-source-code-releases-nokia-8-t3930324, they are identical. The only difference are the device tree files (which still contain typos that break the display), and of course all modifications I made to the sirocco kernel source that Umbrella is based on (wifi driver, EDL mode reactivation, upstreaming, etc.)
Click to expand...
Click to collapse
So, are these new codes broken like 4.84?
techno_man000 said:
So, are these new codes broken like 4.84?
Click to expand...
Click to collapse
I wouldn't call Nokia sources broken, but I would call them incomplete, outdated and impractical to work with. And that hasn't changed.
Iam currently building device tree for nokia 8..
Unable to figure out how to edit init folder specifically for nokia8
[email protected] said:
Iam currently building device tree for nokia 8..
Unable to figure out how to edit init folder specifically for nokia8
Click to expand...
Click to collapse
Please do so! We can't let this phone die so early!
which defconfig file should choose?
lk
[email protected] said:
which defconfig file should choose?
Click to expand...
Click to collapse
nb1_defconfig is for Nokia 8
Can somebody help me? I have built Lineage OS 16.0 for the Nokia 8 with the Umbrella Kernel. However I am facing issues with getting it into work. Firstly TWRP fails to flash it with error 7. I am including the recovery.log file in case anyone wants more detail. I then proceeded to extract the payload.bin file, and flashed boot.img and system.img seperately. However that didnt work either as my phone got stuck at the Bootloader unlocked warning screen. If anyone is interesteed I can upload the .zip outputed by the build
Device Tree: https://github.com/GPUCode/android_device_nokia_nb1
Recovery.log: https://hastebin.com/akohutiwed.sql
Thanks in advanced
emufan4568 said:
Can somebody help me? I have built Lineage OS 16.0 for the Nokia 8 with the Umbrella Kernel. However I am facing issues with getting it into work. Firstly TWRP fails to flash it with error 7. I am including the recovery.log file in case anyone wants more detail. I then proceeded to extract the payload.bin file, and flashed boot.img and system.img seperately. However that didnt work either as my phone got stuck at the Bootloader unlocked warning screen. If anyone is interesteed I can upload the .zip outputed by the build
Device Tree: https://github.com/GPUCode/android_device_nokia_nb1
Recovery.log: https://hastebin.com/akohutiwed.sql
Thanks in advanced
Click to expand...
Click to collapse
hey, did you wipe userdata before flashing this? I think you need to do that, like when switching to using GSIs.
also, have you checked this https://github.com/resident-nokia/twrp? Specifically the fstab file for NB1.
oaid said:
hey, did you wipe userdata before flashing this? I think you need to do that, like when switching to using GSIs.
Click to expand...
Click to collapse
Thanks for the suggestion. I have flashed GSIs before but never had any problems. Also I cannot find any userdata partition in TWRP. I asked in the Lineage OS discord and I was told that probably that TWRP image is broken. I am confused
emufan4568 said:
Thanks for the suggestion. I have flashed GSIs before but never had any problems. Also I cannot find any userdata partition in TWRP. I asked in the Lineage OS discord and I was told that probably that TWRP image is broken. I am confused
Click to expand...
Click to collapse
that's the data partition, if I'm not mistaken ?*
which twrp image are you using? Maybe try Dorian's latest?
oaid said:
that's the data partition, if I'm not mistaken ?*
which twrp image are you using? Maybe try Dorian's latest?
Click to expand...
Click to collapse
Yes I am using the latest TWRP. Before flashing I erased the data partition but still the error persisted

Unofficial build help?

I'm trying to build for a device that has no known Android 10 device trees that I can find. I think I fleshed out the trees pretty well by following some sister/cousin devices and extracting a lot of stuff from the rooted phone itself, but my build fails at 2% due to a missing output file. The missing libdss.so file should be built as part of the kernel (whose source I have), but the build clearly isn't happening (or isn't happening in time to be recognized by the build system.)
I tried to build the kernel as a standalone module to see what might be wrong, and in trying to do that I can't seem to resolve all the issues with dependencies for cross-compilation to arm64. I've built for devices with existing trees by cherry-picking what I needed, but I've never built for something from the ground-up like this. I don't want to make the ROM with a pre-built kernel as the end-goal would be to become official. The attached image is the exact error I'm receiving, and the following links are to all of my source repositories that I'm using in addition to the Lineage17.1 base. Any help would be appreciated. I work as a full-time dev by day, I don't mind slogging around in some code if that's what I takes, I've just reached the end of my troubleshooting knowledge here and am not sure what the next step might be.
https://github.com/polaarbear/android_device_motorola_troika_sprout
https://github.com/polaarbear/android_device_motorola_universal9610-common
https://github.com/polaarbear/android_vendor_motorola_universal9610-common
https://github.com/polaarbear/android_kernel_motorola_universal9610

Categories

Resources