[Q] Flashable zip for copying files to /system - Nexus One Q&A, Help & Troubleshooting

So I've got a handful of audio files I need to copy to /system/media/audio/notifications and /system/media/audio/ringtones every time I flash a new ROM (even upgrade).
I do this since I often have my SD card mounted (car/desk/etc), and if I do, I get the terrible system beep ringtone/notification, since my N1 can't find the configured sound file.
How would I go about creating a flashable zip that would install those files to the correct location, rather than doing it manually each time?

I've made a similar flashable zip.
Here is what I did. Took a ROM zip file. Made a copy. Opened the *copy* up. Navigate to System. Delete all files/folders except for media.
Open up media folder. Delete all files/folders except for audio.
Open up audio folder. Delete all files/ folders except for ringtones and notifications.
Open up ringtones folder. Delete all files and add the ringtones you want.
Open up notifications folder. Delete all files and add the notifications you want.
Save the new zip file to the SD card and flash it.
And most importantly, NANDROID before you flash it.
BTW, you can also make a media/audio/notifications folder (and/or media/audio/ringtones) on the SD card. Then you can run then right from the card instead of loading them each time. Takes a little time for the new ringtones to show up in settings.

Related

I Need Helping Making A Custom update.zip

So I guess my question is, "Can anyone help me?"
I used custom ringtones, and I don't like using them from the SD card, it creates lag, takes longer to load the ringtone, etc, so I keep them on my /system/media folder. Normally to accomplish this, when I install a new ROM update, I edit it and resign it, with my media folder, rather than the ROM's.
My predicament however, is that I don't know how to change the file structure for the update, I know there are files in the update that say, this and this folder exist, where this goes, etc. This is what I don't know how to do.
All I need the update to do is contain the media (/system/media) folder, so I can just add all my ringtones and notifications to this update, and flash it after I flash whatever update/rom, etc, instead of always having to be at my computer to create a custom version of every rom I use.
Could anyone please care to help? I'd be ever grateful.
You can use the attached file.
Just edit the files in the ROM
zip it
put the zipped ROM in the same folder as the attached files
run sign.bat
FLASH
ID# said:
You can use the attached file.
Just edit the files in the ROM
zip it
put the zipped ROM in the same folder as the attached files
run sign.bat
FLASH
Click to expand...
Click to collapse
is this just to be used for signing? i already know how to sign files. i need someone to edit w/e files are inside the rom that tell its structure (this folder exists, and gets flashed here, this folder goes here, etc). i cant just take a cm rom and delete everything i dont need then flash it. it will get errors in recovery.
Make a folder called media in the root of your update, and create the proper descending folders in media (i.e. audio/ringtones, etc). Place your notifications/ringtones/alarms etc in the proper folders. (I am sure you understand this already)
Open your update-script file for the update and add the line
Code:
copy_dir PACKAGE:media SYSTEM:media
That should do it.
Note that if in the update-script you already have an entire system folder being copied over via
Code:
copy_dir PACKAGE:system SYSTEM:
then you need only add the folder media to the folder /system in the update.
cloverdale said:
Make a folder called media in the root of your update, and create the proper descending folders in media (i.e. audio/ringtones, etc). Place your notifications/ringtones/alarms etc in the proper folders. (I am sure you understand this already)
Open your update-script file for the update and add the line
Code:
copy_dir PACKAGE:media SYSTEM:media
That should do it.
Note that if in the update-script you already have an entire system folder being copied over via
Code:
copy_dir PACKAGE:system SYSTEM:
then you need only add the folder media to the folder /system in the update.
Click to expand...
Click to collapse
Thanks man, but my buddy actually just helped me out with this, but yeah thats exactly what I needed to know. Thanks a ton mate

Question about flashing.

I noticed all the ringers and notifier files in the system/media/audio/ folders. Could I:
1) take that zip and delete everything except for these files,
2) remove ringers I don't like,
3) add others I want
and just flash it in recovery? I know I can just put files on the sd card but in MIUI it's alot of navigating. Will it rewrite the folder contents and delete files not in the zip or just append whats there?
Thanks

Can't delete folder on my internal memory.

I had ktoonsez installed on my previous rom, I switched over to a different rom and now I can't delete the folder in my internal memory called, "device." When I look in the folder it has ktweaker and other stuff, I've tried to mount the system as r/w but it still doesn't work. Does anyone else have this folder? Photos attached.
Try looking in /data/media/0 or /data/media/legacy
See if the folder is there and try deleting it. Sometimes the files on /sdcard are just images of the data folder. GL!
Delete any folder easily
If you fell any problem to do copy,paste,error Deleting File or Folder.Then you should use Long Path Tool to solve your problem.
If Long Path Tool fails on start up, please ensure you have .net framework installed on your PC.

Importing stock ringtones into custom rom

How do I do it?
Sent from my XT894 using Tapatalk
Stock ringtones should be under the standard folder: /system/media/audio/ringtones. You can copy them out of there to the SD card or somesuch using any file manager that can acquire root access; Total Commander is one such example.
As for the ROM you're transferring to...it depends on how new it is.
For KitKat-based ROMS/CM11, you can make a folder on either the internal or external SD card simply named "ringtones", and put the ringtones in there; it should work. Alternatively, you can copy them directly into /system/media/audio/ringtones for the recipient ROM, as long as the permissions on the files are right (664/rw-r--r-- iirc).
For Lollipop/CM12(.1), the last time I checked, putting ringtones and notifications on either SD partition didn't work properly after a reboot (if at all to begin with); this might have been fixed at some point in the last few months, so it's worth checking.
A surefire way is using the built-in CM File Manger (Total Commander didn't used to work, but may these days) to copy them into /system/media/audio/ringtones, again, as long as the permissions are set properly. They should show right up, if not, reboot the phone.
Keep in mind that extra files placed in /system/media/audio/ringtones will be wiped during every ROM flash (e.g. nightlies and the like). After "installing" the ringtones, you can use something like ZIPme to make a flashable zip out of the ringtones folder, and flash that after a new nightly.

Skipping Existing Files When Transferring Music Causes Nothing to be Copied

As the title implies, trying to move files into a folder that already has some of the files you are moving provides the options to skip or overwrite existing files. Upon choosing skip existing files, nothing is copied. However, overwriting all the files seems to allow for everything to be copied. I've noticied that using Windows Explorer on the Droid Turbo in debug mode is a little wonky, but I can still move files. I am tired of having to overwrite my entire music library to copy some new songs from my computer. Anyone have any ideas?

Categories

Resources