This is the continuation of my ongoing effort to get the FP6 fully feature complete with linux.

I chose NFC cause i thought it would be relatively easy like GPS, well that assumption turned out to be wrong.

But alot of time later and as you can see in the video now reading works! card emulation is a whole other can of worms that i want to tackle after.

Unlike the GPS which was a userspace problem this is a true kernel patch and im quite nervous about submitting it, if anyone happens to have contributed to the kernel please tell me how it went, i would really appreciate any advice.

I’m trying to flip all of these to a green wall of “Works”: FP6 pmOS feature matrix

GPS is now a solid green works when my patch gets approved, NFC now is partial.

Mobile Linux development mini guide for beginners

Disclaimer: This guide is written by some guy who only vaguely knows what he is doing, please don’t take this as authority.

I will mostly write this in the perspective of the FP6, but it applies to other phones aswell since i’ll try to keep it generic. I don’t want to dig into the tech here but more the general process with some common pitfalls.

  1. Pick a phone with a cooperative manufacturer, Fairphone is excellent in this but there might be more.
  2. Don’t just flash linux onto it directly, First test every hardware feature running on stock android, then you know 100% for sure it’s not a hardware problem. i made this mistake and when i was really stuck with the NFC i thought maybe my phone is just broken since i never tested it on android and had to flash android again, turns out the hardware was fine as shown in the video.
  3. Android is your friend, use it, I know software devs love reinventing the wheel but don’t, looking at android is the biggest help there. ideally you have a same model phone running (rooted) android by your side so you can directly compare, i know it’s a hard ask to purchase 2 phones but i cannot understate how much it helps. what i did is i purchased the linux one for myself and the android one for a family member, which i borrow for development. During the GPS and NFC work i really just compared what the android driver transmitted vs the linux driver and it helps a ton.
  4. Get a folder with all your research material Clone the linux kernel, your downstream kernel if there is one for your device, an android kernel, and device trees from the manufacturer, and any technical documents you can find: for the FP6 i am using these:

downstream kernel

Fairphone kernel

e/OS kernel

Fairphone 6 technical manual (most of the document is not very interesting, but all the way at the bottom are wire diagrams, these are very helpfull)

  1. Start small, don’t just grab the most valuable task from the beginning, start with the easiest task that ideally can be done in userspace.

  2. Think before you act, This is more of a do as i say not do as i do, cause i don’t follow this rule fully myself but it is very important, you don’t want to brick or fry your device, when flashing or working with voltages look twice before you push.

  3. Keep your device charged, When working on your device you probably have it connected to your PC 99% of the time, but your PC might not provide enough power to have a net positive while you look at your phone and go “oh it’s charging so it’s fine” hook it up to a dedicated USB charger every once in a while if this is the case on your device

I wanted to cover these pitfalls specifically, there are probably better technical guides then i can write out there on stuff like adb, fastboot and the kernel.

And if you only know basic C that is genuinely not an issue, good linux knowledge is far more important as you spend far more time troubleshooting then programming (atleast in my experience)

And finally, you need alot of patience, it is not extremely difficult, just very time consuming.

I get it is not for everyone, and i don’t want to make it so like im pressuring people, but nobody is going to do this except us, the clock is ticking until android gets locked down, and big tech would much rather have us on their proprietary software where they can squize our wallets dry then free software.

  • diaphragmwp@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    1 day ago

    For some, functional calls are most important, for others completely cutting power to the modem is important. The cell network fundamentally incompatible with the freedoms, and people may just want a pocket computer (those aren’t made anymore and the easiest way is basically just reuse a smartphone).