Using LineageOS on the FP2

I’m lost somewhere…
I downloaded the microG Services Core apk (0.2.4-92) from the repo , then within Amaze with root access moved the .apk file to /system/priv-app , then rebooted the phone.
However, now I don’t have anymore the button “MicroG settings” and I cannot find a hint that it’s well installed.

In the /system/priv-app folder there are only apps contained in folders, do I have to create one as well for MicroG ?

Hi QED,
Exactly as it says. You’re trying to flash LineageOS on top of your old (FP?) OS. That’s not possible. You need to first wipe/factory reset your device. Of course you will lose all data when you do this.

Yup, worked out just fine after I wiped via TWRP :slight_smile:

1 Like

I don’t think you will have to create a folder for microG. I am only using UnifiedNlp, however, with only the apk file within the /system/priv-app/ folder, everything works fine…

127|FP2:/system/priv-app $ ls
AudioFX CMUpdater ContactsProvider DownloadProvider InputDevices MtpDocumentsProvider Settings StorageManager VpnDialogs
BackupRestoreConfirmation CalendarProvider CtsShimPrivPrebuilt EmergencyInfo LineageSetupWizard NetworkLocation.apk SettingsProvider SystemUI WallpaperCropper
BlockedNumberProvider CallLogBackup CustomTiles ExtServices LiveLockScreenService OneTimeInitializer SharedStorageBackup TeleService WeatherManagerService
CMAudioService CarrierConfig DefaultContainerService ExternalStorageProvider ManagedProvisioning PackageInstaller Shell Telecom WeatherProvider
CMParts CellBroadcastReceiver Dialer FusedLocation MediaProvider ProxyHandler Snap TelephonyProvider qcrilmsgtunnel
CMSettingsProvider Contacts DocumentsUI Gallery2 MmsService Recorder StatementService Trebuchet
FP2:/system/priv-app $ exit

Can you make sure that the microG Services Core apk is actually present in /system/priv-app/ ? If you know how adb works, the following commands should do in a terminal…

sudo adb shell
su mount -o rw,remount /system
cd system/priv-app/
ls

For the people who want OTA updates:

4 Likes

This is great work! Thanks for this!
I tried it out yesterday and ran into some issues. I followed the instructions for installation when coming from FPOOS, i.e. I upgraded TWRP (which went well), then flashed the modem and recent Lineage zip, after wiping everything. The OS booted up, but then I went into problems with the setup wizard: it kept crashing after I connected to Wifi. I also tried to skip this, same thing. Others have suggested elsewhere that it might be related to SD cards, so I removed it, and still had the same. I tried back and forth, flashed lineage again, and after some fairly random poking around, it did not crash and let me finish the setup. Unfortunately, then I found that SIM card slot #2 does not work properly: it recognizes that there is a SIM card, but doesn’t ask for my PIN, nor does it find any networks. This is absolutely crucial for me, because my SIM card slot #1 is broken (i.e. I can’t even try to swap SIMs). I went back to FPOOS 17.04 for now.
Cheers, Roman

It’s weird because some people have problems with a SIM in slot 2 and some don’t with Lineage. But the phone of @chrmhoffmann does the same thing so hopefully he’ll be able to fix it.

Wow this is really great! Thanks!!

It’s working great for me, and for the biggest part more user friendly than fp open os which I was using until I flashed last week. I don’t understand programming very well so I’ll give feedback in my lay language and hope it’s helpful :wink:

The only bug that is bothering me, is when i’m calling (via normal phone app as well as whatsapp); the screen goes black until the other party disconnects. During the call there is nothing I can do to disconnect, which can be pretty nasty if you don’t want to leave a 2 mins long voicemail on someones box ;). I think this probably has to do something with the proximity sensor? Is there something I can change in the settings so that I can turn on the screen during calls, for instance with the on-off button?

Overall, this port is a great work! My LAN integration isn’t very fine, because of
the wrong MAC. But for now I can deal with it.

Did you get UnifiedNLP (nogapps) to work? The self check shows no binding with the
system.

I hope the FP devs will get the proximity calibration tool into F-droid.

Hi, I don’t know if this works with Lineage, but there is the setting:
Go to Settings --> Accessibility and activate “Power button ends calls”.

Actually the screen should not get dark as long as your ear stays away from the phone during a phone call.

@rkennke , do you have the modem files 4436.1.FP2-0-01 (from Fairphone OS 17.05.2) installed?

A post was merged into an existing topic: Porting LineageOS to FP2

UnifiedNLP (nogapps) works like a charm here…

I installed it following the installation instructions that can be found on github:

  1. Download NetworkLocation.apk

  2. Mount /system read-write: from your PC, call
    adb root && adb remount

  3. Copy NetworkLocation.apk to /system/priv-app: from your PC, call
    adb push NetworkLocation.apk /system/priv-app/NetworkLocation.apk

  4. Reboot: from your PC, call
    adb reboot

3 Likes

So you must do it over adb? Copying with Amaze with root permissions does not do the same, even when it shows the apk in place? But direct support like CM had would be better. It would survive an OTA update. Otherwise you have to do this procedure every time.

I’m not quite sure why it does not seem to work if you simply copy the apk to /system/priv-apps/ with Amaze with root permissions… I never tried that. But @oli.sax had a similar problem with the microG Services Core apk.

Yes that could be that the “adb way” is required… I’ll try out and let you know :slight_smile:

On the github page they mention also a patch, but I didn’t understand if this patch is for the APK (when building it?) or for the OS (to fix permission?)

Admittedly, the instructions are a bit confusing. But if I understand them correctly, the patch is not needed when installing to /system/priv-apps/ via adb :slight_smile:

Thanks for the tip! Practical workaround :slight_smile:

@Gerry it turns black immediately when it starts dialing, so before the phone hits my face.

UnifiedNLP works with the adb method.

2 Likes

This issue could be fixed in Fairphone OS 17.05.2. A hint from the respective release notes:

Fixed the proximity sensor calibration data not taken into account

Source

Hopefully the latest modem files have this patch included. Which modem files do you use currently?

I believe the Fairphone community which works on a Lineage OS port for Fairphone 2 should team up with the Fairphone OS developers to get such patches first-hand.