System encrypted, /dev/block is read-only

Search This thread

Deltwin

Member
Sep 25, 2022
25
3
root
Hi, I have a redmi note 9 that I wanted to mod but I had a lot of problems modding it. I initially installed crDroid 8.7 but the control center animation was lagging and the battery drains fast, so I decided to change the ROM with Project Elixir (Android 12 all ROMs). I saw that crDroid 8.9 came out (September 22, 2022) and there had been some notable changes, as the battery did not run out anymore the animations were fluid, but i was not able to get working google apps.

I tried everything and it wasn't right. (Nik, OpenGapps, MTG nothing) indeed I installed the gapps I had on 8.7 and them didn't work .. So I decided to move to pixel experience android 12 but I had these problems:

On all the roms that I have installed (except I think MIUI) the system is encrypted. I tried flashing a zip, via commands, via recovery but nothing the system is encrypted. I can't access it and in addition I wanted to change the bootanimation but I can't move the zip because it says it's read only and following these commands too I couldn't do it:

adb root adb disable-verity adb reboot adb remount adb shell mount -o rw,remount /system for these commands i also used ADB Sideload (ofc) but also some zips

It says the /dev /<number>/block is read-only and I have not been able to unlock it. (I tried with all these recoveries: TWRP, SHRP (SkyHawk, OrangeFox [UNOFFICIAL but is only for A11]). (If I go from TWRP to sdcard / I have all the files encrypted. I have the phone rooted with magisk.

In addition, I also had problems formatting the phone because the system with both TWRP and SHRP was not deleted or if I restarted the phone after formatting the ROM would open again so to format it I used Pixel Experience which has worked very well so far.
 

Mr Hassan

Account currently disabled
Feb 14, 2016
935
57
OnePlus 10 Pro
But custom rom already have ability to rw
Anyway you're lucky there thread available google it like
Universal method to get rw
 

Deltwin

Member
Sep 25, 2022
25
3
root
Idk. I have installed Project Elixir, crDroid and this Pixel Experience and are encrypted.
I already googled it....
 

Deltwin

Member
Sep 25, 2022
25
3
root
And how i can modify the boot animation? Files are encrypted and the zip is in /system/product/media/.zip
 

VD171

Senior Member
Jun 21, 2012
2,853
2
2,102
127.0.0.1
LG K10
Samsung Galaxy J7
/dev/ and /system/ are not same.
Stock MIUI is system read-only.
If you want to mount system as read-write, you need "universal mount system r/w" by @lebigmac
 
  • Haha
Reactions: lebigmac

Deltwin

Member
Sep 25, 2022
25
3
root
Ok so tried flashing systemrw_flashable (Universal RW) with sideload bcs i have crypted files.
This is the error that it gave me:

Extracting ...
There was an error extracting the file. Please install unzip and try again.

I tried flashing with SHRP (TWRP based) bcs twrp can't work with adb sideload (for me).

Edit: searched on xda the problem, i installed the BusyBox module in magisk (From Fox Modules Manager) but nothing to do, still same error.
 
Last edited:
  • Haha
Reactions: lebigmac

lebigmac

Account currently disabled
Jan 31, 2017
1,206
813
Oh ok, it will work on A12?
it should start up if you comment out the checkSDK() function in the script itself.
Not sure if you can sideload it probably not. Just execute it like any other script (runnable in both Android and recovery) or flash it like any other flashable zip in recovery.

Keep in mind I'm working on a new version that should fix some issues. Just need to make sure it works perfect on multiple devices b4 I release it...

If you can't get my script to work and you're too impatient to wait for the new version to be released then you could try some of the copycat imitations. There's a couple of those floating around here... Good luck!(y)
 
Last edited:

Mr Hassan

Account currently disabled
Feb 14, 2016
935
57
OnePlus 10 Pro
it should start up if you comment out the checkSDK() function in the script itself.
Not sure if you can sideload it probably not. Just execute it like any other script (runnable in both Android and recovery) or flash it like any other flashable zip in recovery.

Keep in mind I'm working on a new version that should fix some issues. Just need to make sure it works perfect on multiple devices b4 I release it...

If you can't get my script to work and you're too impatient to wait for the new version to be released then you could try some of the copycat imitations. There's a couple of those floating around here... Good luck!(y)
But how can be you make sure without some beta testers you neef guys like me and this op who have device in hand to test it and give you feedback
 
  • Like
Reactions: lebigmac

Deltwin

Member
Sep 25, 2022
25
3
root
it should start up if you comment out the checkSDK() function in the script itself.
Not sure if you can sideload it probably not. Just execute it like any other script (runnable in both Android and recovery) or flash it like any other flashable zip in recovery.

Keep in mind I'm working on a new version that should fix some issues. Just need to make sure it works perfect on multiple devices b4 I release it...

If you can't get my script to work and you're too impatient to wait for the new version to be released then you could try some of the copycat imitations. There's a couple of those floating around here... Good luck!(y)
Oh so it cant work in sideload... Good tip if it will work u made a very good script
 

lebigmac

Account currently disabled
Jan 31, 2017
1,206
813
To be honest I've never used this sideload feature before... What are the advantages of sideloading versus flashing the .zip as usual?

But how can be you make sure without some beta testers you neef guys like me and this op who have device in hand to test it and give you feedback
That's a good idea. I should release an open beta before releasing the final program.
That way we can make sure it works on as many devices as possible :)(y)
 

Mr Hassan

Account currently disabled
Feb 14, 2016
935
57
OnePlus 10 Pro
To be honest I've never used this sideload feature before... What are the advantages of sideloading versus flashing the .zip as usual?


That's a good idea. I should release an open beta before releasing the final program.
That way we can make sure it works on as many devices as possible :)(y)
Thanks for appreciating the idea
Hope we'll get beta soon but is there any idea date how many days still need to release it

