yashsingh1/xdaforums huggingface dataset:
[SuperR Kitchen] SuperR.:
The kitchen can do most of this for you and help you with some of the rest. The kitchen menus are easy to navigate and all the options are there. Here is a brief overview:

Extract firmware in the kitchen

choose set_metadata if you are not using a Google device (Nexus/Pixel)

custom kernel is beyond the scope of this kitchen, but it's probably easy. If your custom kernel is packed in a boot.img, simply replace the original boot.img with the custom boot.img in your project directory. If your custom kernel is a zImage, unpack the original boot.img and replace the zImage with your custom zImage in the bootimg/ramdisk directory. If the custom kernel is in a flashable zip, you may need to add any additional files in the zip to the corresponding location in your ROM.

In the boot menu, unpack boot.img, remove dm-verity, remove forcencrypt, pack boot.img

twrp should not be added to your ROM, but you can create a flashable recovery zip with twrp if you rename the file to recovery.img.

In the root menu, add SuperSU, add Busybox

In the debloat menu, debloat

csc is beyond the scope of this kitchen, but I believe you need to replace the cache.img with the cache.img from the firmware of the region you want before extracting the firmware and choose to extract cache.img when the kitchen asks.

In the ROM tools menu, deodex ROM

In the Build menu, build full rom zip, and say yes to zipalign.

The kitchen does not use git-lfs anymore. Your firmware extracted without issues for me. I let the kitchen extract the full firmware package. You could try one of the kitchen ready Linux distros linked in my signature if you continue having issues.

There must be packages missing in your OS as I can't reproduce this. You could try one of the kitchen ready Linux distros linked in my signature.
[SuperR Kitchen] Barthlon:
thanks so much for your reply! i think i can figure it out now. is there any other stuff/options i should know about and really need in a rom? not every option/setting is clear to me. or is it more like "if you don't know what it is, you don't need it" :p

i'm on your kitchen-ubuntu, running on windows 10. i might try to reinstall the whole thing and redownload the rom. no idea why it won't work...

[edit] it works now, after a clean install of the whole thing (y)
[SuperR Kitchen] :
Yep that did it ! used Ubuntu in the end.
[SuperR Kitchen] Barthlon:
ok, just to verify: if i get a custom kernel as boot.img from somewhere, and it's already 'prepped' with the dm-verity and forcencrypt tweaks, do i then still need to do the second part, or can i just swap it out for the original boot.img and that's it?

or do you advice to unpack it, apply the tweaks and repack it, anyway (for better integration or something)?

cheers!
[SuperR Kitchen] jeff the cheff's left nut:
I'm completely new to making custom roms and I want to create a marshmallow (6.0.1) rom for my j5108 (no one has made any custom rom fully supporting it) and everywhere I look one thread says one thing, others say something else.

Where is the best place to start, I'm using bash on ubuntu on windows and copying and pasting code is the best I've gotten at this (i literally started today). I was looking at threads from 5 years ago until I realised that they have nothing to do with what I need. If anyone could post a beginners thread/tutorial which will show me a starting point that would be greatly appreciated.

Thanks for any help
[SuperR Kitchen] narshi shukla:
+1
[SuperR Kitchen] Wonders_Never_Cease:
https://xdaforums.com/showthread.php?t=2195858
[SuperR Kitchen] SuperR.:
If the boot.img has already been patched in all the required/desired ways, there is no need to patch it again. Just replace the original boot.img with the new modified boot.img before building your rom.

WSL (aka Bash on Ubuntu on Windows) is not supported. cygwin is not supported. One or both may work at least partially, but I will never test or support this kitchen in any Windows environment. If you want a Windows kitchen, the donate version runs in native Windows :)

This is not a tutorial for this kitchen :P
[SuperR Kitchen] Wonders_Never_Cease:
Got the questions outta the thread though...??
[SuperR Kitchen] jeff the cheff's left nut:
thanks for the reply I would've been looking around for things that didn't even work for me.
[SuperR Kitchen] narshi shukla:
Can you guide Mr how to port boot.img ot full rom?

The stock zui rom for my device is Oreo 8.0 but it have encryption, the rom i m porting doing have encryption, can i still use boot img and other contents of stock rom as base rom in porting.

Or there are several other Oreo roms which don't have encryption issues, but size of these tom is very less compare to stock rom of the rom i m gonna port,like 500 mb vs 1.3gb for whole zip and boot img 12 mb vs 65 mb.

