Blackphone 2 - bootloop after rw mount using TWRP

Search This thread

polartux

Member
Dec 10, 2016
35
19
Hello, I have a question regarding strange behaviour after running TWRP on BP2 (Blackphone 2).

TWRP image: twrp-3.0.2-0-bp2.img
System version: Silent OS 2.0.8 RC4 (Lollipop 5.1.1, LMY47V)
Device model: BP2H001RW1


When I boot TWRP for a first time, it asks me "Keep System Read only?" and I always choose "Keep Read only".

When I mount /system in a ro mode, reboot and have my system working fine as previously.
But once I remount /system with rw privileges and unmount it even without touching files, I reboot and have a forever bootloop.

I even tried this to test:
Code:
mount /system -o remount,rw && umount /system && reboot

Yes, it goes bootloop after that.
So, everytime I mount /system with rw flag, there is something in the stock ROM that is tracking ext4 flags for mount count or last mount time and preventing the system from booting.
The only way to fix it is to write original system.img again using dd or TWRP "Install image".
I reproduced it multiple times and confirm that you don't need to modify any files, only a mount with rw permissions and unmount is enough in order to break it.

Is it some kind of protection? Any thoughts how to bypass this issue?
 
Last edited:

androidblue

Member
Mar 24, 2013
42
46
Hello, I have a question regarding strange behaviour after running TWRP on BP2 (Blackphone 2).

TWRP image: twrp-3.0.2-0-bp2.img
System version: Silent OS 2.0.8 RC4 (Lollipop 5.1.1, LMY47V)
Device model: BP2H001RW1


When I boot TWRP for a first time, it asks me "Keep System Read only?" and I always choose "Keep Read only".

When I mount /system in a ro mode, reboot and have my system working fine as previously.
But once I remount /system with rw privileges and unmount it even without touching files, I reboot and have a forever bootloop.

I even tried this to test:
Code:
mount /system -o remount,rw && umount /system && reboot

Yes, it goes bootloop after that.
So, everytime I mount /system with rw flag, there is something in the stock ROM that is tracking ext4 flags for mount count or last mount time and preventing the system from booting.
The only way to fix it is to write original system.img again using dd or TWRP "Install image".
I reproduced it multiple times and confirm that you don't need to modify any files, only a mount with rw permissions and unmount is enough in order to break it.

Is it some kind of protection? Any thoughts how to bypass this issue?


Hi there
a simple google search always helps:

System read only option: Devices that ship with 5.0 and higher as their initial OS are using block level OTA updates. With this style of OTA update, the update script checks to see if the system partition has ever been mounted read/write. Further, the script also usually runs an SHA sum of the entire system partition to detect if any changes have been made. If any changes have been made, the OTA update will refuse to install. Since not all OEMs and devices have factory images available, we have created a new feature in TWRP that detects if the system partition has ever been mounted read/write. If not, you will be prompted asking if you want TWRP to mount system as read/write. If you choose not to allow TWRP to mount as read/write, TWRP won’t prompt to install SuperSU and TWRP won’t try to patch the stock ROM to prevent TWRP from being replaced by stock recovery. The goal of this option is to hopefully allow the user to make a raw system image backup that they can use to get back to a state where they can take OTA updates again.


I think that it means is that when you try to re-boot the system the OS check and when it discovers it does not match the checksum it stops from loading.
 
  • Like
Reactions: polartux

polartux

Member
Dec 10, 2016
35
19
Could someone elaborate about that checksum script? Where is it usually kept , which block device, how to bypass it? Any info could be useful there.
 

kch79624

New member
Jan 18, 2017
1
0
Hello, I have a question regarding strange behaviour after running TWRP on BP2 (Blackphone 2).

TWRP image: twrp-3.0.2-0-bp2.img
System version: Silent OS 2.0.8 RC4 (Lollipop 5.1.1, LMY47V)
Device model: BP2H001RW1


When I boot TWRP for a first time, it asks me "Keep System Read only?" and I always choose "Keep Read only".

When I mount /system in a ro mode, reboot and have my system working fine as previously.
But once I remount /system with rw privileges and unmount it even without touching files, I reboot and have a forever bootloop.

I even tried this to test:
Code:
mount /system -o remount,rw && umount /system && reboot

Yes, it goes bootloop after that.
So, everytime I mount /system with rw flag, there is something in the stock ROM that is tracking ext4 flags for mount count or last mount time and preventing the system from booting.
The only way to fix it is to write original system.img again using dd or TWRP "Install image".
I reproduced it multiple times and confirm that you don't need to modify any files, only a mount with rw permissions and unmount is enough in order to break it.

Is it some kind of protection? Any thoughts how to bypass this issue?

Maybe It's because of the dm-verity (verified boot). I also had the same issue.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hello, I have a question regarding strange behaviour after running TWRP on BP2 (Blackphone 2).

    TWRP image: twrp-3.0.2-0-bp2.img
    System version: Silent OS 2.0.8 RC4 (Lollipop 5.1.1, LMY47V)
    Device model: BP2H001RW1


    When I boot TWRP for a first time, it asks me "Keep System Read only?" and I always choose "Keep Read only".

    When I mount /system in a ro mode, reboot and have my system working fine as previously.
    But once I remount /system with rw privileges and unmount it even without touching files, I reboot and have a forever bootloop.

    I even tried this to test:
    Code:
    mount /system -o remount,rw && umount /system && reboot

    Yes, it goes bootloop after that.
    So, everytime I mount /system with rw flag, there is something in the stock ROM that is tracking ext4 flags for mount count or last mount time and preventing the system from booting.
    The only way to fix it is to write original system.img again using dd or TWRP "Install image".
    I reproduced it multiple times and confirm that you don't need to modify any files, only a mount with rw permissions and unmount is enough in order to break it.

    Is it some kind of protection? Any thoughts how to bypass this issue?


    Hi there
    a simple google search always helps:

    System read only option: Devices that ship with 5.0 and higher as their initial OS are using block level OTA updates. With this style of OTA update, the update script checks to see if the system partition has ever been mounted read/write. Further, the script also usually runs an SHA sum of the entire system partition to detect if any changes have been made. If any changes have been made, the OTA update will refuse to install. Since not all OEMs and devices have factory images available, we have created a new feature in TWRP that detects if the system partition has ever been mounted read/write. If not, you will be prompted asking if you want TWRP to mount system as read/write. If you choose not to allow TWRP to mount as read/write, TWRP won’t prompt to install SuperSU and TWRP won’t try to patch the stock ROM to prevent TWRP from being replaced by stock recovery. The goal of this option is to hopefully allow the user to make a raw system image backup that they can use to get back to a state where they can take OTA updates again.


    I think that it means is that when you try to re-boot the system the OS check and when it discovers it does not match the checksum it stops from loading.