Modify file in /data/data... directory and retain permissions? - Android Software/Hacking General [Developers Only]

Hello,
I have a metronome app which uses .wav files which are stored in a subdirectory of /data/data/[app name]. Android 6.0.1, Oneplus 3.
Now I wanted to modify these wav files with Wavelab and put them back into place (via ES File Explorer in root mode).
That worked, BUT the owner of the files is now "root", and the app won't play the files anymore.
How can I either reset the file owner or prevent the ownership from changing??

Does no one answer because this problem isn't solvable?
Or is it because my question unmasks me as noobish??

Why not copy the wav files to sdcard then modify it?
Sent by a Cool Guy using XDA-Developers mobile app

Hahaha, you obviously don't understand what my problem is (although I think I described it clearly). It's no problem to copy the files elsewhere and modify them; it's when I copy them back into the original directory via root explorer that the file owner gets changed to "root" which makes them inaccessible to the metronome app.

hasenbein1966 said:
Hahaha, you obviously don't understand what my problem is (although I think I described it clearly). It's no problem to copy the files elsewhere and modify them; it's when I copy them back into the original directory via root explorer that the file owner gets changed to "root" which makes them inaccessible to the metronome app.
Click to expand...
Click to collapse
i think you can't do anything about it since its in "/data"

What about manually changing the owner back to the correct value after copying?

No, that isn't possible. Only owner selectable is "root".

hasenbein1966 said:
No, that isn't possible. Only owner selectable is "root".
Click to expand...
Click to collapse
Then the limit is in your file manager or root app, just change them
Sent from my Samsung GT-S5830i using XDA Labs

Related

Disabling/altering startup and shutdown sounds.

I read the tip in another thread about how to disable and/or change the Captivate's startup and shutdown sounds but cannot find the files mentioned on my phone. Does anyone have more detailed instructions on how to get rid of the annoying startup and shutdown sounds without using the SDK?
You must have root, then use a file manager (I use root explorer) and rename or delete the sound file:
/system/etc/PowerOn.wav
/system/media/audio/ui/shutdown.ogg
Sent from my SAMSUNG-SGH-I897 using XDA App
I keep getting an error saying I don't have the permissions to rename those files... I'm using several different file explorer apps and they all give me the same message
Do you have root access? If so change the filesystem to RW or use Root Explorer.
decepticon said:
Do you have root access? If so change the filesystem to RW or use Root Explorer.
Click to expand...
Click to collapse
I didn't know how to change it to R/W so paid for the App, well worth the $3 thanks for the quick replies
Still unable to find the files. I am using the default file manager with View Hidden Files enabled and there is no /system directory.
sup3rus3r said:
Still unable to find the files. I am using the default file manager with View Hidden Files enabled and there is no /system directory.
Click to expand...
Click to collapse
You need to download a manager that has ROOT capabilities or you will not find them.
LGSilva said:
You must have root, then use a file manager (I use root explorer) and rename or delete the sound file:
/system/etc/PowerOn.wav
/system/media/audio/ui/shutdown.ogg
Click to expand...
Click to collapse
Easy with ConnectBot to turn off that annoying startup sound.
Connect to local system
su
(Confirm superuser request)
mv /system/etc/PowerOn.wav /system/etc/PowerOn.bak
exit
exit
Done!
Thanks for this LGSilva
I finally ponied up and bought Root Explorer. I found the files and renamed them and everything seems to be working.
Would love to find this info myself.
I cant get access from root explorer. Says read only even with hidden files shown. What am I missing?
Sent from my SAMSUNG-SGH-I897 using XDA App
adamandro12 said:
I cant get access from root explorer. Says read only even with hidden files shown. What am I missing?
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
Did you allow superuser permission when prompted?
LGSilva said:
You must have root, then use a file manager (I use root explorer) and rename or delete the sound file:
/system/etc/PowerOn.wav
/system/media/audio/ui/shutdown.ogg
Sent from my SAMSUNG-SGH-I897 using XDA App
Click to expand...
Click to collapse
Worked great - thank you
It never prompted me. It is rooted and i toggled the button to mount but no access. I got it to five me check marks for read and write, but they were already checked.
Sent from my SAMSUNG-SGH-I897 using XDA App

[Q] Where is system/ lib and app folders?

