Script to delete-all? - Android Q&A, Help & Troubleshooting

Hi Folks, I'm trying to modify a de-bloat script to remove all sounds from the UI folder. Can someone help me out with the command?
Here is what I've tried so far that hasn't worked.
delete("/system/media/audio/ui/);
delete("/system/media/audio/ui/*);
delete("/system/media/audio/ui/*.*);
delete("/system/media/audio/ui/*.ogg);
None of this works. What would be the proper command to delete all files in a particular folder?

I ended up deleting the entire folder instead of folder contents.
http://forum.xda-developers.com/showthread.php?t=1265120

Related

Why can't I delete this folder/files

Ok this is driving me nuts. I've tried every file manager, script manager, file deleter and everything else I could come up with. And before anyone asks yes I've connected my phone to my computer and tried getting rid of them that way with no luck. They seem to get deleted but when I look on my phone there still there. I've been successful at making copies of the folders which now resulted in me having 2 folders I can't erase.
Here's the folder named "tmp" that's on my sd card.
https://www.dropbox.com/sh/m9l4ur7txma5aby/9Wx7p9KF9W
The folder consists of a cleanup.sh file that is written like this
#!/sbin/sh
rm -rf /sdcard/theme/
echo "Cleanup complete"
And another file named
"This folder can be deleted after the theme has been installed"
I have no clue as to what theme it's referring to nor do I recall what theme installed this but all I want to do is get rid of it. When I try to delete it all I get is uninstall fail, or not enough memory, which makes no sense. I've tried changing permissions with no luck and I'm stumped. I don't think these folders are causing any harm to my phone but still I want them erased. If anyone may know of another way maybe through terminal command or something I can erase these files I would be greatly appreciated.
sent from my DNA
What is the path to the file?
Localhost798 said:
What is the path to the file?
Click to expand...
Click to collapse
There's many different paths but the most direct path is /sdcard/tmp/cleanup.sh
Or u could go /storage/emulated/0/tmp/cleanup.sh
sent from my DNA

[Q] A ROM has the "system" folder as a file with no extension, how do I edit it?

[Q] A ROM has the "system" folder as a file with no extension, how do I edit it?
What the title says.
I got a new Chinese phone and I want to modify some guys custom ROM, removing some apps and adding some other things. But the System and Recovery folders are typed as "File" with no extensions.
Information on how to just access them or edit them would be greatly appreciated, thanks!

Dead files

Hello,
I do not know how I get them, but in my TitaniumBackup folder on /sdcard all files have 1.1.1970 timestamp and I can not delete them. I tried to call chmod, but also this gives error "permission denied".
Does anybody know how I can remove/fix these files on the root-shell? In general filesystem is fine. I can install new apps, copy files, create folder and so on. But there are these dead files
Greetings
Update: I was able to delete the files with the FileManager inside of TWRP. Problem solved

[Q] how to/should i add folders to backup scripts in addon.d

i want to save some custom apps that i have moved to system when i install CM updates. so i want to add them to a script in addon.d
these app folders seem to have the apk and an empty lib folder. adding the apk seems easy, but how exactly do i tell the script to also backup the 'lib' folder and restore it?
thanks.

ADB functions clarification and usage for data transfer/backup on an image disk

Hello xda-developers,
I'm trying to figure out the proper way to transfer app data from an Android image disk. I'm very new to this, so I hope I'm not missing something basic.
Situation. I have a .img disk image file obtained from a .vmdk file via a virtualbox conversion , the latter being created by an Android emulator. I'm trying to recover some app data and transfer that to a new, working, .img disk. The emulator works on Android 4.4.2, if that matters.
What I did. I extracted apks and copied app data folders (com.<devname>.<appname>) from/to the /data/data directory. I did that using a file manager (ES file explorer) or via the cp command, as I found in many tutorials and guides. Others suggested to copy those folders to /Android/data instead, so I did try that as well. These procedures were ineffective, because they both messed up with folders and files permissions. Although cp -ar retains folders/files permissions and ownership, that was of no use after the import into the working image. Those operations were performed on Ubuntu 18.04.
The problem (and a workaround). When the apks are installed, a new uid (in the 10000 group) is generated for them. These values are unknown when I import the data folders, hence they are destroyed at phone boot. A log in /data/system/uiderrors.txt confirms this. The only way I could make it work was to install the apk from scratch, open the app so that the new data folders are created with a proper uid, replace those folders with old ones and manually change ownership and permissions accordingly (for every apk). This turned out to be effective but it's a very tedious and error-prone process.
What am I doing wrong? How do ADB push, pull and backup commands manage folders permissions/ownership and app uids? Could they be useful in my situation? If so, how can I use them on a .img file?
Thank you.

Categories

Resources