Not possible to change system files after updating to Oreo... - HTC 10 Questions & Answers

HTC 10, S-Off, Android 8.0, Magisk 16. After moving to Oreo I can't change system files. So AdAway (changing hosts file) doesn't work. I even can't mute boot sound. Is there any way to solve this problem?

You can read the instructions to Magisk and anything else you're using.
What's the point of running Magisk if you're going to change /system? That's what "modify system systemless-ly" means.
Why aren't you asking this in the Magisk subforum?

Related

Android 7.0 & /etc/hosts

/etc/hosts blacklist entries seem to be ignored with Android 7.0 (e.g. adding 127.0.0.1 amazon.com still allows me to reach amazon.com). Is anyone else experiencing something similar or familiar with any gotchas around Android 7.0 and modifying /system/etc/hosts?
I'm running official Nexus 5X Android 7.0 build number NRD90R. I have an engineering build of android that I boot from as follows to modify my /system/etc/hosts file:
adb reboot-bootloader
fastboot boot my-recovery.img
<mount from phone menu>
adb remount
adb push my-hosts system/etc/hosts
adb shell
chmod 644 system/etc/hosts
exit
<reboot from phone menu>
I've been using this process after every OTA update since Android 6.0, and it's been working. I also noticed that I'm not getting the red warning on boot any more (the one you get after you modify anything on the system partition), just the yellow warning (the one you get from having phone unlocked). Maybe I did something wrong ¯\_(ツ)_/¯ but I could sure use a sanity check.
Could be related to java cache, after a modification to hosts file you should reboot to let the cache reload. Try it.
The OS is not booted when editing hosts since it's being edited from a recovery image with the system mounted into it. The last step is to reboot. I did reboot the phone again for good measure and it's still not working. If it is a cache related thing, it lives through reboot. I suspect it's not though as I was seeing ads in news websites that I do not frequent.
Any other thoughts?
Are you using chrome? Did you disable data saver option in chrome?
Sent from my SHIELD Tablet K1 using Tapatalk
Seems to be related to: http://forum.xda-developers.com/nex...oid-nougat-t3445647/post68737720#post68737720 . Basically the files that one would modify by mounting /system are no longer used, afaict.
When I boot a live image, mount the system partition, and make a modification (i.e. /system/etc/hosts), that change is persisted through a reboot back to the live image and remount. However, it's not loaded by the OS when it boots. Instead both /etc/hosts and /system/etc/hosts are unmodified. Odd, and why is there even anything mounted at /system? I'm not sure if there are multiple system partitions or what's going on. I would love to find some information about Android 7.0 that explains.
crashenx said:
Seems to be related to: http://forum.xda-developers.com/nex...oid-nougat-t3445647/post68737720#post68737720 . Basically the files that one would modify by mounting /system are no longer used, afaict.
When I boot a live image, mount the system partition, and make a modification (i.e. /system/etc/hosts), that change is persisted through a reboot back to the live image and remount. However, it's not loaded by the OS when it boots. Instead both /etc/hosts and /system/etc/hosts are unmodified. Odd, and why is there even anything mounted at /system? I'm not sure if there are multiple system partitions or what's going on. I would love to find some information about Android 7.0 that explains.
Click to expand...
Click to collapse
I responded to your post in the other thread. This is repost.
Android 7.0 introduced redundant bits for reed solomon forward error correction into the system and vendor partitions and code in the kernel to perform the error correction.
Your changes are being written to emmc but when you boot with 7.0 kernel with dm-verity enabled your changes are being treated as data corruption and on-the-fly error corrected back to original.
You can see your changes if you boot into twrp because it has dm-verity disabled. However if you boot into android with dm-verity enabled it will look like original image again even though your changes are technically still there.
It took me a day to figure out what was really going on because i initially had no idea they added this feature to Android N.
The simple way to disable dm-verity is to install SuperSU, but you can also accomplish the same patching your own kernel, installing pre-patched kernel, installing custom kernel, etc.
sfhub said:
I responded to your post in the other thread. This is repost.
Android 7.0 introduced redundant bits for reed solomon forward error correction into the system and vendor partitions and code in the kernel to perform the error correction.
Your changes are being written to emmc but when you boot with 7.0 kernel with dm-verity enabled your changes are being treated as data corruption and on-the-fly error corrected back to original.
You can see your changes if you boot into twrp because it has dm-verity disabled. However if you boot into android with dm-verity enabled it will look like original image again even though your changes are technically still there.
It took me a day to figure out what was really going on because i initially had no idea they added this feature to Android N.
The simple way to disable dm-verity is to install SuperSU, but you can also accomplish the same patching your own kernel, installing pre-patched kernel, installing custom kernel, etc.
Click to expand...
Click to collapse
That's good info and makes total sense. Thanks! Pretty neat actually, just a bummer for me.
Yeah so SuperSU path is not really one I want to pursue. I could learn how to update the dm-verity shas used for verification. That'd probably be the most secure, but it's gonna be a PITA I bet. I imagine I'd need to compile my own image similar to how I made my live image and update a few things. Might have to deal with encryption which is probably an even bigger headache. Also, I bet it would break OTA and have to reflash to update, though that's true now.
I'm really curious what AdAway is doing. Maybe I should pursue reverse engineering that.
I really appreciate you pointing us in the right direction.
crashenx said:
I'm really curious what AdAway is doing. Maybe I should pursue reverse engineering that.
Click to expand...
Click to collapse
I don't use adaway but I believe there are 2 ways to install it with Android N. First is to install SuperSU (or otherwise disable dm-verity) and have it update as it always has. 2nd way is systemless where it piggybacks on some init scripts SuperSU has created to mount "over" the existing hosts file. Basically like symlinking but using a mount point on top of the existing file.
sfhub said:
I don't use adaway but I believe there are 2 ways to install it with Android N. First is to install SuperSU (or otherwise disable dm-verity) and have it update as it always has. 2nd way is systemless where it piggybacks on some init scripts SuperSU has created to mount "over" the existing hosts file. Basically like symlinking but using a mount point on top of the existing file.
Click to expand...
Click to collapse
I'll probably try to go the route of updating init scripts to mount over the existing host file but without using SuperSU or AdAway.

