- cross-posted to:
- linux@programming.dev
- cross-posted to:
- linux@programming.dev
AI can speed up a lot of the manual labour needed to bring even an almost dead, 10-year-old device back to life. My Xiaomi Mi Max 2 (oxygen, MSM8953) was dead. With AI help and my own knowledge, I ported/rewrote the missing drivers, and it now runs Nura (postmarketOS) with working camera, torch, SIM, phone calls and SMS. Only the loudspeaker is still broken.
Everything is up for anyone who wants to install it, or to understand the changes and manually write the patches for mainline: https://github.com/sv1sjp/mi-max2-oxygen-msm8953-nura-drivers Testing, feedback and PRs welcome.
You said the forbidden word. How dare you!
any information on how you did it? Like what the setup was, what you asked the ai to do, etc. With the video game fusions people have been doing using claude lately I’ve become interested in AI for cutting out the most tedious, life wasting parts of reverse engineering but I haven’t seen examples involving hardware
“AI” can also speed up the process of making a code base buggy and hard to debug, when the people that generated it do not understand the code.
Nura will not accept generated patches, by the way. It might run your own version of Nura, but will not run upstream Nura with your patches.
Nura will not accept generated patches, by the way.
If you click OP’s github link and scroll down you’ll find this section which acknowledges that: https://github.com/sv1sjp/mi-max2-oxygen-msm8953-nura-drivers#about-ai-assistance-and-contributing-upstream
The drivers, patches, scripts and write-ups here were produced in collaboration with an AI assistant and tested on a real Mi Max 2 (oxygen).
The Nura project does not accept LLM-generated contributions. One of its maintainers explains the reasons in this post: the social and environmental cost of these models, and the risk that people use them to produce private knowledge instead of joining and strengthening the community whose work the models learned from. We respect that decision. So:
- This repository is not a contribution to Nura or pmaports, and its code should not be submitted there as it is.
- It is public documentation, not private notes. The reusable part is the knowledge: how the hardware is wired, register addresses and meanings, root causes, what was tried and ruled out, and how to test safely. These are facts anyone can check on their own device. It can save time for anyone who wants to understand what works and what does not, and then write their own code to submit upstream.
- If you want to get this into Nura or upstream, learn from it, verify it on your hardware and write your own implementation, following the rules of the project you contribute to (Nura, the Linux kernel and libcamera each have their own contribution policies).
- Please engage with the community. The Nura wiki, the msm8953-mainline project and the people credited below did the groundwork this builds on.
@OP (@sv1sjp@lemmy.world) what isn’t clear to me is why you don’t try to upstream the kernel parts, since Linux is accepting LLM-assisted contributions (as is Nura actually, just only indirectly after their upstreams like Linux accept them).
Yeah, I personally prefer the bug-free old version:

