yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S7 Questions and Answers] sumurtugu:
A while back I installed an Official ROM on my S7 (I had the Greek Rom and I installed the UK one in order to get Android 8. I wanted to know if I still get system updates (since its an official Rom) and of not, would I have to install a newer version of the Rom to get any updates.
[Xiaomi Redmi Note 5 Pro Questions & Answers] csm1n:
Disclaimer: I come from the LG D802 world so I have no idea what antirb, dm-verity, authorization code or other strange protections are. Back then, any soft/hard brick could have been simply fixed by putting the phone in download mode and flashing the original software. So here I'm a bit scared to mess with the phone. I googled up all these questions, but mostly got contradictory answers so I decided to make a thread here trying to address everything.

For all the following scenarios, we'll consider that we're running the latest global MIUI with antirb = 4 (MIUI v10.0.1 OEIMIFH)

SCENARIO 1:

Let's say I want to gain root access with the original ROM (in my case: MIUI v10.0.1 OEIMIFH with antirb = 4). I understand that I have to:

1. fastboot into some custom recovery (let's say orangefox)

2. reflash redwolf from recovery

3. flash magisk

4. reboot into system

Now I should have root access, right? What about if I want to make changes to the /system partition now? From what I understand, there is a dm-verity check that detects changes to the /system partition and bootloops the phone if found. So, am I safe or not to make changes? (eg: flash youtube vanced, edit hosts, remove system apps, edit configuration files, etc)

SCENARIO 2:

I read somewhere that in order to disable all /system integrity checks, I'll have to reflash MIUI through orangefox and it will auto-patch out those checks. So, for instance, I want to flash the latest weekly xiaomi.eu ROM. (which AFAIK is China developer based and might interfere with the antirb check). The steps should be:

1. download the ROM

2. look into the .zip file and remove the firmware update script (is this necessary or orangefox will take care of it ???)

3. copy to sd

4. wipe cache, dalvik and /data (without /system and /persist)

5. flash through orangefox

6. flash magisk

7. reboot to system. done???

Now I should be able to make all sorts of changes to the phone (/system partition) without bootlooping or whatever?

SCENARIO 3:

Let's say I want to flash RR (or any other custom ROM). The instructions say that I need to have a NON-ARB firmware. What does it mean? How do I flash a NON-ARB FW if I'm on ARB 4 without bricking my phone?

SCENARIO 4:

Let's say that somehow I managed to flash a custom ROM. How can I go back to the original MIUI without bricking/losing the unlocked bootloader? Is miflash enough?

Unrelated questions:

1. How to make the custom recovery permanent? (is booting into recovery + twrp reflash enough ???)

2. Will OTA's brick my phone? (the phone being twrp'ed + magisk'ed)

3. Will OTA's remove my custom recovery?

4. What is lazyflasher and when does it have to be flashed? (or is it still required?)

5. Is it possible that the bootloader will get relocked by mistake?

6. What are the advantages of redwolf/orangefox compared to vanilla twrp?

I'd appreciate if somebody could take time to explain the steps and answer my questions (especially those from scenario 3) because I'm pretty sure there are many other users as confused as me regarding all this xiaomi flashing policy.
[Xiaomi Redmi Note 5 Pro Questions & Answers] SunilSuni:
Scenario 3 : No you don't have to flash any firmware as you are already in latest miui version

Non ARB is for those people who is using anti3 ROM and don't want to upgrade to anti4 ROM

Just flash RR ROM without flashing any firmware file

Scenario 4 : yes using MiFlash just flash fastboot ROM or else just flash recovery ROM from custom recovery

There won't be any chances of bricking if you use MiFlash software because MiFlash checks bootloader index before flashing fastboot ROM, to be safer side always flash latest available MIUI ROM

xiaomi.eu is not a official ROM you can get official ROM from en.miui.com

To make custom recovery permanent just flash lazy flasher

No OTA will not brick your device

Yes if you flash full recovery ROM then custom ROM will be replaced by mi recovery but you can avoid this by flashing lazy flasher

No there is no chances of bootloader lock with OTA update, to lock bootloader you have to flash fastboot ROM using MiFlash software and you have to select clean all and lock option
[Xiaomi Redmi Note 5 Pro Questions & Answers] csm1n:
Thank you, I finally start to understand how this phone works.

Now I have 1 more question: what about that dm verity thing? I don't feel yet ready to go to a full custom rom so I'd like to try out xiaomi.eu rom first because I understand that it is based on the chinese version of miui which comes with extra features. Will messing around with /system partion bootloop my phone? (due to the dm verity thing)
[Xiaomi Redmi Note 5 Pro Questions & Answers] SunilSuni:
All the edited options will be over written by newly flashed ROM.

I don't know much about Dm Verity but you can flash lazy flasher to avoid dm Verity

Hopefully you will find your answer here https://xdaforums.com/android/software-hacking/zip-lazyflasher-tool-flashing-custom-t3549210
[Xiaomi Redmi Note 5 Pro Questions & Answers] raptorddd:
had a G2 long time.

dm verity you can flash after installing TWRP flash file called lazyflasher or use orange fox recovery and no need to do anything. just flash and forget.

also try masik rom
[Xiaomi Redmi Note 5 Pro Questions & Answers] Remig83:
I'm a newbie myself. Can I ask a few questions too?

1. If I want to root (miui 10) and install some mods, what's the best way to backup my current rom before rooting?

2. If I change my ROM to a custom ROM, how can I flash back my current ROM with OTA?

Thanks
[Xiaomi Redmi Note 5 Pro Questions & Answers] SunilSuni:
1. TWRP Backup or ADB backup

2. You can return to stock MIUI ROM by flashing fastboot ROM using MiFlash (Recommended) or by flashing MIUI Recovery ROM
[JAMin, XDA Neo, S200 ROM Development] chriskay:
how can i modify registry keys such as htccpl in any rom kitchen? possible at all? or are they always related to the htccpl.cpl in the windows folder? how to modify that one then?

i just can't modify or delete them in neokit.

cheers.
[JAMin, XDA Neo, S200 ROM Development] Cloudyfa:
Some in reg, some in provxml :) Check your PM for more detail, friend !
[JAMin, XDA Neo, S200 ROM Development] chriskay:
yeah, thanks, mate! i found all entries i need in those provxml files! great stuff!!

now i am almost done with all modifications reverting everything back to "original".

any ideas how to change "hidden" status of a single file? i want to make the templates for notes and office visible.

cheers!
[JAMin, XDA Neo, S200 ROM Development] rondol1:
I'm not sure what you are talking about, but I do like the word "original".... If you are done, is it worth sharing?
[JAMin, XDA Neo, S200 ROM Development] chriskay:
well, as i stated in cloudyfa's thread, i am not a friend of too heavily customized roms even though most of them look pretty cool. everyone is individual and has a different taste. therefore i really liked korand's contribution. unfortunately there were still some minor flaws, such as an incorrect wm6 sound scheme (as i believe), which i could not figure out to fix.

but with cloudyfa's rom providing wpa2 and showing no signs of bugs so far, i just could not resist making my own close-to-originally-offical wm6.1 rom, because no-one seemed to respond to my appeal of making a truely clean version. so i took the challenge myself... :) and it was quite some lesson and a lot of fun, however, i still do not consider myself a rom cook (yet).

and "yes", i will share it if cloudyfa does not mind and if i will not encounter any problems while testing my "creation" at the moment. i only need to figure something out about user customization. maybe you have an idea since i could not find anything specific on my question:

if uc is enabled, will it still be possible to run autorun from extended rom even though it would be redundant? because there is still the registry key set for autorun destination on extended rom. or can i delete it? or should i leave it for some kind of "dual autorun mode" :)?

