Question root - Can't edit hosts file - Redmi Note 11 (spes/spesn)

I am using Redmi Note 11 running on Custom ROM - `Xiaomi Eu`
Specs:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
My device is rooted via Magisk.
I want to edit the `hosts` file. I have tried using ADB, CX File Explorer, X-Plore Manager but I am unable to edit it.
Apparently none of the methods are able to write on `/system` partition because it is `Read Only System`.
I looked up online and tried mounting it as writable via ADB using
adb shell
su
mount -o rw,remount /system
Output : /system not in /proc/mounts
mount -o rw,remount /
Output : /dev/block/dm-0 is read only
`adb root` and `disable-verity` aren't working either.
It is so annoying. I had to wait 5 days to unlock the bootloader. Spent whole night installing Custom ROM and rooting my device. And all of it for nothing. Please help.
(Please don't recommend AdAway because I just want to block some particular sites)

Activate the hosts magisk module from the magisk settings, then modify it from the module's files.
AdAway does have custom filters, btw. But you will have to activate the hosts module

Related

[DEV] Mms apk

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Changelog:
0.02
- fixed a bug that would crash if the status of the message was "sending..."
0.01
- added the ability to switch between keyboard layouts (emoticons vs enter key)
- ability to hide avatars in conversation list
- ability to hide avatars in message view
- ability to hide names in message view
- ability to remove the sent: / expires: prefix on messages
Download link here
How to install:
Download the apk and run
adb shell mount -o remount -rw -n /system
adb push Mms.apk /system/app
adb shell mount -o remount -r -n /system
what is the diffrence between this and the original one?
oh men, what a bummer.
crzfish said:
what is the diffrence between this and the original one?
Click to expand...
Click to collapse
well i would have thought the screenshots and the changelog would speak for themselves
It's more customizable than the original cm7.2 apk
I think this thread not belong here..maybe u should move it to THEME N APP SECTION..

Problem with some Facebook leftovers

-------------------------
-------------------------
axl409 said:
Hello, I have recently installed the twrp recovery, but when I tried to do a backup it give me an error about a path that can't be read. That path refer to the Facebook folder in /data/data/facebook-katana.
There is one file ( 6-lxk7_g5koNUrLwO82eQTzq6_w.cnt ) that can't be deleted. I tried with several file manager, like solid explorer, es file manager and the file manager from rom toolbox. Same result from the picture that I will post in this thread.
Also tried to go in recovery and use the recovery built in file manager to delete that file, but same results. How can I solve?
Here's the pic.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Click to expand...
Click to collapse
Thinking off the top of my head, this may not work:
Download a terminal emulator from play store.
Enter the following commands, one after each other:
"su"
"cd data/data/facebook-katana"
"rm 6-lxk7_g5koNUrLwO82eQTzq6_w.cnt"
It may not work, but try it anyway!
Do post your results.
Sent from my XT1068 using XDA Free mobile app
-------------------------

Custom Boot Animation Problem

I have recently unlocked my bootloader and flashed official twrp for one plus 3t (android pie) and have flashed magisk... I have also installed many modules in magisk which I think can be a problem but I can't remove them because they run my EdXposed framework and a lot of things which I use on a daily basis...
The main Problem >>
I can't copy my custom bootanimation.zip directly to system/media/ via root explorer and ES Explorer too...
I tried pushing it via ADB hola it got pushed ?? but no animation stock >>ANDROID<< animation, I looked at system/media/ folder and check the properties and found that size is 0.00 B
I then created a twrp flashable zip and yo amigo it got successfully flashed but still stock ANDROID animation again I checked for the size and it's still 0.00 B...
I have deleted the previous file before flashing twrp so I don't need that advice or something like that I think my system partition has been allotted a particular size due to which this all is happening... Can anybody help me here?? ??
Flashed/Pushed bootanimation.zip :
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Stock bootanimation.zip :
Custom bootanimatio.zip :

General remove miui12 gapps and other apps script

Hello everyone, I have a script to share with everyone!
It can remove all Google Apps and MIUI12 other Apps from miui12!
You will get miui12 core version!
It support miui eu/global/cn version!
I tested it on the redmi note 9 4g ( lime cn version ) device , miui12.5.5 eu/cn/global , miui12 eu/cn/global ,it's work ok !
It's support root and shell users in work!
[ HOW DO ]
UNLOCK BOOTLOADER
HAVE ROOT
UNLOCK SYSTEM PARTITION READ-ONLY
FIX BOOTLOOP IN MI
PUSH SCRIPT TO STORAGE
Bash:
adb push startupsystem.sh /sdcard/
RUN THE SCRIPT
Bash:
adb shell
#if you have root and fix bootloop mi the run this :
su && sh /sdcard/startupsystem.sh
#select 1.remove app and your ui version
#if not root :
sh /sdcard/startupsystem.sh
#select 3.disable and your ui version
[ DOWNLOAD SCRIPT ]
[ SCREENSHOT ]
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

usb connection script

Hello
I am going to write a script that will run another script When the USB device is connected.
I used a rule called 99-my-usb-rule.rules in /etc/udev/rules.d
All the work I did and the error log are all in the attached image file
Can anyone help me?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
debug your commands/scripts in shell first , to see if they run and do what you want them to.
bash -x ./script.sh ( for detailed debugging )
then running from udev script just like running from crontab
is a very sterile environment unlike a login shell.
do "/usr/bin/env > /tmp/udev-env.txt" from udev script to see what it set and what is not.
vs "env > /tmp/login-env.txt" from a login shell , which would have all sorts of things set besides paths that might be missing etc...
and you are also not specifying any devices ( do you want script to run on all usb device connections? )
lookup udev rules if you want something a bit more specific.
also you do not need /bin/bash if you have shebang #!/bin/bash as first line of your script
just execute your /path/to/script.sh ( make sure it is an executable )

Categories

Resources