As the size of other Oreo roms is less so it means there are less contents inside them. I doubt if it will work.

I m porting oxygen os Oreo from oneplus 3 to zuk z2 plus.

Any help will be helpful for me.

Thanks in advance :)
[SuperR Kitchen] SuperR.:
I believe you do not have Python 3.5 or higher which is required. The python glob module got the additional "recursive" argument in Python 3.5, so any previous version of Python will give this error..
[SuperR Kitchen] goodman_east:
Thank you for the reply. I'll check Pythod version and update.
[SuperR Kitchen] SuperR.:
v1.1.8.7 (Free Bash version)

Changes:

Updated vdexExtractor by [MENTION=407497]anestis[/MENTION]b.

Use new --ignore-crc-error argument to the vdexExtractor command if deodex fails without it.

Write crc ignored files to deodex_crc_ignored log for reference.

Find zygote and dalvikcache_data_file names before patching sepolicy and cil to be sure we get everything patched.

Added backup/restore to all perm types to provide addon.d survival script support.

Updated smali/baksmali to v2.2.3.

Improvements to /vendor set_metadata lines on devices where the default vendor context is not vendor_file.

Added check for Python version to be sure it is 3.5 or higher.

Added support for version, product, and cust partitions in configure.sh for Huawei ROMs.
[SuperR Kitchen] russel5:
[MENTION=5787964]SuperR.[/MENTION] last version is broken, very sad. Not create vendor metadatas

Preparing files ...
grep: vendor_toolbox_exec: No such file or directory
grep: vendor_file: No such file or directory
grep: vendor_file: No such file or directory
grep: vendor_file: No such file or directory
grep: vendor_file: No such file or directory
grep: vendor_file: No such file or directory
grep: vendor_file: No such file or directory
tools/source/superr: line 4605: echo: write error: Channel break
[SuperR Kitchen] SuperR.:
v1.1.8.9 (Free Bash version)

Changes:

Fixed grep errors during extraction.
[SuperR Kitchen] baloo30310:
Hello Super's!

I meet a big problem I can not do a rom deodex for my SM-N950F.

In Odex is good the flash is OK.

In Deodex No I remain stuck on the Bootanimation Samsung.

Drm verity and Force encrypte are well disable
[SuperR Kitchen] SuperR.:
Are you deodexing Oreo?

If so, did you patch sepolicy for Oreo deodexing from the boot menu?

If not, I am sure you have seen the NOTICE when choosing to deodex.
[SuperR Kitchen] baloo30310:
No Nougat Deodex set_metadata!

Drm verity and Force encrypte are well disable.

Security Patch Level 2018-01-01

Product code XEF

PDA N950FXXU3BRA8

CSC N950FOXM2BRA1
[SuperR Kitchen] russel5:
[MENTION=5787964]SuperR.[/MENTION] find another bug in your sepolicy patching script.

Let's see, we want patch something like this