cheerio.
[JAMin, XDA Neo, S200 ROM Development] varanusvincent:
yups, you can still run some application from extende rom.

At windows folder, you will find config.txt . You have to give some command on it.

The command there, is just a RST ( Reset ) . But If you give a command first, it will install some cabs. It all command from AutoRun

This is some command

LOCK: Enable

CAB: \Extended_ROM\TCPMP.CAB

CAB: \Extended_ROM\Cabs\ABCD.CAB

LOCK: Disabled

RST: Reset

the command will install TCPMP.cab and ABCD.cab

share at XDA is always a good one.

:)
[JAMin, XDA Neo, S200 ROM Development] l3v5y:
With Cloudyfas ROM, there is a provxml file that sets the keys for AutoRun to somewhere in the windows directory. You will have to remove/alter that for autorun from the storage card.

The point of AutoRun is to allow you to install cabs etc before the user can really use the ROM. UC is to provide users with a faster way to set up the ROM. The two can and should co exist.
[JAMin, XDA Neo, S200 ROM Development] chriskay:
so if i got it correctly: putting the common command lines of the extended rom autorun PLUS the command lines of sdautorun into this single config.txt file would make the device boot and install from both locations one by one?

so, what are your recommendations about the registry key:

[HKEY_LOCAL_MACHINE\Comm]

