Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[TUTORIAL] How to create an CWM installable .zip (Mod)

OP FlorisNL

14th February 2012, 10:17 PM   |  #1  
FlorisNL's Avatar
OP Senior Member
Flag Amersfoort
Thanks Meter: 388
 
507 posts
Join Date:Joined: Jun 2011
More
Hey guys, made an tutorial on how to make an CWM installable .zip

Requirements
Notepad++
An CWM/Feamod installable .zip for your device


Instructions:

1. Get yourself an CWM installable .zip for your device.
2. Extract the .zip
3. Go into the META-INF folder, delete CERT.RSA, CERT.SF and MANIFEST.MF.
4. go to META-INF/com/google/android
5. Right-Click on updater-script and select Notepad++
6. You see an script. Edit it. If you want to extract the folder (zip)/system/media/audio/ui use this script:
Code:
package_extract_dir("system/media/audio/ui", "/system/media/audio/ui");


ui_print("text"); means the text shown when you install the .zip in CWM.
run_program("text"); means that CWM runs a program
delete("/system"); means that you delete /system
package_extract_dir("framework", "/system/etc"); means that the files in /system/framework are extracted in /system/etc (on the device)


Make the script. My script for my iPhone Sounds is
ui_print("iPhone-Sounds by FlorisNL");
Code:
show_progress(1.000000, 0);

mount("ext4", "/dev/block/mmcblk0p15", "/system");
set_progress(0.400000);

package_extract_dir("system/media/audio/ui", "/system/media/audio/ui");
set_progress(0.800000);

unmount("/system");
set_progress(0.900000);

ui_print("Installed Iphone-Sounds. Enjoy.");
set_progress(1.000000);
When your done, create an .zip with 7z. and test it. If you still got problems, feel free to post it in this topic.
(Sorry for my poor english sometimes ;p)

Floris
Last edited by FlorisNL; 19th February 2012 at 04:06 PM.
The Following 4 Users Say Thank You to FlorisNL For This Useful Post: [ View ]
15th February 2012, 09:44 PM   |  #2  
Senior Member
Thanks Meter: 206
 
639 posts
Join Date:Joined: Sep 2010
No need to make CWM flashable mod for audio files.

Put ogg/m4a/mp3 files in

sdcard/Alarms
sdcard/Notifications
sdcard/Ringtones

Reboot and media scanner will make them available in Settings > Sounds.

sdcard/Ringtones/.nomedia <- (0 size file)
Reboot and media scanner skip the folder sdcard/Ringtones
The Following User Says Thank You to O-T For This Useful Post: [ View ]
15th February 2012, 11:17 PM   |  #3  
FlorisNL's Avatar
OP Senior Member
Flag Amersfoort
Thanks Meter: 388
 
507 posts
Join Date:Joined: Jun 2011
More
But I want to know. And im not porting ringtones only but also lock sounds, camera shutter sound, etc.

Sent from my GT-I9001 using xda premium
15th February 2012, 11:51 PM   |  #4  
Senior Member
Thanks Meter: 206
 
639 posts
Join Date:Joined: Sep 2010
Then you must promise not to include aiPhaun sounds... :*

I don't want to be held responsible for distributing that to Android platform :\
16th February 2012, 04:09 PM   |  #5  
FlorisNL's Avatar
OP Senior Member
Flag Amersfoort
Thanks Meter: 388
 
507 posts
Join Date:Joined: Jun 2011
More
Quote:
Originally Posted by O-T

Then you must promise not to include aiPhaun sounds... :*

I don't want to be held responsible for distributing that to Android platform :\

Lol ok, it was just an idea. I just like the shutter sound and the lock sounds of the iphone but I prefer Android.
16th February 2012, 05:49 PM   |  #6  
wintel_mac's Avatar
Senior Member
Flag Nuremberg
Thanks Meter: 182
 
452 posts
Join Date:Joined: Jun 2011
Donate to Me
More
Just take a normal zip for your device, extract it, look at the file in META-INF\com\google\android --> updater-script (edit only with notepad++ under windows os, otherwise with normal notepad or other software the line endings might get converted from UNIX style to windows style which will not work!)

Files to be copied will most likely be in a folder structure like \system\YourFile.