On a more serious note, we’re still in a period where people are figuring out what AI can/cannot be used for and what the best practices are. Ironically, since it’s better at reverse engineering and bug hunting than developing when compared to a human, it is more useful for hacker and open-source projects than enterprise.
Well, we know the best practices for the Nura project:
We forbid the use of generative AI tools in Nura.
It’s literally the first sentence of their policy.
since it’s better at reverse engineering and bug hunting than developing when compared to a human
Citation needed.
They have given five reasons for not using AI:-
- water and energy use
- worker exploitatio
- worker layoffs
- use of other’s work without consent
- not understanding what the code is actually doing
Of these, the first is a result of using fossil fuels, the second and third are a result of capitalism, and the fourth is only a problem if you believe in the whole ‘intellectual property’ charade. Only the fifth is an actual issue with AI, and that can be solved by either mandating human review, or marking AI-generated code as such and letting users use or exclude it.
“Intellectual property” is mostly a capitalist idea. To give a direct example of the harm caused by LLMs using others’ work without attribution or credit, there is the recent case in which one of the models was being portrayed as finding a mathematical proof which was actually in it’s training data. The original authors will not get the credit, academic support, exposure and funding they would have gotten otherwise.
Also, even if information is not “owned”, it’s epistemology and source are an important part of it. Consumption by LLMs degrades the information by removing such metadata, and even worse hallucinating sources.
one of the models was being portrayed as finding a mathematical proof which was actually in it’s training data. The original authors will not get the credit, academic support, exposure and funding they would have gotten otherwise.
If the original authors have published their findings somewhere (journal / conference / arXiv), they will definitely get the credit from other mathematicians.
it’s epistemology and source are an important part of it.
I don’t know about all AIs, but deepseek does cite sources. You can always cross-check them.
Unfortunately the proof found by the LLM combines work by different teams of mathematicians that cannot individually be published as proofs. It’s the equivalent of a scoop in investigation journalism by someone who was spying on journalists instead of doing any investigating. It’s on lemmy/wired: https://lemmy.world/post/52843754
It’s good that some do cite sources, however one major problem with generative AI is that it can produce volumes of output much faster than they can be verified. “You can always cross-check” is not viable at scale, and by the time LLM output gets cited, it becomes a quagmire potentially unlimited levels deep.
LLM output should never be treated as original until they can show their work transparently.
From what I understood from that article, OpenAI scooped the work of a couple of mathematicians (one an OpenAI employee, and both using OpenAI’s tools) and claimed it as their own. Stealing others’ work is not commonplace in science, but it does happen. The lesson here is to not trust OpenAI / Anthropic with your data or ideas, and to use local AI or at least less shady services. Also, the mathematicians will still get credit if they publish the findings first in a scientific journal, arXiv or conference - blogs and press releases sadly don’t count in academia.
It’s literally the first sentence of their policy.
Yes, but what about the 2nd sentence?
The following is not allowed in Nura:
- Submitting contributions fully or in part created by generative AI tools to Nura.
- Recommending generative AI tools to other community members for solving problems in the Nura space.
As you can see, it says nothing about researching, troubleshooting, reverse-engineering, etc. As long as you write and understand the code yourself AI is allowed for everything else. As long as you’re not using generative AI it’s fine.
Citation needed.
My personal experience working with AI over the past year. And if that’s not enough, here’s also Linus Torvalds himself.
The arguments regarding resource use and profiting off of theft are valid. The arguments regarding the nature and capabilities of the tech are not. Developers ARE responsible for the code they submit, regardless of how it was created.
It’s not a good tool for research, it will just generate a hallucination and you end up doing something which does not work or just works somehow, but is not done correctly and will break in the future.
I talked to quite a few people recently at the postmarketOS and Alpine Linux conference, it definitely was noticed that more contributions are now coming in that do things wrong or in a subtly broken way and the submitting people have no clue.
If you rely on a lying computer for research, then your code will lie to you.
I’ve used AI for low level debugging on things that are basically undocumented to fix my personal machines, doesn’t eliminate the trial and error process but it’s gotten me farther a lot faster than if I were to do it on my own.
I rely on it to scour the docs, the forums, the codebases for any and all potential solutions and neatly present them to me. I then validate and evaluate myself. Just going with the first thing the AI suggests is lunacy and is exactly what I meant by “people are still discovering best practices”.
As you can see, it says nothing about researching, troubleshooting, reverse-engineering, etc. As long as you write and understand the code yourself AI is allowed for everything else. As long as you’re not using generative AI it’s fine.
I’m not sure if you’re joking or legitimately confused, but, assuming the latter, fyi the “AI” that people use for “researching, troubleshooting, reverse-engineering, etc” is part of what is called “generative AI”. Given this, it’s not much a stretch to read it as saying that even posting in Nura forums about the existence of @sv1sjp@lemmy.world’s github repo would actually be a violation of Nura’s policy (as of today; I expect it will evolve in the not-too-distant future).
That’s fair. It would certainly align with the described “spirit” of the policy. Hopefully it becomes clearer in the future.
Also Google destroyed a huge chunk of Swedish forest to build a data centers for more AI… That’s the main feature of AI. Figure that one out.
*Finnish forest
It’s Palantir (or maybe it was just of one of the founders?) that bought a large chunk of land in Sweden, but to my knowledge they haven’t made their plans for what to do with public
On one hand you don’t know what the code is doing but on the other hand it’s impossible to write so much code by hand and do any amount of testing for projects this big
LLM code is getting less sloppy and you now have the choice between generating open-source projects which you will never read the code of, or using an artisan coded buggy project.
Nobody has the time to test every single communication protocol manually to see when a camera is able to take pictures or a microphone records audio. LLM’s can do this driver development and even check when the result looks good. There’s soooo much tedious labour which can already be automated.
OP managed to revive an abandoned phone with working drivers thanks to LLM development. That’s a massive win.
LLM code is getting less sloppy and you now have the choice between generating open-source projects which you will never read the code of, or using an artisan coded buggy project.
If nobody understands the code, then I might as well use proprietary software, at least somebody will understand that code.
Too bad Android is locked down and the android versions on these devices don’t support a lot of modern apps.
You can use Nura (PostMarketsOS) and have the LLM write the hardware drivers for your own phone which are missing from the project. This is often a pretty custom for most phones. Once you get the drivers you can use the rest of the OS like normal.
You can now revive obsolete devices and get them useable. There’s probably some slop in there but the slop is really getting a lot better it would be great if people were more accepting for using LLM’s for extremely labour intensive tedious tasks which nobody would else do anyways.
proprietary software doesn’t have easily accessed answers for why things don’t work, source avaliable slop does.
upstream linux does accept AI “assisted” patches. if this gets properly mainlined, why wouldn’t it run Nura?
HUZZAH!!!
That’s so cool, I wish I could go full linux on my redmi note 11
Can ai get past the AT&T fuckery on my galaxy s5 active?
The Chinese are going to save us once again? I never thought I would root for fucking China vs US in my life.
Depending on what you mean by saving us, I don’t think China will, but they’re not invading random countries, staging coups, droning civilians, etc, so these two countries are not even remotely comparable.
The usa could save us all by falling into the ocean
Can’t the ai trash just f*ck back off to windows, apple, and google where they belong?
Nura is an anti ai distro
You don’t have to use it? 🤷♀️
It’s not that simple, even if you are.
Explain it to me like I’m five
Sure, let me know when you get there.
Very considerate of you to await him at the destination.
One of the issues there is that I will most likely not recognise them by the time they get there, due to all of the other zombies/crypto-bros/trash, many of whom are clearly frequenting this sub now.
“Everyone who disagrees with me is a lesser person”
Idealists’ favourite coping method










