How to change hosts file using phh GSI rom? - Android Q&A, Help & Troubleshooting

I'm using phh AOSP 12.0 v400 (https://github.com/phhusson/treble_experimentations/releases) and I would like to know if there is a way of permanently change /system/etc/hosts file, or at least auto changing it in every boot, which is probably what Magisk does, but I'm not sure how to do it with this ROM since there is no boot.img.

Related

How can I create a custom SEAndroid Policy?

I'm using a custom ROM that I've built and I want to loosen a few of the SEAndroid policies without using CF-Autoroot or any other third party tool. Since I am compiling my own kernel, I thought I could compile my own sepolicy file but Samsung doesn't provide and *.te files. My first guess was to use CF-Autoroot, add the changes with the sepolicy binary, pull it from the phone, replace my sepolicy file in my ramdisk with the modified one, and build my ROM again. The phone booted but crashes if I open the Samsung settings app (and a few others). I think my best option is to compile a fresh sepolicy file but I don't know if that can be done? If I change it, will my apps fail SafetyNet checks? Any better alternatives to achieve my goal of added a few more allow statements to my ROM? I'm using Marshmallow 6.0.1 on a Galaxy S6.

Can't Create, Move, and Modify Files in System Folder in Android Pie (9.0)

Hello.
I'm using Xiaomi Pocophone F1 (Global Edition). Upgraded from Android Oreo (8.1) MIUI Global 10.0.6.0 to Android Pie (9.0) MIUI Global 10.1.3.1 using system update (choose update package), then it will update through custom recovery, TWRP. The phone is root using Magisk v18.0.
Before I upgrade to Android Pie, I was able to move files from internal storage and SD Card to /system folder, such as bootanimation.zip. I'm using ES File Explorer Pro as a File Manager, and I already enable the Root Explorer in the tools tab. Next, I able to flash ARISE Sound Systems such as Viper4Arise, Dolby Digital Plus and Dolby Atmos. It works pretty good.
Right after I upgrade my phone to Android Pie, I can no longer create, move, modify files in /system folder. Moving files using the TWPR File Manager also failed. I also can't flash ARISE Sound Systems sound mod. There's no error flashing the sound mod, but after rebooting, the phone is still the same, no Viper4Arise, Dolby Digital Plus or Dolby Atmos was found.
Outside the system folder, (the root folder, "/"), I'm able to move the bootanimation from my internal storage and SD card to there.
I tried changing the ro.debuggable = 1, ro.secure = 0, ro.build.type = userdebug, using the MagiskHide Props Config modules. I don't know if that have something to do with my problem, but still no luck. I also have Busybox enabled in Magisk modules.
It seems like there's a problem with the system folder. Maybe it's because of Android Pie? Or the File Manager itself? Or Magisk? Who knows.
Below I provide you the screenshots of the result when I tried to move my bootanimation.zip file to /system folder.
I hope someone could help me with my problem. Thank you for taking your time to read my thread.
- Chaorrupted X - said:
Hello.
I'm using Xiaomi Pocophone F1 (Global Edition). Upgraded from Android Oreo (8.1) MIUI Global 10.0.6.0 to Android Pie (9.0) MIUI Global 10.1.3.1 using system update (choose update package), then it will update through custom recovery, TWRP. The phone is root using Magisk v18.0.
Before I upgrade to Android Pie, I was able to move files from internal storage and SD Card to /system folder, such as bootanimation.zip. I'm using ES File Explorer Pro as a File Manager, and I already enable the Root Explorer in the tools tab. Next, I able to flash ARISE Sound Systems such as Viper4Arise, Dolby Digital Plus and Dolby Atmos. It works pretty good.
Right after I upgrade my phone to Android Pie, I can no longer create, move, modify files in /system folder. Moving files using the TWPR File Manager also failed. I also can't flash ARISE Sound Systems sound mod. There's no error flashing the sound mod, but after rebooting, the phone is still the same, no Viper4Arise, Dolby Digital Plus or Dolby Atmos was found.
Outside the system folder, (the root folder, "/"), I'm able to move the bootanimation from my internal storage and SD card to there.
I tried changing the ro.debuggable = 1, ro.secure = 0, ro.build.type = userdebug, using the MagiskHide Props Config modules. I don't know if that have something to do with my problem, but still no luck. I also have Busybox enabled in Magisk modules.
It seems like there's a problem with the system folder. Maybe it's because of Android Pie? Or the File Manager itself? Or Magisk? Who knows.
Below I provide you the screenshots of the result when I tried to move my bootanimation.zip file to /system folder.
I hope someone could help me with my problem. Thank you for taking your time to read my thread.
Click to expand...
Click to collapse
I personally have almost the same setup as you (magisk 18 but updated using stock recovery) and have no issue using jrummy root browser (https://play.google.com/store/apps/details?id=com.jrummy.root.browserfree). Try with it
Blendman974 said:
I personally have almost the same setup as you (magisk 18 but updated using stock recovery) and have no issue using jrummy root browser (https://play.google.com/store/apps/details?id=com.jrummy.root.browserfree). Try with it
Click to expand...
Click to collapse
It's okay. My problem has been solved. I flash the rom (same version as I'm using) through the TWRP, without wiping anything (except dalvik cache). Root with Magisk. Now I can create, move and modify files in the /system folder.
Thanks for the suggestion anyway. I did try the jrummy Root Browser before I flash the rom through TWRP, but it's still the same.
I guess there's problem during my first upgrade to Android Pie.
- Chaorrupted X - said:
It's okay. My problem has been solved. I flash the rom (same version as I'm using) through the TWRP, without wiping anything (except dalvik cache). Root with Magisk. Now I can create, move and modify files in the /system folder.
Thanks for the suggestion anyway. I did try the jrummy Root Browser before I flash the rom through TWRP, but it's still the same.
I guess there's problem during my first upgrade to Android Pie.
Click to expand...
Click to collapse
Google enhanced the security on Android 9 including the Safetynet. I think that's the reason why we can't just deliberately create nor modify /system partition