Be sure to remove in \META-INF files CERT.RSA, CERT.SF and MANIFEST.MF.
Those are the files that gurantee the file is correct and integer ("signed zip") will become invalid after repacking.

Then pack everything with 7zip (with format .zip and lightest compression) and make sure that when you open up your zip META-INF is in the zip root.

More information on updater-scripts can be found on XDA or google with search for edify script.
The Following 4 Users Say Thank You to wintel_mac For This Useful Post: [ View ]
16th February 2012, 10:28 PM   |  #7  
FlorisNL's Avatar
OP Senior Member
Flag Amersfoort
Thanks Meter: 388
 
507 posts
Join Date:Joined: Jun 2011
More
What do you exactly mean with a zip for your device? Another mod?

Sent from my GT-I9001 using xda premium
17th February 2012, 05:44 PM   |  #8  
wintel_mac's Avatar
Senior Member
Flag Nuremberg
Thanks Meter: 182
 
452 posts
Join Date:Joined: Jun 2011
Donate to Me
More
Yes. For example, this is the start of crybert's AIO package script for 9001.
Code:
ui_print(" AIO - Package v1 by crybert		");
ui_print("**********************************");
ui_print("  	root      					");
ui_print("  	busybox						");
ui_print("  	init.d						");
ui_print("  	custom bootanimation 		");
ui_print("  	FeaModRecovery 1.4			");
ui_print("**********************************");
ui_print("  Credits:						");
ui_print("  	manveru0 - FeaModRecovery	");
ui_print("  	KeksKlip - Root				");
ui_print("  								");
ui_print("**********************************");
show_progress(1.000000, 0);

ui_print("Preparing device");
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/system");
package_extract_dir("system", "/system");
set_progress(0.200000);

ui_print("Activating SuperUser");
set_perm(0, 0, 06755, "/system/bin/su");
symlink("/system/bin/su", "/system/xbin/su");
set_progress(0.400000);
17th February 2012, 06:14 PM   |  #9  
FlorisNL's Avatar
OP Senior Member
Flag Amersfoort
Thanks Meter: 388
 
507 posts
Join Date:Joined: Jun 2011
More
Quote:
Originally Posted by wintel_mac

Yes. For example, this is the start of crybert's AIO package script for 9001.

Code:
ui_print(" AIO - Package v1 by crybert		");
ui_print("**********************************");
ui_print("  	root      					");
ui_print("  	busybox						");
ui_print("  	init.d						");
ui_print("  	custom bootanimation 		");
ui_print("  	FeaModRecovery 1.4			");
ui_print("**********************************");
ui_print("  Credits:						");
ui_print("  	manveru0 - FeaModRecovery	");
ui_print("  	KeksKlip - Root				");
ui_print("  								");
ui_print("**********************************");
show_progress(1.000000, 0);

ui_print("Preparing device");
mount("ext4", "EMMC", "/dev/block/mmcblk0p15", "/system");
package_extract_dir("system", "/system");
set_progress(0.200000);

ui_print("Activating SuperUser");
set_perm(0, 0, 06755, "/system/bin/su");
symlink("/system/bin/su", "/system/xbin/su");
set_progress(0.400000);

This is my script how it's now. It is installing but its not replacing the Lock.ogg - Unlock.ogg - TW_Unlock.ogg files... Can you help me?

Code:
ui_print("iPhone-Sounds by FlorisNL");
show_progress(1.000000, 0);

mount("MTD", "/system/media/audio/ui", "/system/media/audio/ui");
set_progress(0.400000);

package_extract_dir("system/media/audio/ui", "/system/media/audio/ui");
set_progress(0.800000);

unmount("/system/media/audio/ui");
set_progress(0.900000);

ui_print("Installed Iphone-Sounds. Enjoy.");
set_progress(1.000000);
My Folder:
Code:
system/media/audio/ui/Lock.ogg TW_Unlock.ogg Unlock.ogg
Code:
META-INF/com/google/android/updater-binary and updater-script
Last edited by FlorisNL; 17th February 2012 at 06:20 PM.
17th February 2012, 09:23 PM   |  #10  
wintel_mac's Avatar
Senior Member
Flag Nuremberg
Thanks Meter: 182
 
452 posts
Join Date:Joined: Jun 2011
Donate to Me
More
Mount command seems wrong.

Sent from my GT-I9001 using XDA App

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes