How to: Create Clockwork Recovery flash files - Vibrant Themes and Apps

I have a shutdown sequence and some sounds I would like to turn in to a flashable .zip file. I checked out the CW forums, but that was more painful than informative. I have taken a look at some of the zip files I have found so far, but am not 100% sure about what I'm doing. Can anyone point me to a how-to or even in the general direction of some information to get me started?
Thanks guys!
Edit: Those interested can find all the information needed in the3dman's post and here:
http://www.londatiga.net/it/how-to-create-android-update-zip-package/
http://www.londatiga.net/general/how-to-sign-apk-zip-files/

I'd copy this guy
http://forum.xda-developers.com/showthread.php?t=795459

Thanks for the link. I had actually started there, and it's a great template if I just want to throw in my own files, but I was really looking for a how to so that I had more options for customizing, rather than being stuck with only the shutdown / startup sequence.
Sent from my SGH-T959 using XDA App

First you have to have your folder structure like this in the zip:
Main .zip
{
META-INF { com -> google -> android -> update-script } ( <- these are folders inside the META-INF except update-script this is a script file)
app (if the file you want to flash is an app it goes in this folder)
framework (if the file you want to flash is a framework file it goes in this folder)
system (if the file you want to flash is a system file (start up animations) it goes in this folder also make sure you put the correct subfolder inside this folder ie: if your file goes in system -> media make sure you put the file you wish to flash in a correctly named subfolder other wise it will flash into just the system folder and not into the correct folder within the system folder on your phone.)
}
After your folder structure is set up you must tell clockwork which folder or folders in the zip to flash. To do this open the update-script from the zip with a text editor and modify or add these lines with the correct folders.
copy_dir PACKAGE:framework SYSTEM:framework (use this for the framework folder)
copy_dir PACKAGE:app SYSTEM:app (use this for the app folder)
copy_dir PACKAGE:system SYSTEM:system (use this for the system folder)
Then sign your zip and flash.
Below is a picture of an example folder structure so show what I mean. Also I attached a zip with an example update-script in it.

the3dman said:
First you have to have your folder structure like this in the zip:
Main .zip
{
META-INF { com -> google -> android -> update-script } ( <- these are folders inside the META-INF except update-script this is a script file)
app (if the file you want to flash is an app it goes in this folder)
framework (if the file you want to flash is a framework file it goes in this folder)
system (if the file you want to flash is a system file (start up animations) it goes in this folder also make sure you put the correct subfolder inside this folder ie: if your file goes in system -> media make sure you put the file you wish to flash in a correctly named subfolder other wise it will flash into just the system folder and not into the correct folder within the system folder on your phone.)
}
After your folder structure is set up you must tell clockwork which folder or folders in the zip to flash. To do this open the update-script from the zip with a text editor and modify or add these lines with the correct folders.
copy_dir PACKAGE:framework SYSTEM:framework (use this for the framework folder)
copy_dir PACKAGE:app SYSTEM:app (use this for the app folder)
copy_dir PACKAGE:system SYSTEM:system (use this for the system folder)
Then sign your zip and flash.
Below is a picture of an example folder structure so show what I mean. Also I attached a zip with an example update-script in it.
Click to expand...
Click to collapse
Thank you very much! This was PERFECT for getting me started! This lead me to the following sites for more information on how-to's and even all the available syntax. For anyone looking to get into this (it's not difficult), check out these pages:
http://www.londatiga.net/general/how-to-sign-apk-zip-files/
http://www.londatiga.net/it/how-to-create-android-update-zip-package/

Related

[Q] help with theme GreenDevDroid Ultimate (solve)

