• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[LINUX][FREE] SuperR's Kitchen (v1.2.1.3 - 10-16-21)

Search This thread

SuperR.

Recognized Developer
Mar 23, 2014
2,637
8,714
Invisible
Moto E 2015
LG Nexus 5X
v1.2.1.3

Changes:
  • Fixed downloads so kitchen can complete the install.
  • Fixed building some img files that were failing with the out of space error.
  • Fixed all symlinks going in symlinks-system file when using mount to extract a single partition that is not system.
  • Fixed extracting some newer img files that can only be mounted as read-only.
  • Unpack odm.img from payload.bin if it exists.
  • Store project forceencryption type in project srk.conf instead of main srk.conf.
  • Added support for extracting Samsung Beta firmware with AP_xxxx.tar in a 7z file.
  • Fixed some devices by-name paths not being found during the ROM flash.
  • Fixed Busybox download not working due to the change in the XDA website.
  • Allow boot.img to unpack in a new project even if there is no default.prop.
  • Fixed new.dat conversion on partitions with a period in the name.
  • Fixed mount extract adding rootfs context for /system on system-as-root firmware.
  • Fixed extracting 7z files that contain files/directories with spaces in the name.
  • Fixed regression where old ROM files/directories are not moved before extracting new.
  • Detect spaces in manually created project names and replace with underscore.
  • Use auto for mount filesystem type argument instead of ext4, which should allow extracting any filesystem type your kernel supports.
 

furniturewinches

New member
Feb 13, 2020
3
0
I'll give it a shot on Samsung Galaxy Note 5 - if there aren't any objections against @SuperR.
  • Added support for extracting Samsung Beta firmware with AP_xxxx.tar in a 7z file.
  • Fixed some devices by-name paths not being found during the ROM flash.
  • Fixed Busybox download not working due to the change in the XDA website.
  • Allow boot.img to unpack in a new project even if there is no default.prop.
  • Fixed new.dat conversion on partitions with a period in the name.
  • Fixed mount extract adding rootfs context for /system on system-as-
 
Mr. SuperR
I Thank You for some major improvements and fixes!!
(Not truly aware of MS issues with win 11, I was forced to downgrade to Win10. Which means I had to wipe half my disc, and reinstall Win10- In doing so, this time around, I actually upgraded my Ubuntu to 21.10 at same time.)
After Ubuntu 21.10 was up and going properly, I add Kitchen back and was having major issues. thought it was all my end. I see that it's not!!!
Awesome.
I THANK YOU!!
 

MinhaD

Member
Oct 10, 2019
6
1
Samsung Galaxy Grand Prime
@SuperR. SuperR's Kitchen Free Version : 1.2.1.3 can't mount system.img to extract files and can't do boot.img modification like disable dm verity and others on Ubuntu 21.10 with all the dependencies installed. I've used version 1.2.1.2 without any problem. Is it me or there are bugs in new update?
 
Last edited:

el-sahef

Member
Sep 28, 2019
16
0
I want to add init.d support to my boot.img but the last SuperR Kitchen version that included this feature was v1.1.9.3 according to the changelog. Is this version still available for download somewhere? Why was this feature removed?
 

AnonVendetta

Senior Member
Apr 29, 2016
956
357
Portland, OR
I want to add init.d support to my boot.img but the last SuperR Kitchen version that included this feature was v1.1.9.3 according to the changelog. Is this version still available for download somewhere? Why was this feature removed?
The feature was removed because both Magisk and SuperSU support script execution on boot, without needing
init.d. However, if you know how to unpack/repack boot.img manually, you can try adding it yourself.

Grab the files from this page (including the contents of the sbin folder).

Init.d Github files

Unpack your boot.img. Put the files in the proper places, doing edits if necessary (probably will also need to edit init.rc to call the init.d script). You may also need to patch sepolicy to allow init.d to work. Repack boot.img and flash it. I cant remember the exact specifics, but that's the gist of it, i've done it before.

Other things you can try:
1. init.d injector by @Zackptg5
2. Kernel init.d support injector by @osm0sis (Kernel init.d support injector)

