Download the kitchen for creating firmware. Creating custom firmware on dsixda's Android Kitchen. Changing your own firmware

Many more experienced Android users wish to create their own ROMs for their mobile devices, but creating custom ROMs completely from scratch is often a very laborious process that requires a lot of patience and time. Then various programs come to the rescue, like Android Kitchen.

Android Kitchen is not quite a complete tool for working with firmware. It is inferior in the sense that an existing base is used to create a custom, that is, another ROM. In this guide, we will help you understand the main functions of this very useful utility. Android Kitchen supports most mobile devices available on the market, including those from global brands such as HTC, Samsung, Motorola, LG, Huawei, ZTE and more. Recall that you do any actions with the software of your Android gadget at your own peril and risk, and we strongly recommend that you create backup copies before any modification or firmware change.

Android Kitchen requires a Linux environment to work correctly, so first of all, the "kitchen" is focused on working on the Linux family of operating systems. Let's look at installing Android Kitchen using Ubuntu (a popular Linux distribution) as an example. First, install the "Ubuntu Software Center". In the latest versions of Ubuntu distributions, it is already built in, but in case you have an older version, enter the following command in the terminal:

sudo apt-get install software-center

(sudoapt-getinstallia32-libs is a command required for 64-bit operating systems). We launch the installed application center manually or through the terminal with the command " software center”, in the search box, enter “Java”, select “OpenJDK Java 6 Runtime” from the results and install it.