Ok let me show my progress
I make my vendor sys odm to ext4
And ser the logs according to logs
I have rw now

OnePlus8:/ # mount | grep "dm-0"
/dev/block/dm-0 on / type ext4 (rw,seclabel,relatime)
OnePlus8:/ # mount | grep "dm-19"
/dev/block/dm-19 on / type ext4 (rw,seclabel,relatime)
OnePlus8:/ # mount | grep "dm-3"

But the weird thing is still not able to edit
Any file in these parts.
 

Deltwin

Member
Sep 25, 2022
25
3
root
it should start up if you comment out the checkSDK() function in the script itself.
Not sure if you can sideload it probably not. Just execute it like any other script (runnable in both Android and recovery) or flash it like any other flashable zip in recovery.

Keep in mind I'm working on a new version that should fix some issues. Just need to make sure it works perfect on multiple devices b4 I release it...

If you can't get my script to work and you're too impatient to wait for the new version to be released then you could try some of the copycat imitations. There's a couple of those floating around here... Good luck!(y)
How i can run ur script directly from android?
Like on magisk?
 

lebigmac

Account currently disabled
Jan 31, 2017
1,206
813
How i can run ur script directly from android?
Like on magisk?
Hi. Please check the Manual Installation and Examples section of the thread in my signature ;)(y)
And if you're running Android 12+ don't forget to disable the sdkCheck() function in the systemrw.sh script file @ line # 425 like this #sdkCheck
It should work if your only problem is the shared_blocks read-only feature. If your device got the new erofs read-only protection feature then you must wait for next version of my script or try your luck one of the copycat imitations that are floating around.
Good luck! (y)
 

Deltwin

Member
Sep 25, 2022
25
3
root
So after an hard brick at work (so i leaved it for 5 hours with redmi logo on lol) and after many steps i reinstalled MIUI with root... it's running A11 so how i can install it? I need to disable the sdkCheck? I think no if you need it on A12...

Second question i need to flash it before the first boot or i can do it after the first boot?
 

lebigmac

