help edit android file - General Questions and Answers

Hello, I am trying to modify my cell phone "samsung galaxy s6" with android 11 "lineage 19.1 unofficial", twrp and magisk installed, the root is working, I have modified several files with a magisk module that I am doing, the file that I want to modify is "/sys /kernel/debug/sched_features" but I can't. It has permissions of 666 and it is the root owner. Is there any way to edit it? . i was thinking of editing twrp backup but i dont know how to unpack the *.win file

You have root in TWRP, so what's the problem?

twrp does not save changes

kuroro82 said:
twrp does not save changes
Click to expand...
Click to collapse
What are you doing?

I create a backup with zip I open it in notepad++ without decompressing it I edit it I give it save the 7zip it asks me if I want to update the file I put it if I put it on the cell phone and flash it I restart the cell I check the changes and nothing happens

You can change the contents of the file directly in the TWRP terminal while keeping the ownership of the file (chown) and its permissions (chmod)?

kuroro82 said:
I create a backup with zip I open it in notepad++ without decompressing it I edit it I give it save the 7zip it asks me if I want to update the file I put it if I put it on the cell phone and flash it I restart the cell I check the changes and nothing happens
Click to expand...
Click to collapse
Make sure the partition where the mentioned file should be copied onto is mounted as RW.

Related

How to make a CWM file

Hello, I have searched everywhere and cant find the answer to my question. I wanted to replace a file using CWM .zip how in the heck do I do that? Most of all I just wanted to learn how to do it as well...
Thanks,
Chad
Well to begin with you can take an existing zip with the file path you need, delete everything in the folders not touching the META-inf folder at all, those are the install instructions, and put the file you want to flash in the correct folder. I think thats how everyone starts out.
studacris said:
Well to begin with you can take an existing zip with the file path you need, delete everything in the folders not touching the META-inf folder at all, those are the install instructions, and put the file you want to flash in the correct folder. I think thats how everyone starts out.
Click to expand...
Click to collapse
but your update-script has to match what you are flashing via cwm. if you take a rom zip and just pop in a few files in place of the whole rom structures, your flash will fail because your update-script is looking for specific structures.
Oxicottin said:
Hello, I have searched everywhere and cant find the answer to my question. I wanted to replace a file using CWM .zip how in the heck do I do that? Most of all I just wanted to learn how to do it as well...
Thanks,
Chad
Click to expand...
Click to collapse
One way would be to use: Update Zip creator/modifier (Requires Windows)
yeah it would be bad mojo if you used a wipe rom zips META INFO to make an update zip.....
Thanks a million everyone......
Sorry for being late to the party again.. Here goes my attempt at an explanation though:
Essentially, a CWM flashable zip is just a zip file with the file system replicated in it. So for example, if you wanted to add swype, and you know Swype.apk would regularly go in /system/app, then you would create a blank folder called 'system', and another folder inside system called 'app', and put your Swype.apk inside that. (/system/app/Swype.apk)
After that, all that's left is to build an update script. So, from your root directory (where your system folder is), you would make another directory called META-INF, with a folder inside called 'com', another one inside that called 'google', and finally one called 'android' inside that (/META-INF/com/google/android), you put a text file in there called 'update-script' that tells recovery what you want to do (in this case, copy swype over to the corresponding directory on the file system).
http://forum.xda-developers.com/showthread.php?t=641223
^There's a guide for how to make those. You can also pick apart any rom you find in the dev section and check out the update script for reference.
After that, it's just a matter of zipping up all the contents in your root directory, then signing the zip with testsign.jar
modest_mandroid said:
Sorry for being late to the party again.. Here goes my attempt at an explanation though:
Essentially, a CWM flashable zip is just a zip file with the file system replicated in it. So for example, if you wanted to add swype, and you know Swype.apk would regularly go in /system/app, then you would create a blank folder called 'system', and another folder inside system called 'app', and put your Swype.apk inside that. (/system/app/Swype.apk)
After that, all that's left is to build an update script. So, from your root directory (where your system folder is), you would make another directory called META-INF, with a folder inside called 'com', another one inside that called 'google', and finally one called 'android' inside that (/META-INF/com/google/android), you put a text file in there called 'update-script' that tells recovery what you want to do (in this case, copy swype over to the corresponding directory on the file system).
http://forum.xda-developers.com/showthread.php?t=641223
^There's a guide for how to make those. You can also pick apart any rom you find in the dev section and check out the update script for reference.
After that, it's just a matter of zipping up all the contents in your root directory, then signing the zip with testsign.jar
Click to expand...
Click to collapse
Is there a way from the CWM interface to do the same with a backup you create? I noticed backups are not in the same format, they are usually .img, .tar, and an md5 file?