Some Help please... updated...

Hi!
I noticed that all change i made in system or vendor build.prop are ignored, or in some other xml files, even if i made a factory reset!
I try to add camera2 API and doesn´t work as example, APN changes to, etc...
The files i add, Change after boot still like stock but if i mount it on twrp it shows the changes i made!
Why?!
After some research i think there is no way to tweak system or vendor.
In some way i think vendor and system are writed in data when is flashed and stay in encriped data partition and when it boot only read data.
I read in some where that images only are use for fast update like dual images something problably the tweak image is not the one in use...
https://source.android.com/devices/tech/ota/ab/
Only customs ROMs will work maube because it have their own boot images and works in a diferent way.
I think it is the end of stock mods... :\
Thanks
Hello i had the same problem in android 10 miui 11.0.3 // you will need to reinstall your stock rom from https://xiaomifirmwareupdater.com/miui/platina/ fastboot rom using mi flash tool
After flash done flash twrp / magisc / install root explorer.
After that you should be able to edit again these files.
Or you can use twrp file manager to edit that .xml files // find a recovery that have the ability to edit those files.

Modifying system partition on LineageOS 17.1

Hi guys,
I recently installed LineageOS 17.1 as an upgrade for 14.1 on my tablet. I have modded the Total Commander app such that it can directly write to SD cards when installed to /system/priv-app. So I wanted to put this app in LineageOS 17.1 too. But every time when I do this the system doesn't boot anymore. If I delete the app manually afterwards using TWRP, the system is stll not booting.
Is it possible to modify the system partition of LineageOS 17.1? Or is just my app not working anymore?
Thank you,
Oebbler
Oebbler1 said:
Is it possible to modify the system partition of LineageOS 17.1? Or is just my app not working anymore?
Click to expand...
Click to collapse
IMHO, to successfully modify /system and/or /system/priv-app Android's SElinux & DM-Verity & AVB must get disabled before.
Thank you for your reply!
All three features are already disabled by default on my tablet. I found out it's possible to change settings in build.prop (only from recovery, because I can't even mount /system as r/w from LineageOS and I don't know why), but inserting my modded Total Commander app is still not possible. I can insert it, but the OS doesn't boot afterwards. Any ideas how I can deal with that and insert this app successfully?

OnePlus Nord N10 TMO BE2028 Custom Boot Animation

Found the directory storing bootanimation.zip in Product/Media However the files themselves cannot be modified even though I have rooted with magisk and tried to move them with Material Files. Device passes safetynet attestation. Tried booting into twrp, and mounting the partitions. It cannot even read the files in product partition, only folder shows up. When moving a bootanimation.zip file into the Product/Media directory it gives an error message. Obtained the boot animation from OnePlus 7 Pro forums. Need some help getting rid of this ugly magenta logo. Thanks
Edit: On OOS 11.0.3BE88CB
Ive also been trying to change boot animation.
OxygenOs 11.0.2.BE86AA
Rooted w/ magisk
It's in /system/product/media for stock roms and /system/media for gsi roms.
heres a couple that i use, one is the same as stock, only blue, the other i barrow from octavi gsi.
Be careful not to change the permissions on the file if you swap it out.

Categories

Resources