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.

top 50 comments

sorted by: hot top controversial new old
[–] 3 points 6 hours ago

Huh, Nura? I like the name PostmarketOS better, but that's just me.

Cool that you got it working with ai, but I hope that doesn't become a standard in device porting. Sure with proper vetting the code can be ensured to be maintainable, but that code had to come from somewhere. These systems don't just magically know how to make software work, so it sounds like they're probably just referencing code somewhere else that could be under any kind of copyright. Sounds like a legal nightmare waiting to happen.

The thing I'm really hoping for is these general purpose mobile Linux systems being ported to the plethora of bootleg retro handhelds out there. The majority of these devices already have unlocked bootloaders and are super friendly to third party firmware. The problem is people are only porting these hyper minimalist emulation-focused Linux builds when there's so much untapped potential.

  • source
  • [–] 14 points 11 hours ago

    You said the forbidden word. How dare you!

  • source
  • [–] 9 points 11 hours ago

    That's so cool, I wish I could go full linux on my redmi note 11

  • source
  • [–] 69 points 1 day ago (45 children)

    "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.

  • source
  • hideshow 45 child comments
  • [–] 10 points 8 hours ago

    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).

  • source
  • parent
  • [–] 41 points 1 day ago (36 children)

    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.

  • source
  • parent
  • hideshow 36 child comments
  • load more comments (34 replies)
  • [–] 20 points 1 day ago* (last edited 1 day ago) (3 children)

    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.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 9 points 1 day ago (2 children)

    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.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 9 points 1 day ago*

    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.

  • source
  • parent
  • [–] 3 points 21 hours ago (2 children)

    upstream linux does accept AI "assisted" patches. if this gets properly mainlined, why wouldn't it run Nura?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 11 points 23 hours ago

    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

  • source
  • load more comments
    view more: next ›