English

Porting LineageOS to FP2

lineageos
Tags: #<Tag:0x00007fefbd91af28>

#125

Just FYI the Calibration tool isn’t easily installed because the tool needs to be installed as privileged system app which can only be done by the manufacturer/rom maker or with root permissions. But yes, a flashable zip should be possible (but that’s also possible with a non-open source .apk)


#126

Actually will the tool be enough?
FP OS 17.04.8 had the tool, but the OS wasn’t able to use the data provided by the tool if I understood it right.


#127

Hey everyone,

Finally got a new screen and found time to test the latest source. First impression was that it runs better than some of the stock ROMs I’ve used in the past. Great work!

That being said, I did run into some issues after using it for a few days.

  1. Pairing Bluetooth can crash the device. It first becomes unresponsive and eventually reboots. I can reproduce it by running the pairing wizard in the Pebble app with a Pebble Time. I’ll look into it, but pointers in the right direction are welcome in case you’ve already observed.

Logcat: https://pastebin.com/rGd2YC3Q

  1. Some (probably related) battery drain that occurs occasionally. Couldn’t pinpoint it yet but the phone gets really hot. So most likely a process that runs into some kind of loop.

Cheers


#128

Out of curiosity I’m checking out LineageOS at the moment, so far thumbs up :+1: .
But FM radio doesn’t work for me. I wiped my phone, had to format data because of encryption, and then installed lineage_FP2-ota-2017-06-14.zip, modem-17.06.4.zip and open_gapps-arm-7.1-pico-20170715.zip via TWRP.

The stock App is giving me “Process failed. If the problem persists, please turn FM off and on.”
Turning it off and on doesn’t help. I also tried forcing turn off and clearing App data and cache in Settings. Restarting the phone doesn’t help either.
And earphones are connected as antenna, as it prompts for this if they aren’t (so at least the earphone connection gets detected).

To check whether it is perhaps the App’s fault, I also tried SpiritF (free Open Source Spirit2 FM) from here, which doesn’t work, too …

Now what to do?


#129

I started the encryption process, then the Android robot showed up for a moment, followed by an immediate reboot and a bootloop as far as the LineageOS booting animation.

What did I do wrong?


#130

Are you aware of this thread?

Perhaps using a newer Version could help to solve the problem. Also there is the posibility to have OTA Updates.


#131

This has to be with the data partition filesystem and not with Lineage OS itself. Encryption doesn’t work for you in Fairphone OS or Open, neither. I have the same issue. Check the bug report: https://bugtracker.fairphone.com/project/fairphone-fairphone-os-android-6/issue/9


#132

FM radio works fine here. And I have the same image installed as you did.
Just without gapps.


#133

But it did, I came here from an encrypted Fairphone Open OS :wink: .
Before I installed LineageOS for the first time, I only wiped the phone and hoped for the best, but upon first booting after installing LineageOS the encryption complained about my password being correct but the data being corrupt, hence my formatting of data (mentioned in my FM Radio post above) before I installed LineageOS again and it worked.

Anyway … I now formatted data again and restored a TWRP backup from before trying to encrypt and currently MyPhoneExplorer is restoring Internal Storage (needs some time because of GBs of downloaded Osmand maps, any form of upcoming FP3 could use USB3.0 :slight_smile: ).

Will perhaps have a look at the OTA thread and this old possible workaround mentioned in the bug report discussion later.

Edit: Oh, look who ran into something similar before :slight_smile: … Perhaps forgetful me should try that again.


#134

Thanks for confirming this.

Ok, I don’t know what the pico package I installed would have to mess around in these parts, but that’s a valuable hint. I could try installing again without it or change the order next time and install the fresh modem files after Open GApps.


#135

I don’t think, that gapps has to do anything with this. But this is the difference.
I have f-droid privileged extension and microg flashed.

Are you able to calibrate your compass? The skymap app says, that my
compass is not calibrated correctly. But I am not able to calibrate it within
the app. I can see the compass moving in the satstat app, but I am not sure,
if it is correct. I have a Xperia Z1 here with lineage. There is the same behaviour.


#136

Funny thing, that. In Fairphone Open OS, my compass was always pointing in the wrong direction when I initially started any map App, some few seconds of swinging around for calibrating always fixed this. I thought perhaps the magnets in my flip case would cause this, but …

