TWRP 3.1.1-1 boot issue

I tried to install the 20171016 build using the OTA updater, but it didn’t work. The phone rebooted but got stuck on the following screen:

The device is encrypted, so usually it asks for the password when booting to TWRP, but in this case it didn’t.

The device got very hot, so I switched it off after some time.

Any idea what I could try now?

Edit 1 - Solution: In addition to the encrypted device I am using an SD card as adopted storage. The solution was to move the data from SD card to internal storage and then remove the SD card.

In case anyone has the same problem, here are the steps:

  1. Delete data from SD card (of course make a backup first!) like photos, videos, offline map data etc. until the remaining data fits into the internal storage.
  2. Go to Settings > Storage > Internal shared storage. From the menu on the top right select Migrate data and migrate the data to the internal storage.
  3. Go to Settings > Storage > SD card > Apps. If there are any apps, move them to the internal storage.
  4. Go to Settings > Storage > SD card and select Eject from the menu on the top right.
  5. Remove the SD card.
  6. Booting into TWRP should work now.

[details=Alternative solution]Edit 2 - Final solution: Edit 3: It seems something went wrong when only 1 partition was created, so this solution usually doesn’t work (see here).

[quote="_Chris, post:28, topic:34370"]
I finally found the cause of the problem with the adopted storage:

The SD card was formatted as external storage before formatting it as adopted storage. As a side effect there was a remaining small 17 MB partition in addition to the adopted storage partition on SD card.

The solution is to delete all partitions before formatting an SD card as adopted storage. This way there is only the adopted storage partition on SD card and TWRP doesn’t get “confused” any more by multiple partitions.

So finally I am able to boot into TWRP using an encrypted device with adopted storage :slight_smile:
[/quote][/details]

If you can boot into TWRP, just install the LineageOS ZIP file via TWRP.
If you can’t boot into TWRP, just flash TWRP again.

I never use the updater (because I’m in TWRP anyway backing up the system before updating).

Thanks, but the problem is that I can’t boot into TWRP.
I tried it again after switching the phone off, but it didn’t work.
I also reinstalled TWRP, but it didn’t help either.

Hmmm … you could try booting a signed TWRP image without flashing it …

https://forum.fairphone.com/t/howto-use-twrp-without-flashing-it-e-g-for-backup/23747

Where do I get a signed TWRP?

I have seen the signed TWRP images from here, but they are too old (and I didn’t fully understand the linked instructions about how to sign an image).

Why that? New batch Fairphone 2?

Yes, sorry I should have mentioned it. I get only a bluescreen with TWRP 3.1.1-0.

Too bad :frowning: … Ok, two ideas …

  1. PM @retsifp whether he could be so nice and sign the current TWRP image and upload it.

  2. Back to flashing … Try “fastboot erase recovery” before flashing TWRP again. I’m a big fan of wiping partitions when things go wrong :slight_smile:

Another question: I wonder what the updater did before rebooting? And if this somehow can be undone? (TWRP worked before)

This didn’t solve the problem.

I will do this,

Thanks for trying to help :slight_smile:

I looked into this on Windows and got me a signed current TWRP image that fastboot boots on my phone (yes, I’m surprised myself). Here goes … and you don’t have to bother with the whole key stuff, we’ll just download some :wink:

  • Install Java (if not already installed).
  • Make (or look for) a directory to put stuff into.
  • Download BootSignature.jar from @z3ntu’s place to the directory (URL found here).
  • Download SignApk.zip (found here), from SignApk.zip extract the two files testkey.pk8 and testkey.x509.pem to the directory (or just extract the whole ZIP, doesn’t matter).
  • Download the current TWRP image from here to the directory (or copy it there if you got it already).
  • Open a command line (Start - Run - cmd) and cd your way into the directory.
  • In the directory execute the following command (one line assuming twrp-3.1.1-1-fp2.img as the unsigned image filename):

java -jar BootSignature.jar /boot twrp-3.1.1-1-fp2.img testkey.pk8 testkey.x509.pem twrp-3.1.1-1-fp2-signed.img

  • If you want, you can make sure only the signature was appended to the original image and nothing else was changed by comparing the two images e.g. with WinMerge.

Et voilà! Have fun fastboot booting your signed TWRP image on your phone.

2 Likes

For reference: I have a guide on my blog which should work on Linux/macOS: https://z3ntu.github.io/2017/06/16/Signing-boot-images.html

1 Like

twrp-3.1.1-1-fp2-signed.img is now here.
Sorry, I was aware of a new version but thought that the “ota_fix” version from @z3ntu already included the new drivers - which was obviously not the case.

3 Likes

Unfortunately the problem is the same when booting the signed TWRP image without flashing it.[quote=“_Chris, post:260, topic:29441”]
Another question: I wonder what the updater did before rebooting? And if this somehow can be undone?
[/quote]
TWRP needs to know that the new LineageOS should be flashed and I wonder where this info is stored? Maybe deleting this info could help?

Does it boot at least?

Same as before - it got stuck on the image I posted above

LineageOS still works, so I am able to use the phone, but I am not able to update any more using the OTA update.

Moved this to another topic as not all encrypted LineageOS users experience this (not me for example). Also seems localized to TWRP.

Thanks for moving it :slight_smile:

Do you know where the updater stores the information for TWRP?

On the seperate “/misc” partition if I’m correct. @z3ntu is the maintainer of TWRP, so maybe he can better answer this.

How long have you waited at the splash screen? Apparently it might take some minutes (for whatever reason).

15 minutes or so - I think this should be sufficient?