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

Search This thread

pressagny27

Senior Member
Aug 30, 2013
60
12
Cheswick
In a couple of days I will make some video tut's in spoken English for all the guys coming from Windows OS while it's still fresh in my own mind to try resolve all the plea's for help. ;)
@pressagny27 What's your current OS and PC Spec's I will try tailor it toward you. :confused:

---------- Post added at 03:20 AM ---------- Previous post was at 03:16 AM ----------



It did but I was too quick on the Enter key :laugh:

I use Windows 7 Home Premium Service Pack one. I really appreciate all you guys help.
 

bigrammy

Senior Member
Apr 8, 2011
2,962
2,592
huddersfield
I use Windows 7 Home Premium Service Pack one. I really appreciate all you guys help.

That's cool same as me :good:
It should simplify things anyway.
Things I will show you.
1, Prepare your PC to install Linux on a partition using windows tools.
Trust me It's quicker easier and safer to just do a dual boot setup than mess with all the VM's, iso's etc etc which just cause no end problems. :good:
For the Demo I will Use a Linux distro called Zorin which is based on Ubuntu. Coming from windows you will find it has a very familiar feel and look to it.
http://zorin-os.com/ Check it out I defo recommend it. But you can use what works best for you. ;)

2, I will show you how to make a few tweaks to the Linux distro for ease of use.

3, How to install ArchiKitchen A quick tour of the kitchen and how to get your phone automatically detected by the kitchen plus other stuff. :eek:

Please give me a couple of day's as work get's in the way of my play time. :laugh:
 

JustArchi

Inactive Recognized Developer
Mar 7, 2013
8,739
38,807
Warsaw
JustArchi please support Galaxy Note 4 SM-N910F Snapdragon wersion :)

Thats not how this works. Works one of 2 ways, give him the info needed after you confirmed it works for your device, or after confirming it works for your device, push your changes to github and submit a pull request to Archi.

As above.

There's no problem in updating the database, it's as simple as creating one folder with three files inside. The question is if kitchen properly supports your device, because this is the main reason for defining a device in the kitchen itself.

This way, user knows whether kitchen has been tested with his device, or not (yet).

And I'm not adding any device without required information and confirmation that kitchen works properly with that device. In fact, users should send pull requests, as knowledge how github works helps not only with this project. But this is not a requirement, the requirement is that kitchen has been tested on that device and you give required information.
 
Last edited:
  • Like
Reactions: Isriam and Dzepar

Thorvic777

Senior Member
May 3, 2013
947
1,242
La Fortuna
As above.

There's no problem in updating the database, it's as simple as creating one folder with three files inside. The question is if kitchen properly supports your device, because this is the main reason for defining a device in the kitchen itself.

This way, user knows whether kitchen has been tested with his device, or not (yet).

And I'm not adding any device without required information and confirmation that kitchen works properly with that device. In fact, users should send pull requests, as knowledge how github works helps not only with this project. But this is not a requirement, the requirement is that kitchen has been tested on that device and you give required information.
I added MY SM- N910h to the kitchen
 

FrozenTears

