Kernel development - OnePlus Nord N100 Questions & Answers

Is there anything that would be interested in a custom kernel or maybe custom roms for this device? I can pick one up pretty cheap on eBay, just wondering what the landscape if the community is here.

From what I could see on GitHub, some developers tried to use the kernel sources, but it seems that OnePlus forgot to release some parts of it. So for now no one has created any roms or kernels, there is just an unofficial TWRP.

I'm quite good with recreating the kernel sources, I have done so for the N10, N200 5G, and a few other devices. See here. The missing parts are mostly Qualcomm specific code they keep in CAF repositories. Until my device touches down in my mailbox I'll need some testers. I'll have the kernel source completed well before then.

Sorry but personally I don't think I can help testing, since it's my main device I'd rather avoid having to erase my data every time.

That's understandable. You wouldn't happen to have a boot.img I can start with? The stock firmware doesn't have the files broken up individually.
If anyone wants to follow development:
OnePlus Nord N100 Community
You can view and join @OPn100 right away.
t.me

I have this one from the latest update (EU variant, I don't know if it changes anything):

Related

How to build AOSP from Google for the OnePlus 3/3T?

I'm trying to build Stock AOSP (Not LineageOS) straight from Google for the OnePlus 3/3T?
I searched for a guide, but haven't found one.
Thanks in advance!
You can't
AOSP source is available for Pixel and Nexus devices
But you can build CAF for OnePlus 3, is clean and close to AOSP
Sent from my ONEPLUS A3003 using Tapatalk
Since you're doing it on your own I suggest using a rom here as a base GZR recently posted GZOSP a Oreo base for Developers to use as a base for their roms you should check it out it's a great start if you're new to development
liam_davenport said:
Since you're doing it on your own I suggest using a rom here as a base GZR recently posted GZOSP a Oreo base for Developers to use as a base for their roms you should check it out it's a great start if you're new to development
Click to expand...
Click to collapse
That would be doing him a great dis-service. Buy using anothers base you dont learn everything you need and rely on others code way too much. Not to mention if a cm/los issue happens (underlying bug in their base code so you are waiting for them to fix it) This is the reason that whole project will not work.
Starting from scratch is a great start and a place everyone should start
... If he's never built a rom before then starting from scratch is most definitely *not* the place to start. GZOSP would likely be the best place to start as at least you can sync all and it actually builds. Would learn a ton just by figuring out how to remove all the GroundZero naming to make it your "own" rom.
There aren't any default AOSP device tree's available for OP3(you'd *have* to use someone else's code and it would likely require manually fixing it to build) so can't start there really, and good luck trying to find which branch(s) of caf and which repo's you need to build.. Writing device trees from scratch by yourself for aosp is drunkeness unless you've done it before and *know* what you're doing.
--
TLDR: There's no guide because it's not a thing currently. Would start with GZOSP if I were you.
HolyAngel said:
... If he's never built a rom before then starting from scratch is most definitely *not* the place to start. GZOSP would likely be the best place to start as at least you can sync all and it actually builds. Would learn a ton just by figuring out how to remove all the GroundZero naming to make it your "own" rom.
There aren't any default AOSP device tree's available for OP3(you'd *have* to use someone else's code and it would likely require manually fixing it to build) so can't start there really, and good luck trying to find which branch(s) of caf and which repo's you need to build.. Writing device trees from scratch by yourself for aosp is drunkeness unless you've done it before and *know* what you're doing.
--
TLDR: There's no guide because it's not a thing currently. Would start with GZOSP if I were you.
Click to expand...
Click to collapse
I mean in Biology, you don't start at the organism, you start at the atom. You start at the base and build from there.

[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

ROM ❯ PIXEL 3a ❯ UNOFFICIAL ❯ ProtonAOSP 11

ProtonAOSP • Pixel 3a
Android 11 ROM​
ProtonAOSP is a minimal custom Android 11 ROM focused on UI/UX and performance, with a touch of privacy.
Instead of customization it is focused on more smoother experience.
Installation
1. Unlock Bootloader
2. fastboot flash boot boot.img
3. Reboot to factory and factory reset
4. adb sideload rom.zip
5. Reboot​Note:- Rom already comes with gapps included so no need to flash them
Code:
- Your warranty is now void.
- You have been warned.
- Use at your own risk.
Download Here​Known issues
No eSIM support(I plan to add in next build)
Join the Telegram group for support
Kernel source code
ROM source code
This is just a side project, I may or may not maintain it in future.
A huge thanks to @kdrag0n for the amazing rom and the work done on this rom.
Reserved
I was just thinking how much I'd love to see this for the 3a.
Couple of things though;
1) Where's the device tree source and vendor blobs?
2) Its unfortunate that you baked in the google crap, one of the great things about custom builds is to get rid of that.
96carboard said:
I was just thinking how much I'd love to see this for the 3a.
Couple of things though;
1) Where's the device tree source and vendor blobs?
2) Its unfortunate that you baked in the google crap, one of the great things about custom builds is to get rid of that.
Click to expand...
Click to collapse
1. Soon I'll push source
2. I do have microg build for sargo as it is my main device, but not for bonito, so I did not post here on xda, if you want it join the support link group in the thread. Regarding google crap, for some users flashing gapps externally had less fluid experience so I did it.
I hope soon will be very soon, since I'm only interested in building myself anyway.
Have you spoken to @kdrag0n about adding in your source and making this "official"?
96carboard said:
I hope soon will be very soon, since I'm only interested in building myself anyway.
Have you spoken to @kdrag0n about adding in your source and making this "official"?
Click to expand...
Click to collapse
Device source
Vendor Source
Note:- I have few extra proprietary stuff added in vendor for Google Fi and stuff to work for users out the box which lineage does not have added in their vendor, so if you really want less vendor blob use lineage vendor. It will work without any issue, I think kdrag0n also uses them.
Regarding official builds, I don't have the same infrastructure as him(reason why I only posted gapps build here, it takes lot of time to maintain both gapps and non gapps build) nor the time to maintain it officially. as said in thread, this is my side project which I thought to share it with community. If things work well in future and I feel like doing it official, I may ask kdrag0n. Also idk if he is accepting new device as he is maintaining all the official devices alone by himself.
FoxA said:
Device source
Vendor Source
Note:- I have few extra proprietary stuff added in vendor for Google Fi and stuff to work for users out the box which lineage does not have added in their vendor, so if you really want less vendor blob use lineage vendor. It will work without any issue, I think kdrag0n also uses them.
Regarding official builds, I don't have the same infrastructure as him(reason why I only posted gapps build here, it takes lot of time to maintain both gapps and non gapps build) nor the time to maintain it officially. as said in thread, this is my side project which I thought to share it with community. If things work well in future and I feel like doing it official, I may ask kdrag0n. Also idk if he is accepting new device as he is maintaining all the official devices alone by himself.
Click to expand...
Click to collapse
Thank you very much. I'll give that a go
Hi, just checking if there is any development planned for this one? Looks to be interesting ROM for daily use.
cichy63 said:
Hi, just checking if there is any development planned for this one? Looks to be interesting ROM for daily use.
Click to expand...
Click to collapse
sorry, I don't have the device anymore.
The link download is not working, please update it
cichy63 said:
Hi, just checking if there is any development planned for this one? Looks to be interesting ROM for daily use.
Click to expand...
Click to collapse
Here's a current source.
I don't know if it's trusted, or who the maintainer of this unofficial build is though. Just found it via telegram.
ProtonAOSP - Browse /ProtonAOSP at SourceForge.net
sourceforge.net
Nice one. It's really handy to be able to revive old, unsupported devices like the Pixel 3a, which is a perfectly usable phone and can be picked up for next to nothing.
Some of us don't care about de-googling our phones and really just want to extend their lifespan with security updates, so having gapps baked in to ProtonOASP is really nice. Especially when we're just trying to help out our non-technical friends get a bit more life out of their old phones. A consistent, familiar user experience is all they really want.
I was wondering though: Does your build (or any build of ProtonOASP) come with verified-boot signatures so that the device's bootloader can be locked down after the ROM is installed, or is CalyxOS the only option for this?
Unfortunately, Calyx are very puritanical when it comes to de-googling, and microG is just a terrible substitute for interacting with Google services. I tried it on the Pixel 3a, and it doesn't even sync the contact list from your Google account. My non-technical friend was not impressed.
GrapheneOS still has builds up for 3a, however new builds were terminated as of February. While it doesn't ship with gCrap preinstalled, installation is trivial as they've built a compatibility layer to make it work correctly (and much MUCH more securely) as user-installed software, which you can install from the program "Apps".

