[EOL] [KITCHEN] ArchiKitchen - Android Kitchen [Linux]

Search This thread

osm0sis

Senior Recognized Developer / Contributor
Mar 14, 2012
16,767
40,432
Halifax
GT-i9250
Google Nexus 4
That's possible. ArchiKitchen uses mkbootimg created by @osm0sis - https://github.com/osm0sis/mkbootimg.

Hi! Nice project! :)

Could you please provide credit in the OPs however? Thanks in advance! Keep up the good work. :highfive:

If ArchiKitchen has the latest updates from there, then it should be handling the boot image fine. I've been using Android Image Kitchen for my M8 boot images with no issue.

Correct! I've had a few confirmations it works on the M8 with no issues. Guess it pays to stay ahead! :D

@JustArchi you might just need to add dtb support to the repacking part of your script; my two binaries should definitely handle it. :cowboy:
 

JustArchi

Inactive Recognized Developer
Mar 7, 2013
8,739
38,807
Warsaw
Hi! Nice project! :)

Could you please provide credit in the OPs however? Thanks in advance! Keep up the good work.



Correct! I've had a few confirmations it works on the M8 with no issues. Guess it pays to stay ahead! :D

@JustArchi you might just need to add dtb support to the repacking part of your script; my two binaries should definitely handle it. :cowboy:

Sure thing, I have a little list of third-party tools used by ArchiKitchen here - https://github.com/JustArchi/ArchiKitchen/blob/master/tools.txt but I'm too lazy to write a nice thread so I have everything on my todo list, haha.

I'll definitely add you in a moment, thank you for your awesome work by the way :).
 
  • Like
Reactions: osm0sis

iamsuperuser

Senior Member
Aug 15, 2011
699
166
37
Hyderabad
Xiaomi Poco F1
@JustArchi
Excellent !! :victory: :good:

Finally a kitchen that works for my Note 3 ha3g SM-N900 Exynos .
Yaaaaaaaaaaayyyyyyyyyy!!!!! :good::good:

Used it on Ubuntu13.10 x64(VM Ware)

Please consider adding /data/app & /data/data backup and restore scripts in you future releases.

Thanks Again
 

friedrich420

Senior Member
Dec 25, 2011
8,698
24,008
The Land of Whatever
If you tell me manual process of doing so, I'll. I don't have any device with KNOX, and I won't buy one for obvious reasons. My SGS3 is the last Samsung probably :p.

Its 3-4 files in system/app and 3-4 files in system/priv-app and also the whole container folder..
The files are not the same for every model so im not sure how it could be done universally...
 

JustArchi

Inactive Recognized Developer
Mar 7, 2013
8,739
38,807
Warsaw
Its 3-4 files in system/app and 3-4 files in system/priv-app and also the whole container folder..
The files are not the same for every model so im not sure how it could be done universally...

We can make a "blacklist" of KNOX apps and delete them if they exist. As you know the KNOX better than I do, if you could tell me everything that should be deleted (folders/apps) then I could implement such feature. We can always improve it in future, ArchiKitchen is open for all suggestions :).
 

friedrich420

Senior Member
Dec 25, 2011
8,698
24,008
The Land of Whatever
We can make a "blacklist" of KNOX apps and delete them if they exist. As you know the KNOX better than I do, if you could tell me everything that should be deleted (folders/apps) then I could implement such feature. We can always improve it in future, ArchiKitchen is open for all suggestions :).

Ill make you a list in a few minutes for both s4 and note 3 :)

KNOX APPS:

NOTE 3 and S4

system/app:
1. ContainerAgent.apk
2. KNOXAgent.apk
3. KnoxAttestationAgent.apk
4. KNOXStore.apk
5. KNOXStub.apk

system/priv-app

1. KLMSAgent.apk
2. SPDClient.apk

system/containers/framework

1. KNOXModeSwitcher.apk
2. sec_container_1.zzzKnoxLauncher.apk

system/lib

1. libknoxdrawglfunction.so
 
Last edited:

JustArchi

Inactive Recognized Developer
Mar 7, 2013
8,739
38,807
Warsaw

friedrich420

Senior Member
Dec 25, 2011
8,698
24,008
The Land of Whatever

iamsuperuser

Senior Member
Aug 15, 2011
699
166
37
Hyderabad
Xiaomi Poco F1
hi

can anyone help me for how to use the kitchen through ubuntu ?

--Install ubuntu

--Download ArchiKitchen-master.zip in ubuntu and extract it.

--In the extracted folder you get following folders and files
base_drops(folder), files(folder), tools(folder), .gitgnore, archi and tools.txt

--Put system.img, boot.img, cache.img & modem.bin from tar.md5 into base_drops folder.

--Open terminal in ArchiKitchen-master folder and type ./archi

--from here everything is same as dsixda kitchen, just follow instructions on the kitchen.

---------- Post added at 03:46 PM ---------- Previous post was at 03:17 PM ----------