Senior Member
Jan 12, 2013
256
239
39
Karachi
Hopefully Shiny is correct :fingers-crossed:
But if not Frozen I suspect you may have some missing sys links or permissions that are specific to your Nokia Dual sim. :(
Try find a OTA update.zip for the same phone as yours so you can check and compare the updater-script's for any missing probably SoC based links/permissions. :eek:
You will probably find that any phone with the same dual sim SoC has probably got the same SoC specific links/permissions as yours. So try find a few so you can compare there updater-scripts and look for a common link/permission that's contained in them all then add them to your builds. :fingers-crossed:
It's Like that for the MTK SoC anyway :laugh:
Good Luck with the search. :cool:

Thanks bigrammy
 
Last edited:
  • Like
Reactions: bigrammy

Eliminater74

Recognized Developer
I decided I wanted to try out the Custom Rom business, Since I have enough equipment to test out on,
I have 2 Samsung Galaxy S Tab 10.5 (T805 Wifi LTE Unlocked International) (T800 Wifi)
and LG G3 Unlocked as well as LG F6..

I want to custom my T805. Thats my play tab since my T800 is my main Tablet thats used for everyday stuff..
anyhow. I have fallowed the Utube guide and it worked great, No problem there..
but something the youtube doesnt show you is, Deodexing and Init.s and a few others.. it only shows you Root and busybox.. Nothing more.

So when I follow that, it works. but when I try something more, init.d support zipaligned and deodex and decompiling kernel.img and support init.d there.

everything seems to work.. Till I flash and get Error executing update binary in zip.. Let it be told, I do use TWRP....

Also, would it be hard to add option to sign zip file and apk's? would be a nice option.. and
with samsung, is there a way to add the bootup screen mod.. to be able to disable the qma files and run bootanimation.zip file.. ??

Anyhow.. I thank the dev's for the great tool they put alot of work into......


EDITED: When I put back the debloated apps, everything worked again.. So its something to do with that.. hmmm... Any ideas??
 
Last edited:

Androidwizzard

Inactive Recognized Contributor
Nov 22, 2013
4,271
7,197
I decided I wanted to try out the Custom Rom business, Since I have enough equipment to test out on,
I have 2 Samsung Galaxy S Tab 10.5 (T805 Wifi LTE Unlocked International) (T800 Wifi)
and LG G3 Unlocked as well as LG F6..

I want to custom my T805. Thats my play tab since my T800 is my main Tablet thats used for everyday stuff..
anyhow. I have fallowed the Utube guide and it worked great, No problem there..
but something the youtube doesnt show you is, Deodexing and Init.s and a few others.. it only shows you Root and busybox.. Nothing more.

So when I follow that, it works. but when I try something more, init.d support zipaligned and deodex and decompiling kernel.img and support init.d there.

everything seems to work.. Till I flash and get Error executing update binary in zip.. Let it be told, I do use TWRP....

Also, would it be hard to add option to sign zip file and apk's? would be a nice option.. and
with samsung, is there a way to add the bootup screen mod.. to be able to disable the qma files and run bootanimation.zip file.. ??

Anyhow.. I thank the dev's for the great tool they put alot of work into......


EDITED: When I put back the debloated apps, everything worked again.. So its something to do with that.. hmmm... Any ideas??

Just a slight insight from me on some of your questions:
Most of rom builders don't use debloat option in the kitchen and recommend manual debloating.
No need for that bootanimation thing cause this can also be done manually.
Signing apk you got to run eg AndroidMultitool.
All general options are present in kitchen and for further things you got to learn additional stuff.
ArchiKitchen is an advanced tool, not an automatic rom builder, so :highfive:
 
Last edited:

Eliminater74

Recognized Developer
Just a slight insight from me on some of your questions:
Most of rom builders don't use debloat option in the kitchen and recommend manual debloating.
No need for that bootanimation thing cause this can also be done manually.
Signing apk you got to run eg AndroidMultitool.
All general options are present in kitchen and for further things you got to learn additional stuff.
ArchiKitchen is an advanced tool, not an automatic rom builder, so :highfive:

Thank you for your input on the matters above. I uderstand its an advanced tool. Most rom builders if not all seem to always point to use the kitchen to do most if not all of there rom buildings. I just want to test things out for my own personal use. Im not worried about bricking device. it wouldnt be the first time.. I have hard bricked one of my LG G3's and I have softbricken many times before., but I learned what not to do from the experience. The only way a guy can realy learn this stuff, Is if he experiments ( as long as he can afford the consequences behind it).. I learned everything from reading and doing it.. Just reading it alone doesnt help me. I need to see it in action and try it for my self.

I have been running a linux system for many years. I just recently decided I wanted to take a crack at Android Roms. im even considering taking a crack at compiling my own kernel. but I want to wait on that till I get more nfo on Android it self.. Im not new to the coding world. but I am new to the Android World. I am willing to take the risk. I know what commands will hardbrick this device. and I know pretty much how to use a Jtag (device that cost me $150.00) to resurrect Device from a hardbrick.

But, once again Thank you for your input and advice. As I said before. I just want to learn.. and I want to use the best programs to do such learning.. and The Kitchen is consider the best program to use for Custom roms. As long as one knows how to use it. It makes things much easier then doing things manually.. I know some things will have to done manually..
 

JustArchi

Inactive Recognized Developer
Mar 7, 2013
8,739
38,807
Warsaw
Thank you for your input on the matters above. I uderstand its an advanced tool. Most rom builders if not all seem to always point to use the kitchen to do most if not all of there rom buildings. I just want to test things out for my own personal use. Im not worried about bricking device. it wouldnt be the first time.. I have hard bricked one of my LG G3's and I have softbricken many times before., but I learned what not to do from the experience. The only way a guy can realy learn this stuff, Is if he experiments ( as long as he can afford the consequences behind it).. I learned everything from reading and doing it.. Just reading it alone doesnt help me. I need to see it in action and try it for my self.

I have been running a linux system for many years. I just recently decided I wanted to take a crack at Android Roms. im even considering taking a crack at compiling my own kernel. but I want to wait on that till I get more nfo on Android it self.. Im not new to the coding world. but I am new to the Android World. I am willing to take the risk. I know what commands will hardbrick this device. and I know pretty much how to use a Jtag (device that cost me $150.00) to resurrect Device from a hardbrick.

But, once again Thank you for your input and advice. As I said before. I just want to learn.. and I want to use the best programs to do such learning.. and The Kitchen is consider the best program to use for Custom roms. As long as one knows how to use it. It makes things much easier then doing things manually.. I know some things will have to done manually..

Kitchen will not build ROM for you.

Kitchen is just a tool with various functions and you're "the maestro" here , you're pushing those buttons, you're telling it how to create a proper ROM for you. I'm physically not able to cover all scenarios, all ROMs, all devices and all possible problems. For example my bloat list created for i9300 stock ROMs may not work correctly for your device and your ROM. Another example is that doedexing on Lollipop is totally broken and you must know that, because kitchen just executes what it's told. By adding only root and busybox, as shown in my video, you're nearly guaranteed that device will boot properly and be already rooted and busyboxed. Everything else may, or may not, work properly for your device, and your system.

The main objective of the kitchen is to make zip-flashable ROM from stock system images, to allow you further modifications and so. What work for me may not work for you and vice versa, hence, AK is open-source project and somehow requires that community will keep it updated, because I own just a few out of thousand of devices available and can't make sure that it works for everyone.
 
Last edited:
  • Like
Reactions: Dzepar and ste22032

Eliminater74

Recognized Developer
Kitchen will not build ROM for you.

Kitchen is just a tool with various functions and you're "the maestro" here , you're pushing those buttons, you're telling it how to create a proper ROM for you. I'm physically not able to cover all scenarios, all ROMs, all devices and all possible problems. For example my bloat list created for i9300 stock ROMs may not work correctly for your device and your ROM. Another example is that doedexing on Lollipop is totally broken and you must know that, because kitchen just executes what it's told. By adding only root and busybox, as shown in my video, you're nearly guaranteed that device will boot properly and be already rooted and busyboxed. Everything else may, or may not, work properly for your device, and your system.

The main objective of the kitchen is to make zip-flashable ROM from stock system images, to allow you further modifications and so. What work for me may not work for you and vice versa, hence, AK is open-source project and somehow requires that community will keep it updated, because I own just a few out of thousand of devices available and can't make sure that it works for everyone.

Thats well understood. Your right, what may work for some devices, May not work for others. I only wanted an understanding as to a few things. and you pretty much explained it all. I will just keep playing around with it. till I get something that works to my liking's. I have managed to get a few working flashable Roms from stock. But once I feel that I have mastered that part. I wil go deeper into custom mods to fit my style that I like.

On the Debloating method, I seen your script thats used. I will try and track down all system safe apps to delete for this Samsung galaxy S tab 10.5. and modify your debloat script to fit the desire level needed.

I have been reading up on the edify updater script writing. Trying to get a hands on hold of that lang. Seems pretty simple enough.
I do get that "Error executing update binanry zip" at times..... I will track down the problems and fix them as I learn what works and what doesnt work. Im just trying to get a feel for it all now. This project is just for my personal use only.. I like to learn new things. and this is something I want to learn. I havent really coded in any lang since 2003..
I only realy know C,C++,pascell,VB,QB,TCL,PHP,ASM.. (Asm Back from the c64 days and so forth.) So as you can see. I just need to learn this scripting lang and tweak the ROM to my style.

Well anyhow. thank you again for your great work that you have put into the kitchen. I know that the other Kitchen Retired his work. Nice to see someone picked it back up.
 

JustArchi

Inactive Recognized Developer
Mar 7, 2013
8,739
38,807
Warsaw
Thats well understood. Your right, what may work for some devices, May not work for others. I only wanted an understanding as to a few things. and you pretty much explained it all. I will just keep playing around with it. till I get something that works to my liking's. I have managed to get a few working flashable Roms from stock. But once I feel that I have mastered that part. I wil go deeper into custom mods to fit my style that I like.

On the Debloating method, I seen your script thats used. I will try and track down all system safe apps to delete for this Samsung galaxy S tab 10.5. and modify your debloat script to fit the desire level needed.

I have been reading up on the edify updater script writing. Trying to get a hands on hold of that lang. Seems pretty simple enough.
I do get that "Error executing update binanry zip" at times..... I will track down the problems and fix them as I learn what works and what doesnt work. Im just trying to get a feel for it all now. This project is just for my personal use only.. I like to learn new things. and this is something I want to learn. I havent really coded in any lang since 2003..
I only realy know C,C++,pascell,VB,QB,TCL,PHP,ASM.. (Asm Back from the c64 days and so forth.) So as you can see. I just need to learn this scripting lang and tweak the ROM to my style.

Well anyhow. thank you again for your great work that you have put into the kitchen. I know that the other Kitchen Retired his work. Nice to see someone picked it back up.

You should copy my bloat list and make your own based off it, the one that suits you.

It's all well documented in README.
 
  • Like
Reactions: Dzepar

Lulavc

Senior Member
Dec 31, 2011
309
50
40
Recife
While creating a new project... i faced this:

Stage 1: Mounting with automatic filesystem...
mount: você precisa especificar o tipo do sistema de arquivos
Failed!
umount: /tmp/ArchiKitchenLOOP: não montado
Stage 2: Checking if image is in special sparse ext4 format available for conversion...
Yes it is!


Besides that... everything did fine. Should i worry?
 

ShinySide

Inactive Recognized Developer
Nov 30, 2013
3,951
4,780
IHB
While creating a new project... i faced this:

Stage 1: Mounting with automatic filesystem...
mount: você precisa especificar o tipo do sistema de arquivos
Failed!
umount: /tmp/ArchiKitchenLOOP: não montado
Stage 2: Checking if image is in special sparse ext4 format available for conversion...
Yes it is!


Besides that... everything did fine. Should i worry?

Completely normal
 

JustArchi

Inactive Recognized Developer
Mar 7, 2013
8,739
38,807
Warsaw
While creating a new project... i faced this:

Stage 1: Mounting with automatic filesystem...
mount: você precisa especificar o tipo do sistema de arquivos
Failed!
umount: /tmp/ArchiKitchenLOOP: não montado
Stage 2: Checking if image is in special sparse ext4 format available for conversion...
Yes it is!


Besides that... everything did fine. Should i worry?

No, you should not, AK firstly asks Linux to mount image with automatic filesystem, if it knows how to. This is known as "stage 1" that works for minority of images. Stage 2 is for sparse ext4 images, and there's no stage 3 at the moment, as only very very old devices use other images than ext4 and sparse ext4. Therefore, AK supports all images that Linux kernel understands and can mount, and in addition to that - sparse ext4 images used in nearly all Samsung devices.

This way, even if something new arrives, like btrfs-based files, as long as Linux kernel understands them, no update for AK will be required.
 
  • Like
Reactions: Lulavc and carl1961

bigrammy

Senior Member
Apr 8, 2011
2,962
2,592
huddersfield
How To: For Noobs. windows7 to Linux, install & use ArchiKitchen

I use Windows 7 Home Premium Service Pack one. I really appreciate all you guys help.
@manojpy

For Linux NOOBs Only:
My Youtube tuts are now up for How To prepare your PC with windows tools for a Windows7 & Linux dual boot installation using the Windows Bootloader.
A couple of tweaks for your ubuntu install.
How to clone ArchiKitchen.
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

Please Do Not!!! Post questions on this thread regarding parts 1, 2 & 3 I will try answer any questions you have by PM on xda not youtube.

All is at your own risk as always. :fingers-crossed:

Just Hit the Thanks below if it helped you. :good:
 
Last edited:

ShinySide

Inactive Recognized Developer
Nov 30, 2013
3,951
4,780
IHB
@manojpy

For Linux NOOBs Only:
My Youtube tuts are now up for How To prepare your PC with windows tools for a Windows7 & Linux dual boot installation using the Windows Bootloader.

One suggestion. Make 3 partitions. One for / , one for /home, one for /swap, That way if you screw up or system or want to try a different distro you can reinstall or install a new distro on / and not lose all your home folder files ;)
 
  • Like
Reactions: bigrammy

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.