"TurnRadioFlag"=dword:0

"AutoRunCFG"="\\Extended_ROM\\config.txt"

"AutoRun"="\\Extended_ROM\\autorun.exe"

leave it or kill it?? :cool:

edit: decided to remove it due to its complete redundancy. it is uc already... now i am close to finishing. :)

edited edit: put it back in. i think it won't hurt and maybe someone still needs it.

cheerio.
[JAMin, XDA Neo, S200 ROM Development] l3v5y:
One of Cloudyfas ProvXML files overwrites that, so it is completely redundant!

It's called mxipupdate_zz_oemoperators_102_CheckAutorun.provxml

You can look at it and see what it does.
[JAMin, XDA Neo, S200 ROM Development] l3v5y:
The two AutoRun files (SDConfig.txt and Config.txt) are separate files that run independently. The point of UC is User Customization. All you need to do is make sure SDAutoRun.exe is in \Windows and that the last line of your config.txt file is

EXEC:\Windows\SDAutoRun.exe

That is all that is needed for it to run.
[JAMin, XDA Neo, S200 ROM Development] chriskay:
ok. removed the redundant entries. i was just thinking there might be some way of a "dual boot". but actually this is rubbish. so i leave it as uc as it is.
[JAMin, XDA Neo, S200 ROM Development] l3v5y:
The point of UC is that the two are seperate. Everything can be achieved with just one of the two systems, but with UC, you (the chef) can install cabs, and the user can install tweaks etc.
[OnePlus X Q&A, Help & Troubleshooting] psychem:
can some dev post the method to make roms like [MENTION=4335373]hunfatal[/MENTION] it will be easier to bring other roms to this device. im sure a lot of users would be interested in using variety of roms
[OnePlus X Q&A, Help & Troubleshooting] Marado:
https://www.google.pt/search?source...i19k1j0i22i30i19k1j0i22i10i30k1.0.f0TyAkeA2NU

google is your friend...

you have to learn by yourself if you have no one that teaches you... I learned myself too...

4 essential things:

1- rom source

2-device tree

3- device kernel

4-device vendor
[OnePlus X Q&A, Help & Troubleshooting] psychem:
how do u integrate security patches?
[OnePlus X Q&A, Help & Troubleshooting] Marado:
Security patches are integrated when you update the source with "Repo sync"...

on older versions like lollipop or marshmallow don´t know never tried it..

maybe with git pull or git merge...
[OnePlus X Q&A, Help & Troubleshooting] psychem:
what if the source hasnt been updated? like hunfatal was updating RR before LOS was updated by YM
[OnePlus X Q&A, Help & Troubleshooting] Marado:
You can send a pm to [MENTION=4335373]hunfatal[/MENTION], he will certainly respond your questions....

but RR is based on lineage, so their source is synchronized. ;)
[OnePlus X Q&A, Help & Troubleshooting] psychem:
:good: I left a msg on his thread. He wants to keep it a secret :angel:
[OnePlus X Q&A, Help & Troubleshooting] Marado:
Send pm to him...

I could build a rom, but Yumemichi is doing a great job, then i´m focusing my energy