Ill make you a list in a few minutes for both s4 and note 3 :)

KNOX APPS:

NOTE 3 and S4

system/app:


system/priv-app



system/containers/framework



system/lib
@friedrich420

Thanks for the list, :good:

There are these files in
/system/preloadedkiosk/kioskdefault.apk and
/system/preloadedsso/ssoservice.apk_

I saw this
s2v2vl.png
icon in ssoservice.apk_/res/drawable-hdpi folder, looks like some knox related apk.

And the kioskdefault.apk has images of the samsung launcher ,

I use a different launcher from play store,

So can we delete both 'preloadedkiosk' and 'preloadedsso' folders ???
 

iamsuperuser

Senior Member
Aug 15, 2011
699
166
37
Hyderabad
Xiaomi Poco F1
I can add preloadedsso to the list, if you think that it's KNOX-related app, but preloadedkiosk is not KNOX-related, it's typical bloatware. And my Kitchen doesn't yet debloat ROM, but maybe in future... :D.

https://github.com/JustArchi/ArchiKitchen/commit/45f62c09384da706354b37cc86dd62bac6352805

Yes please add preloadedsso to the list coz it is KNOX-related app, and it is .apk_ not just .apk

For debloating note 3 (atleast :p) you can use the Spreadsheet HERE :good:

But most important feature of all data/app and data/data backup-restore. :fingers-crossed:

I'm trying to add these myself with below lines in updater-script

Code:
run_program("/sbin/mount", "-t", "auto", "/data");
package_extract_dir("data", "/data");
set_perm(1000, 1000, 0771, "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/data");
unmount("/data");

BUT I cannot restore the /data/data part. :crying:

Also please consider adding ' Change Wipe Status of ROM ' feature. :fingers-crossed:

This is my current updater-script


Code:
ui_print("                              ");
ui_print("                              ");
ui_print("Installing NB2 with SONY Media");
ui_print("                              ");
ui_print("                              ");


ui_print(" ");
ui_print(" ");
ui_print("Mounting Partitions");
run_program("/sbin/mount", "-t", "auto", "/system");
run_program("/sbin/mount", "-t", "auto", "/data");
run_program("/sbin/mount", "-t", "auto", "/cache");

ui_print(" ");
ui_print(" ");
ui_print("Formatting....");
ui_print(" ");
ui_print(" System ");
delete_recursive("/system");
ui_print(" ");
ui_print(" Data ");
delete_recursive("/data");
delete_recursive("/storage/emulated/0/Android");
delete_recursive("/storage/emulated/legacy/Android");
delete_recursive("/storage/extSdCard/Android");
ui_print(" ");
ui_print(" Cache ");
delete_recursive("/cache");
ui_print(" ");
ui_print(" & Dalvik-Cache ");
delete_recursive("/data/dalvik-cache");

ui_print(" ");
ui_print(" ");
ui_print("Extracting System");
package_extract_dir("system", "/system");

ui_print(" ");
ui_print(" ");
ui_print("Symlinking...");
symlink("dumpstate", "/system/bin/dumpcrash");
symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
symlink("logcat", "/system/bin/lolcat");
symlink("mksh", "/system/bin/sh");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("/system/xbin/busybox", "/system/bin/busybox");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/chcon");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/clear");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/cp");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/du");
symlink("toolbox", "/system/bin/freshsebool");
symlink("toolbox", "/system/bin/getenforce");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/getsebool");
symlink("toolbox", "/system/bin/grep");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/load_policy");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/md5");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/mkswap");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/playback");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/readlink");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/restorecon");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/runcon");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/setenforce");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/setsebool");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/swapoff");
symlink("toolbox", "/system/bin/swapon");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/touch");
symlink("toolbox", "/system/bin/touchinput");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");