allow init secd (file...

and your script try to find 'allow init*' 'allow * secd *' and then paste what it find, BUT what if we don't have secd in plat_sepolicy.cip at all?

Your script will add this

allow init [EMPTY] (file...

and this is not right. Can you fix this?

Point is if we don't have dalvikcache_data_file your script will add empty string
[SuperR Kitchen] SuperR.:
I see your point. In this case, would it be best to add a line with dalvikcache_data_file or do nothing?
[SuperR Kitchen] baloo30310:
Hello Super's.

I'm sorry to disturb you did you see my answer for Note8 support exynox ?

I thank you in advance ..:D

https://xdaforums.com/showpost.php?p=75863148&postcount=6388
[SuperR Kitchen] SuperR.:
I did, but I wonder if you read my reply. The NOTICE you say yes to every time you choose to deodex:

To the best of my knowledge, the kitchen deodexes the way it should. I did not write and do not maintain smali/baksmali, oat2dex, or vdexExtractor which are the tools used to deodex the various Android versions. This is the reason for the notice.
[SuperR Kitchen] baloo30310:
Yes certain are already deodex then after I have the message of deletion of the meta-inf for the apk Theme.

So I try with and without.
[SuperR Kitchen] SuperR.:
v1.1.9.0 (Free Bash version)

Changes:

Fixed flashing issues since adding the backup/restore and changing the location of configure.sh.

NOTE: Sorry I broke the flashing. After the update, you can get the fixes in your existing project by either changing perm types to something else and back to what you want or extracting your project fresh.
[SuperR Kitchen] sibali:
Thank you so much
[SuperR Kitchen] Barthlon:
I just noticed that the knox/debloat script didn't remove SPDClient from priv-app, even though it's in the script. I don't know why though.

Also, the latest ROMs also have knox*/Knox*/Container* etc files in priv-app. The current script only gets them from app.

Cheers!
[SuperR Kitchen] SuperR.:
v1.1.9.1 (Free Bash version)

Changes:

When patching sepolicy for Oreo deodex, do not patch cil files if either zygote or dalvikcache_data_file do not already exist in the file.

Remove framework jar files from knox debloat list.
[SuperR Kitchen] abittercoffee73:
Hey to all,

I am using free latest kitchen (1.1.9.0) and I am having trouble building the ROM with right CSC. My device is Galaxy J7 Prime (G610M) and I am trying to do Android 7 ROM, deodexed and zipaligned, without bloatware and Knox.

So I unpacked four files - boot, system, cache and hidden - to the project folder. I started by extracting the system.img, when prompted, adding content from cache and hidden files, then deodexed it, removed bloatware (automated) and Knox. Zipaligned all files, including framework. The ROM has been successfully built, but when I try to flash it, TWRP says "location argument to mount can't be empty" and aborts the whole thing.

How can I correct this?

PS: when not selecting "remove bloatware+ Knox" the ROM installs and boots as it must be.
[SuperR Kitchen] baloo30310:
Hi guys !!!

I encounter the same problem on my Note 8 exynos.

If I deodex and I do not delete knox it passes.

If I delete knox I will not start anymore and stay locked on Samsung bootanimation.:silly:
[SuperR Kitchen] SuperR.:
Have either of you tried removing knox with v1.1.9.1? It was reported that removing the knox jar files from framework caused a bootoop. v1.1.9.1 does not remove these files. If the problem still persists, you can either test what should and should not be removed or someone else will need to help. I do not own a Samsung device and only remove what I am told should be removed by other Samsung users.
[SuperR Kitchen] baloo30310:
Hi @ Super's!

And thank you for your answer I make apk by apk to know who is responsible for this bootloops.

As soon as I find I'll let you know.;)

---------- Post added at 04:06 PM ---------- Previous post was at 03:28 PM ----------

Hi guys !

Well I confirm it is the jar files in the framework that are the cause of the bootloop and prevents start ;)
[SuperR Kitchen] abittercoffee73:
Thank you. I'll definitely try it. Knox must be removed at all costs, it makes life harder with its existence.
[SuperR Kitchen] SuperR.:
v1.1.9.2 (Free Bash version)

Changes:

Updated img2sdat.py by [MENTION=5132229]xpirt[/MENTION] to v1.6.

Updated md5 for Busybox Installer by [MENTION=4544860]osm0sis[/MENTION].

Updated md5 for Android Image Kitchen v3.2 by [MENTION=4544860]osm0sis[/MENTION].
[SuperR Kitchen] I_hate_your:
Hi, I had this problem

"

ERROR:

There was a problem extracting your ROM.

Press ENTER to return to the Main Menu

"

Search on the forum did not give results, what to do?
[SuperR Kitchen] SuperR.:
v1.1.9.3 (Free Bash version)

Changes:

Fixed some vendor set_metadata lines being skipped.
[SuperR Kitchen] vacumbanan:
Way for run windows

Hi, I runned that programm at Windows with Ubuntu distributive. When i trying unpack boot.img paragraphs 3 and 6 give status N/A.

Is it because of incompatibility?
[SuperR Kitchen] narshi shukla:
Supersu free version don't work on windows wsl, on Windows only paid version is supported, either use Linux for free version or use paid one.
[SuperR Kitchen] vacumbanan:
win

If i runned it at Windows :confused:
[SuperR Kitchen] narshi shukla:
Then u need paid version,
[SuperR Kitchen] mana7224:
Hello -

I am trying to modify the latest stock ROM for Xiaomi Redmi 4X (Android 7.1.2) using Kitchen v1.1.9.3

Unfortunately, after installing via TWRP the device is stuck in bootloop (not even showing android boot logo) even without any changes to the ROM.

I used perm method raw_img. Kitchen running on Ubuntu 16.04.

Is there any way to get further information about what went wrong?

Or is there something I have to consider generally when working with MIUI ROMs?

Thanks!
[SuperR Kitchen] SuperR.:
set_metadata will probably solve your issue.
[SuperR Kitchen] mana7224:
I have tried it with every perm type getting the same result :(

Is it possible that MIUI uses a completely different zip structure? Or that TWRP for Redmi 4x cannot handle these ROMs?
[SuperR Kitchen] Priyanuj Dutta:
Is there a list of supported devices? Or are all devices supported?
[SuperR Kitchen] SuperR.:
Since you did not send a support.zip, recovery.log, or a firmware link I have no idea what is going on.

Most devices are supported with a goal of all devices being supported. There is no list.
[SuperR Kitchen] Priyanuj Dutta:
How do I mod a rom though? Any tutorial for that?
[SuperR Kitchen] mana7224:
Sorry, couldnt post links

Here is my support.zip

Recovery Log

Latest MIUI ROM for Redmi 4x
[SuperR Kitchen] SuperR.:
Here is a tutorial video by [MENTION=2545403]chevycam94[/MENTION] building a custom ROM for the Pixel2 XL. He is using the donate version but the concept is the same. However, unless you are building for an AOSP device, I suggest choosing set_metadata when you build since you are not using the donate version.

Everything looks good in the support.zip. The recovery.log you sent does not contain the ROM flash so I can't see what happened there.

If you added init.d that may cause problems. init.d support will be removed in the next update.

The only other thing I can think of is the detected by-name path when flashing. Can you flash this zip and post the results? A screenshot from twrp may be the easiest way. I am not sure if the results show up in the recovery.log. This zip will only display the detected by-name path on your screen. It does not make any changes to your device.
[SuperR Kitchen] mana7224:
Okay, here are my results. Included the recovery.log again, I think this time it contains the ROM flash. My zip is called miui_stock.zip. (Have not done anything with init.d, just unpacked and built the rom without changes to the files)

Tank you very much for your support!
[SuperR Kitchen] SuperR.:
Please try the following:

Unpack your boot.img

Remove dm-verity

Remove forceencrypt

Pack boot.img

Build your ROM and test
[SuperR Kitchen] mana7224:
Amazing, that worked! Thanks for the help. Can you explain shortly how you came to this solution and what is the problem with the boot image?

Probably going to get the donate version, because this tool is great work and will be essential for my bachelor thesis. :)
[SuperR Kitchen] SuperR.:
There is no problem with your boot.img. dm-verity being enabled is standard for stock boot.img. Removing dm-verity is required in custom ROMs for most devices starting with Marshmallow I think. If the system is modified in any way dm-verity will fail the boot. Remove dm-verity and problem solved :)
[SuperR Kitchen] SuperR.:
If possible, allow the kitchen to unpack the entire firmware package. It will grab all the parts required for your ROM. If that is not possible, try to at least let the kitchen extract the system.img using option #4. It looks like your updater-script was not created from a kitchen extracted system.img.
[SuperR Kitchen] bcrichster:
Will this newer Kitchen properly deal with multiple system.img_sparsechunks from the factory FW.zip or do I need pull them as a whole image from device instead? Been a minute since I've seen any reference to this situation..