on a great custom kernel for onyx...:silly:
[OnePlus X Q&A, Help & Troubleshooting] psychem:
looking forward to the kernel!
[OnePlus X Q&A, Help & Troubleshooting] Marado:
It´s a kernel like many others...:crying:

but did you already build a rom or not? just ask if you have any questions...
[OnePlus X Q&A, Help & Troubleshooting] psychem:
will do it over the weekend when i have free time. will ask then
[OnePlus X Q&A, Help & Troubleshooting] cd247:
I have tried most of the custom ROMs available for onyx but I always had to switch back to stock because I faced one common issues in all ROMs : heavy app like snapchat, amazon, Instagram, etc stops working in some time and I have to reopen that app to continue might be because:

>> Its not allowing more CPU usage or might be I need to change Kernel

or

>> device get uncertified after installing custom ROM so version of apps from playstore are not stable or compatible with device

or

>> Some problem with patching WebView with G-Apps

I am just guessing the reasons but you can guide me with possible solution to help my experience with customized ROMs more smoother on OPX
[OnePlus X Q&A, Help & Troubleshooting] Marado:
Have no idea... But i know that Snapchat was app problem, i think with the last update is working...

other apps i dont know...
[OnePlus X Q&A, Help & Troubleshooting] psychem:
[MENTION=6369510]Marado[/MENTION]
[MENTION=7093179]YumeMichi[/MENTION]
[MENTION=4335373]hunfatal[/MENTION]

i was trying to build but got into some problems

i overwrote this symlink file when i was trying to solve the errors below - manifest.xml from /root/android/lineage/.repo/ . how do i get it back?

errors were

root@mx:~/android/lineage# repo init -u https://github.com/YumeMichi/kernel_oneplus_onyx.git -b lineage-16.0
From https://github.com/YumeMichi/kernel_oneplus_onyx
+ 0419ab9712e...975fdef3f0e cm-14.1 -> origin/cm-14.1 (forced update)
+ 954e6772a58...4e6c6a06b1e cm-14.1-sultan -> origin/cm-14.1-sultan (forced update)
+ 3e184d8da6c...c87e54b532b lineage-15.1-sultan -> origin/lineage-15.1-sultan (forced update)
+ 5b3dca0a275...674e2f500b0 lineage-16.0 -> origin/lineage-16.0 (forced update)
.repo/manifests/: discarding 23 commits
fatal: manifest 'default.xml' not available
fatal: manifest default.xml not found

root@mx:~/android/lineage# breakfast onyx
including vendor/lineage/vendorsetup.sh
build/make/core/product_config.mk:234: error: Can not locate config makefile for product "lineage_onyx".
11:42:12 dumpvars failed with: exit status 1
Device onyx not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS).
Found repository: android_device_oneplus_onyx
Traceback (most recent call last):
File "vendor/lineage/build/tools/roomservice.py", line 258, in <module>
default_revision = get_default_revision()
File "vendor/lineage/build/tools/roomservice.py", line 114, in get_default_revision
m = ElementTree.parse(".repo/manifest.xml")
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1182, in parse
tree.parse(source, parser)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 647, in parse
source = open(source, "rb")
IOError: [Errno 2] No such file or directory: '.repo/manifest.xml'
build/make/core/product_config.mk:234: error: Can not locate config makefile for product "lineage_onyx".
11:42:14 dumpvars failed with: exit status 1
build/make/core/product_config.mk:234: error: Can not locate config makefile for product "lineage_onyx".
11:42:14 dumpvars failed with: exit status 1

** Don't have a product spec for: 'lineage_onyx'
** Do you have the right repo manifest?
[OnePlus X Q&A, Help & Troubleshooting] Kéno40:
Whoa !!

For Pie ?

Great news ! You can PM me for testing !
[OnePlus X Q&A, Help & Troubleshooting] Marado:
[MENTION=4302880]psychem[/MENTION] you are building Lineageos?

---------- Post added at 12:17 PM ---------- Previous post was at 12:15 PM ----------