friends
someone could help me or raise the issue with the original purpose of the windows, and not use that brings the theme
and try changing the original XML (xmlsForStandardWindowAnimation.zip), but the keyboard disappeared and I can not connect via USB, restarted
Greetings from Chile
excuse my English. jajjajjaajaaja sucks google translate
thanks
Hi.
Could you elaborate chronologically what happened/what did you do?
Hi
1 GDDUltimateForLGVoidEcho.zip extract files
2 Remove the framework-res.apk files
3 delete the files in the folder res / anim
4 Copy the contents of "xmlsForStandardWindowAnimation.zip" folder anim
5 sign "framework" res.apk "
6 compressed "GDDUltimateForLGVoidEcho.zip"with the new content "framework" res.apk "
7 signs "GDDUltimateForLGVoidEcho.zip"
install the theme with recovery, starts, but see some sort of errors that were closed following
google.process.gapps
com.android.email
com.mobileleader.sync
com.android.deskclock
the keyboard does not start (to write anything, numbers, names, etc)
I can not connect to usb
thank you very much for reading this and help
I hope you did nand backup your phone before installing the theme.
If you did that, do 'Nand restore' in recovery menu, reboot
if you did not do that, you need to reflash void-echo, reboot, install any void's modules such as kernel, a2sd, gapps, etc. that you want.
After making sure your phone is OK, try these steps:
- redownload GDDUltimateForLGVoidEcho.zip
- redownload xmlsForStandardWindowAnimation.zip
- extract contents of xmlsForStandardWindowAnimation.zip to a directory in your PC
- copy GDDUltimateForLGVoidEcho.zip to a file, say you name it 'temp.zip'
- open temp.zip (just open, not extracting it) with 7-zip
- while opening temp.zip, navigate to directory 'system/framework'
- doubleclick framework-res.apk
- navigate to directory 'res\anim'
- drag-drop previous extracted files from 'xmlsForStandardWindowAnimation.zip' to this directory ('res\anim')
- close 7-zip, answer 'Yes' when asked whether to update contents of framework-res.apk
- sign temp.zip
- copy the signed zip file to sd card and flash it
Hope this solves your problem.
Cheers.
giveme13s said:
I hope you did nand backup your phone before installing the theme.
If you did that, do 'Nand restore' in recovery menu, reboot
if you did not do that, you need to reflash void-echo, reboot, install any void's modules such as kernel, a2sd, gapps, etc. that you want.
After making sure your phone is OK, try these steps:
- redownload GDDUltimateForLGVoidEcho.zip
- redownload xmlsForStandardWindowAnimation.zip
- extract contents of xmlsForStandardWindowAnimation.zip to a directory in your PC
- copy GDDUltimateForLGVoidEcho.zip to a file, say you name it 'temp.zip'
- open temp.zip (just open, not extracting it) with 7-zip
- while opening temp.zip, navigate to directory 'system/framework'
- doubleclick framework-res.apk
- navigate to directory 'res\anim'
- drag-drop previous extracted files from 'xmlsForStandardWindowAnimation.zip' to this directory ('res\anim')
- close 7-zip, answer 'Yes' when asked whether to update contents of framework-res.apk
- sign temp.zip
- copy the signed zip file to sd card and flash it
Hope this solves your problem.
Cheers.
Click to expand...
Click to collapse
That is what he did wrong? no idea what the problem xD
Muchas gracias amigo!!

[Q] boot loop after arabic framework.jar

HI
I was running CF-Root-sgs2_XX_OXIKG3-v4.1
then through cwmv4.0.0.2
I have generated a zip file by doing
"Pull /system/framework/framework.jar from your phone and place it in the subfolder framework that you extracted in step 1
If you’re not using a CyanogenMod ROM, then you’ll also need to pull /system/lib/libandroid_runtime.so from your phone and place it in subfolder libandroid_runtime that you extracted in step 1
Double click on commands.exe. Do not close the black cmd screens that will pop up. Once the patch is done, you should get a patched framework.jar in the subfolder generated"
this is for making arabic framework.jar
the files I have pulled were from a super core_1 Kernel with Darkyrom2
then i have changed to CF-Root-sgs2_XX_OXIKG3-v4.1 kernel with cognition_S2-131
I went to cwmv4.0.0.2 and installed the zip file
boot loop happened
how can I fix it
thanks
"1-Download the patch below and extract it to a folder on your computer.
2-Pull /system/framework/framework.jar from your phone and place it in the subfolder framework that you extracted in step 1
3-If you’re not using a CyanogenMod ROM, then you’ll also need to pull /system/lib/libandroid_runtime.so from your phone and place it in subfolder libandroid_runtime that you extracted in step 1
4-Double click on commands.exe. Do not close the black cmd screens that will pop up. Once the patch is done, you should get a patched framework.jar in the subfolder generated
5-Version 0.800 provides a recovery flashable file in folder generated. Place that on your sdcard, reboot into recovery and flash it. If the flashing through recovery didn’t work for some reason, you’ll need to do the following manually:
-Put file generated/framework.jar in your phone at /system/framework/
-Put file generated/libandroid_runtime.so in your phone at /system/lib/ (if this file exists, it shouldn’t if you’re arabizing CM6).
-Put file REQUIRED-IMPORTANT/libicuuc-arabic.so in your phone at /system/lib/ This is extremely important, failing to place this file will result in a boot loop of your device"

