1. Download our Official Android App: Forums for Android!

I need some help with unlocking a read only directory

Discussion in 'Android Rooting' started by reble, May 12, 2016.

  1. reble

    reble Android Enthusiast
    Thread Starter
    Rank:
     #205
    Points:
    63
    Posts:
    310
    Joined:
    Sep 1, 2012

    Sep 1, 2012
    310
    35
    63
    Male
    retired
    Kennewick Wa
    I need to unlock the system directory and the sub dir's under it. I want to add some extra ringtones in my phone. The dir were the ringtones go is locked with a read only cmd. I know how to unlock Windows dir's but I don't know the Android cmd. I think it is a simple thing to do. I just don't know how.


    Steve

     

    Advertisement

  2. scary alien

    scary alien not really so scary
    Moderator
    Rank:
     #8
    Points:
    2,138
    Posts:
    22,298
    Joined:
    Mar 5, 2010

    Mar 5, 2010
    22,298
    23,695
    2,138
    Male
    space alien ;)
    Indy
    You're wanting to remount /system in read-write mode?

    You can do this via an adb or on-phone terminal session (using something like Terminal Emulator for Android) with special mount commands.

    The easiest way though to do this is using an app like Root Explorer.
     
  3. codesplice

    codesplice Elite Recognized Moderator
    Moderator
    Rank:
     #14
    Points:
    1,563
    Posts:
    8,804
    Joined:
    Oct 29, 2013

    Oct 29, 2013
    8,804
    10,192
    1,563
    Male
    SysAdmin
    Huntsville, AL
    What's your phone? You generally don't need to root in order to add new ringtones...
     
    electricpete and scary alien like this.
  4. Slayer72

    Slayer72 Android Expert
    Rank:
    None
    Points:
    323
    Posts:
    2,672
    Joined:
    Dec 22, 2011

    Dec 22, 2011
    2,672
    955
    323
    Male
    Troy NY
    You do if it's in a system directory and the phone doesn't have root
     
  5. reble

    reble Android Enthusiast
    Thread Starter
    Rank:
     #205
    Points:
    63
    Posts:
    310
    Joined:
    Sep 1, 2012

    Sep 1, 2012
    310
    35
    63
    Male
    retired
    Kennewick Wa
    The phone is a HTC Desire 626s. The phone is rooted other wise the easy tether app wont work. And I already tested easy tether.

     
  6. Slayer72

    Slayer72 Android Expert
    Rank:
    None
    Points:
    323
    Posts:
    2,672
    Joined:
    Dec 22, 2011

    Dec 22, 2011
    2,672
    955
    323
    Male
    Troy NY
    Ok then just use es file explorer with root option enabled and navigate to the system folder that holds your default ringtones and add your new ones
     
  7. reble

    reble Android Enthusiast
    Thread Starter
    Rank:
     #205
    Points:
    63
    Posts:
    310
    Joined:
    Sep 1, 2012

    Sep 1, 2012
    310
    35
    63
    Male
    retired
    Kennewick Wa
    I have looked at ES file explorer just now. And I can't find any that says ES file explorer with root file enabled.

     
  8. reble

    reble Android Enthusiast
    Thread Starter
    Rank:
     #205
    Points:
    63
    Posts:
    310
    Joined:
    Sep 1, 2012

    Sep 1, 2012
    310
    35
    63
    Male
    retired
    Kennewick Wa
    Scary Alien. Just for the heck of it. What are the special mount commands? So I can add to my reference note book were I keep keep my notes like this one in. Like my farther used to say "the only stupid question, is the one that didn't get asked". And my farther was a very wise person.

     
  9. Bg260

    Bg260  
    VIP Member
    Rank:
     #32
    Points:
    763
    Posts:
    3,538
    Joined:
    Apr 30, 2016

    Apr 30, 2016
    3,538
    3,667
    763
    Male
    Freelance Entrepreneur
    Lincoln
    @reble Htc phones are write protected regardless of root. You need to flash a custom kernel with write protection removed. Consult your phones development forum. @Slayer72 @scary alien
    Please correct me if I'm wrong
     
    #9 Bg260, May 13, 2016
    Last edited: May 13, 2016
    Hadron likes this.
  10. Hadron

    Hadron  
    VIP Member
    Rank:
     #7
    Points:
    2,218
    Posts:
    22,869
    Joined:
    Aug 9, 2010

    Aug 9, 2010
    22,869
    16,302
    2,218
    Spacecorp Test Pilot
    Dimension Jumping
    The system directory is write-protected when running Android if your phone is S-On, but if you are rooted and have a custom recovery you could try using adb push to push the ringtones when it's in recovery. Or S-Off, if there is an S-Off solution for that model, then just mount it with any root-capable file explorer.

    However, my HTCs have always read tones from /sdcard/Ringtones and /sdcard/Notifications as well as from the system media directory. Have you tried just creating those directories (if you don't already have them), putting the tones/notifications you want in there, and seeing whether it works?
     
  11. Bg260

    Bg260  
    VIP Member
    Rank:
     #32
    Points:
    763
    Posts:
    3,538
    Joined:
    Apr 30, 2016

    Apr 30, 2016
    3,538
    3,667
    763
    Male
    Freelance Entrepreneur
    Lincoln
    [Confirmed] Used Zedge app on Desire 510. In ringtones selection press + in upper right. The downloaded ringtones were there. If you have custom ringtones try placing them in the zedge ringtones folder as well. Make sure the file extension matches. I still would rather have no write protection, personally.
     
  12. reble

    reble Android Enthusiast
    Thread Starter
    Rank:
     #205
    Points:
    63
    Posts:
    310
    Joined:
    Sep 1, 2012

    Sep 1, 2012
    310
    35
    63
    Male
    retired
    Kennewick Wa
    I have tried just coping the sound file from the SD card to the place that the alarm ringtones are in. And I keep getting the same error message saying that place were I want to place the ringtone is a write protected dir. See the picture bellow.

     

    Attached Files:

  13. reble

    reble Android Enthusiast
    Thread Starter
    Rank:
     #205
    Points:
    63
    Posts:
    310
    Joined:
    Sep 1, 2012

    Sep 1, 2012
    310
    35
    63
    Male
    retired
    Kennewick Wa
  14. Bg260

    Bg260  
    VIP Member
    Rank:
     #32
    Points:
    763
    Posts:
    3,538
    Joined:
    Apr 30, 2016

    Apr 30, 2016
    3,538
    3,667
    763
    Male
    Freelance Entrepreneur
    Lincoln
    Yes, sorry the second link is device specific for mine so please disregard. The first is universal I believe.
     
  15. scary alien

    scary alien not really so scary
    Moderator
    Rank:
     #8
    Points:
    2,138
    Posts:
    22,298
    Joined:
    Mar 5, 2010

    Mar 5, 2010
    22,298
    23,695
    2,138
    Male
    space alien ;)
    Indy
    Just in case you ever need it or can use it:

    mount -o remount,rw /system

    That doesn't always work, though, depending on your version of Android and often takes a device-specific version:

    mount -o remount,rw <device> /system

    where <device> is the path name to the system partitions /dev/block entry

    Remounting back to read-only is the same command with just changing "rw" to "ro".

    Also note / remember that when the multi-users were supported in Android (4.x?), the mount behavior does not get communicated outside of the process that issued the mount command. So, you can't use the above mount in an adb command expect that an app would see the results of the mount behavior. You'd have to finish doing your stuff from the same process (i.e., adb or the terminal emulator, etc.).

    Cheers!
     
    reble, Bg260, Hadron and 1 other person like this.
  16. Hadron

    Hadron  
    VIP Member
    Rank:
     #7
    Points:
    2,218
    Posts:
    22,869
    Joined:
    Aug 9, 2010

    Aug 9, 2010
    22,869
    16,302
    2,218
    Spacecorp Test Pilot
    Dimension Jumping
    The place you are trying to copy to in that picture is in /system, which you will not be able to write to from Android unless you are S-Off (and have mounted the partition read-write).

    But did you try just copying to /sdcard/Ringtones instead (or /sdcard/Notifications. Actually I have a /sdcard/Alarms too, but that is empty)? I use HTC devices and I do not need to copy my ringtones into the system folder.
     
    #17 Hadron, May 13, 2016
    Last edited: May 13, 2016
  17. Bg260

    Bg260  
    VIP Member
    Rank:
     #32
    Points:
    763
    Posts:
    3,538
    Joined:
    Apr 30, 2016

    Apr 30, 2016
    3,538
    3,667
    763
    Male
    Freelance Entrepreneur
    Lincoln
    I am still S-on. I Flashed custom kernel to remove write protection. But as I said, different model.
     
  18. reble

    reble Android Enthusiast
    Thread Starter
    Rank:
     #205
    Points:
    63
    Posts:
    310
    Joined:
    Sep 1, 2012

    Sep 1, 2012
    310
    35
    63
    Male
    retired
    Kennewick Wa
    The ringtone is on the sdcard but not in Notifications. The files are in download. I was able to set the ringtones by going into sound & notification > alarm and hit + to select the ringtone that I wanted. Also I was able to do it for the incoming call ringtone. I didn't need to unlock the system dir. But thanks for the notes if I should ever need to remove the write protect down the road. And thanks for the tip on how to add the ringtones without having to unlock the system dir.

     
    codesplice likes this.
  19. ThePhizzle

    ThePhizzle Well-Known Member
    Rank:
     #184
    Points:
    73
    Posts:
    219
    Joined:
    Oct 4, 2015

    Oct 4, 2015
    219
    61
    73
    Male
    Development
    Fresno,California
    You can find all your answers at htcdev.com you just simply have to register on their website.
     
  20. ThePhizzle

    ThePhizzle Well-Known Member
    Rank:
     #184
    Points:
    73
    Posts:
    219
    Joined:
    Oct 4, 2015

    Oct 4, 2015
    219
    61
    73
    Male
    Development
    Fresno,California
    Before Getting Started: Things You Need to Have

    There are a few basics you need to get out of the way before you can start this process:

    • This method will only work for a device that already has anunlocked bootloader with a custom recovery, so be sure that you have that before going forward.
    • Uninstall HTC Sync. The program is great way to get the HTC Desire drivers installed, which you will need for this process, but it will interfere with the tool we will be using to S-Off your HTC.
    • Enable USB debugging.
    • Turn off all security settings from Settings -> Security.
    [​IMG]
    • Disable Fast boot mode from Settings -> Power/Battery Manager.
    [​IMG]
    • You'll also want to make sure that you are using a USB 2.0 (not USB 3.0) port for this for compatibility reasons.
    • Backing up your data is also necessary, just in case anything goes wrong.
    Preparing Your Framework & Kernel (Optional)
    This process works best with a Sense-based ROM with an insecure kernel, and you can flash InsertCoin in order to have both of those bases covered.

    This section (Steps 1 through 6) will show you how to to get InsertCoin ready on your HTC Desire, but if you're already running a kernel with an insecure kernel, you can skip this section and proceed directly to the Preparing Your Device & Downloading Firewater section below.

    Step 1: Download InsertCoin ROM to Your Device
    We will be flashing the InsertCoin ROM so that we have a Sense framework and kernel that fits all the needs of the S-Off tool we are going to use. The InsertCoin ROM can be downloaded directly from the InsertCoin Team's website onto your device.

    [​IMG]
    Step 2: Enter Recovery Mode
    With the ROM downloaded, place your device into Recovery mode by holding the Power and Volume Down buttons at the same time, which will take you to the following Bootloader screen:

    [​IMG]
    Once in Bootloader mode, use the Volume Down key to highlightRecovery and hit the Power button to boot into TWRP.

    Step 3: Create a Backup
    Before going any further, you should make sure to have a backup of your existing setup since we'll be performing a full data wipe in the next step.

    You can do this directly from TWRP using the Backup option. After going through the S-Off process, you can restore this backup to get all your apps, messages, and settings back as they were before.

    Step 4: Wipe Data
    From the main TWRP menu, select Wipe, then Advanced Wipe and check the Dalvik Cache, Cache, Data, and System boxes, thenSwipe To Wipe.

    [​IMG]
    [​IMG]
    Step 5: Flash InsertCoin ROM
    Now tap the Home button to get back to the main TWRP menu and tap the Install option. Select the ROM you downloaded, then Swipe to Confirm Flash.

    [​IMG]
    [​IMG]
    After swiping you will need to go through the AROMA installer to finish the flash. The installer will have extra options and tweaks that you can choose to add to your device, but those are only needed if you plan on keeping this ROM after flashing. Once the process completes, select the Reboot option.

    Step 6: Set Up Your ROM & Reenable USB Debugging
    If your device doesn't boot as quickly as usually, don't panic, that is expected. Once it boots back up, go through the initial setup process one more time, as you did when first got your phone. Once your phone is set up you will need to reenable USB Debugging.

    [​IMG]
    Preparing Your Device & Downloading Firewater
    Plug your HTC to your computer and open up terminal. You'll also want to download the S-Off tool Firewater and place it on your Desktop.

    Step 7: Run Firewater on Your Device
    1. Reboot your device using ADB.
    • adb reboot
    1. Once rebooted, push Firewater to your device.
    • adb push Desktop/firewater /data/local/tmp
    If you didn't put Firewater on your Desktop, you are going to need to change it to the appropriate directory.

    1. You'll now need to change the permissions of Firewater so that it can run on your device.
    • abd shell
    • su
    • chmod 755 /data/local/tmp/firewater
    After typing su, check your device to see if your Superuser app asks for your approval.

    [​IMG]
    1. Run Firewater, and do not touch your device after the process starts.
    • /data/local/tmp/firewater
    1. Now simply agree to the terms and conditions when prompted by typing "yes", then let firewater start chugging.
    [​IMG]
    You're all set, your HTC is now S-Off!
    Good Health & Good Luck!
     
  21. electricpete

    electricpete Android Expert
    Rank:
     #63
    Points:
    393
    Posts:
    2,073
    Joined:
    Jan 7, 2012

    Jan 7, 2012
    2,073
    1,029
    393
    Male
    Electrical Engineer
    deleted.
     
    #22 electricpete, May 15, 2016
    Last edited: May 15, 2016
  22. Bg260

    Bg260  
    VIP Member
    Rank:
     #32
    Points:
    763
    Posts:
    3,538
    Joined:
    Apr 30, 2016

    Apr 30, 2016
    3,538
    3,667
    763
    Male
    Freelance Entrepreneur
    Lincoln
  23. reble

    reble Android Enthusiast
    Thread Starter
    Rank:
     #205
    Points:
    63
    Posts:
    310
    Joined:
    Sep 1, 2012

    Sep 1, 2012
    310
    35
    63
    Male
    retired
    Kennewick Wa
    I am already registered on htcdev.com. A person has to be registered with them 1st before using there setup to unlock the bootloader.

     
  24. pacamp06

    pacamp06 Lurker
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    May 13, 2016

    May 13, 2016
    1
    0
    5
    No real clew but, Is there an Administrators Area with Permissions With In Android ? Text editor? Something like you could use to Edit Reg File/or file like Cfig.sys? You most likely Have the Rights. Redundant but Create Another Directory for your files. Is Google on your phone?
    Buena fortuna [emoji361]

    Paul
    No real clew but, Is there an Administrators Area with Permissions With In Android ? Text editor? Something like you could use to Edit Reg File/or file like Cfig.sys? You most likely Have the Rights. Redundant but Create Another Directory for your files. Is Google on your phone?
     

Share This Page

Loading...