I will release it for everybody testing....:silly:
[OnePlus X Q&A, Help & Troubleshooting] psychem:
trying to.
[OnePlus X Q&A, Help & Troubleshooting] Marado:
try repo sync again...
[OnePlus X Q&A, Help & Troubleshooting] psychem:
root@mx:~/android/lineage# repo sync
Traceback (most recent call last):
File "/root/android/lineage/.repo/repo/main.py", line 531, in <module>
_Main(sys.argv[1:])
File "/root/android/lineage/.repo/repo/main.py", line 507, in _Main
result = repo._Run(argv) or 0
File "/root/android/lineage/.repo/repo/main.py", line 158, in _Run
copts, cargs = cmd.OptionParser.parse_args(argv)
File "/root/android/lineage/.repo/repo/command.py", line 67, in OptionParser
self._Options(self._optparse)
File "/root/android/lineage/.repo/repo/subcmds/sync.py", line 189, in _Options
self.jobs = self.manifest.default.sync_j
File "/root/android/lineage/.repo/repo/manifest_xml.py", line 360, in default
self._Load()
File "/root/android/lineage/.repo/repo/manifest_xml.py", line 407, in _Load
self.manifestProject.worktree))
File "/root/android/lineage/.repo/repo/manifest_xml.py", line 443, in _ParseManifestXml
root = xml.dom.minidom.parse(path)
File "/usr/lib/python2.7/xml/dom/minidom.py", line 1918, in parse
return expatbuilder.parse(file)
File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 922, in parse
fp = open(file, 'rb')
IOError: [Errno 2] No such file or directory: '/root/android/lineage/.repo/manifest.xml'
[OnePlus X Q&A, Help & Troubleshooting] Marado:
you have the repo bin folder inside Lineage source folder?

if yes delete it, and open terminal in desktop and place it there...

you´re using yumemichi´s sources right? the easiest way to build is download the sources direct from yume github, place in lineage source "device" "kernel" and "vendor", change the makefiles in device folder (in this case there is no need because yumemichi source is for lineage too) and brunch onyx....

In this way you don´t need to mess with manifest files (that is probably what you did) and if they´re wrong is a pain to sync back the source...
[OnePlus X Q&A, Help & Troubleshooting] Marado:
export CROSS_COMPILE=/home/thinkmachine/android/los17/ubertc/arm-linux-androideabi/

that´s wrong...

you should have bin folder inside ubertc folder.

export CROSS_COMPILE=/home/thinkmachine/android/los17/ubertc/bin/arm-linux-androideabi-

like this.:good:
[OnePlus X Q&A, Help & Troubleshooting] psychem:
$ make -j16
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/generated/uapi/linux/version.h
CC scripts/mod/empty.o
/home/thinkmachine/android/los17/ubertc/bin/../libexec/gcc/arm-linux-androideabi/4.9.4/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
make[2]: *** [scripts/Makefile.build:308: scripts/mod/empty.o] Error 1
make[1]: *** [scripts/Makefile.build:443: scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:531: scripts] Error 2
make: *** Waiting for unfinished jobs....
[OnePlus X Q&A, Help & Troubleshooting] Marado:
come on.... just google the errors instead of asking everything....

sudo apt-get update

sudo apt-get install libmpfr4

And then when it said that libmpfr4 was already at its latest version, just to be sure:

sudo apt-get install --reinstall libmpfr4
[OnePlus X Q&A, Help & Troubleshooting] psychem:
there are so many solutions to every error, some work some don't.

i installed libmpfr4-dev package, that was the only one available in synaptic, it didn't work. apt-get gave below results.

$ sudo apt-get install libmpfr4
[sudo] password for thinkmachine:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libmpfr4

the machine already has libmpfr6 installed.
[OnePlus X Q&A, Help & Troubleshooting] Marado:
Try this:

sudo apt-get update -y

sudo apt-get install -y libmpfr4

if dont work create a simbolic link..

sudo ln -s /usr/lib/x86_64-linux-gnu/libmpfr.so.6 /usr/lib/x86_64-linux-gnu/libmpfr.so.4

and recompile...
[OnePlus X Q&A, Help & Troubleshooting] psychem:
symbolic link worked but same problem while compiling kernel