Account currently disabled
Jan 31, 2017
1,206
813
So after an hard brick at work (so i leaved it for 5 hours with redmi logo on lol) and after many steps i reinstalled MIUI with root... it's running A11 so how i can install it? I need to disable the sdkCheck? I think no if you need it on A12...

Second question i need to flash it before the first boot or i can do it after the first boot?
I thought hard bricks were unrecoverable? :unsure:

If your Xiaomi device is running Android 10 or 11 then you don't need to disable the sdkCheck() function in my old script.
Ok here are all the necessary steps in chronological order for you ;)(y)
  • unlock bootloader
  • flash stock ROM
  • install systemrw_1.32
  • root
  • debloat
  • customize
  • enjoy :love:
 
Last edited:

Deltwin

Member
Sep 25, 2022
25
3
root
No it's possible, i tought not but here i am with my redmi note 9..
jk apart i unbrick with SP Flash tool but i had other problems like NVRAM warning (it fixed automatically with updates idk lol..) and the IMEI was deleted but fortunately i had a flashable backup..

I need to flash the stock rom? I have pixel experience with A12/13

Edit: I tried to flash it (i have the file on the microSD) but it gave me this error:

There was an error extracting the file. Please install unzip and try again.
 
Last edited:

lebigmac

Account currently disabled
Jan 31, 2017
1,206
813
Well my script was designed for stock A10, A11 ROMs ( or A12 if you're lucky and your device only uses the infamous shared_blocks read-only feature + you must disable sdkCheck() function in script itself ) but I don't see why it shouldn't work on a custom ROM as well ;)

Ok let me try this again but only because it's you :)
  • Boot phone into Android OS and make sure it's properly rooted
  • download the systemrw_1.32_BUNDLE_proper.zip and extract it
  • extract the systemrw_1.32_flashable.zip
  • copy the systemrw_1.32 folder into /data/local/tmp/ on your phone
  • open adb shell or terminal app and type
Bash:
adb shell
su
cd /data/local/tmp/systemrw_1.32
chmod +x ./systemrw.sh
./systemrw.sh in=`realpath /dev/block/by-name/super` size=50

Good luck!🍀 (y)
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    /dev/ and /system/ are not same.
    Stock MIUI is system read-only.
    If you want to mount system as read-write, you need "universal mount system r/w" by @lebigmac
    1
    Ok so tried flashing systemrw_flashable (Universal RW) with sideload bcs i have crypted files.
    This is the error that it gave me:

    Extracting ...
    There was an error extracting the file. Please install unzip and try again.

    I tried flashing with SHRP (TWRP based) bcs twrp can't work with adb sideload (for me).

    Edit: searched on xda the problem, i installed the BusyBox module in magisk (From Fox Modules Manager) but nothing to do, still same error.
    1
    it should start up if you comment out the checkSDK() function in the script itself.
    Not sure if you can sideload it probably not. Just execute it like any other script (runnable in both Android and recovery) or flash it like any other flashable zip in recovery.

    Keep in mind I'm working on a new version that should fix some issues. Just need to make sure it works perfect on multiple devices b4 I release it...

    If you can't get my script to work and you're too impatient to wait for the new version to be released then you could try some of the copycat imitations. There's a couple of those floating around here... Good luck!(y)
    But how can be you make sure without some beta testers you neef guys like me and this op who have device in hand to test it and give you feedback
    1
    tried

    1665437078452.png

    Edit: my fault I had the wrong line of code ..

    New image:

    1665437376104.png


    It's all correct?

    Edit 2: I rebooted the phone, tried to delete the file bootanimation.zip (from the data/product/media folder) but it doesn't delete it. :(
    1
    tried

    View attachment 5731625
    Edit: my fault I had the wrong line of code ..

    New image:

    View attachment 5731627

    It's all correct?

    Edit 2: I rebooted the phone, tried to delete the file bootanimation.zip (from the data/product/media folder) but it doesn't delete it. :(
    Looks like you're also victim of erofs