Error file_contexts not found - OnePlus 3 Questions & Answers

When i was un repacking the system of 4.0.1
I got this error
I used the file_contexts from boot img
Still the same error
Can any one help ?

Related

problem no file_contexts

I have this problem in no recovery file_contexts how can you solve?

Finding file_contexts from stock image

Hello,
After modifying my system.img filesystem, I need to find the adequat file_contexts file for my PixelC to be able repack my system file as an image.
To do so, I opened the boot.img image and extracted the ram disk.
Unfortunately I could not find a file name "file_contexts" but only "plat_file_contexts" or "nonplat_file_contexts" which ended up making the tablet not boot.
Where can I find the appropriate file_contexts for the Pixel C ?
Thank you.
Das Kartoffel said:
Hello,
After modifying my system.img filesystem, I need to find the adequat file_contexts file for my PixelC to be able repack my system file as an image.
To do so, I opened the boot.img image and extracted the ram disk.
Unfortunately I could not find a file name "file_contexts" but only "plat_file_contexts" or "nonplat_file_contexts" which ended up making the tablet not boot.
Where can I find the appropriate file_contexts for the Pixel C ?
Thank you.
Click to expand...
Click to collapse
When you change system.img .. do you remove DM-verity too ?
Otherwise it will never boot.
No need for file_contexts .. just use simg2img tool to make sparse image again ..or keep it as ext4 system.img.
It seems like file_contexts got split between plat_ and nonplat_ from Android 8.0 on. See this: https://source.android.com/security/selinux/compatibility

I can't install room in TWRP

I have a problem with install room in TWRP. When I try to install rom from zip. I paste log here.
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment initialized.
selinux_android_file_context: Error getting file context handle (No such file or directory)
Warning: No file_contextsscript aborted: E3004: This package is for device: g4,p1,h815; this device is .
E3004: This package is for device: g4,p1,h815; this device is .E:unknown command [log]
Proces Updater zakończony z błędem: 7
I have H815 from European distribution.
mateuszko said:
I have a problem with install room in TWRP. When I try to install rom from zip. I paste log here.
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment initialized.
selinux_android_file_context: Error getting file context handle (No such file or directory)
Warning: No file_contextsscript aborted: E3004: This package is for device: g4,p1,h815; this device is .
E3004: This package is for device: g4,p1,h815; this device is .E:unknown command [log]
Proces Updater zakończony z błędem: 7
I have H815 from European distribution.
Click to expand...
Click to collapse
I think in this Rom there are missing Files or this Rom isn´t for your G4 Model.
Have you tried to install an other Rom for testing?
Foto .....
I tried this room aoscp_h815-6.0.0-20180718-official.zip and tried LineageOs rom for H815 too
mateuszko said:
I tried this room aoscp_h815-6.0.0-20180718-official.zip and tried LineageOs rom for H815 too
Click to expand...
Click to collapse
What twrp version. The selinux errors aren't the issue. I believe you are trying to install Oreo with twrp 3.1.1. Correct?
If so, try 3.2.2 (latest official)
mateuszko said:
I have a problem with install room in TWRP. When I try to install rom from zip. I paste log here.
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment initialized.
selinux_android_file_context: Error getting file context handle (No such file or directory)
Warning: No file_contextsscript aborted: E3004: This package is for device: g4,p1,h815; this device is .
E3004: This package is for device: g4,p1,h815; this device is .E:unknown command [log]
Proces Updater zakończony z błędem: 7
I have H815 from European distribution.
Click to expand...
Click to collapse
There is an official TWRP thread.
The log you posted is useless, check my signature on how to get the real log.
Always use the latest available TWRP version.
Sent from my LG-H815 using XDA Labs
I instaled newest TWRP and working. Thanks for help.

TWRP and "No OS installed" and failed to mount /System (Permission denied)

As explained in an other thread i got this issue :
with TWRP-offain and original one downloaded from TWRP website i received this error message after installation attempts of different custom ROMs
No OS installed
I wiped System and Data partition on each A and B slots and then tried to install on each slots some custom ROMs
At the end of each installations i received also this error message :
failed to mount "/System" (Permission denied)
How can i solve the issue ?
updater process ended with ERROR: 1
i have also tried to solve issue installing dm-verity disabler KO again
now when i try to install custom ROMs smartphone returns this error :
updater process ended with ERROR: 1
Error installing zip file "/external SD/name_custom_rom.zip
johnjohnmel said:
i have also tried to solve issue installing dm-verity disabler KO again
now when i try to install custom ROMs smartphone returns this error :
updater process ended with ERROR: 1
Error installing zip file "/external SD/name_custom_rom.zip
Click to expand...
Click to collapse
You need to use this twrp. Then it will work. About twrp errors: just ignore...
I've already used also that TWRP version
twrp-installer-daisy-3.3.0-0-offain.zip
KO
Voodoojonny said:
You need to use this twrp. Then it will work. About twrp errors: just ignore...
Click to expand...
Click to collapse
I started and completed successfully installation of TWRP and custom ROM in a slot, but when i try to change slot i received this error message "Failed to mount /system (permission denied)"
In TWRP > advanced i'm not enable to mount /system partition
How can i solve ?

failed to install LineageOS on Riva

Hello, i want to give a try LineageOS on my Xiaomi Redmi 5A (Riva), i have unlock bootloader and flasing recovery img (twrp), and every file checksum is even. i tried to flash
lineage-17.1-20201020-UNOFFICIAL-riva.zip
Click to expand...
Click to collapse
on my device but i got an error log. sound like problem in selinux. can someone help me?
Code:
I:operation_start: 'Flashing'
Installing zip file '/sdcard1/lineage-17.1-20201020-UNOFFICIAL-riva.zip'
Checking for Digest file...
Unmounting System...
I:Update binary zip
Cannot verify treble package compatibility, must build TWRP in Oreo tree or higher.
I:Extracting updater binary 'META-INF/com/google/android/update-binary'
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment not used in updater.
No path given to file labeling backend
selinux_android_file_context: Error getting file context handle (No such file or directory)
Warning: No file_contextsscript aborted: assert failed: riva.verify_trustzone("TZ.BF.4.0.5-157266")
assert failed: riva.verify_trustzone("TZ.BF.4.0.5-157266") == "1"error: 25
Updater process ended with ERROR: 7
I:Install took 0 second(s).
Error installing zip file '/sdcard1/lineage-17.1-20201020-UNOFFICIAL-riva.zip'
Cvar1984 said:
Hello, i want to give a try LineageOS on my Xiaomi Redmi 5A (Riva), i have unlock bootloader and flasing recovery img (twrp), and every file checksum is even. i tried to flash on my device but i got an error log. sound like problem in selinux. can someone help me?
Click to expand...
Click to collapse
Sounds like wrong twrp recovery
https://forum.xda-developers.com/xi...ent/rom-lineage-os-17-1-t4051339/post81771033

Categories

Resources