E:Unable to unlock /dev/block/mmcblk0* for flashing: (null)

Search This thread

fermi6-626

Member
May 20, 2022
18
1
DEVICE: samsung galaxy f22 sm-e225f (2022)
ANDROID VERSION: 11
TWRP: UNOFFICAL TWRP 3.6.11
VBMETA: disabled
MAGISK INSTALLED before flashing TWRP and flashing using TWRP



I:eek:peration_start: 'Flashing'
Installing zip file '/external_sd/v4afx_v2.7.2.1.zip'
Unmounting System...
I:Update binary zip
Verifying package compatibility...
Package doesn't contain compatibility.zip entry
I:Extracting updater binary 'META-INF/com/google/android/update-binary'
I:Zip does not contain SELinux file_contexts file in its root.
- Mounting /system
mount: mounting /system on /system_root failed: Invalid argument
- Mounting /system_root
- Mounting /vendor
- Device is system-as-root
- Mounting /apex/com.android.apex.cts.shim
- Mounting /apex/com.android.art
- Mounting /apex/com.android.i18n
- Mounting /apex/com.android.runtime
- Mounting /apex/com.android.vndk.v30
- Mounting /apex/com.android.wifi
- Mounting /apex/com.android.adbd
- Mounting /apex/com.android.cellbroadcast
- Mounting /apex/com.android.conscrypt
- Mounting /apex/com.android.extservices
- Mounting /apex/com.android.ipsec
- Mounting /apex/com.android.media
- Mounting /apex/com.android.media.swcodec
- Mounting /apex/com.android.mediaprovider
- Mounting /apex/com.android.neuralnetworks
- Mounting /apex/com.android.os.statsd
- Mounting /apex/com.android.permission
- Mounting /apex/com.android.resolv
- Mounting /apex/com.android.sdkext
- Mounting /apex/com.android.tethering
- Mounting /apex/com.android.tzdata
Archive: /external_sd/v4afx_v2.7.2.1.zip
inflating: module.prop
***********************************************************
ViPER4Android FX
by ViPER520, ZhuHang, Pittvandewitt, MrWhite214, Zackptg5
***********************************************************
*******************
Powered by Magisk
*******************
Archive: /external_sd/v4afx_v2.7.2.1.zip
inflating: customize.sh
**************************************
* MMT Extended by Zackptg5 @ XDA *
**************************************

- Only uninstall is supported in recovery
Uninstalling!
- Unmounting partitions
I:Updater process ended with RC=0
I:Install took 10 second(s).
E:Unable to unlock /dev/block/mmcblk0p4 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p6 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p14 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p13 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p9 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p18 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p42 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p15 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p7 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p5 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p11 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p8 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p10 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0boot0 for flashing: (null)
E:Unable to unlock /dev/block/mmcblk0p12 for flashing: (null)
Updating partition details...
I:checking for twrp app
I:Data backup size is 10663MB, free: 96262MB.
...done
I:Set page: 'flash_done'
I:eek:peration_end - status=0
I:Set page: 'clear_vars'

TRIED:
mount -o rw /dev/block/mmcblk0p42
mount -o rw /dev/block/mmcblk0p14
mount -o rw /dev/block/mmcblk0boot0
ERROR: mount: '/dev/block/mmcblk014' not in fstab
factory reset
wiping data, internal storage, cache, dalvik_cache