[TUTORIAL] How to change apk icons

Use X-Plore file manager
(Root access is required)
First backup your original apk file.
Instructions:
1- Open an app as zip file
2- go to res\drawable-hdpi\ folder or other folders
3- find icon.png in this folder
4- then Go to the second section in the browser (on the screenshot)
5- find the png file which is your new icon.
6- Rename it "icon.png" and mark.
7- Then copy it and write over old one.
8- Done
Note:The new apk file is not signed so you can't install it like a normal installation.
So you can push it to the system\app folder (Root access is required)

Bloatware rename / removal batch file for Windows

Hi,
This is my first time creating a batch file for this. I have only renamed the apks but you can easily edit the file to remove them as well.
Requirements
1) Android-sdk installed
2) Root access to phone
Instructions:
Please move it to where your ADB-sdk\platform-tools\ folder is located
Double click the file
It will automatically rename the following apks to
Books.bak
Facebook.bak
FacebookEngine.bak
Facebook_Client.bak
HtcMusic.bak
HtcMusicEnhancer.bak
HtcMusicWidget.bak
MyVerizon.bak
NewBayService.bak
PlusOne.bak
Slingbox.bak
TuneIn.bak
VCAST_TONES.bak
VCast.bak
VZWInstaller.bak
VZW_Lets_Golf_3.bak
VZW_Real_Racing_2.bak
VZW_Slacker_Radio.bak
VZW_VMM_HUX.bak
VZW_VOD.bak
Videos.bak
VzNav.bak
Watch.bak
WifiRouter.bak
amazonmp3.bak
com.mobitv.client.nfl2010.bak

Plugin Descriptions (Donate Version)

