Apprendre à faire un zip installable/flashable facilement
Description et pré-requis
Vous allez apprendre à faire un zip flashable facilement et avec votre appareil Android.
Pour vos Mods, ROMs, etc etc
Pré-requis
- ES Explorateur de fichier
- Script Manager
- ZipSigner
- un dossier META-INF récent, récupéré sur un MOD ou une ROM ou thème ...
Préparation du contenu à installer
Je vais prendre en exemple un de mes zip ( MOD )
J'ai des fichiers à installer dans :
/system/
/system/etc/init.d/
/system/bin/
/system/framework/
/system/xbin/
/système/bin
/data/
/.../...
/...
/sdcard/
/...
Je créé donc 3 dossier :
-system
-data
-sdcard
Si j'ai un fichier a installer dans /system/etc/init.d/ je dois crer dans le dossier system un dossier nommé : etc.
Dans ce dossier etc je dois créer un dossier nommé : init.d
Et coller dedans vos fichiers
updater-script
Là ... Cela devient plus délicat !
AUCUNE faute de syntaxe n'est tolérée ...
Où se trouve le updater-script ?
Dans /META-INF/com/google/android/
À quoi sert-il ?
Ce sont les commandes d'installation de vos fichiers:
Ouvrez le avec Script Manager.
voici comment est le miens:
updater-script :
ui_print("**********************************************************");
ui_print("Architect_Edition by NorthLight");
ui_print("**********************************************************");
ui_print(" ");
ui_print(" Only for Domination-20130720 ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print("Mounting /system /data /sdcard and /cache");
run_program("/sbin/mount", "/system");
run_program("/sbin/mount", "/data");
run_program("/sbin/mount", "/cache");
run_program("/sbin/mount", "/sdcard");
show_progress(1, 15);
ui_print("Deleting old files,please wait...");
delete_recursive("/data/tombstones");
delete_recursive("/data/dalvik-cache");
delete_recursive("/data/boot-cache");
delete_recursive("/data/resource-cache");
delete("/system/etc/init.d/S98CFSD");
delete("/system/etc/init.d/S98CFSE");
delete("/system/etc/init.d/S98CFSF");
delete("/system/etc/init.d/S98CFSG");
delete("/system/etc/init.d/S98CFSH");
delete("/system/etc/init.d/S98CFSI");
delete("/system/etc/init.d/S98CFSJ");
delete("/system/etc/init.d/S98CFSK");
delete("/system/etc/init.d/S98CFSL");
delete("/system/etc/init.d/S98CFSM");
delete("/system/etc/init.d/S98CFS_1.9.1");
delete("/system/etc/init.d/S98CFS_2.1.1.1");
delete("/system/etc/init.d/S98CFS_1.9.4");
delete("/system/etc/init.d/S98CFSStock");
delete("/system/etc/init.d/S98CFS_1_9_1");
delete("/system/etc/init.d/S98CFS_2_1_1_1");
delete("/system/etc/init.d/S98CFS_1_9_4");
delete("/system/etc/init.d/S99finish");
delete("/system/etc/init.d/89system_tweak");
delete("/system/etc/init.d/98fly_core");
delete("/system/etc/init.d/90screenstate_scaling");
delete("/system/etc/init.d/S97ramscript");
delete("/system/etc/init.d/S97rambooster");
delete("/system/etc/init.d/03sdcardspeedfix");
delete("/system/etc/init.d/04kerneltweaks");
delete("/system/etc/init.d/05sysctltweaks");
delete("/system/etc/init.d/98KickAssKernel");
delete("/system/etc/init.d/06tweaks");
delete("/system/etc/init.d/S01edt_sysctl");
delete("/system/etc/init.d/S98edt_tweaks");
delete("/system/etc/init.d/s99acidext4tweak");
delete("/system/etc/init.d/00remount");
delete("/system/etc/init.d/02Transform");
delete("/system/etc/init.d/01acid_sysctl");
delete("/system/etc/init.d/03sdcardspeedfix");
delete("/system/etc/init.d/04kerneltweaks");
delete("/system/etc/init.d/05sysctltweaks");
delete("/system/etc/init.d/S98CFSA");
delete("/system/etc/init.d/S98CFSB");
delete("/system/etc/init.d/nos_entropy_agg");
delete("/system/etc/init.d/nos_entropy_light");
delete("/system/etc/init.d/nos_entropy_mod");
delete("/system/etc/init.d/prof_mod");
delete("/system/etc/entropy/rngd_light");
delete("/system/etc/entropy/rngd_moderate");
delete("/system/xbin/rngd");
delete("/system/bin/entropy");
delete("/system/bin/nos_entropy");
delete("/system/bin/seeder");
delete("/system/xbin/rngd");
delete("/system/xbin/entro");
delete("/system/etc/init.d/S98CFSC");
delete("/system/etc/init.d/s78enable_touchscreen_stock");
delete("/system/etc/init.d/s78enable_touchscreen_2");
delete("/system/etc/init.d/net_buffer");
delete("/system/etc/init.d/ram_optimize");
delete("/system/etc/init.d/remount_fullext4");
delete("/system/etc/init.d/S70darky_zipalign");
delete("/system/etc/init.d/ext4_lagfix");
delete("/system/etc/init.d/05LagFixer");
delete("/system/etc/init.d/S98system_tweak");
delete("/system/etc/init.d/05Fly_engine");
delete("/system/etc/init.d/Fly_engine");
delete("/system/etc/init.d/08Fly_engine");
delete("/system/etc/init.d/98system_tweak");
delete("/system/etc/init.d/ram_optimize");
delete("/system/etc/init.d/net_buffer");
delete("/system/etc/init.d/ext4_lagfix");
delete("/system/etc/init.d/velocity_system");
delete("/system/etc/init.d/velocity_ram");
delete("/system/etc/init.d/s78sensitive_touchscreen");
delete("/system/etc/init.d/remountCM_fullext4");
ui_print("Installing patched services.jar, SuperCharger, Fly-On Mod");
ui_print(" ");
ui_print(" and ...");
ui_print(" ");
ui_print(" Kernel Architect");
ui_print(" ");
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
package_extract_dir("sdcard", "/sdcard");
ui_print("Fixing permissions...");
set_perm(0, 0, 0777, "/system/etc/init.d/98fly_engine");
set_perm(0, 0, 0777, "/system/etc/init.d/darky_zipalign");
set_perm(0, 0, 0777, "/system/xbin/openvpn");
set_perm(0, 0, 0777, "/system/etc/init.d/sqlite_optimize");
set_perm(0, 0, 0777, "/system/xbin/sqlite3");
set_perm(0, 0, 0777, "/system/xbin/zipalign");
set_perm(0, 0, 0777, "/system/lib/libncurses.so");
set_perm(0, 0, 0777, "/system/etc/init.d/09sdcardspeedfix");
set_perm(0, 0, 0777, "/system/etc/init.d/02logdelete1");
set_perm(0, 0, 0777, "/system/etc/init.d/zipaligndata");
set_perm(0, 0, 0777, "/system/etc/init.d/04Governor_tweaks");
set_perm(0, 0, 0777, "/system/etc/hosts");
set_perm(0, 2000, 0777, "/system/bin/bfq");
set_perm(0, 2000, 0777, "/system/bin/cfq");
set_perm(0, 2000, 0777, "/system/bin/deadline");
set_perm(0, 2000, 0777, "/system/bin/conservative");
set_perm(0, 2000, 0777, "/system/bin/freq");
set_perm(0, 2000, 0777, "/system/bin/freq1");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,1");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,2");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,3");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,4");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,5");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,6");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,7");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,8");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,9");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,97");
set_perm(0, 2000, 0777, "/system/bin/freqmax2");
set_perm(0, 2000, 0777, "/system/bin/governors");
set_perm(0, 2000, 0777, "/system/bin/hotplug");
set_perm(0, 2000, 0777, "/system/bin/lazy");
set_perm(0, 2000, 0777, "/system/bin/lulzactive");
set_perm(0, 2000, 0777, "/system/bin/lulzactiveq");
set_perm(0, 2000, 0777, "/system/bin/noop");
set_perm(0, 2000, 0777, "/system/bin/ondemand");
set_perm(0, 2000, 0777, "/system/bin/pegasusq");
set_perm(0, 2000, 0777, "/system/bin/row");
set_perm(0, 2000, 0777, "/system/bin/noop");
set_perm(0, 2000, 0777, "/system/bin/schedulers");
set_perm(0, 2000, 0777, "/system/bin/sio");
set_perm(0, 2000, 0777, "/system/bin/smartassV2");
set_perm(0, 2000, 0777, "/system/bin/volt");
set_perm(0, 2000, 0777, "/system/bin/vr");
set_perm(0, 2000, 0777, "/system/bin/zzmoove");
set_perm(0, 2000, 0777, "/system/bin/zen");
set_perm(0, 2000, 0777, "/system/bin/volt-50");
set_perm(0, 2000, 0777, "/system/bin/volt-25");
set_perm(0, 2000, 0777, "/system/bin/volt0");
set_perm(0, 2000, 0777, "/system/bin/volt+25");
set_perm(0, 2000, 0777, "/system/bin/volt+50");
set_perm(0, 2000, 0777, "/system/bin/touchwake");
set_perm(0, 2000, 0777, "/system/bin/touchwakeoff");
set_perm_recursive(0, 2000, 0777, 0777, "/system/etc/entropy");
set_perm(0, 2000, 0777, "/system/bin/rngd_on");
set_perm(0, 2000, 0777, "/system/bin/rngd_off");
set_perm_recursive(0, 2000, 0777, 0777, "/data/Fly-On");
set_perm(0, 0, 0777, "/system/etc/init.d/03kill_media_server");
run_program("/sbin/umount", "/system");
run_program("/sbin/umount", "/data");
run_program("/sbin/umount", "/cache");
ui_print("Welcome on Architect_Edition .:");
ui_print(" ");
ui_print(" So ... Fast ! and ... battery friendly !");
ui_print("Architect_Edition by NorthLight");
ui_print("**********************************************************");
ui_print(" ");
ui_print(" Only for Domination-20130720 ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print("Mounting /system /data /sdcard and /cache");
run_program("/sbin/mount", "/system");
run_program("/sbin/mount", "/data");
run_program("/sbin/mount", "/cache");
run_program("/sbin/mount", "/sdcard");
show_progress(1, 15);
ui_print("Deleting old files,please wait...");
delete_recursive("/data/tombstones");
delete_recursive("/data/dalvik-cache");
delete_recursive("/data/boot-cache");
delete_recursive("/data/resource-cache");
delete("/system/etc/init.d/S98CFSD");
delete("/system/etc/init.d/S98CFSE");
delete("/system/etc/init.d/S98CFSF");
delete("/system/etc/init.d/S98CFSG");
delete("/system/etc/init.d/S98CFSH");
delete("/system/etc/init.d/S98CFSI");
delete("/system/etc/init.d/S98CFSJ");
delete("/system/etc/init.d/S98CFSK");
delete("/system/etc/init.d/S98CFSL");
delete("/system/etc/init.d/S98CFSM");
delete("/system/etc/init.d/S98CFS_1.9.1");
delete("/system/etc/init.d/S98CFS_2.1.1.1");
delete("/system/etc/init.d/S98CFS_1.9.4");
delete("/system/etc/init.d/S98CFSStock");
delete("/system/etc/init.d/S98CFS_1_9_1");
delete("/system/etc/init.d/S98CFS_2_1_1_1");
delete("/system/etc/init.d/S98CFS_1_9_4");
delete("/system/etc/init.d/S99finish");
delete("/system/etc/init.d/89system_tweak");
delete("/system/etc/init.d/98fly_core");
delete("/system/etc/init.d/90screenstate_scaling");
delete("/system/etc/init.d/S97ramscript");
delete("/system/etc/init.d/S97rambooster");
delete("/system/etc/init.d/03sdcardspeedfix");
delete("/system/etc/init.d/04kerneltweaks");
delete("/system/etc/init.d/05sysctltweaks");
delete("/system/etc/init.d/98KickAssKernel");
delete("/system/etc/init.d/06tweaks");
delete("/system/etc/init.d/S01edt_sysctl");
delete("/system/etc/init.d/S98edt_tweaks");
delete("/system/etc/init.d/s99acidext4tweak");
delete("/system/etc/init.d/00remount");
delete("/system/etc/init.d/02Transform");
delete("/system/etc/init.d/01acid_sysctl");
delete("/system/etc/init.d/03sdcardspeedfix");
delete("/system/etc/init.d/04kerneltweaks");
delete("/system/etc/init.d/05sysctltweaks");
delete("/system/etc/init.d/S98CFSA");
delete("/system/etc/init.d/S98CFSB");
delete("/system/etc/init.d/nos_entropy_agg");
delete("/system/etc/init.d/nos_entropy_light");
delete("/system/etc/init.d/nos_entropy_mod");
delete("/system/etc/init.d/prof_mod");
delete("/system/etc/entropy/rngd_light");
delete("/system/etc/entropy/rngd_moderate");
delete("/system/xbin/rngd");
delete("/system/bin/entropy");
delete("/system/bin/nos_entropy");
delete("/system/bin/seeder");
delete("/system/xbin/rngd");
delete("/system/xbin/entro");
delete("/system/etc/init.d/S98CFSC");
delete("/system/etc/init.d/s78enable_touchscreen_stock");
delete("/system/etc/init.d/s78enable_touchscreen_2");
delete("/system/etc/init.d/net_buffer");
delete("/system/etc/init.d/ram_optimize");
delete("/system/etc/init.d/remount_fullext4");
delete("/system/etc/init.d/S70darky_zipalign");
delete("/system/etc/init.d/ext4_lagfix");
delete("/system/etc/init.d/05LagFixer");
delete("/system/etc/init.d/S98system_tweak");
delete("/system/etc/init.d/05Fly_engine");
delete("/system/etc/init.d/Fly_engine");
delete("/system/etc/init.d/08Fly_engine");
delete("/system/etc/init.d/98system_tweak");
delete("/system/etc/init.d/ram_optimize");
delete("/system/etc/init.d/net_buffer");
delete("/system/etc/init.d/ext4_lagfix");
delete("/system/etc/init.d/velocity_system");
delete("/system/etc/init.d/velocity_ram");
delete("/system/etc/init.d/s78sensitive_touchscreen");
delete("/system/etc/init.d/remountCM_fullext4");
ui_print("Installing patched services.jar, SuperCharger, Fly-On Mod");
ui_print(" ");
ui_print(" and ...");
ui_print(" ");
ui_print(" Kernel Architect");
ui_print(" ");
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
package_extract_dir("sdcard", "/sdcard");
ui_print("Fixing permissions...");
set_perm(0, 0, 0777, "/system/etc/init.d/98fly_engine");
set_perm(0, 0, 0777, "/system/etc/init.d/darky_zipalign");
set_perm(0, 0, 0777, "/system/xbin/openvpn");
set_perm(0, 0, 0777, "/system/etc/init.d/sqlite_optimize");
set_perm(0, 0, 0777, "/system/xbin/sqlite3");
set_perm(0, 0, 0777, "/system/xbin/zipalign");
set_perm(0, 0, 0777, "/system/lib/libncurses.so");
set_perm(0, 0, 0777, "/system/etc/init.d/09sdcardspeedfix");
set_perm(0, 0, 0777, "/system/etc/init.d/02logdelete1");
set_perm(0, 0, 0777, "/system/etc/init.d/zipaligndata");
set_perm(0, 0, 0777, "/system/etc/init.d/04Governor_tweaks");
set_perm(0, 0, 0777, "/system/etc/hosts");
set_perm(0, 2000, 0777, "/system/bin/bfq");
set_perm(0, 2000, 0777, "/system/bin/cfq");
set_perm(0, 2000, 0777, "/system/bin/deadline");
set_perm(0, 2000, 0777, "/system/bin/conservative");
set_perm(0, 2000, 0777, "/system/bin/freq");
set_perm(0, 2000, 0777, "/system/bin/freq1");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,1");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,2");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,3");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,4");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,5");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,6");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,7");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,8");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,9");
set_perm(0, 2000, 0777, "/system/bin/freqmax1,97");
set_perm(0, 2000, 0777, "/system/bin/freqmax2");
set_perm(0, 2000, 0777, "/system/bin/governors");
set_perm(0, 2000, 0777, "/system/bin/hotplug");
set_perm(0, 2000, 0777, "/system/bin/lazy");
set_perm(0, 2000, 0777, "/system/bin/lulzactive");
set_perm(0, 2000, 0777, "/system/bin/lulzactiveq");
set_perm(0, 2000, 0777, "/system/bin/noop");
set_perm(0, 2000, 0777, "/system/bin/ondemand");
set_perm(0, 2000, 0777, "/system/bin/pegasusq");
set_perm(0, 2000, 0777, "/system/bin/row");
set_perm(0, 2000, 0777, "/system/bin/noop");
set_perm(0, 2000, 0777, "/system/bin/schedulers");
set_perm(0, 2000, 0777, "/system/bin/sio");
set_perm(0, 2000, 0777, "/system/bin/smartassV2");
set_perm(0, 2000, 0777, "/system/bin/volt");
set_perm(0, 2000, 0777, "/system/bin/vr");
set_perm(0, 2000, 0777, "/system/bin/zzmoove");
set_perm(0, 2000, 0777, "/system/bin/zen");
set_perm(0, 2000, 0777, "/system/bin/volt-50");
set_perm(0, 2000, 0777, "/system/bin/volt-25");
set_perm(0, 2000, 0777, "/system/bin/volt0");
set_perm(0, 2000, 0777, "/system/bin/volt+25");
set_perm(0, 2000, 0777, "/system/bin/volt+50");
set_perm(0, 2000, 0777, "/system/bin/touchwake");
set_perm(0, 2000, 0777, "/system/bin/touchwakeoff");
set_perm_recursive(0, 2000, 0777, 0777, "/system/etc/entropy");
set_perm(0, 2000, 0777, "/system/bin/rngd_on");
set_perm(0, 2000, 0777, "/system/bin/rngd_off");
set_perm_recursive(0, 2000, 0777, 0777, "/data/Fly-On");
set_perm(0, 0, 0777, "/system/etc/init.d/03kill_media_server");
run_program("/sbin/umount", "/system");
run_program("/sbin/umount", "/data");
run_program("/sbin/umount", "/cache");
ui_print("Welcome on Architect_Edition .:");
ui_print(" ");
ui_print(" So ... Fast ! and ... battery friendly !");
NB : lors de l'édition du script ne laisser jamais d'espace ni au début de la ligne ni à la fin.
Sinon vous aurez un Failed lors de l'installation.
Commandes
Dans le cas présent :
Code:
ui_print(" Écrivez ce que vous voulez ");
Code:
run_program("/sbin/mount", "/system");
Monter le dossier system afin d'y injecter notre contenu
Code:
delete_recursive("/data/dalvik-cache");
delete_récursive sert à effacer un dossier
Code:
delete("/system/etc/init.d/98fly_core");
Supprimer le fichier 98fly_coré du dossier init.d présent dans /system/etc/
Code:
package_extract_dir("system", "/system");
Extraire le dossier system et son contenu du zip vers le dossier system de votre appareil Android
Code:
set_perm(0, 0, 0777, "/system/etc/init.d/darky_zipalign");
Donner les permissions, en l'occurrence chmod 777 ( tous les droits en lecture/écriture )
set_perm(uid,gid,mode,target)
Pour tous fichier installer il faut donner les permissions en fonction de ce qu'il font ...
Code:
run_program("/sbin/umount", "/system");
Démonter le dossier system
liste des commandes
:
Compiler et signer le zip
Compiler
Avec ES Explorateur de fichier :
- selectionnez vos dossiers ( sans oublier le META-INF ...)
- Compresser en niveau de compression " stockage " c'est à dire sans compression
Signer
-Ouvrez l'application ZipSigner
-signez le zip précédemment compilé.
Et voilà ! Vous savez faire un zip installable/flashable ! Il n'y a plus qu'à redémarrer en mode Recovery ...
PS : je vais rajouter des screenshot et d'autres commandes
Dernière édition par NorthLight le Sam 27 Juil 2013 - 2:27, édité 2 fois