TeamWin / android_device_xiaomi_olive

Xiaomi Redmi 8 TWRP Device tree
7 stars 10 forks source link

nano throwing errors and possible corruption #3

Open FONZACUS opened 2 years ago

FONZACUS commented 2 years ago

Device codename: olive TWRP version: 3.5.2_9

WHAT STEPS WILL REPRODUCE THE PROBLEM?

my redmi8 is using stock A9, but with crdroid A11 full custom. IIRC recoveries currently support A10 (seems to be issue with mounting system and magisk? not mounting works normally) advanced > filemanager > edit = nano any file

WHAT IS THE EXPECTED RESULT?

being able to edit a file in recovery mode (with mounted parts)

WHAT HAPPENS INSTEAD?

throws many errors, advanced > copylogs dont catch them. its prolly related to runtime files. for me it does cause a bootloop somehow corrupting a file, if its an important system file OFC.

ADDITIONAL INFORMATION

oldstable 3.4.x used to work just fine (with mounts and magisk, though it was also an old version of it). IMHO it was just a whim when i tried it a few days ago and just remembered to post an issue. just in case, yep im using magisk 23 with only hide, no other module

/tmp/recovery.log: dmesg: not much info recorded in logs https://drive.google.com/file/d/1WH4Mfx-A2Q-c-bjHrbkLJ_PjGA_Cfr11/view?usp=sharing

bigbiff commented 2 years ago

Do you have screenshots of the error?

FONZACUS commented 2 years ago

sorry nope, i guess recording with another phone should be used right? is it possible to dump the buffer as a log?

what i did recently discovered was not mounting system before editing does seem to work, and not corrupt the file as copying it over with a mounted system doesnt bootloop. i guess this is on magisk? IIRC they do have a different view when using magisk and custom recoveries?

what i did catch was many runtime files 'mistakes', dont know what that means. the text below shows the last of many. it might also hide even more important errors at the top. this was just opening a file with edit on external > nano.txt

[ Reading File ] 86 lines ] GNU nano 2.9.1 +++/system_build.prop [ Mistakes in '/system/etc/nano/markdown.nanorc' ] ^G Get Help ^O Write Out ^W Where Is ^K Cut Text ^X Exit ^R Read File ^\ Replace ^U Uncut Text # begin common build properties # autogenerated by build/make/tools/buildinfo_common.shro.system.build.date=Wed Aug 11 17:42:09 UTC 2021 ro.system.build.date.utc=1628703729 ro.system.build.fingerprint=Xiaomi/olive/olive:10/QKQ1$ro.system.build.id=RQ3A.210805.001.A1 ro.system.build.tags=release-keys ro.system.build.type=userdebug ro.system.build.version.incremental=eng.root.20210811.$ro.system.build.version.release=11 ro.system.build.version.release_or_codename=11 ro.system.build.version.sdk=30 ro.product.system.brand=Xiaomi ro.product.system.device=olive ro.product.system.manufacturer=Xiaomi ro.product.system.model=Redmi 8 ro.product.system.name=lineage_olive # end common build properties # begin build properties[ line 1/87 (1%), col 1/1 (100%), char 0/2879 (0%) ]Modified nano "/external_sd/nano.txt" # begin common build properties # autogenerated by build/make/tools/buildinfo_common.sh=Wed Aug 11 17:42:09 UTC 2021date.utc=1628703729fingerprint=Xiaomi/olive/olive:10/QKQ1$id=RQ3A.210805.001.A1ags=release-keystype=userdebugincremental=eng.root.20210811.$=11release_or_codename=11 ro.system.build.version.sdk=30brand=Xiaomidevice=oliveanufacturer=Xiaomimodel=Redmi 8 ro.product.system.name=lineage_olive # end common build properties 

if it is on magisk, sorry for taking your time

ive also noticed it made a temp backup "file.name" appended with .save and .save.1. the .save is empty whereas the .1 has 'nano "/dir/file"'.

bigbiff commented 2 years ago

What version of android are you using? Does system come from a super based LVM partition? If so that is mounted R/O and files are not editable in TWRP.

If you are just editing system without mounting the underlying partition/LVM block device, you are just editing files in the TWRP ramdisk.

FONZACUS commented 2 years ago

my base is a9, but with crdroid a11. i havent used more advanced features like lvm/f2fs etc. https://forum.xda-developers.com/t/rom-los-11-0-official-olive-crdroid-v7-10-for-redmi-8.4299817/

iirc most custom roms are generally running as a sar. when first launching twrp id always swipe to allow modification.

editing without mounting system picks up the runtime files in nano, and without temp.backups.saves then, mount system causes the bug during editing but without mounting, editing the files do work fine, and can be copied over after were done editing the files with a mounted system

i dont fully understand how magisk works, but the lvm part does seem like what magisk is systemlessly rooting

id honestly consider it as super low priority, it seems its not a widely used feature most people know of recently moved, no wonder i didnt see it on a not logged in browser, sorry