Plugin Installation:
Open the Plugin Manager
Choose Install a Plugin
Choose the plugin you want to install
Choose Run a Plugin
Choose the Plugin you want to run
Enjoy!
NOTE: The usage instructions in each plugin description below assume you have already installed it. When the instructions end, that's when you run the plugin from the plugin manager.
SuperR's Kitchen Plugin Descriptions
SuperR Maintained Plugins:
add_placeholder
Only for system-as-root devices
Adds placeholder files to all empty directories in your project
add_remove_files
Add all apk files from a directory
Choose apk to import
Choose directory structure to import
Delete files from your ROM based on directory structure
NOTE: To use "Choose directory structure to import" and "Delete files from your ROM based on directory structure", your directory must be set up as the following example:
Code:
your_directory_name/system/anything_you_want
your_directory_name/vendor/anything_you_want
your_directory_name/cache/anything_you_want
your_directory_name/hidden/anything_you_want
your_directory_name/boot.img
The above is only an example. You can add anything you want as long as there is a "system" directory inside another directory. When choosing the directory, choose your_directory_name instead of system or it won't work. Think of the directory structure exactly like the kitchen project directory. When you import directory structure, your directory will be copied into your project directory and files will be overwritten if they already exist. When you remove a directory structure, you will choose your_directory_name again and the plugin will remove the same files it finds from your project directory.
amlogic_unpack
Unpack Amlogic firmware img
apktools
Choose an apk from your current rom directory.
Decompile the apk.
Build apk.
Sign apk with 3 options (use signapk.jar, copy original META-INF to new apk, or copy new classes.dex and resources.arsc to original apk).
Move apk back to where it came from.
Patch smali using .ptch files
Delete META-INF from all apk files
Delete SEC-INF from all apk files
Separate lib directory from all apk files
Zipalign apk files
aroma_install
Install Aroma in your existing ROM.
Create aroma-config using a menu.
Choose apk files to add to the option menu.
Usage:
Extract your ROM normally using ONLY set_metadata or set_perm.
autorom_config
Creates an AutoROM config file to automate the extraction process and many other tasks.
Currently supports perm type, vendor.img, rom name, custom signature, deodexing, root, su.d, and Busybox
buildprop_add
Adds lines from a file to build.prop.
concatimg
Combines partition_*.img files into a single img file
custom_zip
Create a flashable zip of one or more image files as long as you know the partition name where it should be flashed.
Create a flashable patch zip from directories that have matching fs_config and file_contexts3 files
Convert updater-script to update-binary script for use in the mods_install plugin
Usage:
Copy the partition images and/or directories you want in the zip into a new directory in your project.
In the kitchen main menu, choose Plugin Manager > Run a plugin > custom_zip
Choose the new directory from the list.
For img files in by-name devices, type the partition name from your device where it should be flashed (ex. aboot)
For img files in mmcblk devices, choose your block from the list (add it to the device superr_mmc file if needed first).
decrypt_htc
Decrypt ruu.exe and ruu.zip files stored in your current project directory.
Extract system.img & boot.img to the current project directory for extraction.
Usage:
Copy ruu.exe or ruu.zip to current project directory (ruu.zip must be named exactly ruu.zip).
gapps
Downloads and includes Open Gapps in your ROM.
Choice of aroma, super, stock, full, mini, micro, nano, or pico
Detects Android version and architecture from ROM to download the latest available version for your device.
If there is no ROM, it will allow you to choose Android version and architecture.
Remove gapps if it already exists.
gen_set_metadata
Generates set_metadata lines for every file in project directories that have matching fs_config and file_contexts3 files.
img_tools
Allows rebuilding ext4 img files that have been extracted by the kitchen even if there is not a complete ROM in the project.
Convert sparse img to raw img
Convert raw img to sparse img
Build super.img
Resize img
super.img Build Requirements:
All included img files must be built as sparse.
img file names must be either partition.img or partition_new.img.
super.img size must be in 00_project_files/srk.conf.
Example:
supersize=9437184000
The numeric value in the example above is the raw super.img file size in bytes.
The kitchen adds the super.img size when unpacking a super.img. If the kitchen did not unpack the super.img, you can enter the size in srk.conf manually.
Optional values metadata-size and metadata-slots can also be added to srk.conf. Defaults are listed below:
metadata-size=65536
metadata-slots=2
*This plugin will only work in v3.2.1.0 or higher*
lg_tools
Unpack LG kdz files
Removes rctd, ccmd, and triton from LG boot.img.
mods_install
Add any flashable zip to your ROM that uses an update-binary script instead of a updater-script
Remove mods
Shows the kitchen added mods you currently have installed
ozip_decrypt
Decrypt firmware.ozip files
payload_dump
Unpack payload.bin firmware
rockchip_unpack
Unpack Rockchip firmware img files
samsung_tools
Asks one-by-one if you want to add ro.config.tima=0, ro.config.knox=0, ro.securestorage.knox=false, ro.securestorage.support=false, ro.security.mdpp.ux=Disabled, and wlan.wfd.hdcp=disabled to ramdisk default.prop
Create tar.md5 from all img, mbn, ext4, and bin files in your ROM directory.
Create tar.md5 from all the above except system.img, system.img.ext4, boot.img, and recovery.img
Decode OMC/CSC
Deodex patch for Android 8.1+
Pack *_new.img files to lz4
sepolicy_injector
Converts sepolicy denials into allow rules, and optionally patches seplicy with the new rules.
Paste a denial
Read denials from 00_project_files/logcat.log
unsign_mtk_img
Removes MTK signature from img files
updateapp
Extract firmware.zip that contains UPDATE.APP
Extract img files from UPDATE.APP
Usage:
Place a firmware.zip or UPDATE.APP in your rom directory.
xiaomi_patch
Patches several things in Xiaomi firmware.
Usage:
Extract your firmware with the kitchen, then run the plugin.
xperia_unpack
Unpack Xperia firmware
Choose full firmware zip, an ftf file, or a sin file.
When choosing a sin file, all sin files in the project directory will be unpacked.
Respects the partition_extract_list variable from kitchen/tools/srk.conf
User Contributed Plugins:
None
Custom Plugins
The donate version has plugin support. This means you can integrate your own script into the kitchen. Each plugin must have its own directory inside the kitchen plugin directory, and it must be named the same as the plugin script.
Examples:
/kitchen/tools/plugins/example_bash/example_bash.sh (Linux, Mac)
/kitchen/tools/plugins/example_batch/example_batch.bat (Windows)
You can check the example plugins in the kitchen for more details and use them as templates for your own plugin.
There are 3 variables set in the example plugin to take note of:
bd = /path/to/kitchen
rd = /path/to/kitchen/superr_projectname
plugdir = /path/to/kitchen/tools/plugins/pluginname
NOTE: If you would like to contribute a plugin, please PM a link to the plugin for review.
This post contains the last working versions of all plugins that have lost native Windows support.
If you are running the kitchen in WSL, WSL2, Linux, or Mac you should use the kitchen plugin manager to get the latest versions of these plugins.

Categories

Resources