[ EDIT: I flashed self-modified nethunter kernel twrp-only flashable zip. And the errors are the same. The flashing shows successful, then those errors pop up. Device boots up normally, and kernel shows "4.14.186-nethunter". I am worried if the flashing didn't correctly succeed. ]
 

Attachments

  • SmartSelect_20220520-142523_Settings.jpg
    SmartSelect_20220520-142523_Settings.jpg
    46.6 KB · Views: 19
Last edited:

fermi6-626

Member
May 20, 2022
18
1
kernel issue. same for mmcblk0 is partially write protected

I don't know what this installer tries to modify on /system on systemless-root, but script is buggy
I'm sorry, I didn't quite understand what you mean. Aren't those logs and kernel.zip sufficient? Do you require any other logs or files?

Despite the kernel issue, why is everything including the changes i made in the kernel is working normally?

Please explain what you meant at your convenience. Thanks!
 

fermi6-626

Member
May 20, 2022
18
1
your dmesg is sufficient log. it shows some errors caused by kernel (post #18)

you could flash stock ROM and see if the errors are gone.
That log was after the error during flashing, E:Unable to unlock /dev/block/mmcblk0 for flashing: (null).

This is the dmesg with modified kernel generated from TWRP without flashing anything and with everything in the TWRP options mounted.

There aren't any error which were in the previous dmesg log

Will there be any problems like unexpected behavior, heating, malfunction... if i keep this kernel installed in the long run? If there's no problem at all, i'd like to leave it as it is, and come back later.
 

aIecxs

Senior Member
Feb 17, 2016
1,888
536
gitlab.com
Figures it's Mediatek SoC lol.. so most of that are Mediatek Secure Boot related partitions. I think Samsung has protected it with TEEGRIS
Code:
E : unlock mmcblk0p42 (uh) failed with 13: Permission denied
E : unlock mmcblk0p11 (nvdata) failed with 13: Permission denied
E : unlock mmcblk0p4 (sec_efs) failed with 13: Permission denied
E : unlock mmcblk0p18 (misc) failed with 13: Permission denied
E : unlock mmcblk0p6 (param) failed with 13: Permission denied
E : unlock mmcblk0boot0 (preloader_a) failed with 13: Permission denied
E : unlock mmcblk0p15 (seccfg) failed with 13: Permission denied
E : unlock mmcblk0p5 (bota) failed with 13: Permission denied
E : unlock mmcblk0p7 (up_param) failed with 13: Permission denied
E : unlock mmcblk0p14 (protect2) failed with 13: Permission denied
E : unlock mmcblk0p10 (nvcfg) failed with 13: Permission denied
E : unlock mmcblk0p8 (expdb) failed with 13: Permission denied
E : unlock mmcblk0p13 (protect1) failed with 13: Permission denied
E : unlock mmcblk0p12 (metadata) failed with 13: Permission denied
E : unlock mmcblk0p9 (frp) failed with 13: Permission denied
 

ansh_/

Member
Apr 18, 2017
24
2
Figures it's Mediatek SoC lol.. so most of that are Mediatek Secure Boot related partitions. I think Samsung has protected it with TEEGRIS
Code:
E : unlock mmcblk0p42 (uh) failed with 13: Permission denied
E : unlock mmcblk0p11 (nvdata) failed with 13: Permission denied
E : unlock mmcblk0p4 (sec_efs) failed with 13: Permission denied
E : unlock mmcblk0p18 (misc) failed with 13: Permission denied
E : unlock mmcblk0p6 (param) failed with 13: Permission denied
E : unlock mmcblk0boot0 (preloader_a) failed with 13: Permission denied
E : unlock mmcblk0p15 (seccfg) failed with 13: Permission denied
E : unlock mmcblk0p5 (bota) failed with 13: Permission denied
E : unlock mmcblk0p7 (up_param) failed with 13: Permission denied
E : unlock mmcblk0p14 (protect2) failed with 13: Permission denied
E : unlock mmcblk0p10 (nvcfg) failed with 13: Permission denied
E : unlock mmcblk0p8 (expdb) failed with 13: Permission denied
E : unlock mmcblk0p13 (protect1) failed with 13: Permission denied
E : unlock mmcblk0p12 (metadata) failed with 13: Permission denied
E : unlock mmcblk0p9 (frp) failed with 13: Permission denied
Do you know a way to unlock these partitions for mediatek device so that i can flash something using twrp we have been trying to fix
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    you are the creator of that flashable zip, only you can know what you're doing.

    all I can see from the incomplete log you provided you're trying to install v4afx_v2.7.2.1.zip from TWRP regardless it must flashed from Magisk. you said this is just example, so I am not spending time in analyzing v4afx_v2.7.2.1.zip and figuring out what it does.

    if you get similar error about Unable to unlock mmcblk0 for flashing for each and every flashable zip, it's probably not an issue with the zip itself.

    the error means some operation was unable to unlock partition for flashing. it's lacking context, so you should provide recovery.log at least
    1
    you are the creator of that flashable zip, only you can know what you're doing.

    all I can see from the incomplete log you provided you're trying to install v4afx_v2.7.2.1.zip from TWRP regardless it must flashed from Magisk. you said this is just example, so I am not spending time in analyzing v4afx_v2.7.2.1.zip and figuring out what it does.

    if you get similar error about Unable to unlock mmcblk0 for flashing for each and every flashable zip, it's probably not an issue with the zip itself.

    the error means some operation was unable to unlock partition for flashing. it's lacking context, so you should provide recovery.log at least
    twrp log and dmesg log
    1
    regarding kernel:

    that one failed, probably because (1) device is dynamic partitions read-only, or (2) script is not handling /system_root/system correctly
    Code:
    - Target Image: /dev/block/mmcblk0p36
    - Copying firmware to /system/etc/firmware

    that part succeed, unrelated to the below error messages
    Code:
    - Flashed new bootimage
    - Boot image patching complete

    This looks like a bug in TWRP, please claim it to TWRP maintainer, or just ignore it
    Code:
    E:Unable to unlock /dev/block/mmcblk0p42 for flashing: (null)
    1
    that error is in Magisk for same partitions as in TWRP, therefore it's not a bug in TWRP. maybe it's not even an error at all, can be ignored
    Code:
    E : unlock mmcblk0p42 failed with 13: Permission denied
    E : unlock mmcblk0p11 failed with 13: Permission denied
    E : unlock mmcblk0p4 failed with 13: Permission denied
    E : unlock mmcblk0p18 failed with 13: Permission denied
    E : unlock mmcblk0p6 failed with 13: Permission denied
    E : unlock mmcblk0boot0 failed with 13: Permission denied
    E : unlock mmcblk0p15 failed with 13: Permission denied
    E : unlock mmcblk0p5 failed with 13: Permission denied
    E : unlock mmcblk0p7 failed with 13: Permission denied
    E : unlock mmcblk0p14 failed with 13: Permission denied
    E : unlock mmcblk0p10 failed with 13: Permission denied
    E : unlock mmcblk0p8 failed with 13: Permission denied
    E : unlock mmcblk0p13 failed with 13: Permission denied
    E : unlock mmcblk0 failed with 13: Permission denied
    E : unlock mmcblk0p12 failed with 13: Permission denied
    E : unlock mmcblk0p9 failed with 13: Permission denied
    1
    this is the kernel i've managed to flash successfully but with errors demonstrated above, which is completely out of my comprehension. Can you check it for errors? any help will be greatly appreciated.
    regarding /system/etc/firmware
    you are using anykernel wrong, I think it should be $SYSTEM/etc/firmware at least (not sure about the read-only ext4-dedup/logical partitions, though)

    maybe @osm0sis will help you out

    edit: unrelated to anykernel