LD drivers/usb/gadget/g_android.o
LD drivers/usb/gadget/built-in.o
make[1]: *** [scripts/Makefile.build:443: drivers/usb] Error 2
make[1]: *** Waiting for unfinished jobs....
LD drivers/staging/prima/wlan.o
LD drivers/staging/prima/built-in.o
LD drivers/staging/built-in.o
make: *** [Makefile:979: drivers] Error 2
[OnePlus X Q&A, Help & Troubleshooting] psychem:
[MENTION=7093179]YumeMichi[/MENTION] a recent commit was causing kernel build error. i fixed it by deleting the commit.

now getting an error.

[ 79% 57731/72760] build out/target/product/onyx/obj/ETC/vendor_file_contexts_intermediates/vendor_f
FAILED: out/target/product/onyx/obj/ETC/vendor_file_contexts_intermediates/vendor_file_contexts
/bin/bash -c "(m4 --fatal-warnings -s system/sepolicy/vendor/file_contexts out/target/product/onyx/obj/ETC/sectxfile_nl_intermediates/sectxfile_nl device/qcom/sepolicy-legacy/common/file_contexts out/target/product/onyx/obj/ETC/sectxfile_nl_intermediates/sectxfile_nl device/qcom/sepolicy-legacy/msm8974/file_contexts out/target/product/onyx/obj/ETC/sectxfile_nl_intermediates/sectxfile_nl device/qcom/sepolicy-legacy/test/file_contexts out/target/product/onyx/obj/ETC/sectxfile_nl_intermediates/sectxfile_nl device/qcom/sepolicy-legacy/legacy-common/file_contexts out/target/product/onyx/obj/ETC/sectxfile_nl_intermediates/sectxfile_nl device/lineage/sepolicy/qcom/vendor/file_contexts out/target/product/onyx/obj/ETC/sectxfile_nl_intermediates/sectxfile_nl device/oneplus/onyx/sepolicy/file_contexts out/target/product/onyx/obj/ETC/sectxfile_nl_intermediates/sectxfile_nl device/lineage/sepolicy/common/vendor/file_contexts out/target/product/onyx/obj/ETC/sectxfile_nl_intermediates/sectxfile_nl > out/target/product/onyx/obj/ETC/vendor_file_contexts_intermediates/vendor_file_contexts.tmp ) && re(out/host/linux-x86/bin/checkfc out/target/product/onyx/obj/ETC/sepolicy_intermediates/sepolicy out/target/product/onyx/obj/ETC/vendor_file_contexts_intermediates/vendor_file_contexts.tmp ) && (out/host/linux-x86/bin/fc_sort out/target/product/onyx/obj/ETC/vendor_file_contexts_intermediates/vendor_file_contexts.tmp out/target/product/onyx/obj/ETC/vendor_file_contexts_intermediates/vendor_file_contexts )"
libsepol.context_from_record: type sysfs_disk_stat is not defined
libsepol.context_from_record: could not create context structure
out/target/product/onyx/obj/ETC/vendor_file_contexts_intermediates/vendor_file_contexts.tmp: line 1001 has invalid context u:object_r:sysfs_disk_stat:s0
libsepol.context_from_record: type sysfs_disk_stat is not defined
libsepol.context_from_record: could not create context structure
out/target/product/onyx/obj/ETC/vendor_file_contexts_intermediates/vendor_file_contexts.tmp: line 1001 has invalid context u:object_r:sysfs_disk_stat:s0
Error: could not load context file from out/target/product/onyx/obj/ETC/vendor_file_contexts_intermediates/vendor_file_contexts.tmp
13:20:33 ninja failed with: exit status 1

#### failed to build some targets (55:37 (mm:ss)) ####
[OnePlus X Q&A, Help & Troubleshooting] psychem:
[MENTION=7093179]YumeMichi[/MENTION] [MENTION=6369510]Marado[/MENTION]

Any fix?
[OnePlus X Q&A, Help & Troubleshooting] YumeMichi:
https://github.com/LineageOS/androi...mmit/a80660e898bde8c697ebb28a70d54b895e814f66