First Port to the Cube T7 Phablet.

After trying and trying and failing, I have finally figured out a way to port a rom to the Cube T7.
This has proven the only method (in my experience) to work. All the standard methods have failed
each time.
WARNING!!!!! THIS COULD BRICK OR DAMAGE YOUR PHONE
YOU ARE TRYING THIS AT YOUR OWN RISK. I WILL NOT BE HELD RESPONSIBLE
FOR WHAT HAPPENS TO YOUR DEVICE!!!!
Things you need.
latest Spftool
and the Rom package
NOTE:You need to know that you can't just flash the package I put together. You will
need to use the TWRP recovery that comes in the package to transfer file from your external sd to
the system folder and so forth. Also the proper permission to set.
Step 1: Flashing the images.
I've already pulled the correct img from each folder and put it together for you.
The only thing that you will need to do is extract the folder and use the spf tool to
install the firmware.
Note** In order to keep the 3.97 app storage, I've had to make sure to use the
Spf tool to do a full format except for the bootloader.
Step 2: Repairing the Rom
In the rar package, I included all the files need to fix the rom so
it will work smoothly on your phone. The files can be located in
the "system" folder which will need to be copied to your external sdcard
At this point you will already have flash the images and turn on the phone.
You will notice that the after you turn it on, you will get a warning that says "Cpu overheating"
or at least to that affect. This is not true by the way, this is from the fact the tp settings are off
from the original rom. Either way the warning will force boot your phone which again is fine.
Once this happens you will need to go to recovery.
Once in recovery make sure that you go ahead and mount your
system partition.
With this done you will be able to go to /system/etc/.tp
This folder contains the files that control the thermal manager for
the rom. You want to delete this folder. YES DETELE IT!!!
Once deleted, go to the system folder that you should have copied to your
external Sdcard. You need to copy /system/etc/tp to the exact location that you
just deleted the original.
Once you've done this you will need to set the permissions for the folder and the
files contained. The folder needs to be set to 0755 and the files inside need to be set to 0644.
Once done its best to go ahead and use the recovery to flash UPDATE-SuperSU-v2.46.zip to root your device before
restarting. Once restarted you will need to use root explorer or es explorer root function to
copy all the files to there correct locations and set their permissions. Each file is in its corresponding
folder as it should be in the system partition. All you will need to do is copy and past from the folder on the external and
paste to the same folder in the system partition. For those that may not know, all files will be set to 0644/rw--r--r-- and folders that you copy over will be 0755/rwxr-xr-x (if your using root explorer, just un check the group and others on the "Write" permissions.
Whats not working?
I can't figure out how to get the camera to working.
I've used standard tuts to try and copy the right files or libs
but not luck as of yet. If anyone figures out a way please share!!!
Also, if you have the fold case, the screen does not come on when you
open the fold. Also when double tapping the screen, this does not take it out of sleep
mode. From what I've seen those are the only things that dont work. If you see something
else, please report it to this thread.
Also in the package you will find the Carliv 3.3 recovery version for our phone.
Thanks to kushyree from needrom.com for building it for us.
He also has been assisting me in trying to port other roms to our phone. We owe him a lot of thanks.
Let me know if you guys need any help with this. I will do the best I can to try and help out. Enjoy.

I'm rooted, trying to install Xposed Framework, how do I delete a file from /system/?

I tried installing it with both Flashify and Magisk, but both methods failed.
When I tried installing it via the included Xposed Installer, it also failed, but gave me the message:
> Error: Xposed_Framework.jar already exists in /system/framework
I'm guessing a previous installation failed, but left the file there.
My next idea is to delete that file from /system/framework and try again, but since it's in an RO directory I don't have permission.
I tried using a terminal emulator to mount the drive in rw mode, and also tried using a root file explorer, but either both methods don't work, or I just couldn't figure it out.
Anyone have an idea of how to remove or rename that file so I can try to install the .zip ?
-Thanks
Highfiverobot said:
I tried installing it with both Flashify and Magisk, but both methods failed.
When I tried installing it via the included Xposed Installer, it also failed, but gave me the message:
> Error: Xposed_Framework.jar already exists in /system/framework
I'm guessing a previous installation failed, but left the file there.
My next idea is to delete that file from /system/framework and try again, but since it's in an RO directory I don't have permission.
I tried using a terminal emulator to mount the drive in rw mode, and also tried using a root file explorer, but either both methods don't work, or I just couldn't figure it out.
Anyone have an idea of how to remove or rename that file so I can try to install the .zip ?
-Thanks
Click to expand...
Click to collapse
In the Xposed app you should be able to just run the uninstaller script. If that doesn't work, boot TRWP and delete it from there.
D3RP_ said:
In the Xposed app you should be able to just run the uninstaller script. If that doesn't work, boot TRWP and delete it from there.
Click to expand...
Click to collapse
Unfortunately, the uninstaller also fails.
It says it can't remove that file from a read only directory..
Highfiverobot said:
Unfortunately, the uninstaller also fails.
It says it can't remove that file from a read only directory..
Click to expand...
Click to collapse
flash installer or uninstaller through TWRP
wmcdrugs said:
flash installer or uninstaller through TWRP
Click to expand...
Click to collapse
Root Explorer....
This app does wonders, it allows you to modify directories in /system and other root folders. You can even change permissions of specific folders/files from read/write/read-only....etc. I've had this app since the earliest of android days and it has been my go to file explorer. Root Explorer of course requires root....but it completely unlocks your phone and allows you to modify any system file that is set to any permission. Of course there are other file explorers that allow you to modify system files, but this is the one that i have the most experience with. You should be able to access the system folder where the Xposed file remains and modify it so it can fix your problem.
djer34 said:
Root Explorer....
This app does wonders, it allows you to modify directories in /system and other root folders. You can even change permissions of specific folders/files from read/write/read-only....etc. I've had this app since the earliest of android days and it has been my go to file explorer. Root Explorer of course requires root....but it completely unlocks your phone and allows you to modify and system file that is set to any permission. Of course there are other file explorers that allow you to modify system files, but this is the one that i have the most experience with. You should be able to access the system folder where the Xposed file remains and modify it so it can fix your problem.
Click to expand...
Click to collapse
This!. I've used it for years. Not muss no fuss. It's not bloated like a certain couple others I know of. It just does what it does and does it well. Manages files. No extra garbage.Give it a try. I'd be surprised if you can't delete it with Root Explorer. If you do try it, go to the folder you want to delete the file from. Once in there, look at the top right of the screen. Somewhere up there It will say MOUNT R/W. Touch that and you should be able to do whatever you want to within that folder.
Do you have the magisk DNSCrypt module installed? If so, thats why you cant modify anything in /system. Not sure why or how it breaks it, but it does. Took me for ever to figure out what was causing it. Now that i removed the module, i can modify anything i want again.
Sent from my [device_name] using XDA-Developers Legacy app

How to change bootanimation?

I have rooted my phone and granted root access to root explorer, but i still can't paste anything into system/media folder and I can't rename the bootanimation.zip file. It says rename failed and then "root explorer was granted superuser rights" pops up on my screen. Am I doing something wrong?
You must to make changes inside twrp
Our phones are a bit different there.
system, or rather system_root, is read only. Think of it like a CD-ROM. You can only read from it, not write to it.
You have to use a kitchen of some sort, extract system.img from the ROM you are running, and edit the ROM from there. Once you have, you have to create the system.img from your files again. Then flash that system.img on your phone.
And then you are good to go!
It's that simple!

I Can't Get Root Back

I have a Motorola Edge (regular not +) running LineageOS 17.1 (20210528). I had it rooted and decided I wanted to use the hosts file for ad blocking. I couldn't figure out how to get the OS to allow me to modify the host file. While I was doing so, I some how corrupted to OS and couldn't boot into it. That was easily fixed by flashing the the OS, but now I can't get root back. When I reboot after I flash the patched boot.img (to both partitions), I get "Can't load Android system. Your data maybe corrupt..." (This happens when I try to boot into both partitions). Before I see the error message, it goes into a bootloop.
I'd also like to know how to modify the hosts file.
Thanks
Heat84 said:
I'd also like to know how to modify the hosts file.
Click to expand...
Click to collapse
Once phone is rooted
1. You mount Android's directory /system/etc as RW
2. Pull out the hosts file what is located therein to PC
3. Edit the hosts file according to your needs
4. Make sure hosts file gets saved in UNIX-file format
5. Push back the hosts file to Android's /system/etc directory
6. Make hosts file RW
Thanks. Any clue about the rooting problem?
I forgot to mention that I patched boot.img with Magisk.
TWRP has a file system repair function. Does that have anything to do with this?

Categories

Resources