You can also use busybox's run-parts to execute init.d scripts on boot.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    I want to add init.d support to my boot.img but the last SuperR Kitchen version that included this feature was v1.1.9.3 according to the changelog. Is this version still available for download somewhere? Why was this feature removed?
    The feature was removed because both Magisk and SuperSU support script execution on boot, without needing
    init.d. However, if you know how to unpack/repack boot.img manually, you can try adding it yourself.

    Grab the files from this page (including the contents of the sbin folder).

    Init.d Github files

    Unpack your boot.img. Put the files in the proper places, doing edits if necessary (probably will also need to edit init.rc to call the init.d script). You may also need to patch sepolicy to allow init.d to work. Repack boot.img and flash it. I cant remember the exact specifics, but that's the gist of it, i've done it before.

    Other things you can try:
    1. init.d injector by @Zackptg5
    2. Kernel init.d support injector by @osm0sis (Kernel init.d support injector)

    You can also use busybox's run-parts to execute init.d scripts on boot.
  • 115
    Disclaimer: I am not responsible for anything bad that may occur from the use of this kitchen, but I will take all the credit you can give me if it works for you :)

    main_free.png




    Please read the usage instructions in post #3 and the troubleshooting in post #4 below before asking for help. Thanks

    Free Changelog

    Download/Install

    Donate version for Windows/Mac/Linux/WSL:
    Dedicated thread found here

    Free Kitchen (Linux terminal):
    **NOTE: The free kitchen will not work in WSL**
    1. Download the kitchen.zip from here. Extract to a new directory.
    2. Enter the following commands one by one pressing ENTER after each line where "/location/of/kitchen" is the directory where the kitchen lives:
      Code:
      cd /location/of/kitchen
      ./superr

    Dependencies:
    • Java 8 or higher (8 is recommended)
    • Python (to run the launcher (could be bypassed by running tools/source/superr in the terminal from the main kitchen directory))

    Video tutorials by @chevycam94

    Credits:
    @osm0sis - For Busybox Installer and Android Image Kitchen
    @Chainfire - For SuperSU
    @JesusFreke - For [Bak]smali
    @nkk71 - For creating the TWRP minzip patch
    @Captain_Throwback - For providing a pre-compiled update-binary with the minzip patch and squashing bugs
    @_riddle - For oat2dex
    @iBotPeaches - For Apktool
    @AOSP - For zipalign, adb, aapt, img2simg, simg2img, make_ext4fs
    @xpirt - for img2sdat
    @bcrichster - For extensive testing


    XDA:DevDB Information
    SuperR's Kitchen, Tool/Utility for the XDA Community Apps

    Contributors
    SuperR.

    Version Information
    Status:
    Stable

    Created 2017-04-27
    Last Updated 2020-07-24
    33
    Usage:

    1. Run "superr" from it's location in terminal
    2. Create new project using the menu
    3. Copy ROM zip into the superr_NAME directory of this tool (NAME = the name of your new project).
      OR
      Copy system.ext4.tar and boot.img into the superr_NAME directory of this tool.
      OR
      Copy system.ext4.win and boot.emmc.win into the superr_NAME directory of this tool.
      OR
      Copy system.img and boot.img into the superr_NAME directory of this tool.
      OR
      Copy official Nexus tgz into the superr_NAME directory of this tool.
      OR
      Copy Samsung firmware zip into the superr_NAME directory of this tool.
      OR
      Copy Moto firmware zip into the superr_NAME directory of this tool.
      OR
      Leave superr_NAME directory empty to extract from rooted device or custom recovery
    4. Extract for new ROM from the Main menu.
    5. Enjoy!

    Example:

    In your terminal, type the following where "/home/user/kitchen/" is the directory where the kitchen lives:

    Code:
    cd /home/user/kitchen/
    ./superr

    NOTE: the above code is 2 separate commands and requires ENTER to be pressed after each command

    OR

    Double-click the superr file and choose "Run in Terminal" if your OS supports it.

    Add your own device support:
    1. Create a new project in the kitchen.
    2. Add your files to the project directory (system.img/boot.img, system.ext4.tar, win, zip, etc.)
    3. Extract for new rom from the menu
    4. When asked how to get your partitions, choose detect by-name from boot.img. If it gives you an error, put a recovery.img in your project directory and choose detect mmc from recovery.img.
    5. Enjoy :)
    32
    Troubleshooting/FAQ:

    When asking for help, please provide as much of the following info as possible so I can help as easily as possible. I am a busy person and would prefer not to ask all of these questions every time someone has a problem. Thank you for understanding.

    What Kitchen version?
    What environment are you running the kitchen in (OS, 32/64-bit, cygwin, Bash on Windows, etc.)?
    What device are you working on (make/model)?
    What was the source you started from (system.img, system.ext4.tar, rom.zip, etc.)
    What Android version?
    What perm method (set_perm, set_metadata, sparse_dat, raw_img)?
    What did you do after extracting and before building?
    Were there errors on the screen if you scroll up in the terminal?
    Send a recovery.log after flashing if you have problems flashing the ROM.
    Send a link that does not require registration to the files you started with (nandroid, system.img, boot.img, etc)
    Use the support option in the Misc Tools menu and attach the support.zip to your post.


    Ubuntu4Kitchen
    An Ubuntu 16.04 distro with all the things you need to get the kitchen working easily.
    Visit the dedicated thread here

    Language Files (translations)
    English - Default/Included in the kitchen

    Download additional language files here

    Once the language zip has been downloaded, extract to /kitchen/tools/language and restart the kitchen.

    Does this kitchen support Windows CYGWIN?
    CYGWIN is not supported and will not work. Try the donate kitchen for Windows, Linux, and Mac.

    WSL (Bash on Ubuntu on Windows)
    WSL is not supported in the free kitchen and will not work. Try the donate kitchen for Windows, Linux, and Mac.

    Which perm type should I choose?
    Here is a very brief summary of set_perm, set_metadata, sparse_dat, and raw_img.

    set_perm : The oldest of the 4. Sets file/directory permissions when flashing a rom. Not recommended for KitKat and above.

    set_metadata: Also sets file/directory permissions when flashing a rom, but also adds file contexts. It was introduced with selinux in KitKat. Recommended for KitKat and above.

    sparse_dat: The newest of the 4, and only works on Lollipop +. The permissions, symlinks, and file contexts are all added inside a sparse image. A sparse image is an image with a more efficient space usage. Only for Lollipop and above. The free kitchen uses AOSP permissions/capabilities when building system.img. If your device requires different permissions, this method will not work for you in the free kitchen.

    raw_img: This is literally raw images that are flashed to your device. The permissions, symlinks, and file contexts are all added inside the raw image. Works for all Android versions. The free kitchen uses AOSP permissions/capabilities when building system.img. If your device requires different permissions, this method will not work for you in the free kitchen.

    Flashing error:
    This package is for "xxxxx" devices; this is a "yyyyy"

    The problem is the asserts and it is easy to fix. In the kitchen menu, go to ROM Tools > Asserts > Add/Remove device asserts. At the bottom it will say "xxxxx". Edit the line to say "xxxxx,yyyyy" and press enter. Build your rom again and flash.

    Why is my ROM zip so small?
    blkdiscard failed: Invalid argument
    These are generally due to the partition size detection method. You need the correct partition size for ALL partitions you are creating sparse dat and raw_img images for. The kitchen will ask for each one that is included in your rom when you choose to build the full rom zip. If none of the provided auto-detect methods work, you will need to find the partition size on your own and enter it manually in the kitchen.

    Root problems?
    You can replace the SuperSU.zip and Magisk.zip in the kitchen with any flashable SuperSU/Magisk version you want. It is located in kitchen/tools/root/root_zips. Delete the one that is there (if it exists) and add yours. Then, unroot, re-root and your replacement will be used.

    Auto check for updates when kitchen starts
    To enable the auto update check, go to "Check for updates" in the main menu. After it checks, you will be asked if you want to enable it.

    I added root and busybox but there is no su or busybox in my project. Why?
    The kitchen does not add Busybox or SuperSU/Magisk files to the project. Instead it adds flashable zips inside the rom.zip. There are many variables to deal with (Android version, device architecture, manufacturer, system/systemless, etc.). Flashing the zips with the rom accounts for all of these variables and there is no reason to re-invent the wheel.

    Debloat and custom debloat
    There are 2 options in the debloat menu (besides knox which is self explanatory):

    1) Debloat ROM
    This option removes all files included in the kitchens standard bloat list file - /kitchen/tools/root/bloat

    2) Custom Debloat
    This option removes all files included in the bloat_custom file - /kitchen/tools/root/bloat_custom OR kitchen/superr_project/00_project_files/bloat_custom
    This file is empty by default and is there for you to add whatever you want to remove. You can either add everything you want to remove and use only option 2, or you can add new files here and use option 1 and 2.

    I suggest you take a look at /kitchen/tools/root/bloat to see the format of the listed bloat files. Use the same format for the bloat_custom file.

    When you use either option, the files are not deleted. Instead they are moved to the 00_project_files directory in case you want to restore them later.

    Deodexing
    Deodexing Samsung roms may or may not work. If your rom does not boot after deodexing, try it without. If it works and you must deodex your rom, try a different tool. I hear svadev deodex tool works well for Samsung roms.

    boot.img errors
    If the kitchen gives you errors about unpacking boot.img, there is a good chance I will not be able to help. I suggest you figure out how to unpack it using Linux commands/binaries and let me know how you did it. You may also find a tutorial about how to unpack your boot.img. If so, please send a link. It does not help me to know another tool works. I need the commands/binaries used in order to update the kitchen.

    Feel free to upload your boot.img AND the build.prop from the same rom so I can check to see if I can fix it. I will ignore you if you don't upload both mentioned files :)
    29
    Features:

    *Extract and create ROM from:
    • Rooted Device
    • Custom Recovery
    • Existing ROM zip
    • system.img/boot.img (and cache.img on Samsung devices)
    • system.ext4.tar/boot.img
    • system.ext4.win/boot.emmc.win (including multi-file *.win000, *.win001, etc)
    • Moto and other factory firmware zips containing sparsechunk files
    • cm12 + roms with sparse dat files
    • Zips that contain system.img and boot.img
    • Samsung firmware zips that contain tar.md5 file
    • Official Pixel/Nexus firmware tgz
    • Official Pixel/Nexus preview tgz
    • SpreadTrum firmware that includes a pac file
    • system directory that contains symlinks and boot.img
    *Create flashable zips of many varieties including:
    • Full ROM
    • Switch between set_perm, set_metadata (KitKat+), raw_img, and sparse_dat (Lollipop+)
    • Kernel
    • Recovery
    • Media
    • app, priv-app, and framework
    *Deodex the following:
    • Pie ROMs
    • Oreo ROMs
    • Nougat ROMs
    • Marshmallow ROMs
    • Lollipop ROMs
    • KitKat and earlier ROMs
    *Root features:
    • Root/unroot
    • Choose SuperSU or Magisk zip (add other versions to /tools/root/root_zips directory)
    • Choose system OR systemless root for M+ and Samsung 5.1.1 roms (SuperSU only)
    *Boot features:
    • Unpack/repack boot/recovery img (Big Thanks to @osm0sis for mkbootimg source!!!)
    • Add/remove su.d support
    • Add/remove insecure boot
    • Remove dm-verity
    • Remove forceencrypt
    *By-name auto-detection from:
    • Device
    • Existing ROM
    • boot.img
    • kernel.elf
    • **OR**...manually enter it
    *mmcblk auto-detection from:
    • recovery.img
    *Kitchen updater:
    • View the last 3 changelogs when an update is available.
    • Incremental update for updating the most recent previous version
    • Option to check for updates when the kitchen starts
    *Create system.img
    *Device database for mmcblk devices (currently very small, but will grow over time)
    *Add devices to the assert
    *Add custom asserts
    *Zipalign apks
    *Debloat ROM
    *Custom Debloat list support
    *Remove Knox
    *Add/remove busybox (Big thanks to @osm0sis for his Busybox Installer)
    *Add/remove user app support (/data/app)
    *Sign zips
    *Translatable with language files

    *Donate version additional features:
    • Cross-platform - Windows, WSL, Macos, Linux
    • tarfs - Get original permissions, contexts, and capabilities from tar/win backups.
    • Create system.img with identical permissions, contexts, and capabilities as the original system.img or tar/win backup.
    • Plugins - Probably the best part! Currently over 20 extra features and growing
    • Root - Use a custom root zip (not the included Magisk or SuperSU)
    • Custom directory - can be included in your ROM and flashed to a specified partition
    • Custom Signature - No Built with SuperR's Kitchen, anywhere, plus add your own
    • Custom Build Display in About Phone, or leave it as default
    • AutoROM - Automation for ROM creatiion using a congig file (there's a plugin for that)
    • Convert updater-script to an update-binary script
    • No mounting img files. One less thing requiring your password and interrupting extraction.
    • Upload support.zips and device.zip directly from the kitchen for review
    • Download language files directly from the kitchen
    • Restore original boot.img after modifying and repacking
    • Remove asserts from the updater-script
    • Configurable compression level for packing zips
    • Remove all placeholder tags (#ASSERT, #SYM, #PERM, etc.) before packing the ROM
    • Create ext4 img file from any partition you include in your ROM.
    • zipalign without building ROM
    • Fix ext4.img files automatically if block count is higher than actual blocks
    15
    v1.2.0.8

    Changes:
    • Fixed crash if a file does not exist when validating kitchen files.
    • Fixed deleting projects from the main menu.
    • Fixed crash if smali.zip does not download properly.
    • Create new apk including the deodexed classes if apk does not exist when deodexing.
    • Added screen_clear config option that will use either no screen clearing, or tput clear.
    • Removed use_tput config option in favor of the new screen_clear config option.
    • Automatically fix geometry errors in ext4 img files during extraction.
    • Fixed Samsung devices pulling img files from the device through adb (hopefully).
    • Fixed lag during extraction after entering your rom name and after choosing the perm type.
    • Fixed kitchen updater for future updates.
    • Many other small fixes.

    Screen Clearing
    If you do nothing, the default is ascii escape codes that clear the screen. This has been the default since v1.2.0.0. The Bash version uses tput clear. If you are not having screen clearing issues, it is recommended that you do nothing.

    In kitchen/tools/srk.conf, you can add a line to change the screen clearing behavior:
    • Use "tput clear"
      Code:
      screen_clear=1
    • Do not clear the screen at all and display a new page below the old page
      Code:
      screen_clear=None
    • "use_tput=1" is no longer available, as "screen_clear=1" does the same thing.
    There is no need for a restart. After saving srk.conf with the new line, the change will be seen immediately.