I think that free firmware on 4G and 5G phones is not only possible, but that it should be and is inevitable to happen eventually. Many ham radios on the market allow ham radio operators to easily transmit on police, fire, ambulance, and several government frequencies. Sometimes your new radio will transmit anywhere, right out of the box, new and un-modified. There are probably hundreds of thousands, if not millions of ham radio operators in just the US alone. On top of that, you don’t need to show any license when buying these ham radios. You can walk in to many local retail outlets, buy these radios anonymously, and leave without anyone knowing what you bought. So the controls on the potential abuse of the technology is not found in keeping people out. That doesn’t work and is bad for society in the long run if free software is not allowed by law.
Using ham radios as just one example, you can get yourself in a lot of big trouble very quickly if you cross certain lines. After I modified my two-meter handheld radio several years ago, I grew over time, to be afraid to use that radio at all. With no safetys, it’s too easy to accidentally transmit on police and fire frequencies. I used to also monitor the main fire dispatch channel. I was never stupid enough to set the CTCSS tones to open the fire department repeater input frequency to any transmissions that I might make and to set a frequency offset to allow me to transmit in to that repeater. But a few times I accidentally switched channels on the radio and somehow ended up giving my callsign by mistake over the fire dispatch output frequency (no big deal as without a repeater, you won’t get out very far). Even so, after that I always kept looking to verify the frequency every time before I keyed-up that radio after that. I was a bit relieved to toss that radio in to the landfill a few years later because of several unintended issues that came up after I modified that radio to allow out-of-band transmissions. I couldn’t reverse the modification at the time because the original modification involved using tweezers to scrape a 0402 sized (near microscopic) capacitor off of the circuit board inside of the radio. Without access to a $5K surface-mount solder rework station, I couldn’t replace that capacitor. Most people don’t realize how ignorant they are about their own assumptions. Using that same radio at a hamfest a few years later, a presenter there said to me “key up your radio and unkey it, but don’t say anything”. So I did. Then he gave me my own callsign. He was presenting on radio fingerprinting technology. No two oscillators are exactly the same. The oscillator in my radio had already been catalogged and attached to my callsign in his database at one point as I had previously used the local ham radio repeaters, giving my callsign each time. If I had intended any mischief say, by hasassing the police on their own radio channels (a stupid thing that I have never done), the police could have provided my radio fingerprint pattern to a repeater owner to retrieve my callsign. I didn’t even know about that technology until a few years after getting my license. The point is that most people who are up to some kind of no good will be caught because there are invisible traps. Most people who are smart enough to hack in to bleeding edge technology either know they will be caught, so they don’t do it, or they get caught. When you do get caught, those penalties can be severe.
So as with ham radio equipment, the honor system actually does work. I guess it’s not exactly the honor system in one way. It can also be like there is a gun to your head if you mess-up. But in exchange, there is always a path made available that you can follow if you want to experiment with the technology and build your own stuff, complete with metaphoric street signs, guard rails, and forgiveness of reasonable mistakes. That is what ham radio does. One unofficial rule is to not modify your commercially-made radio hardware. If you do, you’re on your own. But if you build your own radio from scratch, some forgiveness might be in order if you accidentally violate a rule in the learning process. If you’re capable of writing 4G or 5G cell phone opensource firmware and make an honest mistake, you’re more likely to be offered a high paying job than anything else. So the technology should be made public as much as is possible.
The cell phone carriers probably don’t want people experimenting on their networks. So if Verizon wants to share intellectual property with Samsung so that Samsung can build cell phones to work on the Verizon network and they don’t let anyone else in on those secrets, it will be really difficult for any opensource firmware to be written for that hardware. That is the biggest problem. But if you respect licensing requirements, you should be able to write your own firmware. Finding the radio chip provider who will share their datasheets with you without making you keep that information a secret might be the hardest thing to do. By nature, that requirement to keep those secrets would prohibit you from publishing your opensource code. So there is a lot of hoops to jump through. But opensource cell phone firmware should be possible.