InstigatorX said:
Originally Posted by Chouie
Im in v3...i donto have Google talk either
U can just use Samsung's social hub for gchat
Sent from my SGH-I727R
Click to expand...
Click to collapse
Attached Google Talk files that worked for me (from TouchWiz 1.0.2 ROM). Put the lib file into /system/lib and the apk into /system/app. Change perms to 744.
Click to expand...
Click to collapse
I am trying to follow these instructions however I can not find the /system/lib and /system/app folders. The Google Talk stock app vanished when I flashed TCP's rom on the phone, so I am trying to reinstall it this way, since it is not on the market.
Where are these files usually located? Do I need to format my files differently or something?
/system/app
/system/lib
ANYTHING that is not /mnt/sdcard (/sdcard) or /ext-sd requires ROOT access and an app that will look at ROOT
ES File explorer or root explorer
you WILL NOT see these folders by just plugging into your computer, nor will you see it with basic file managers
Pirateghost said:
/system/app
/system/lib
ANYTHING that is not /mnt/sdcard (/sdcard) or /ext-sd requires ROOT access and an app that will look at ROOT
ES File explorer or root explorer
you WILL NOT see these folders by just plugging into your computer, nor will you see it with basic file managers
Click to expand...
Click to collapse
Thanks for the help,
Ok i downloaded ASTRO file manager, but when i try to paste into the app folder it gives me an error message that I have a read only file system...
Make sure you have r/o where it says r/o or r/w. this way you can paste it.
LazyMike said:
Thanks for the help,
Ok i downloaded ASTRO file manager, but when i try to paste into the app folder it gives me an error message that I have a read only file system...
Click to expand...
Click to collapse
Pirateghost said:
/system/app
/system/lib
ANYTHING that is not /mnt/sdcard (/sdcard) or /ext-sd requires ROOT access and an app that will look at ROOT
ES File explorer or root explorer
you WILL NOT see these folders by just plugging into your computer, nor will you see it with basic file managers
Click to expand...
Click to collapse
I know I'm VERY! late with this answer, but I have to correct you. With zArchiver (file-explorer and zip/7-zip app) you can access androids system folders. On a S III mini I can copy the ringtones/notification-sounds or the start sound( on the micro-SD-card for example). It is possible to copy other files too, but that didn't make any sense for me. btw: phone is not rooted.
P.S. Also worked on a non-rooted Huawei Y 625 @ Android 4.4.2 . Of course I can not copy files INTO the system folder(s) but read-acces is definitely possible without root permissions.
Greetz HiddenAssassin2306
Access to /data is forbidden in Android unless you have root access.
/system is read only, and limited.
My quote from above did say you wouldn't see any of these from a computer. And the OP was trying to place files in /system, which is read only.
Is there some reason you felt the need to bring up a 3 year old thread to say I'm wrong, when in this thread, regarding the original post, I am 100% correct?

[Q] How to connect/access g2x thru computer