ui_print(" ");
ui_print(" ");
ui_print("Setting Metadata");
set_metadata_recursive("/system", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/androidshmservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:androidshmservice_exec:s0");
set_metadata("/system/bin/apaservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:apaservice_exec:s0");
set_metadata("/system/bin/app_process", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
set_metadata("/system/bin/at_distributor", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:at_distributor_exec:s0");
set_metadata("/system/bin/auditd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:auditd_exec:s0");
set_metadata("/system/bin/bintvoutservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bintvoutservice_exec:s0");
set_metadata("/system/bin/bootanimation", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bootanimation_exec:s0");
set_metadata("/system/bin/bootchecker", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bootchecker_exec:s0");
set_metadata("/system/bin/bugreport", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bugreport_exec:s0");
set_metadata("/system/bin/charon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:charon_exec:s0");
set_metadata("/system/bin/clatd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:clatd_exec:s0");
set_metadata("/system/bin/connfwexe", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:connfwexe_exec:s0");
set_metadata("/system/bin/createsystemfile", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:createsystemfile_exec:s0");
set_metadata("/system/bin/cs", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:cs_exec:s0");
set_metadata("/system/bin/debuggerd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:debuggerd_exec:s0");
set_metadata("/system/bin/dhcpcd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dhcp_exec:s0");
set_metadata("/system/bin/dnsmasq", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dnsmasq_exec:s0");
set_metadata("/system/bin/drmserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drmserver_exec:s0");
set_metadata("/system/bin/drsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drsd_exec:s0");
set_metadata("/system/bin/dumpstate", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dumpstate_exec:s0");
set_metadata("/system/bin/dumpsys", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dumpsys_exec:s0");
set_metadata("/system/bin/hostapd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:hostapd_exec:s0");
set_metadata("/system/bin/icd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:icd_exec:s0");
set_metadata("/system/bin/immvibed", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:immvibed_exec:s0");
set_metadata("/system/bin/installd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:installd_exec:s0");
set_metadata("/system/bin/insthk", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:insthk_exec:s0");
set_metadata("/system/bin/ipruleset", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ipruleset_exec:s0");
set_metadata("/system/bin/jackservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:jackservice_exec:s0");
set_metadata("/system/bin/keystore", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:keystore_exec:s0");
set_metadata("/system/bin/logwrapper", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logwrapper_exec:s0");
set_metadata("/system/bin/mcDriverDaemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mobicoredaemon_exec:s0");
set_metadata("/system/bin/mdnsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mdnsd_exec:s0");
set_metadata("/system/bin/mediaserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mediaserver_exec:s0");
set_metadata("/system/bin/mksh", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:shell_exec:s0");
set_metadata("/system/bin/mtpd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtp_exec:s0");
set_metadata("/system/bin/netcfg", "uid", 0, "gid", 3003, "mode", 02750, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/netd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netd_exec:s0");
set_metadata("/system/bin/npsmobex", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mobexdaemon_exec:s0");
set_metadata("/system/bin/ping", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ping_exec:s0");
set_metadata("/system/bin/pppd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ppp_exec:s0");
set_metadata("/system/bin/prepare_param.sh", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:prepare_param_sh_file:s0");
set_metadata("/system/bin/racoon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:racoon_exec:s0");
set_metadata("/system/bin/rild", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:rild_exec:s0");
set_metadata("/system/bin/run-as", "uid", 0, "gid", 2000, "mode", 0750, "capabilities", 0x0, "selabel", "u:object_r:runas_exec:s0");
set_metadata("/system/bin/samsungpowersoundplay", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:samsungpowersoundplay_exec:s0");
set_metadata("/system/bin/scranton_RD", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:playready_exec:s0");
set_metadata("/system/bin/sdcard", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sdcardd_exec:s0");
set_metadata("/system/bin/secure_storage_daemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:secure_storage_exec:s0");
set_metadata("/system/bin/sensorhubservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sensorhubservice_exec:s0");
set_metadata("/system/bin/servicemanager", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:servicemanager_exec:s0");
set_metadata("/system/bin/smdexe", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:smdexe_exec:s0");
set_metadata("/system/bin/ss_conn_daemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ss_conn_daemon_exec:s0");
set_metadata("/system/bin/surfaceflinger", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:surfaceflinger_exec:s0");
set_metadata("/system/bin/tima_dump_log", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:tima_dump_exec:s0");
set_metadata("/system/bin/vold", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vold_exec:s0");
set_metadata("/system/bin/wpa_supplicant", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wpa_exec:s0");
set_metadata_recursive("/system/etc/dhcpcd", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:dhcp_system_file:s0");
set_metadata_recursive("/system/etc/ppp", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0555, "capabilities", 0x0, "selabel", "u:object_r:ppp_system_file:s0");
set_metadata("/system/etc/dhcpcd/dhcpcd-run-hooks", "uid", 1014, "gid", 2000, "mode", 0550, "capabilities", 0x0, "selabel", "u:object_r:dhcp_system_file:s0");
set_metadata_recursive("/system/lib", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_library_file:s0");
set_metadata_recursive("/system/vendor", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0"); # NOTICE: This should be applied only to folders, as files have 0 UID and 0 GID. However it shouldn't cause problems, as we can't cover everything
set_metadata_recursive("/system/xbin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");

ui_print(" ");
ui_print(" ");
ui_print("Installing SuperSU & BusyBox");
set_metadata("/system/xbin/su", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
set_metadata("/system/xbin/daemonsu", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
set_metadata("/system/bin/.ext/.su", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
run_program("/system/xbin/su", "--install");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");


ui_print(" ");
ui_print(" ");
ui_print("Activating Sony Music Technology ");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/mm-audio-acdb-test");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/mm-audio-alsa-test");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/mm-audio-native-test");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/mm-mpo-dec-test");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/mm-mpo-enc-test");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/MPQStrMgrTest");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/MPQUnitTest");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/MPQVideoRendererTestApp");


ui_print(" ");
ui_print(" ");
ui_print("Flashing NB2 Insecure Kernel");
package_extract_file("boot.img", "/dev/block/mmcblk0p9");
ui_print(" ");
ui_print(" ");
ui_print("Flashing T.W.R.P v2.7.0.2");
package_extract_file("recovery.img", "/dev/block/mmcblk0p10");
ui_print(" ");
ui_print(" ");
ui_print("Flashing Modem");
package_extract_file("modem.bin", "/dev/block/mmcblk0p13");


ui_print(" ");
ui_print(" ");
ui_print("Installing User Apps & Data");
package_extract_dir("data", "/data");
set_perm(1000, 1000, 0771, "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/data");

ui_print(" ");
ui_print(" ");
ui_print("Un-mounting Partitions");
unmount("/cache");
unmount("/data");
unmount("/system");

ui_print(" ");
ui_print(" ");
ui_print("Finish");
ui_print(" ");
ui_print(" ");
ui_print(" Wipe Cache and Dalvik cache");
ui_print(" ");
ui_print(" ");
ui_print(" ");


Please suggest any changes in my updater-script :highfive::cowboy:
 

JustArchi

Inactive Recognized Developer
Mar 7, 2013
8,739
38,807
Warsaw
Yes please add preloadedsso to the list coz it is KNOX-related app, and it is .apk_ not just .apk

For debloating note 3 (atleast :p) you can use the Spreadsheet HERE :good:

But most important feature of all data/app and data/data backup-restore. :fingers-crossed:

I'm trying to add these myself with below lines in updater-script

Code:
run_program("/sbin/mount", "-t", "auto", "/data");
package_extract_dir("data", "/data");
set_perm(1000, 1000, 0771, "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/data");
unmount("/data");

BUT I cannot restore the /data/data part. :crying:

Also please consider adding ' Change Wipe Status of ROM ' feature. :fingers-crossed:

This is my current updater-script


Code:
ui_print("                              ");
ui_print("                              ");
ui_print("Installing NB2 with SONY Media");
ui_print("                              ");
ui_print("                              ");


ui_print(" ");
ui_print(" ");
ui_print("Mounting Partitions");
run_program("/sbin/mount", "-t", "auto", "/system");
run_program("/sbin/mount", "-t", "auto", "/data");
run_program("/sbin/mount", "-t", "auto", "/cache");

ui_print(" ");
ui_print(" ");
ui_print("Formatting....");
ui_print(" ");
ui_print(" System ");
delete_recursive("/system");
ui_print(" ");
ui_print(" Data ");
delete_recursive("/data");
delete_recursive("/storage/emulated/0/Android");
delete_recursive("/storage/emulated/legacy/Android");
delete_recursive("/storage/extSdCard/Android");
ui_print(" ");
ui_print(" Cache ");
delete_recursive("/cache");
ui_print(" ");
ui_print(" & Dalvik-Cache ");
delete_recursive("/data/dalvik-cache");

ui_print(" ");
ui_print(" ");
ui_print("Extracting System");
package_extract_dir("system", "/system");

ui_print(" ");
ui_print(" ");
ui_print("Symlinking...");
symlink("dumpstate", "/system/bin/dumpcrash");
symlink("libGLESv2.so", "/system/lib/libGLESv3.so");
symlink("logcat", "/system/bin/lolcat");
symlink("mksh", "/system/bin/sh");
symlink("Roboto-Bold.ttf", "/system/fonts/DroidSans-Bold.ttf");
symlink("Roboto-Regular.ttf", "/system/fonts/DroidSans.ttf");
symlink("/system/xbin/busybox", "/system/bin/busybox");
symlink("toolbox", "/system/bin/cat");
symlink("toolbox", "/system/bin/chcon");
symlink("toolbox", "/system/bin/chmod");
symlink("toolbox", "/system/bin/chown");
symlink("toolbox", "/system/bin/clear");
symlink("toolbox", "/system/bin/cmp");
symlink("toolbox", "/system/bin/cp");
symlink("toolbox", "/system/bin/date");
symlink("toolbox", "/system/bin/dd");
symlink("toolbox", "/system/bin/df");
symlink("toolbox", "/system/bin/dmesg");
symlink("toolbox", "/system/bin/du");
symlink("toolbox", "/system/bin/freshsebool");
symlink("toolbox", "/system/bin/getenforce");
symlink("toolbox", "/system/bin/getevent");
symlink("toolbox", "/system/bin/getprop");
symlink("toolbox", "/system/bin/getsebool");
symlink("toolbox", "/system/bin/grep");
symlink("toolbox", "/system/bin/hd");
symlink("toolbox", "/system/bin/id");
symlink("toolbox", "/system/bin/ifconfig");
symlink("toolbox", "/system/bin/iftop");
symlink("toolbox", "/system/bin/insmod");
symlink("toolbox", "/system/bin/ioctl");
symlink("toolbox", "/system/bin/ionice");
symlink("toolbox", "/system/bin/kill");
symlink("toolbox", "/system/bin/ln");
symlink("toolbox", "/system/bin/load_policy");
symlink("toolbox", "/system/bin/log");
symlink("toolbox", "/system/bin/ls");
symlink("toolbox", "/system/bin/lsmod");
symlink("toolbox", "/system/bin/lsof");
symlink("toolbox", "/system/bin/md5");
symlink("toolbox", "/system/bin/mkdir");
symlink("toolbox", "/system/bin/mkswap");
symlink("toolbox", "/system/bin/mount");
symlink("toolbox", "/system/bin/mv");
symlink("toolbox", "/system/bin/nandread");
symlink("toolbox", "/system/bin/netstat");
symlink("toolbox", "/system/bin/newfs_msdos");
symlink("toolbox", "/system/bin/notify");
symlink("toolbox", "/system/bin/playback");
symlink("toolbox", "/system/bin/printenv");
symlink("toolbox", "/system/bin/ps");
symlink("toolbox", "/system/bin/readlink");
symlink("toolbox", "/system/bin/renice");
symlink("toolbox", "/system/bin/restorecon");
symlink("toolbox", "/system/bin/rm");
symlink("toolbox", "/system/bin/rmdir");
symlink("toolbox", "/system/bin/rmmod");
symlink("toolbox", "/system/bin/route");
symlink("toolbox", "/system/bin/runcon");
symlink("toolbox", "/system/bin/schedtop");
symlink("toolbox", "/system/bin/sendevent");
symlink("toolbox", "/system/bin/setconsole");
symlink("toolbox", "/system/bin/setenforce");
symlink("toolbox", "/system/bin/setprop");
symlink("toolbox", "/system/bin/setsebool");
symlink("toolbox", "/system/bin/sleep");
symlink("toolbox", "/system/bin/smd");
symlink("toolbox", "/system/bin/start");
symlink("toolbox", "/system/bin/stop");
symlink("toolbox", "/system/bin/swapoff");
symlink("toolbox", "/system/bin/swapon");
symlink("toolbox", "/system/bin/sync");
symlink("toolbox", "/system/bin/top");
symlink("toolbox", "/system/bin/touch");
symlink("toolbox", "/system/bin/touchinput");
symlink("toolbox", "/system/bin/umount");
symlink("toolbox", "/system/bin/uptime");
symlink("toolbox", "/system/bin/vmstat");
symlink("toolbox", "/system/bin/watchprops");
symlink("toolbox", "/system/bin/wipe");

ui_print(" ");
ui_print(" ");
ui_print("Setting Metadata");
set_metadata_recursive("/system", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/androidshmservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:androidshmservice_exec:s0");
set_metadata("/system/bin/apaservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:apaservice_exec:s0");
set_metadata("/system/bin/app_process", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
set_metadata("/system/bin/at_distributor", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:at_distributor_exec:s0");
set_metadata("/system/bin/auditd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:auditd_exec:s0");
set_metadata("/system/bin/bintvoutservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bintvoutservice_exec:s0");
set_metadata("/system/bin/bootanimation", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bootanimation_exec:s0");
set_metadata("/system/bin/bootchecker", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bootchecker_exec:s0");
set_metadata("/system/bin/bugreport", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:bugreport_exec:s0");
set_metadata("/system/bin/charon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:charon_exec:s0");
set_metadata("/system/bin/clatd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:clatd_exec:s0");
set_metadata("/system/bin/connfwexe", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:connfwexe_exec:s0");
set_metadata("/system/bin/createsystemfile", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:createsystemfile_exec:s0");
set_metadata("/system/bin/cs", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:cs_exec:s0");
set_metadata("/system/bin/debuggerd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:debuggerd_exec:s0");
set_metadata("/system/bin/dhcpcd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dhcp_exec:s0");
set_metadata("/system/bin/dnsmasq", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dnsmasq_exec:s0");
set_metadata("/system/bin/drmserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drmserver_exec:s0");
set_metadata("/system/bin/drsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:drsd_exec:s0");
set_metadata("/system/bin/dumpstate", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dumpstate_exec:s0");
set_metadata("/system/bin/dumpsys", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:dumpsys_exec:s0");
set_metadata("/system/bin/hostapd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:hostapd_exec:s0");
set_metadata("/system/bin/icd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:icd_exec:s0");
set_metadata("/system/bin/immvibed", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:immvibed_exec:s0");
set_metadata("/system/bin/installd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:installd_exec:s0");
set_metadata("/system/bin/insthk", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:insthk_exec:s0");
set_metadata("/system/bin/ipruleset", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ipruleset_exec:s0");
set_metadata("/system/bin/jackservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:jackservice_exec:s0");
set_metadata("/system/bin/keystore", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:keystore_exec:s0");
set_metadata("/system/bin/logwrapper", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:logwrapper_exec:s0");
set_metadata("/system/bin/mcDriverDaemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mobicoredaemon_exec:s0");
set_metadata("/system/bin/mdnsd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mdnsd_exec:s0");
set_metadata("/system/bin/mediaserver", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mediaserver_exec:s0");
set_metadata("/system/bin/mksh", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:shell_exec:s0");
set_metadata("/system/bin/mtpd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mtp_exec:s0");
set_metadata("/system/bin/netcfg", "uid", 0, "gid", 3003, "mode", 02750, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");
set_metadata("/system/bin/netd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:netd_exec:s0");
set_metadata("/system/bin/npsmobex", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:mobexdaemon_exec:s0");
set_metadata("/system/bin/ping", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ping_exec:s0");
set_metadata("/system/bin/pppd", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ppp_exec:s0");
set_metadata("/system/bin/prepare_param.sh", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:prepare_param_sh_file:s0");
set_metadata("/system/bin/racoon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:racoon_exec:s0");
set_metadata("/system/bin/rild", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:rild_exec:s0");
set_metadata("/system/bin/run-as", "uid", 0, "gid", 2000, "mode", 0750, "capabilities", 0x0, "selabel", "u:object_r:runas_exec:s0");
set_metadata("/system/bin/samsungpowersoundplay", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:samsungpowersoundplay_exec:s0");
set_metadata("/system/bin/scranton_RD", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:playready_exec:s0");
set_metadata("/system/bin/sdcard", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sdcardd_exec:s0");
set_metadata("/system/bin/secure_storage_daemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:secure_storage_exec:s0");
set_metadata("/system/bin/sensorhubservice", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:sensorhubservice_exec:s0");
set_metadata("/system/bin/servicemanager", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:servicemanager_exec:s0");
set_metadata("/system/bin/smdexe", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:smdexe_exec:s0");
set_metadata("/system/bin/ss_conn_daemon", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:ss_conn_daemon_exec:s0");
set_metadata("/system/bin/surfaceflinger", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:surfaceflinger_exec:s0");
set_metadata("/system/bin/tima_dump_log", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:tima_dump_exec:s0");
set_metadata("/system/bin/vold", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:vold_exec:s0");
set_metadata("/system/bin/wpa_supplicant", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:wpa_exec:s0");
set_metadata_recursive("/system/etc/dhcpcd", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:dhcp_system_file:s0");
set_metadata_recursive("/system/etc/ppp", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0555, "capabilities", 0x0, "selabel", "u:object_r:ppp_system_file:s0");
set_metadata("/system/etc/dhcpcd/dhcpcd-run-hooks", "uid", 1014, "gid", 2000, "mode", 0550, "capabilities", 0x0, "selabel", "u:object_r:dhcp_system_file:s0");
set_metadata_recursive("/system/lib", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_library_file:s0");
set_metadata_recursive("/system/vendor", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0"); # NOTICE: This should be applied only to folders, as files have 0 UID and 0 GID. However it shouldn't cause problems, as we can't cover everything
set_metadata_recursive("/system/xbin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");

ui_print(" ");
ui_print(" ");
ui_print("Installing SuperSU & BusyBox");
set_metadata("/system/xbin/su", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
set_metadata("/system/xbin/daemonsu", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
set_metadata("/system/bin/.ext/.su", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
run_program("/system/xbin/su", "--install");
run_program("/system/xbin/busybox", "--install", "-s", "/system/xbin");


ui_print(" ");
ui_print(" ");
ui_print("Activating Sony Music Technology ");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/mm-audio-acdb-test");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/mm-audio-alsa-test");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/mm-audio-native-test");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/mm-mpo-dec-test");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/mm-mpo-enc-test");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/MPQStrMgrTest");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/MPQUnitTest");
set_perm_recursive(0, 2000, 0755, 0755, "/system/bin/MPQVideoRendererTestApp");


ui_print(" ");
ui_print(" ");
ui_print("Flashing NB2 Insecure Kernel");
package_extract_file("boot.img", "/dev/block/mmcblk0p9");
ui_print(" ");
ui_print(" ");
ui_print("Flashing T.W.R.P v2.7.0.2");
package_extract_file("recovery.img", "/dev/block/mmcblk0p10");
ui_print(" ");
ui_print(" ");
ui_print("Flashing Modem");
package_extract_file("modem.bin", "/dev/block/mmcblk0p13");


ui_print(" ");
ui_print(" ");
ui_print("Installing User Apps & Data");
package_extract_dir("data", "/data");
set_perm(1000, 1000, 0771, "/data");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/app");
set_perm_recursive(1000, 1000, 0771, 0644, "/data/data");

ui_print(" ");
ui_print(" ");
ui_print("Un-mounting Partitions");
unmount("/cache");
unmount("/data");
unmount("/system");

ui_print(" ");
ui_print(" ");
ui_print("Finish");
ui_print(" ");
ui_print(" ");
ui_print(" Wipe Cache and Dalvik cache");
ui_print(" ");
ui_print(" ");
ui_print(" ");


Please suggest any changes in my updater-script :highfive::cowboy:

delete_recursive("/data");

Shouldn't it delete /data/media (/storage/sdcard0) as well? :laugh:

https://github.com/JustArchi/ArchiDroid/blob/2.X-EXPERIMENTAL/_archidroid/exec/wipe.sh
https://github.com/JustArchi/ArchiD...ETA-INF/com/google/android/updater-script#L73

Here you go :cowboy:.
 
  • Like
Reactions: iamsuperuser

Top Liked Posts

  • There are no posts matching your filters.
  • 283
    kitchen.png


    ArchiKitchen - Brand new Android Kitchen

    Commits/Changes -> https://github.com/JustArchi/ArchiKitchen/commits/master
    Source -> https://github.com/JustArchi/ArchiKitchen
    TODO list -> https://github.com/JustArchi/ArchiKitchen/issues?state=open

    Download. Of course you can also clone my repository to stay up to date.
    109
    [SIZE="+1"]Features:[/SIZE]
    • Compatible with every Linux, which provides bash shell (every available distro nowadays)
    • Full ARM/X86 support for all included android binaries (Root, Busybox)
    • Dynamic permissions - A generic list of all available permissions, with proper filter for your local build and device
    • Dynamic symlinks - A generic list of all available symlinks, with proper filter for your local build and device. Additionaly if you're building from stock image, support for including symlinks from image itself, which results in best 1:1 copy
    • FS-friendly method of flashing - ROMs created with ArchiKitchen are fully compatible with every available partition, which means that they don't reformat /system partition during flashing. This is extremely important for dual-FS support for example for EXT4 and F2FS on SGS3.
    • Kernel repacking - Powered by mkbootimg, repacking a kernel never was easier. With one click you're extracting the kernel along with ramdisk to the proper folder, and with the second you repack it back
    • Deodexing - With one click you can easily deodex your whole ROM. With multi-threaded process and automatic API detection, this never was easier as well.
    • ArchiDroid Init.d - Forget about relying on kernel's ramdisk. Implement init.d in your ROM, not the kernel!
    • Latest [Bak]smali
    • Latest SuperSU
    • Latest Busybox
    • Latest Zipalign
    • And many more in the unique shell ktichen

    [SIZE="+1"]Credits:[/SIZE]
    @osm0sis - For mkbootimg
    @Chainfire - For SuperSU
    @Stericson - For BusyBox
    @JesusFreke - For [Bak]smali
    @bgcngm - For MTK-Tools
    AOSP - For Zipalign
    64
    ArchiKitchen Tutorial

    Part 1 - Setting up Linux & ArchiKitchen on Windows

    By watching above step-by-step video, you'll learn:
    1. How to install Debian on your VirtualBox machine
    2. How to connect Windows with Linux through a shared VBox folder
    3. How to install ArchiKitchen
    4. How to create your first custom ROM, with built-in Root and Busybox

    Extra information:
    - You can use any virtualization method you want. I suggest using VirtualBox, as it's very easy, flexible and free virtualization solution.
    - You can use nearly any Linux distro. I suggest either Debian or Ubuntu, as both of them have excellent support and are very easy to install and use, compared to some other ones. However if you feel fine in Linux environment, you can install nearly any distro you like.

    Mini.iso link
    Weekly Debian Testing.iso link
    Installing virtualbox additions: apt-get install virtualbox-guest-dkms
    Installing required tools: apt-get install zip unzip openjdk-7-jdk
    Mounting a shared VBox folder: mount -t vboxsf yourName /path/to/yourFolder


    Tutorials made by other developers: @bigrammy
    Part 1. Prepare for linux Installation https://www.youtube.com/watch?v=aDsQTcDvSMY
    Part 2. Install Linux (Ubuntu/Zorin) https://www.youtube.com/watch?v=KwnIjCXXM5Y
    Part 2.5. Edit Winows bootloader to boot Linux: https://www.youtube.com/watch?v=gNpQucQxcFQ
    Part 3. Work as Root Mod & Install ArchiKitchen https://www.youtube.com/watch?v=T_ad7uML8QM
    Part 4. How to add your device locally to the Kitchen: http://youtu.be/YXNDcmf6GhI


    ArchiKitchen Questions & Answers

    Q: What is this "ArchiKitchen"?
    A: A Linux-based kitchen, with a main objective of converting stock ROM drops in .img, .tar.md5 or similar formats to CWM-flashable .zip.

    Q: So I can create my own custom ROM based on stock ROM with it?
    A: Exactly.

    Q: Is it for Linux only? Why windows is not supported?
    A: Let's face it, Android is based on Linux kernel and we could call it a mobile UNIX fork. It's hard to work with Linux-based things on Windows, in fact, Windows doesn't even offer Bash (Bourne-again shell), which is absolutely core for ArchiKitchen. Working with windows is painful, for example - .img mounting. I can very easily mount any filesystem image on Linux with just one command, while doing so on Windows usually requires a massive convertion of whole image to .zip file, then extracting a single files. Also, Windows doesn't support symbolic links, and this makes it impossible to create 1:1 copy of the image "translated" to zip file. Therefore, making a Windows port would require lots of more work and solving issues, and even with that it would still cause some core features to be unavailable. However, launching Linux on Windows is very easy thanks to VirtualBox and other virtualization software, so you don't need to reformat your PC or stick purely with Linux. In fact, this is the proposed way of using ArchiKitchen - Installing a native Linux distro (suggested: Debian or Ubuntu) and then installing ArchiKitchen on it. Take a look at tutorial to see how easily you can install and run ArchiKitchen in Linux VBox.

    Q: Is Cygwin supported?
    A: No. Cygwin IS NOT supported and it's not planned to add such support. Reason is nearly the same as above one. However, ArchiKitchen is open-source project and I'm open for all pull requests, so perhaps somebody will add support for Cygwin in the future. Until then, ArchiKitchen is compatible ONLY with Linux, and if you use it on Cygwin you're on your own with the issues that may happen.

    Q: Which phones are supported?
    A: ArchiKitchen contains a local "database" of devices, which includes a kernel/modem blocks to be used. However, as long as you know the partition layour of your device (kernel block), ArchiKitchen works with every phone and every Android variant. I'm trying to make it as universal as possible, so even if your device does not exist in our local database, it should work.

    Q: How can I add my own phone to the local database?
    A: If it doesn't exist yet, take a look at "product" folder. Inside you can notice various devices with name based on their models. ArchiKitchen will detect your ROM's model and check inside if it exists, if it does, then some properties for this model will be loaded, if it doesn't exist, then ArchiKitchen will ask user for them. Probably the best idea is to copy one of the already available models (for example "m0" - Samsung Galaxy S3), then rename new copied folder to your model name and finally edit files inside.

    Q: What is "NULL" text found for example in some MODEM files in the database?
    A: Some phones have a possibility to flash modem directly from CWM, others don't. "NULL" text indicates that this model does not support flashing modem.bin, so even if ArchiKitchen finds and recognizes it, it will pop up an error telling you that it unfortunately can't be used.

    Q: Where is SYSTEM block?
    A: System block is not being used at all, as it's a valid partition and should be located in "fstab" file in recovery already. ArchiKitchen mounts system automatically through "mount" binary, with automatic filesystem and /system path. I consider providing a system block as something obsolete, because it's only required when you're formatting a partition, and even during flashing, a wipe - delete_recursive() function is enough. Therefore, ArchiKitchen does NOT require providing a /system block.


    ArchiKitchen Troubleshooting

    Q: It looks like something is wrong with zipalign command. I can notice errors like "./zipalign: No such file or directory"
    A: This is because zipalign is x86 binary (32-bit), while you have amd64 (64-bit) Linux. Therefore, we must install some missing core packages to properly support x86 binaries. This will do the trick:
    Code:
    apt-get install lib32stdc++6 lib32z1
    42
    [SIZE="+1"]ArchiDroid Init.d[/SIZE]
    ArchiDroid Init.d is an innovative method for including init.d support in the ROM itself, and not in the kernel. ArchiKitchen supports adding ArchiDroid Init.d to any Android ROM.

    ArchiDroid Init.d is based on two files. A core - debuggerd hook, and a check part - simple init.d script.

    Init.d script is named 00ARCHIDROID_INITD, and it only creates a special file to notify the core that init.d has been already executed, therefore it can't conflict with anything and it's completely safe.

    The core is a hook for special /system/bin/debuggerd binary, which is normally called once during initial boot. Therefore, when it's called, ArchiDroid Init.d firstly waits a specified amount of time (default: 5 seconds), in case if user has already a kernel with init.d support. This is required because otherwise all init.d scripts would be executed twice - by kernel and our init.d. After specified time, if init.d is still not executed, our hook executes all scripts in alfabetical order. Lastly, when we're done, hook is executing original debuggerd binary (default: debuggerd.real) and shares the environment, arguments and everything. This is a perfect method for implementing init.d in the ROM itself, because we don't need to trust the kernel that it supports and executes init.d properly. We give it a 5 seconds to execute it, and eventually we do the job if kernel is not interested in that. This way we can support both custom kernels with native init.d support (we wait initial delay, if kernel executes init.d, all is fine and we don't have to do so), and also pure stock kernels without init.d support (we wait initial delay, kernel doesn't care about init.d, so we're executing it).

    I think that such hook works far better than relying on the kernel and modyfing stock ramdisks. Also we're sure that even if user changes kernel to any custom one, we still have reliable init.d support, regardless if custom kernel supports init.d or not.