1. 2015 is going to be a great year for Android! Why wait??
    Samsung Galaxy Note 5 | Samsung Galaxy S6 | HTC One M9
  2. New Forum Created: Samsung Gear VR!

Editing system file


  1. xefe

    xefe Well-Known Member

    I am trying to edit my root\system\customize\widgets.txt file. However it is showing read only. What program can i use to change a file to not be read only. I have tried astro and es file explorer; neither appears to have an option to do this.

    Advertisement
    :
  2. mdizzle99

    mdizzle99 Well-Known Member

    I use root explorer. You change it in the top right corner.
  3. xefe

    xefe Well-Known Member


    Thanks, dont wanna pay 4 bucks to edit a file though :)
  4. akazabam

    akazabam Well-Known Member

    There are several ways to actually change permissions on the file, but the safest (and non permanent) way is to use root explorer. ES *does* have an option to use it in root mode (menu->settings->root options-> check "Root Explorer"), BUT I've heard it can cause all kind of problems.

    If you have both a terminal emulator and busybox installed, you can definitely do what you need to do. It's more time consuming, but it *will* work. There are many ways to do what you want, including actually changing permissions, but that's not a great idea.

    So, install a terminal emulator if you don't have one:

    Android Terminal Emulator - Android app on AppBrain

    Open it, and verify you have busybox by typing "busybox" without quotes, then enter. If just says anything about not being able to find it, it's not installed. If you get some general information, then a list of commands, you're good. If you need it, here it is:

    BusyBox - Android app on AppBrain

    Now, you should modify a widget.txt file either from your phone or from your PC. Be careful when doing it from your computer. If you have windows, and you make it in notepad, you could end up with junk character. Make sure to put the widget.txt file on /sdcard. You can copy it there from where ever you have it using ES.

    Once that is done, open the terminal again, and type "su" then enter. The prompt should change from $ to #. type the following commands:

    cd /system/customize/
    cp /sdcard/widget.txt ./
    cat widget.txt (note: the output should be the contents of the new widget.txt)

    If you get any errors or anything, do this command then try the cp command again:

    rm -f widget.txt

    Once you have copied the file, type:

    ls -l widget.txt

    the first column should look something like this:

    -r--rwxr-x. The second, third, and fourth characters (-r-) are the most important, as they generally end up getting reset to --- when you copy a file from elsewhere outside of /system. It basically means the system won't be able to read the file, and it will be useless. If you see something like that (----rwxr-x), run this command:

    chmod u+r widget.txt

    then check again. You should see -r--rwxr-x. If that's the case, you're done.

    I know this is very complicated if you've never done anything from the command line, but it *does* work and it's free.
    xefe likes this.
  5. tblount

    tblount New Member

    Thanks for the info above but I had these problems:
    First busybox won't install on my HTC evo. It says root access required.

    I tried the commands anyway but after changing to my folder the copy command and rm and ls commands got an access denied - system. Error message


    There must be a way to edit or replace
    My hosts file in /system/etc folder without rooting this phone.

    I paid for the root access program but it also fails with a message saying the phone isn't rooted.

    Any more ideas?
    Thanks
  6. ndh777

    ndh777 Well-Known Member

    Are you absolutely sure that you are rooted? Try getting an app off the Market like Wifi Tether or CacheMate just to test and see if you truly are.
  7. Xtremedays

    Xtremedays Well-Known Member

    You could also install Terminal Emulator from the market. Start it and type su. the $ should change to a # if you are rooted.
  8. akazabam

    akazabam Well-Known Member

    1) Welcome to the forums :).
    2) You need busybox before running those commands, so you're going to need to get that installed first.
    3) There is no way to modify /system without rooting.
    4) Do as others have suggested, and check if you have root by opening the terminal emulator, and typing "su". I'm going to guess you don't have root yet. If you *do*, I forgot a step in the above instructions. You'd need to mount /system as rw by typing this command after su:

    mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system

    5) What root method did you try? It sounds like it never rooted your phone. It's probably old. What was it? Do you have a link?
    xefe likes this.
  9. evomattnc

    evomattnc Well-Known Member

    Guys he just isnt rooted. He was trying to do this without rooting, though he bought an app for root users. You can not write to the /system without root, thats pretty much the whole point in root.
  10. akazabam

    akazabam Well-Known Member

    Sounds like you're right, and I just misunderstood what he was trying to say.
  11. evomattnc

    evomattnc Well-Known Member

    LOL just figured we should save some typing.
  12. ivipopi

    ivipopi New Member

    Hi,
    I have similar problem, but my phone is rooted for sure. In root explorer in system folders I cant switch R/O to R/W .when I edis some file and go to parent folder and back,changes are gone(everything is as before).

    When i try to write commands in terminal emulator as you wrote is tell me somthing like "cant find mount"

    Do you hnow where is problem?
    thank for answer
  13. akazabam

    akazabam Well-Known Member

    Welcome to the forums :).

    1) Do you have S-OFF in hboot? Just because you might have a rooted ROM doesn't mean you have S-OFF.
    2) Do you have busybox installed? I'm going to guess you don't. If not, install it from the market. Busybox will give you the ability to run a lot of different commands from the command line (and some apps even require it).
    3) From the terminal, don't forget to type "su" first if you aren't. It wouldn't give you that particular error, but it's just something to remember.
  14. ivipopi

    ivipopi New Member

    than youm for efford,
    I solved my problem by typing commands as was written(mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system cd /system/app).

    Before I wrote it bad (i didnt do one "space"),thats why it didnt work.
  15. akazabam

    akazabam Well-Known Member

    Ah, yeah, that'll do it to. Thanks for the update.
  16. Harlem Tech

    Harlem Tech Member


    I have full root with s-off running Swagged out ROM(you helped me with the S-off a few months ago) I can not write to system folder with root explorer. I get an error saying the file or folder is read only. I checked to make sure root explorer is in r/w mode, super user is good. I just want to change my boot animation but I know I'm fully rooted because you walked me through it. Any ideas why I can't write to system folder?
  17. ocnbrze

    ocnbrze DON'T PANIC!!!!!!!!! Moderator

    check your superuser app. does it list root explorer as being allowed access? sometimes it will deny apps access and it will say so in the app. and if that is not the case then try and uninstall and reinstall the root explorer.

    also make sure that you have mounted as r/w.
  18. Harlem Tech

    Harlem Tech Member

    I don't believe I'm mounted as R/W but everything else checks out. I don't even care about the new boot animation anymore, now I just want to understand it. I have S-off, I have flashed plenty of roms, flashed new radios and kernels....I'm getting a migrain. Someone help.
  19. ocnbrze

    ocnbrze DON'T PANIC!!!!!!!!! Moderator

    ok so at the top of root explorer there should be a button where you can mount as r/w that is what gives you the ability to read and write on to the system partitions.
  20. naiponnoi

    naiponnoi New Member

    Hi

    I also tried to follow akazabam's post to edit the file STATE in /sys/devices/virtual/switch/hdmi/state but the file cannot be saved (it also cannot be deleted with Operation not permitted message from the terminal screen of Android terminal emulator). I have rooted my phone, which is an Alcatel OT-995, I have busybox. Any suggestion?
  21. ocnbrze

    ocnbrze DON'T PANIC!!!!!!!!! Moderator

    welcome to AF!!!!!!

    just an fyi this is the htc evo 4g root forum so be careful on what your read or follow. somethings here are specific to the evo vs your phone.

    what exactly are you trying to do?
Loading...

Share This Page