Help writing files to /system

First, this is my setup.
Running stock rooted with elemental x kernel.
OS - Jan Patch
Magisk - v16.2
Magisk Manager - v5.6.4
Elemental X- P2-1.05
Twrp - latest
I did search as best I can on these forums but found just bits and pieces and still no solution. If there is one mods please delete and I'll search again.
So my issue is at some point I could no longer overwrite files to my system. I do have a modified host that I did awhile back and that sticks. But I can no longer overwrite that and others. I have es file pro and it can't do it. When I check permissions for system to be rw it switches back to ro when I go back into permissions. I have root browser by jrummy and that lets me change files but it doesn't stick after reboot. I also un checked the radio button avb/dm-verity in Magisk Manager but it too doesn't stick when I back out of app and go back in. Did I not do something correctly when installing Magisk? In Magisk thread it says your /system will only be modified if root is installed to /system. But doesn't explain how to do that. Sorry for long post, hopefully someone can point me in the right direction.
Edit:
Solved.
I got it, I think those two radio buttons are settings for when you update magisk or patch boot. They were both selected by default, so I unchecked them and installed magisk v16.0 through the manager and now I can write to system. Es File Explorer still not working but at least the other file manager is. Mods you can delete this thread.

Wait until your device is fully rebooted before opening apps [REWARDED]

