Forums » Devices evaluations »
LG OPTIMUS L9 (p760)
Added by Anonymous over 11 years ago
Can it be supported by Replicant ?
It does have the minimum requirements in TargetsEvaluation.
It is not "known to be bad" target as explained in TargetsEvaluation.
It is officially supported by Cyanogenmod 10.1 and 10.2 .
It has unlocked bootloader and fastboot mode to flash images.
Kernel sources released and its a GSM phone.
Here is the cyanogenmod wiki page for the device containing links to device and kernel sources.
http://wiki.cyanogenmod.org/w/P760_Info
Replies (11)
RE: LG OPTIMUS L9 (p760) - Added by Paul Kocialkowski over 11 years ago
That definitely looks like a good target. As for the unlocked bootloader and fastboot, I read it is only available after updating the system to jellybean. Is that true or is fastboot usable out of the box?
The modem seems to use AT, so it is possible that the phones meets to requirements to be supported by Replicant. It is not even that expensive, so I might take it as one of my future targets.
RE: LG OPTIMUS L9 (p760) - Added by Anonymous over 11 years ago
Yes, the bootloader is unlockable only after updating the system to stock jelly bean provided by LG. The phone was released with IceCreamSandwich in NOV 2012 with a locked bootloader. In March 2013 it got Jelly Bean update from LG with the ability to unlock bootloader with a single command "adb reboot oem-unlock" (after keeping the device powered on for 1hour).
The device has 4 variants worldwide namely p760, p765, p768, p769.
The P760 and P765 are identical except for the absence of NFC in p765. By now , all variants MUST have got the jelly bean update, so unlocking bootloader shouldn't be a matter i guess.
RE: LG OPTIMUS L9 (p760) - Added by Paul Kocialkowski over 11 years ago
The problem is that we cannot tell people to install the update before switching to Replicant (that would be recommending non-free software).
However, if it's the only way to free the phone, we could mention that the phone needs to have jellybean installed and the bootloader unlocked already to work with Replicant, but I guess many people will ask how to do it, and we cannot provide these instructions. That seems hard to solve.
RE: LG OPTIMUS L9 (p760) - Added by Anonymous over 11 years ago
I think such people asking for instructions will be negligible. Because everyone running custom rom ALMOST will have an unlocked bootloader. And many users with stock rom will have upgraded to jelly bean. Even if they don't they could be noobs (or those who care for warranty) and will try to flash custom rom before ever reaching a project like replicant (which tries to replace propreitary code with open source ones).
We, people at xda could help documenting on how to unlock bootloader if needed. But if its against the rules of this project, it's Ok.
Thanks for your response :)
RE: LG OPTIMUS L9 (p760) - Added by Paul Kocialkowski over 11 years ago
It's not exactly against the rules of the project. If it is a needed step to have a free system running on the phone, it is very important to have that information available!
The problem here is that the unlocking process involves installing and using non-free software (installing the update & starting the LG system to reboot with adb to unlock the bootloader). We cannot provide these steps in our installation guide because it would be encouraging the use of non-free software. However in that particular situation, it is the only possible way to get a free system running on the phone, so it's a tricky one. I'll see what RMS thinks about that case.
RE: LG OPTIMUS L9 (p760) - Added by Paul Kocialkowski over 11 years ago
Here is RMS's answer on that topic:
It is clearly legitimate to install that nonfree upgrade in order to be able to erase the nonfree software.
So it is ok for us to include the instructions on our wiki after all. This a borderline case and the fact that it's the only way to get rid of the non-free Android system makes it ok to install and use non-free software on the phone, according to Richard, and I will follow his views on this one.
RE: LG OPTIMUS L9 (p760) - Added by Anonymous over 11 years ago
That's really good news. I'm excited. :)
RE: LG OPTIMUS L9 (p760) - Added by Anonymous over 11 years ago
I think I can help with this one. I've already run a custom Replicant build on it, but unfortunately loaded with many proprietary pieces. Some of them may not be required, I need to check better, for now just blindly copied every blob included by CM.
I'm currently trying latest CM with a weird setup:
The original unmodified operating system in installed in the internal memory.
There is a small patch in the ramfs that checks for CM or Replicant OS installed in the external SD card, if an OS is found in the SD card, it boots from there instead of the internal one.
This setup allows me to develop and test new things easily and return quickly to the original OS if I need to use the phone just by rebooting and extracting the SD card.
As an extra bonus, I can "ln -s" to the internal memory blobs instead of copying them, this way no proprietary software is actually included in the external OS and can be safely distributed ;)
In this moment I'm busy trying to build the toolchains from source and integrate the toolchain creation in the build scripts. I'm very unhappy with a dependency on the binary blobs distributed by google, compiled by hand and poorly documented procedures, so that's my priority right now. Once I manage to clear this point I will continue testing Replicant port on the L9.
RE: LG OPTIMUS L9 (p760) - Added by Paul Kocialkowski over 11 years ago
1. What do you mean "a custom Replicant build"? Was it really Replicant code you compiled for that device? Then you pushed the blobs?
2. Our system is called Replicant, not Replicant OS ;)
I'm getting more and more interested in this phone anyway. Once we are settled on 4.2 (if ever), It'll probably be one of my first new targets.
RE: LG OPTIMUS L9 (p760) - Added by Anonymous over 11 years ago
It would be very nice!
Heh, I know it is not called "Replicant OS", that phrase means: "the patch checks for either Cyanogenmod or Replicant operating system [unpacked rootfs and system] installed in the SD card". I know my english can be obfuscated sometimes, sorry :(
I was hoping you did't ask about my custom build, but well... ;)
I'll try to explain it. I managed to boot "something" based on 4.0 (before 0005), but it was not very clean. I'm just learning Android internals, never seen nor used an Android device until last month, so it seemed as a good exercise to modify a few things.
First I've tried to compile Replicant using its own tools, for example not using google's prebuilt aapt but the one that is built from the included sources. Looked easy enough, since it is just an utility and not the toolchain... until I've noticed that aapt built from sources compiled correctly but produced invalid results on my 64 bit computer. Looking at the source code I've learned why precompiled binaries are made for 32 bit: bugs and unportable code that expect 32 bits integers.
So, instead of building it for 32 bit, I've started to patch the utilities. Then I've noticed that precompiled binaries are not the same than the ones built from source, they have different options (added or modified by CM patches). The build system uses and seems to install the precompiled binaries in the resulting output SDK, without any CM patches, so for compatibility I've fetched sources from AOSP and use them.
Then I've found libcorkscrew and gave up trying to patch things. At this point some of the tools where patched, some not, some came from AOSP, some where 64 bit and others 32, and then I've just tried to boot "Replicant" or whatever it was in that moment. Of course it didn't boot :)
Started to copy binaries from CM and the default operating system. Script extract-files.sh did not work, for some reason the binaries distributed by CM are not the same than the ones included in my phone's memory, there are a few different file names, missing files and new ones. I've tried a lot of combinations I don't even remember...
At one point I had to change the kernel, the one included with CM did not work, probably because I've taken kernel modules from the default operating system. I've compiled the kernel distributed by LG with the same config used in its default operating system (it was included in the tarball). Had to make a lot of changes to the init.rc and related scripts, created a patched init binary that wrote debug info into a file in the SD card to see what was happening (this was actually surprisingly useful and easy, only had to hook into the ERROR, NOTICE and INFO macros in file system/core/init/log.h). Tried different init binaries (from CM, from the default OS, from my build... don't remember which one finally worked), and a few other binaries I've blindly copied from the internal OS or CM.
It booted. Few second later feezed and I had to hard reboot the phone. At least it was an entertaining experience :P
When 4.2 is ready I'll and start again, hopefully the correct way this time, and try to help with the port (if I can).
Now I'm trying CM, but my goal is not to use it, I wan't to learn about those binary blobs. I still don't know why the ones in my phone are different, and which of them are required. I have not managed to correctly boot latest CM yet (zygote dies), but probably it is because I did something wrong with boot-from-sd-card setup, I'll try again this weekend maybe.
RE: LG OPTIMUS L9 (p760) - Added by Linus Drumbler over 11 years ago
Here's the list of proprietary stuff for this device: https://github.com/CyanogenMod/android_device_lge_p760/blob/cm-10.2/proprietary-files.txt
It looks like we'll be missing GPS, camera, sensors, and possibly audio (no idea why line 16 is commented out).