I have hellfire phoenix v1.9 running on my g2x. I wanted to add a ringtone from my computer into the g2x.
I have installed the android platform driver and then when I connect, I see drives E and F, but cannot explore them.
I searched and found a suggestion to turn on usb storage--but I find no options on the hellfire phoenix v1.9 to do this.
Also, toggling the usb debugging mode does not change anything.
All I am trying to do is to find the native ringtone folder and add my ringtone which I made in a .ogg format.
Please help
The simplest way for you to do this is put the file on your SD card and using either root explorer or ES file manager. You'll want to mount system as writeable via the settings and go to System\media\audio\ringtones\
Note you don't have to make the .ogg files it will still work with MP3's except alarms for some reason. You will also need to reboot before it shows up in your list.
Sorry, but I cannot understand when you say,
--You'll want to mount system as writeable via the settings and go to System\media\audio\ringtones\---
Is there a way to move this .ogg or .mp3 file into the ringtones folder (which exists in System\media\audio\ringtones. I can see all the ringtones once I use file explorer.
Even if I copy the file into a external sd, since it is not as intuitive as cut/copy and paste into the folder--how is this done.
What I was hoping was to be able to open this folder thru the computer when connected thru USB and just drag and drop it into the folder of ringtones. If this is not possible assuming the ringtone I want moved is called vintage.ogg , can this be done with ADB commands? Please help
sksriniv said:
Sorry, but I cannot understand when you say,
--You'll want to mount system as writeable via the settings and go to System\media\audio\ringtones\---
Is there a way to move this .ogg or .mp3 file into the ringtones folder (which exists in System\media\audio\ringtones. I can see all the ringtones once I use file explorer.
Even if I copy the file into a external sd, since it is not as intuitive as cut/copy and paste into the folder--how is this done.
What I was hoping was to be able to open this folder thru the computer when connected thru USB and just drag and drop it into the folder of ringtones. If this is not possible assuming the ringtone I want moved is called vintage.ogg , can this be done with ADB commands? Please help
Click to expand...
Click to collapse
Normally it's read only, as in you can look but you can't touch. Writable means you write to it, you can alter or otherwise put information/files there.
And, yes it's as simple as copy and paste, unless you don't know what you're doing in the first place.
Using ES file explorer is the simplest method. Even if you use ADB you still would have to give it the command to mount the system as writable. If you Droid explorer you still need to have the system mounted as writable.
I don't know if it works on all roms, but Gingerbread based roms if you make a directory named ringtones in the Root of the SD card the phone should read it from there, or it does on mine.
Yes, I did everything--thought it was going to work, but it failed.
Steps I took--
Copied a sound.ogg file into the ext sdcard
Installed ES file explorer and under preferences set permissions to write (because I am rooted)
Copied the file from edt sd card
then switched to the systems\media\audio\ringtones folder, was able to see all the ringtones currently present.
Pasted my sound.ogg file---it said "multiple operations completed, but failed to paste sound.ogg Unclear why..
Should I have rebooted after setting permissions to write, before executing the copy and paste operation?
Thanks for the prior help--but need some more..
Use an app called software data cable......works like a charm.....remember u need to be on the same network......it uses FTP service.
Sent from my LG-P999 using xda premium
I use a really useful app called Airdroid which you can find on the Google market. It allows you to establish a Wifi connection through your computer's web browser to your phone. I then transfer whatever music, files, shows or anything I want through it.
Thanks everybody
Just followed my previous steps as outlined. Being a noob, I had to do things gingerly, not to screw up. As I guessed, I have to reboot, before the ability to write takes effect (on es file explorer). Then it is just a matter of copy and paste.
Thanks all

[Q] advance rooted file explorer

folks, newbie here.
i noticed that there are 2 types of file explorer, the system file explorer that allows you browse around the /system/ directories and the media file explorer such as andro file explorer
could anyone please advise me any file explorer that allows me to access both /sdcard/ and /system/ directories please?
i stumbled upon this thread http://forum.xda-developers.com/showthread.php?t=716309 that recommends root explorer, but it doesnt allow me to open /sdcard/ directories
thanks in advance
I use ES File Explorer and Root Explorer. Both give you full access to your phones file system, including /system and /sdcard.
_MetalHead_ said:
I use ES File Explorer and Root Explorer. Both give you full access to your phones file system, including /system and /sdcard.
Click to expand...
Click to collapse
They do, es file explorer is free, and allows you to to lan shares from pc. Just have to enable root options in settings. I have both, but I currently use es file since I can access my pc from it.
Sent from my HTC One X using Tapatalk 2
kleeman7 said:
They do, es file explorer is free, and allows you to to lan shares from pc. Just have to enable root options in settings. I have both, but I currently use es file since I can access my pc from it.
Sent from my HTC One X using Tapatalk 2
Click to expand...
Click to collapse
thanks kleeman for the info,
I have a rooted HTC One X ATT version, running on non ATT network (brought it to asia)
it doesnt allow me to tether out of a box nor play downloaded glumobile games.
i've browsed xdaforum and found out there are several files in root directory that need to be replaced to fix this.
so i need to access /data/data/com.android.providers.telephony/databases/telephony.db
(which root explorer allows me to access, but doesnt allow me to access the sdcard directory)
whereas ES only allows me to access /data/data/
did i do something wrong with the ES?
thanks again
nicodws said:
thanks kleeman for the info,
I have a rooted HTC One X ATT version, running on non ATT network (brought it to asia)
it doesnt allow me to tether out of a box nor play downloaded glumobile games.
i've browsed xdaforum and found out there are several files in root directory that need to be replaced to fix this.
so i need to access /data/data/com.android.providers.telephony/databases/telephony.db
(which root explorer allows me to access, but doesnt allow me to access the sdcard directory)
whereas ES only allows me to access /data/data/
did i do something wrong with the ES?
thanks again
Click to expand...
Click to collapse
I don't get why you think you can't access your /sdcard with Root Explorer, you can access EVERYTHING with it.
And with ES you have to go into the settings an enable the root explorer to be able to access everything.
_MetalHead_ said:
I don't get why you think you can't access your /sdcard with Root Explorer, you can access EVERYTHING with it.
And with ES you have to go into the settings an enable the root explorer to be able to access everything.
Click to expand...
Click to collapse
MetalHead,
Thanks, it works! now i can access the directory path.
one last question, whenever i tried to edit /system/build.prop
it doesnt allow me to save it after editing, or replace the file with a new one.
i'm referring to this xda article which i cant reply since i'm a noob with less than 10 posts
http://forum.xda-developers.com/showthread.php?t=1714298
please help me if you dont mind.
and as for the root explorer, i have no idea why it doesnt work. one touch of back button makes it "unfortunately root explorer has terminated"
thanks again
nicodws said:
MetalHead,
Thanks, it works! now i can access the directory path.
one last question, whenever i tried to edit /system/build.prop
it doesnt allow me to save it after editing, or replace the file with a new one.
i'm referring to this xda article which i cant reply since i'm a noob with less than 10 posts
http://forum.xda-developers.com/showthread.php?t=1714298
please help me if you dont mind.
and as for the root explorer, i have no idea why it doesnt work. one touch of back button makes it "unfortunately root explorer has terminated"
thanks again
Click to expand...
Click to collapse
You have to mount the file system as read/write otherwise you can't edit anything in /system. Navigate to /system then hit menu >settings, then scroll down all the way to the root settings section and check the circle next to Mount File System. You will be able to edit the build.prop after doing that.
As far as Root Explorer FC'ing on you, I dunno man I've never had it crash on me once in the 3 years I've been using it. Try deleting it and re-installing it.
_MetalHead_ said:
You have to mount the file system as read/write otherwise you can't edit anything in /system. Navigate to /system then hit menu >settings, then scroll down all the way to the root settings section and check the circle next to Mount File System. You will be able to edit the build.prop after doing that.
As far as Root Explorer FC'ing on you, I dunno man I've never had it crash on me once in the 3 years I've been using it. Try deleting it and re-installing it.
Click to expand...
Click to collapse
MetalHead, the ES trick works!
thanks a lot!
No prob

[FIX] KITKAT Security FC

First, you need ROOT access to do this. It will fix the security force-close and enable the uninstall of apps.
1 - Download FIXV2 here - http://d-h.st/gMh
2 - Extract the file to your desktop and copy the files inside "FIRMWARE\IMAGE" folder to your phone.
3 - Download root explorer from play store and move those files to the firmware\image directory located on your phone.
4 - Long press each file and set permition to RW-R-R (0644) (You do this by selecting OWNER to read and write, GROUP to read and OTHERS to read.
5 - Reboot and try accessing settings.
Thanks to ferreinf for the link and how to do it, I just tried to do this as much newbie proof as possible.
have seen this problem in numerous ROM threads(haven't myself run into this), thanks for the heads up :thumbs up:
Sent from my Transformer Prime TF201 using Tapatalk
scorthyn said:
First, you need ROOT access to do this. It will fix the security force-close and enable the uninstall of apps.
1 - Download FIXV2 here - http://d-h.st/gMh
2 - Extract the file to your desktop and copy the files inside "FIRMWARE\IMAGE" folder to your phone.
3 - Download root explorer from play store and move those files to the firmware\image directory located on your phone.
4 - Long press each file and set permition to RW-R-R (0644) (You do this by selecting OWNER to read and write, GROUP to read and OTHERS to read.
5 - Reboot and try accessing settings.
Thanks to ferreinf for the link and how to do it, I just tried to do this as much newbie proof as possible.
Click to expand...
Click to collapse
Hi
Does this help to uninstall system apps as wel instead of deleting apk from system/app folder
Thanks.
smohanv said:
Hi
Does this help to uninstall system apps as wel instead of deleting apk from system/app folder
Thanks.
Click to expand...
Click to collapse
No, it has nothing to do with what you want and there's absolutely no point in doing what wanna do either. You can not reclaim the free space to yourself and that would yet prevent you from installing OTA updates. The best way around this is to unable the system apps you don't wanna run.
Doublepranks said:
No, it has nothing to do with what you want and there's absolutely no point in doing what wanna do either. You can not reclaim the free space to yourself and that would yet prevent you from installing OTA updates. The best way around this is to unable the system apps you don't wanna run.
Click to expand...
Click to collapse
Your description about this patch is confusing...
Read your description,
First, you need ROOT access to do this. It will fix the security force-close and enable the uninstall of apps.
scorthyn said:
First, you need ROOT access to do this. It will fix the security force-close and enable the uninstall of apps.
1 - Download FIXV2 here - http://d-h.st/gMh
2 - Extract the file to your desktop and copy the files inside "FIRMWARE\IMAGE" folder to your phone.
3 - Download root explorer from play store and move those files to the firmware\image directory located on your phone.
4 - Long press each file and set permition to RW-R-R (0644) (You do this by selecting OWNER to read and write, GROUP to read and OTHERS to read.
5 - Reboot and try accessing settings.
Thanks to ferreinf for the link and how to do it, I just tried to do this as much newbie proof as possible.
Click to expand...
Click to collapse
firmware\image directory located on your phone.
Where is this directory on the phone? it does not exist, are we to just push the whole dir w/files to the phone? I agree, need alittle more info here please....
Good work if it does what it says....:good:
TheAxman said:
firmware\image directory located on your phone.
Where is this directory on the phone? it does not exist, are we to just push the whole dir w/files to the phone? I agree, need alittle more info here please....
Good work if it does what it says....:good:
Click to expand...
Click to collapse
Worked for me to get the nexus g+ rom working fully... used root browsed in ROM Toolbox to copy the files to the relevant folder off root, and set all the permissions to rwx.

Categories

Resources