Question How To Get started with Custom Rom Development/Contribution as a Junior Java/Kotlin developer?

As the thread question states I am a junior Java/Kotlin developer and would like to contribute to custom rom projects.
I have been mainly using Lineage OS on my old devices for a past few years and I am genuinely thankful for this community and would like to give back.
I have no idea where to get started and the only threads I found were really old from 2013 and hence I am posting it here. I have only gone as far as compiling AOSP from source and managing to flash it to my device. ( Any guidance is welcome ).
I have 2 additional queries :-
1) Why most custom rom releases are based on AOSP or Lineage as source rather than working backwards from the manufacture's provided rom? In that way the device can retain most of this functionality.
2) I have observed QUALCOMM powered devices are much more appreciated in this community compared to MediaTek, Why is that so? Recent MediaTek Chips have been quite powerful yet support from the community isn't there yet ..... what are MediaTek chipsets lacking ?
Mediatek doesn't release their source code so it's very difficult to develop custom ROMs.
Correct me if I'm wrong
How does your self-built AOSP perform? Everything working correctly?
I think the first question is, because the manufacturer's ROMs are proprietary and closed source, so it's not impossible, but difficult I think. Dunno how Xiaomi.eu does it.
Second question is, because Qualcomm releases source code to CAF - Code Aurora Forum. Custom ROM/Kernel Makers pull a few bits & pieces from CAF into their AOSP ROM, for that added spice.
I think MediaTek does too, but only for few devices?