But if you have a Windows operating system installed on your computer, it doesn’t matter, you can run Android Kitchen through a virtual machine. Let's analyze this option first using the example of Cygwin (this is a UNIX environment for Windows systems). First, install the Java JDK for Windows (32-bit version, and more importantly, you can't install Cygwin itself (the kitchen-compatible version can be found at http://d-h.st/qo7) before installing the JDK). Next, download and unpack Cygwin itself, follow the instructions in the text file "Installation.txt". The second way is to use Virtual Box. We install it in a Linux virtual machine, and from there we already launch Android Kitchen itself. At the same time, do not forget to share directories between the Windows and Linux operating systems on the virtual machine.

It is also possible to work "kitchen" from under Mac OS X, however, one hundred percent performance of this method is not guaranteed. So, we create a .dmg image of the “kitchen” disk. Install Java JDK, GNU version of sed (Mac OS X in sed is not compatible with Android Kitchen), GCC compiler (if it is not already installed by default) - you can enter "GCC" to check, it is included in the XcodeTools software package of the installation DVD. After all this, install wget.

Before the launch itself, unpack the folder from the archive with the "kitchen" into the directory C:/cygwin/home/username/ if using Cygwin or in file-system/home/username/ if using Linux, while username should be replaced with the username. Rename the unpacked folder to kitchen.

To start, you need to either use Cygwin, or enter the commands in the terminal:

cd kitchen

If the path was changed during the installation process, then, accordingly, the first command will be different - that is, the transition to the directory with the "kitchen". Also, for correct operation, the username must consist only of Latin letters, and in general - this is the golden rule always and everywhere.

In order to import the desired firmware ROM into Android Kitchen, copy it to the folder " original_update folder". "Kitchen" can work with such firmware formats: .zip files, system.img, boot.img and the like, and firmware .exe files. ROM, respectively, we take from the stock or custom firmware, depending on which base we want to use for our created version.

After importing the ROM, you can start working with it. We launch it, as mentioned a little above, and if everything was done correctly, a menu will appear:

Android Kitchen - by dsixda (xda-developers.com)

======================================

1. Set up working folder from ROM

2. Add root permissions

3. Add BusyBox

4. Disable boot screen sounds

5.Add wireless tethering

6. Zipalign all *.apk files to optimize RAM usage

7. Change wipe status of ROM

8.Change name of ROM

9. Check update-script for errors

10. Show working folder information

0.Advanced Options

99. Build ROM from working folder

00. About/Update kitchen

Going to item 0 (“Advanced Options”), you can see the following items:

11 - Deodex files in your ROM

12 - Add task killer tweak for speed (stock ROM only)

13 - Add /data/app functionality

14 - Add Nano text editor + sysro/sysrw

15 - Add Bash (command shell)

16 - Add Apps2SD

17 - Add /etc/init.d scripts support (busybox run-parts)

18 - Add custom boot animation functionality

19 - Porting tools (experimental)

20 - Tools for boot image (unpack/re-pack/etc.)

21 - Unpack data.img

22 - Sign APK or ZIP file(s)

23 - Convert update-script or updater-script

24 - Miscellaneous optins / Plugin scripts

0 - Back to main menu

For ease of use of this utility, we will provide a full translation of all items:

1 - create a working folder from the firmware ROM.

2 - add Root access to the firmware.

3 - add to BusyBox firmware.

4 - turn off sounds on the boot screen.

5 – enable the function of the device as a Wi-Fi access point.

6 - Zipalign all .apk files, that is, compress (to save RAM).

7 - change the status of wipe ROM.

8 - change the name of the ROM.

9 - check update-script for errors.

10 - show information about the working folder.

0 - additional options.

99 - build firmware ROM from the working folder.

00 - about the program / update the "kitchen".

0 - exit.

11 - perform deodexing (deodex) of the system.

12 - add improvements to Task Killer to improve performance (only relevant for standard stock firmware versions).

13 - add functionality to the "/data/app" folder.

14 - add text editor Nano text editor + sysro/sysrw

15 - add Bash to the firmware (command line).

16 - add Apps2SD to the firmware (transfer applications to a memory card).

17 - add support for "/etc/init.d" scripts to ROM (busybox needs to be installed to work).

18 - add custom loading animation.

19 - tools for porting (experimental item).

20 - tools for the boot image (unpacking / repacking / etc.).

21 - unpacking the data.img image.

22 – sign .apk or .zip file(s).

23 - convert update-script or updater-script.

24 - various options (launching plugins or scripts).

0 - return to the main menu.

An approximate sequence of actions for working with Android Kitchen:

Import ROM firmware.

Launch Android Kitchen.

Create a working folder from ROM`a.

We add Root access and Busybox to the firmware.

We perform deodexing.

We modify, add and remove everything at will.

We collect ROM in the working folder.

After the assembly is completed, the .zip file ready for firmware will be placed in the directory OUTPUT_ZIP.

Now a few words about replacing the kernel (Kernel) in the firmware being created. First, let's make a reservation right away that Kernel is a file in the image boot.img, But boot.img- this is not the kernel itself, in addition to the Kernel, it contains files for initialization at boot time. So, to replace the core, you can go in several ways. If the desired kernel is closed in the .img file, then rename it to boot.img, replace the current boot.img, which is located in the "kitchen" and replace the modules, if any.

If you need to copy Kernel from one image boot.img in the other, then in “Advanced options” select “unpack boot.img” from the “any folder” folder (that is, any). New boot.img copy to this folder, extract the Kernel itself (zImage). Select the option "unpack a boot.img from your working folder". The BOOT-EXTRACTED folder will be created. Copy zImage from new boot.img to this folder (BOOT-EXTRACTED). Select the option "Re-pack the boot.img". Now boot.img, which is in the working folder, has the new kernel. Do not forget to transfer the modular files if they are also included in the "packaging".

If the new core is on its own and not inside boot.img(i.e. Kernel in the form of zImage or boot.img), then we do the following. In the "Advanced options" menu, select the "unpack the boot.img" item from the working directory. Copy the Kernel file to the created BOOT-EXTRACTED folder, rename it to zImage. Select the item in the "kitchen" "re-pack the boot.img". Now boot.img in the working folder has a new Kernel. If the kernel is bundled with other files, like .ko files for a folder /system, then they also need to be copied to the appropriate directory.

You can add your own applications to the generated firmware if you wish. To do this, you can copy them along the way working directory/system/app, of course, with a replacement. Or, install them in a folder data. To do this, in the "Advanced options" select the item "Add / data / app functionality", after which the folder " working directory/data/app”, where we copy the applications we need. Note that not all programs are equally well "sewn" into ROM, for example, Dr.Web simply refuses to start after flashing the device.

It often happens that some of the Android users do not like the standard firmware of their smartphone or tablet. For example, due to excess software, due to which it is rapidly declining, or simply do not like the functionality of some programs and want to replace them with others. An intensive search for custom firmware begins, but they do not always give the desired result. What to do?

Any firmware can be modified for a specific user

Not everyone knows that the firmware can be finished to fit your personal needs. There are several ways how this can be done, each of them differs in the level of complexity and the necessary set of tools. And, if you don't know how to build Android firmware yourself, this article is for you.

Building from source

One of the most correct ways is to use the source code published by the Google development teams or Cyanogenmod. But at the same time, this method is the most difficult, because in order to compile Android firmware from source, optimize it and make it work on a specific device, you need to have fairly deep programming skills, understand all the intricacies of the mobile operating system and device hardware. This knowledge is not acquired in a day, so in this article we will not describe this method in detail.

Modifying an existing file

If you are not too versed in all the intricacies of the OS, but want to change something in your firmware, the best solution would be to fix it already. You can change both native, built-in firmware, and already changed by someone else. There are a lot of customized firmware on the Internet, and you are unlikely to experience a shortage of them. So, we present step-by-step instructions for assembling your own firmware based on an existing product.

Editing with a computer

Required Software

We will need a computer, a device, a firmware file, and a special program called Android Kitchen (also known as a kitchen). The firmware file can be found on specialized forums, the most famous are the English-language XDA Developers and the Russian-language w3bsit3-dns.com. In the section of your device model, you can find links to the most popular and verified firmware, both official stock and unofficial custom.

Next, you need to install the kitchen on your computer. It is best to work under Linux, but the necessary libraries can be installed on Windows as well. In this case, you can get out of the situation by installing Cygwin. and follow the step by step instructions in the archive. Before that, you will also need to install the Java Platform (JDK) from the official website (https://www.oracle.com/technetwork/java/javase/downloads/index.html for Windows) or find and download OpenJDK Java 6 Runtime or similar (for Linux) in the Ubuntu Application Center. The second use case is to install Linux in a virtual machine and control the process through it.

Firmware modification

Firmware is most often distributed as a file with the .img extension, less often as a ZIP archive. In both cases, you will need the firmware in the installed kitchen folder so that it can import it and start working with it. The kitchen must be installed to c:/cygwin/home/user/ (when installing via Cygwin) or Filesystem/home/user/ (when running via Linux).

  1. Launch the kitchen via Cygwin or a Linux terminal with cd kitchen followed by ./menu.
  2. Unzip the archive into the kitchen, as described above.
  3. After the program menu appears, go to section 0. Advanced Options.
  4. After that, a list of commands for modifying the firmware will be presented. Choose exactly the one you need. You can add Busy Box, Root, Apps2SD, replace stock apps, various animations, free up device memory, and more.
  5. After finishing the manipulations, run the main command 99. Build ROM from working folder (Build the firmware from the working folder) and pick up the ZIP archive with OUTPUT_ZIP.

Device firmware

You can flash the device both through a computer and without it. In the first case, you need to download the firmware program, usually Flash Tool or Odin, drivers for your device model and prepare an already corrected archive.

When flashing through Recovery, you will need to copy the file to the root of the memory card, boot the device in Recovery mode, format the device and cache, and then install the firmware from the archive. After the reboot, you will have the firmware changed by you personally.

On-Device Editing

The easiest way possible. No additional devices and manipulations are needed. All you need is a rooted device, a backup application (Nandroid backup is best) and a file manager with the ability to change the system partition.

Changing your own firmware

  1. If the device is not yet rooted, get it. How to do this, you can read on specialized forums in the section dedicated specifically to your device. The fact is that they are supported by a small number of devices and most of them have an individual procedure.
  2. Install Nandroid backup (https://play.google.com/store/apps/details?id=com.h3r3t1c.onnandbup&hl=ru) and use it to backup your device's system. Save it in a safe place, such as cloud storage. Why make a copy? Suddenly something goes wrong or you accidentally delete something you need - there will be an opportunity to return everything as it was.

  1. Install a file manager that works with the system partition to remove unnecessary software and add your applications. The gold standard is Titanium Backup.
  2. Select the apps you want to uninstall and uninstall them through the file manager.
  3. Install the applications that you want to replace the deleted ones with, and make them system ones through Titanium Backup.
  4. Reboot your device and enjoy your progress.

Android Image Kitchen (AIK)- This program (or rather, a set of scripts) is designed to unpack boot.img, recovery.img directly on the phone.

Instruction:

1. Download zip and put it on a memory card

2. Flash it through the recovery (the contents of the zip "and unpacked into /data/local/, V /system/xbin aik symlink is created on /data/local/AIK-mobile/bin/aik, so there will be no bootlap, but it will not hurt to create a backup copy)

3. Reboot to the system. Install terminal emulator if you don't already have it

4. Type "aik" without the quotes in the terminal. Agree to the request for root access.

5. To unpack the img image, enter

./unpackimg.sh<путь к img>

The image will be unpacked into /data/local/AIK-mobile/ramdisk

6. Replace everything you wanted there

7. To pack the image, enter

./repackimg.sh

The new img image will be saved to /data/local/AIK-mobile/image-new.img

8. To clean the folder from traces of the unpacked image, enter

./cleanup.sh IMPORTANT! cleanup.sh also removes image-new.img, so copy it somewhere else before garbage collection

AIK removal

Delete file /system/xbin/aik and folder /data/local/AIK-mobile

Download Android Image Kitchen (AIK) for Android you can follow the link below.

It is not easy to create custom firmware for Android, it requires special software tools and certain skills, as well as an algorithm of actions that we will describe in this article.

Let's take a special case and start in order. To create a custom Android firmware, you will need:

  1. A personal or laptop computer that is running Ubuntu and has Java installed.
  2. "Kitchen" is an application for processing images of system partitions.
  3. Actually, the Android firmware to be processed.

Step 1 - Installing Ubuntu

Ubuntu is based on the Linux kernel and based on Debian, developed by Canonical. It is not at all necessary to install this system instead of the current one, run it through an emulator, and so on.

To comfortably use all its advantages, it is enough to use the Wubi application, which can install Ubuntu under Windows. Wubi is short for Windows Ubuntu Installer.

After downloading the installer and installing a new operating system through it, when you boot your computer, you can enter one or another system of your choice and manage it through the Windows control panel.

Step 2 - Installing Java

Java is a programming language developed in 1995, its name is apparently taken from the movies (the funny Java people from Star Wars).

Most of the modern software of various types is based on this technology. Some sites only work if you have Java installed on your PC.

To install it you need:

  1. Log in to Ubuntu, and open the Terminal using the Ctrl+Alt+T keys.
  2. Use the sudo add-apt-repository “deb http://archive.canonical.com/ubuntu lucid partner” command in the window that opens to enter / output information in Ubuntu OS - allows you to connect a new repository from which you can download Java. To do this, you will need to enter the Super Administrator password, which is set when you install Ubuntu. Next, you need to use the following commands:
  3. sudo apt-get update to update the list of sources.
  4. sudo apt-get install sun-java6-jre sun java6-plugin sun-java6-fonts to install Java.

Step 3 - work with the "kitchen" to create the firmware

The "kitchen" program is the main tool for working with android firmware. There are several types of them, we will consider working with kitchen from Dsixda.

  • After downloading the necessary files, you need to unzip them to your home folder in the kitchen directory.
  • Launch the Terminal, use the Is command to display a list of documents in the home folder on its screen. Directories will be highlighted in blue, archive files will be highlighted in red, and so on.
  • Open in the Kitchen folder, transfer the processed firmware file in any format to the original_update directory.
  • Return to the Terminal with the Kitchen folder open, enter the Is command. Menu will appear among the files, it should be launched with the ./menu command. This will open a list of numbered commands that you can execute by entering their number on the line and pressing Enter.
  • To disassemble the firmware, you must enter the command 1. After that, the kitchen will begin to display a lot of questions that you need to answer with the Enter key (the required values ​​\u200b\u200bare entered by default).

These actions will lead to the initial menu of the program. Back in the Kitchen folder, you'll find the "WORKING_x_y" folder, where x and y are the date and time it was created.

It will contain the parsed firmware files. All system files can be found in the System folder. parts of these files will change the firmware.

After changing the set of basic applications, functions, settings, and making all the desired amendments to the firmware files, you need to assemble it.

To do this, you need to return to the Terminal, enter the command 99, again answer all the questions with the Enter key. After that, the program will throw the user into the initial menu, and the OUTPUT_ZIP folder will contain a new firmware file, which can then be installed on a mobile device.

Here are some more programs designed for this:

  • The Android SDK is a development environment designed specifically for working with Android applications, it allows you to check the program code.
  • Android Kitchen - necessary for processing images of system partitions in the firmware.
  • JD-GUI is a decompiler capable of working with the Java programming language. Its analogue is DJ Java Decompiler.
  • smali - for working with dalvik code. Designed for code disassembly, backsmali allows you to assemble dalvik code.
  • dex2jar is a utility that allows you to convert executable files based on dalvik code.