Now in LineageOS my compass is showing the correct direction since I installed (and now restored) it, I didn’t have to calibrate it once.

GASP! The rumours were true, Android really seems to be a proper mess :smiley:


Poll: Lineage OS or FPOOS Android 6?
#137

So, I destroyed the LUKS header of userdata, formatted and resized data in TWRP, but still no luck with encrypting LineageOS afterwards :frowning: .

Did the same things again and restored Fairphone Open OS 17.06.4 from a TWRP backup to establish 2 things:

  1. FM Radio does work in the current Fairphone Open OS (I checked, because I last used it back in Android 5).

  2. @Roboe: Fairphone Open OS has once again happily encrypted my data partition, at least both the OS and TWRP want my password and seemingly decrypt the data.

I will restore my Internal Storage for now and continue using Open OS for the time being.
When I have some time again, I will try to set the phone back to the state it was delivered in and then try to install LineageOS from scratch.


Poll: Lineage OS or FPOOS Android 6?
Does Encryption work with Lineage OS?
Foodora App logs me out instantly
#138

Quick update on the Bluetooth issue:

  • Still reproducible when running the initial setup in the Pebble app. The phone does not instantly crash or freeze. Instead the Pebble app seems to continue the devices search just fine until I try to leave the app, open the statusbar or lock the screen.
  • Other BT devices seem to work fine (mostly tested with my BT headphones) BUT I also realized that my Pebble is trying to connect in LE mode. This could make the difference.

I also managed to get better logs. The errors I saw on my initial logcat were WiFi related…
logcat: https://pastebin.com/fQYNBi4B
Kernel: https://pastebin.com/10x2NeN3

Unfortunately nothing too obvious in there. But I’ll keep digging.


#139

The answer is simpler than expected: Privacy Guard

Bluetooth LE was indeed the reason why other devices worked just fine. More specifically, Android requires the ACCESS_COARSE_LOCATION permission to perform BTLE scans. While ACCESS_FINE_LOCATION was allowed for the Pebble app in Privacy Guard, ACCESS_COARSE_LOCATION was set to ‘always ask’ - just that the permission pop-up never appeared. Once I set ACCESS_COARSE_LOCATION to ‘allow’ (or disable Privacy Guard for the app) and everything works.

I’m wondering if this is a potential LineageOS bug, since the pop-up to request coarse location never appears. And I’m surprised that ACCESS_COARSE_LOCATION needs to be granted specifically while ACCESS_FINE_LOCATION is already available. I’ll try to write a small test app to reproduce the problem and get a clearer picture.

Anton


#140

I wonder why Android needs location access at all if you want to do a BTLE scan.


#141

I just did a factory reset from within Fairphone Open OS thinking it would reset my phone to a somewhat near initial state … wrong, OS and TWRP are the same and encryption is still there, only every other user-related stuff is gone and the OS starts with the initial setup.
Dear diary, “factory reset” nowadays seems to be a funny thing not 100% related to the term I once knew, I’m feeling old :slight_smile:
So I wiped everything in TWRP and formatted data again to get rid of the encryption.

This time I installed the newer LineageOS build from over at the OTA thread like @sky suggested, and indeed, FM Radio and encryption do work.
Awesome :+1:!


Does Encryption work with Lineage OS?
Flashing LineageOS is not working
Cannot reinstall Fairphone OS or Fairphone Open OS - only Lineage
Foodora App logs me out instantly
#142

There are lineageos repos now for fairphone:



Code review is done through gerrit as usual:
https://review.lineageos.org/

It is not yet an official device with nightlies.

What is missing?

  • CVE updates
  • more code review
  • switch to a better kernel source at some point (maybe not a showstopper, but would be good)

LineageOS 14.1 with OTA updates for FP2
LineageOS 14.1 with OTA updates for FP2
#143

Getting the FP2 listed as an official device and official builds are a goal though? Just wondering because of the we-are-fairphone OTA etc.
Currently waiting for that, so I do get the “official” OTAs from the beginning.


#144

Yup: The OTA server is doing the building for now (and swithing to the official repo) and when it’s official device I’ll make 2 migration zips to hop on the official release without a factory reset.