Building LineageOS 18.1 for device that only supports 19.1

I desperately need to get my work profile working on my new OnePlus Nord N200 5G (dre), and I've just discovered that it is apparently impossible to create a new work profile on LineageOS 19.1. It seems, however, that a work profile set up on 18.1 will continue to work after a dirty flash to 19.1. Thus, I'm hoping that I can install 18.1 on my device, setup of the work profile, and immediately dirty flash 19.1. I won't really need a fully functional build of 18.1; just something that will boot up and allow me to create the work profile before I dirty-flash 19.1.
In order to do this, I need to build LineageOS 18.1 for this device. Unfortunately, only 19.1 has ever been supported.
I have a build environment that is currently building 19.1, just as a test. I also have the most recent Android 11 vendor firmware, from which I should be able to extract any required proprietary files.
I'm really missing 2 things:
The list of proprietary files that I should extract from the vendor's firmware. (I have the 19.1 list, but I assume that it won't work.)
What other files do I need to create/edit to add the device to the 18.1 build tree.
Is there a guide somewhere that walks through the process?
Ah, @ipilcher I was hoping someone smarter than me would answer your question. It would do so much for all the Android forks, and Android in general. I've asked the same question to several devs on IRC and they all basically say "no, no easy way to explain it...". My kingdom for a guide that doesn't involve the School of Hard Knocks all the way through.
So in full disclosure, as of today, I haven't managed to build a ROM on an unsupported phone- but I have done full builds from source with LOS and Calyx (with bootloader relocking on the latter) using existing projects.
But... I would assume from others that have gotten the AOSP "Generic Stock Images" to run on various random phones that there isn't really that much you /need/ for what you want to do; you don't need a functioning modem, fingerprint sensor, camera, GPS, notification LED, battery management, etc.
From what I understand, if your vendor follows android specs, all that would be in one of the vendor partitions anyway. From the builds I've done (mostly Motorola and OnePlus devices) the proprietary files (in "stock" LOS) are sourced from a few different places, possibly from generic chipset support (the same tree is used for multiple devices by a manufacturer and/or chipset). One LOS 18.1 build had a whole bunch of (proprietary) files in it that weren't even in the stock rom image! If you are sourcing from stock firmware (OTA off OP site or one of the MSM images here) I'd assume that half the partition is spyware or manufacturer test/calibration tools, and the other half are the drivers you want for a fully functional phone- which, luckily, it seems you can fall short of without failure, so you can probably be pretty lax about picking.
The bootloader chain seems to have a lot of drama between Android 11, 12, and 13 (requiring flashing other partitions outside of the normal system ones)- I've never had a N200 to play with to know if it is high drama, too.
Hey, at least you're using a OnePlus with QC chipset, so EDL can bail you out of pretty much anything you do wrong. I hard-bricked a $500 Pixel and learned how absolutely hideous Google support is- never buying one of those again.
Hope that helps.
SomeRandomGuy said:
Ah, @ipilcher I was hoping someone smarter than me would answer your question. It would do so much for all the Android forks, and Android in general. I've asked the same question to several devs on IRC and they all basically say "no, no easy way to explain it...". My kingdom for a guide that doesn't involve the School of Hard Knocks all the way through.
So in full disclosure, as of today, I haven't managed to build a ROM on an unsupported phone- but I have done full builds from source with LOS and Calyx (with bootloader relocking on the latter) using existing projects.
But... I would assume from others that have gotten the AOSP "Generic Stock Images" to run on various random phones that there isn't really that much you /need/ for what you want to do; you don't need a functioning modem, fingerprint sensor, camera, GPS, notification LED, battery management, etc.
From what I understand, if your vendor follows android specs, all that would be in one of the vendor partitions anyway. From the builds I've done (mostly Motorola and OnePlus devices) the proprietary files (in "stock" LOS) are sourced from a few different places, possibly from generic chipset support (the same tree is used for multiple devices by a manufacturer and/or chipset). One LOS 18.1 build had a whole bunch of (proprietary) files in it that weren't even in the stock rom image! If you are sourcing from stock firmware (OTA off OP site or one of the MSM images here) I'd assume that half the partition is spyware or manufacturer test/calibration tools, and the other half are the drivers you want for a fully functional phone- which, luckily, it seems you can fall short of without failure, so you can probably be pretty lax about picking.
The bootloader chain seems to have a lot of drama between Android 11, 12, and 13 (requiring flashing other partitions outside of the normal system ones)- I've never had a N200 to play with to know if it is high drama, too.
Hey, at least you're using a OnePlus with QC chipset, so EDL can bail you out of pretty much anything you do wrong. I hard-bricked a $500 Pixel and learned how absolutely hideous Google support is- never buying one of those again.
Hope that helps.
Click to expand...
Click to collapse
I just wanted to close this out and thank you for your response.
Fortunately, the issue that was driving me to try to build 18.1 for this device (https://gitlab.com/LineageOS/issues/android/-/issues/4983) has been diagnosed, and I was able to work around it.
Of course, I just realized that my wife's new Moto G 5G is an XT2213-3, not an XT2113-3, so maybe I'll revisit this subject some day.
Welllp... at the risk of being accused of insufficent RTFMing, I did stumble across this article the other day that nicely outlined a few things that I didn't know:
[GUIDE] [how to] CREATE OWN ROM [FOR ANY ANDROID DEVICE] [FOR N00B] [EASIEST METHODS]
NOTE: THIS GUIDE WILL WORK ANY ANDROID DEVICE BUT HAS FEW EXTRA PRE-SUGGESTED LINKS FOR GALAXY ACE PLUS USERS. Special Thanks to - dsixda for his awesome kitchen. Please Hit Thanks button for him. inspired by isidromxz's thread. Please kindly...
forum.xda-developers.com
It isn't exactly "build your own device tree on top of AOSP" which I think is what you wanted and I certainly still do... but it might help someone else who finds /this/ thread with the same question. It also ends with the wonderful quote "This thread is 10 yo. Leave it alone. things have changed" - which is pretty solid advice IMHO.
Ah well, if it wasn't a challenge, there would be no reward, eh?

Categories

Resources