Running an Xp3r!meπt with my XT1776
[SuperR Kitchen] SuperR.:
The kitchen should handle the AP file and the system.img.lz4 file if it extracts the entire firmware package. If this is not the case, please send a link to the firmware package so I can take a look.

I think you are in the wrong thread, but both kitchens handle Moto sparsechunks. Let it extract the full firmware package and it will take care of the rest :)
[SuperR Kitchen] mana7224:
Remember to also remove forceencrypt in the boot.img. With forceencrypt enabled I was stuck on the splash screen aswell.
[SuperR Kitchen] SuperR.:
I have never owned a Samsung so I can't help much further, but shouldn't you remove knox? I think you may need to, but again I am not really sure. It is in the debloat menu if you want to try it.
[SuperR Kitchen] CVertigo1:
Is there a way around the file name too long errors during deodexing? I'm not referring to a fix, per se. I mean is there a way to manually deodex those files that are too long, then put them back into the kitchen after the fact?
[SuperR Kitchen] EBH:
I tried to debloat an OTA firmware for a MTK 64bits phone (Vernee Mix 2 6Gb version = MT6757D) with the Superr's kitchen.

The firmware come with a system.new.dat file. So i transformed it in system.img.

When I flash (with SP flash Tool) this transformed system.img, the phone is booting and working well.