Hello friends!
I need a lot help.
If I fail to repair the operating system and work as before, I am impetuously interested in recovering at least the data on the /sdcard (internal phone storage) because I HAVE NO BACKUP and I need that data lke the air.
I have a Xiaomi Redmi Note 8 (Ginkgo) with stock ROM MIUI India/Global (11.0.6.0.PCOINXM), TWRP (3.3.1.0) and Magisk (v20.1 or 20.3 - I don't remember exactly).
About two days ago Revolut no longer allowed me to use the application because the phone is rooted. I needed to make an immediate transfer, so I started playing with Magisk because it didn't pass the SafetyNet test. Until then I had installed only Magisk, I updated to the latest version v21.2, I also installed two modules: MagiskHide Props Config (latest version) and Universal SafetyNet Fix v1.1.0. Plus the latest version of TWRP (3.5.0_9-0).
After running "props" in the terminal, I followed the steps (1, f, Xiaomi, 71 ...) and selected my phone from the list I managed to pass the SafetyNet test, but Revolut still did not work.
After that I tried to disguise the Magisk application with another name to hide it (that's how I saw it through some tutorials), but without success because I didn't activate install applications via USB (something like that).
I left the phone for about half an hour, and then the PROBLEMS BEGUN.
For each application I want to launch I receive the following message "wait until your device is fully rebooted before opening apps". I restarted the phone countless times and nothing. I noticed that TWRP does not decrypt user 0 or 999, so I changed TWRP to the previous version, uninstalled Magisk, deleted the modules from /data/adb/modules, upgraded to MIUI v11.0.6.0 and then MIUI v12.0.1.0 - and the problem persists.
I mention that using TWRP File Manager all the content from /data/data and /sdcard is encrypted (files and folders have unintelligible names). The rest of the files are ok.
Although developer mode is enabled, I don't have USB debugging enabled, and the default USB connection is set to charging and as I constantly get the error "wait until your device is fully rebooted before opening apps" I can't change them.
When I open the phone, at the lockscreen, I have a pattern that I successfully insert and the phone opens. The same pattern in TRWP does not decrypt the data.
Given the fact that it accepts the pattern password, I think that if I had a USB connection I would have managed to recover decrypted content from the internal storage space of the phone. Or is the error I receive exactly due to the fact that the applications no longer have access to the content because it is encrypted?
If so how can I recover all the encryption keys to backup them and then how can I try to fix this problem? Or if the keys have been altered, can they still be generated again (if the phone is the same, as well as the IMEI or serial number, etc)?
I understand that if I solve this problem I will either recover my phone as before or at least I can decrypt and access the data and make a backup.
It is very frustrating to see that the necessary information is still there, but I cannot access it.
Because I have access to the system with TWRP, I think I can attach logs.
I hope no one feels offended, but I am so desperate that I am willing to pay a reward.
Please help me!
Here is my video for a better understanding.
https://www.dropbox.com/s/ob235116jpnbj/ginkgo.mp4?dl=0
When I used MagiskHide, it changed my default.prop
Is it possible that the above problem is due to this fact?
How can I copy default.prop (original from wife's phone - same model) from SD card to phone?
Nothing changes with TWRP File Manager copy/paste. Can a script be used to be flashed with TWRP?
Any prop changes that were made with MagiskHide or MagiskHide Props Config did not touch any of your actual prop files. Your default.prop (and any other prop files) are going to be exactly as they were before enabling MagiskHide or changing prop values with MagiskHide Props Config.
Magisk does these things systemlessly, which means it doesn't actually alter the files. This (default.prop) is not your issue... How did you come to the conclusion that Magisk had changed your prop file anyway?
Since you've uninstalled Magisk and the modules, and even updated your OS and the problem still persists it is unlikely that it's directly related to Magisk. I know very little of MIUI though, so I'll leave the rest of the troubleshooting to those that do.
Thanks for the help and for the reply!
Didgeridoohan said:
Any prop changes that were made with MagiskHide or MagiskHide Props Config did not touch any of your actual prop files. Your default.prop (and any other prop files) are going to be exactly as they were before enabling MagiskHide or changing prop values with MagiskHide Props Config.
Magisk does these things systemlessly, which means it doesn't actually alter the files. This (default.prop) is not your issue... How did you come to the conclusion that Magisk had changed your prop file anyway?
Since you've uninstalled Magisk and the modules, and even updated your OS and the problem still persists it is unlikely that it's directly related to Magisk. I know very little of MIUI though, so I'll leave the rest of the troubleshooting to those that do.
Click to expand...
Click to collapse
I see a difference between my file and my wife's, although the phones are identical and had the same version of the operating system.
Originel - ro.bootimage.build.fingerprint=xiaomi/ginkgo/ginkgo:9/PKQ1.190616.001/V11.0.2.0.PCOINXM:user/release-keys
Actual - ro.bootimage.build.fingerprint=Xiaomi/omni_ginkgo/ginkgo:16.1.0/PQ3B.190801.002/5:eng/test-keys
Maybe I'm wrong, I'm trying different options...
In the end, I'm only interested in being able to access the decrypted content from /data and /sdcard (the internal phone storage) to backup them. Later I will reinstall everything.
Please help me with some tips, ideas, what else can I do?
If I reinstall the same version of MIUI, TWRP and use the same pattern can I decrypt the data (If I finally manage to backup them).
I'm already trying without success for about 2 days, do you think there is any chance to recover the DATA and/or internal storage (most important)?
Or to transfer it encrypted and then set the same pattern and eventually restore the data after I format and reinstall everything?
If I reinstall the same version of MIUI, TWRP and use the same pattern can I decrypt the data?
Adi H. said:
I see a difference between my file and my wife's, although the phones are identical and had the same version of the operating system.
Originel - ro.bootimage.build.fingerprint=xiaomi/ginkgo/ginkgo:9/PKQ1.190616.001/V11.0.2.0.PCOINXM:user/release-keys
Actual - ro.bootimage.build.fingerprint=Xiaomi/omni_ginkgo/ginkgo:16.1.0/PQ3B.190801.002/5:eng/test-keys
Maybe I'm wrong, I'm trying different options...
In the end, I'm only interested in being able to access the decrypted content from /data and /sdcard (the internal phone storage) to backup them. Later I will reinstall everything.
Please help me with some tips, ideas, what else can I do?
Click to expand...
Click to collapse
That fingerprint wasn't set by Magisk... Looks to me like you've been running a third-party/custom ROM and then didn't do a clean install of MIUI when going from the custom ROM. If so, that's a very likely source of the issues. I'm just guessing wildly though...
Didgeridoohan said:
That fingerprint wasn't set by Magisk... Looks to me like you've been running a third-party/custom ROM and then didn't do a clean install of MIUI when going from the custom ROM. If so, that's a very likely source of the issues. I'm just guessing wildly though...
Click to expand...
Click to collapse
Until 14.01.2021 when Revolut no longer worked on rooted phones, I had the MIUI India 11.0.2.0 version installed. Nothing else. Later in trying to make it work I kept switching between various official versions 11.0.2.0 / 11.0.6.0 and 12.0.1.0, flashed thru TWRP or Mi Flash (with save user data method).
It worked perfectly until I made those settings described in the original post. The problem is elsewhere, I think.
Based on the information in the attached file are the system encryption keys generated based on software or hardware?
Because if is hardware, I still have a chance to recover something, but if it's software, the fact that I tried to switch between versions decreases my chances to recover something.
What do you think?
Didgeridoohan said:
That fingerprint wasn't set by Magisk... Looks to me like you've been running a third-party/custom ROM and then didn't do a clean install of MIUI when going from the custom ROM. If so, that's a very likely source of the issues. I'm just guessing wildly though...
Click to expand...
Click to collapse
After I upgraded to MIUI 12.0.1.0 with MiFlash now I can't downgrade to 11.0.2.0. In logs everything seems to be ok, but the phone don't boot entering in recovery.
Trying to flash any other custom ROM, do you thing may be a solution? Or I will make things worse?
How can I resolve this situation?
If the fingerprint is the problem of FBE decrypting, how to restore the correct prop.default file?
Is any recovery that allow me to edit this file like text?
I have a copy of original prop.default.
Hey, did u mange to find a workaround? Im having the same issue, so frustrating!

Unable to edit root directory files.

I recently rooted my moto g5s with magisk i wanted to change a few system files and the boot animation but i found myself unable to edit any root directory file. I thought that the problem was the root and that i did it wrong, but after installing root checker it said it was fine. I was able to use some aplications that need root like fluid ng but i am not able to use ones that create/delete/edit files. I have no clue whats the problem please help.
OBS: my magisk version is 23.0 and im using android oreo 8.1.0

Question magiskhide props config bootloop

Hi, i've messed up my device! I've rooted my f3 (enhanced 12.5.7.0 GLOBAL) with magisk and attempted to get google call screening working by changing props using magiskhide props config module. I've set my device fingerprint to pixel 5 and set the device emulation/simulation options by following another thread (admittedly a oneplus thread).
How can I get Google dialer's call screening?
Has anyone been able to get Google's call screening to work? I've seen some guides for older OnePlus devices, I was wondering how it would work for the 9.
forum.xda-developers.com
Now i'm stuck in a bootloop, however if i flash the stock boot.img i can boot into the OS and my phone works as normal but obviously without magisk and root.
Now if i uninstall magisk app then try to reflash the magisk patched boot.img to try to get root i get bootloops again. Is there a way i can revert the fingerprint/emulation settings somehow without root or access to magisk or edit props without root? When i flash the standard boot.img does this reset the fingerprint and device emulation setting but when i reflash magisk pathed boot.img this reactivates the props changes i made with magisk?
Can someone help!
I have attempted to boot into safe mode using the recovery menu, which should disable all magisk modules?, but no joy. The phone booted into safe mode for about 10 seconds then shut off and went back into recovery mode/meu.
Magisk - Installation and troubleshooting:Magisk and MagiskHide Installation and Troubleshooting guide
www.didgeridoohan.com
As per the documentation it says i can create a "disable_mhpc" file and place it on the device but i don't have root and i also don't have /data/cache in the root folder only /android/data/cache. Also what file type is this? an empty .txt file or does it need to have commands within it?
MagiskHidePropsConf/README.md at master · Magisk-Modules-Repo/MagiskHidePropsConf
This tool is now dead... Contribute to Magisk-Modules-Repo/MagiskHidePropsConf development by creating an account on GitHub.
github.com

Categories

Resources