But, if I just unpack and repack (without made any change) the system.img file, the phone is booting and stopping on the wifi detection/configuration step of the first boot assistant. I use the original file_context and indicate the same size in kb than the original img. What's wrong ?

Android 7.0, no errors in log
[SuperR Kitchen] CVertigo1:
Is this a viable fix? I haven't had the chance to try yet.
[SuperR Kitchen] SuperR.:
I have never seen this error in Linux when deodexing. To answer your question, you could manually deodex the problem files and replace the odexed versions before deodexing. However, you would need to do it on a system that allows long file names and apparently yours does not.

From the troubleshooting/faq post linked in my signature:

The donate kitchen builds system.img with the permissions/capabilities found in your original system.img.
[SuperR Kitchen] CVertigo1:
I'm using Linux to do it. Apparently Wear OS uses some super long file names. It got most of the files to deodex, but some were too long. Are there other platforms that can support super long names?
[SuperR Kitchen] baloo30310:
Hi if it's for your Note8 it works deodexation with the Free.

The pay I'm not I do not have it but I think I'll take it soon.

The advantage if you pay you can always make a comment that on the free less obvious.;)
[SuperR Kitchen] Alann200:
ERROR: The kitchen should not be run as root

I'm using in my VM and it's not working fine I'll be happy if it'll run correctly :)
[SuperR Kitchen] bcrichster:
No. The minimal donation requirement is far less than what he should charge for his continuous, ongoing efforts. And yes, it definitely works VERY WELL. Plus, the donate version has many more options to choose from

Running an Xp3r!meπt with my XT1776
[SuperR Kitchen] afaneh92:
[MENTION=5787964]SuperR.[/MENTION] the installed dependencies brakes my TWRP/ROM building so installed ubuntu again.
[SuperR Kitchen] SuperR.:
I am not sure about other platforms, but this kitchen only runs properly in Linux. Most modern Linux (ext4 file system) have a maximum file name size of 255 characters plus the file path which can be up to 4096 characters. I am surprised to hear a file name is longer than this, but if it is I am not sure what to do about it.

The donate kitchen is only for donors. You should not donate if you don't want to :)

I suggest not running the kitchen as root as the error message says.

If there is a problem with the kitchen, please provide more detail.
[SuperR Kitchen] Alann200:
I can't solve this problem can you tell what command to use?
[SuperR Kitchen] afaneh92:
its keep getting "aborted (core dumped)" even after resetting all updated dependencies.
[SuperR Kitchen] SuperR.:
Use this:

cd /location/of/kitchen

press ENTER

./superr

press ENTER

Do NOT use sudo in your command. If you still get the root error message, you are running Linux as root and you should not.

I still don't know what the problem is. What are you doing in the kitchen when it says core dumped? What dependencies are you referring to? Is the problem kitchen related? What are the steps to reproduce?

I still think your updater-script is not being created while extracting a system.img, but rather from an extracted system directory. If you send a fast link to your firmware that does not require registration I will take a look.
[SuperR Kitchen] afaneh92:
I have cloned the kitchen repo then run ./superr it asked me to install dependency I said yes.

after it finished, I was working on TWRP for my S8, in my android 6.0 repo tryed to compile it using ./make -j16 recoveryimage

then the problem appear while compiling then tryed my 8.1 repo the same!
[SuperR Kitchen] SuperR.:
I am not sure what caused it, maybe java? Here is the full list of packages that are installed from the kitchen if you are missing dependencies:

binutils coreutils cpio e2fsprogs findutils gawk grep gzip libc-bin liblz4-tool lzop mount ncurses-bin procps sed tar unzip util-linux vim-common wget xz-utils (installed on all systems if ANY dependencies are missing)

libc6-i386 (only installed on 64-bit systems for the 32-bit 7-zip binary to work)

default-jre (only installed if you don't have java or have java 7 or lower)

If java is the issue, you can choose a different java version with:

update-alternatives --config java

The kitchen requires java 8 or higher, so if you change this to java 7 for example, the kitchen will complain the next time you run it. You can change it back the same way.
[SuperR Kitchen] baloo30310:
Hi guys !

It's vague your details.

1-Have you deactivated force-encrypt?

2-Have you disabled dr-verity?

3-As you try to flash the Rom without the changes just Root & Busybox.

If you do not proceed step by step you will not be able to find your problem.;)