yashsingh1/xdaforums huggingface dataset:
[SuperR Kitchen] Captain_Throwback:
According to Chainfire's post, only the sepolicy mod is required for standard root on Marshmallow with SuperSU. This applies to Nexus devices and any other Marshmallow-running device, as far as I know (and I can confirm this is the case on my two HTC devices). The other modifications must be Samsung-specific, because I don't see them mentioned by Chainfire anywhere (in that thread).

However, there are the ramdisk modifications for systemless root, which would be nice for inclusion in the kitchen ;).

Hi, btw. I'm new here - was just referred over here by a post in a Linux kitchen that is now EOL. Good stuff happening over here, I must say :).
[SuperR Kitchen] SuperR.:
Yes, but which ramdisk changes are required is the question. [MENTION=4899305]ashyx[/MENTION] is saying only sepolicy changes are required, but the test boot.img you sent had other mods as well documented in the links I posted here. I am happy to create conditions so the extra mods are only applied to certain devices, but I need to know which ones to apply them to if they are needed. Thanks
[SuperR Kitchen] ashyx:
Samsung galaxy tab S2, so it's not as if it's an older device.

---------- Post added at 05:57 PM ---------- Previous post was at 05:55 PM ----------

You can do this with EFS Pro.
[SuperR Kitchen] :
If you give me chance to back up I'll gladly test and report back anything you need on the note 4 (n910c exynos)
[SuperR Kitchen] bcrichster:
1. Efs pro seemed more geared to Samsung's devices than everything else, like the kitchen

2. Grr!! [emoji48] "-F-" Windows programs!! (Thanks anyways, Lol). [emoji28] This kitchen is Linux, has Android Image Kitchen Capabilities, plus I'd like to keep all Development Stuff with Linux anyways. SuperR is always making this Kitchen better so I put in a legitimate request to aid in the benefit of Android users by making it easier to pull files from said devices. I am asking because I've got a cpl projects I'm trying my hand at, that need a full flash image pulled for all partitions to work with other files than just system. [emoji56]

Edit: I also feel that adding the option could end up making files more easily available for more Devs (or noobs to produce for other Devs) to DL & work with. [emoji41]

Gratefully sent from my Rooted JollyRoger_B13
[SuperR Kitchen] SuperR.:
v0.9.4.5

Changes:

Added initial support for rooting Marshmallow roms.

An update to sepolicy-inject by [MENTION=1915408]phhusson[/MENTION] made the sepolicy mods much faster
[SuperR Kitchen] not-i:
I cooked a rom last night using the new selinux changes for Samsung N910C 5.1.1

Booted fine everything worked but yes my WiFi wouldn't turn on either. Switched to an already modded kernel from an xda exynos Note 4 thread and WiFi was fine.

So looks like one of the changes messes with Wi-Fi
[SuperR Kitchen] enotar:
Happy to hear that I am not the only one, only problem I don't have a cooked kernel as for the SM-P600 5.1.1 is new......

I know something happened with wifi_supplicant and permissions of /data/misc/wifi, I tried to change these permissions under root but they don't....Deleting wifi_supplicant don't fix the problem. In script _updater I think these are missing. The whole /data/misc/wifi and also /etc/wifi.

Catlog report a bunch of errors on wifi, I am not sure something else is missing.

I hope this can be fixed.

thank you
[SuperR Kitchen] SuperR.:
If you are comfortable editing scripts, you could try a couple things to see if they help. Make sure you are running v0.9.4.5 before proceeding since the line numbers and edits will be different on other versions.

Try this first:

Open /kitchen/tools/scripts/root. Comment lines 44-47 so they look like this (lines 43-48 shown below)

./root_sepolicy
# if [[ $androidversion = "5.1.1" ]]; then
#	cd $scripts
#	./root_newsam
# fi
cd $scripts

Save the file and try building your rooted rom again. Make sure you unroot and then root in the kitchen before building.

If that doesn't work:

Open /kitchen/tools/scripts/boot_repack_ext. Comment line 75 so it looks like this (lines 74-76 shown below)

--cmdline "$(cat ${chosenimg}.img-cmdline)" \
# --board "$(cat ${chosenimg}.img-board)" \
--base "$(cat ${chosenimg}.img-base)" \

Save the file and try building your rooted rom again. Make sure you unroot and then root in the kitchen before building.

Let me know how it goes, thanks
[SuperR Kitchen] Koognod:
Help?!?

So I figured out the setup all no problem, At least I thought so, this is my first time working on rom development btw. Anyways, My issue being after the rom was created and I am trying to flash I am getting an error similar to jesus 183095 only a little different. my error is appearing directly after it says its about to format the system ( ie Formatting System...) At which point it says E:Error executing updater binary in zip ' ... ' at which point it goes on to say error flashing. I might add my device is a samsung core prime g360t1 and the system was extracted from stock lollipop rom and the boot img from shinysides custom kernel. Any help would be GREATLY appreciated!! :)
[SuperR Kitchen] not-i:
Cheers mate I'll give it a go when I get a chance tonight. Thanks for the effort you are putting in :)
[SuperR Kitchen] jazzespresso:
I wish there's also Windows version of this :crying:
[SuperR Kitchen] :
You can boot into Linux from a flash drive if you don't want to dual boot. Think it will work with the kitchen. Might work with a virtual box from osboxes.org
[SuperR Kitchen] Er. Aditya:
just to be clear all i have to do is add root in kitchen and that would root stock kernel on 5.1.1 ?
[SuperR Kitchen] SuperR.:
Correct :)
[SuperR Kitchen] Er. Aditya:
Your a star man....gonna test this now :D
[SuperR Kitchen] ashyx:
Agreed just down load one of the 64bit virtual box images from osboxes.org and away you go.

I do everything from VmWare as I like being able to access my windows stuff at the same time.
[SuperR Kitchen] AndroidGX:
Hi there,

This kitchen looks interesting (thanks [MENTION=5787964]SuperR.[/MENTION] :good:) ....

... but unfortunately, when I launch it, I have the following :

------------------------------------------------------
SuperR's Kitchen
by SuperR
------------------------------------------------------

MISSING DEPENDENCY:
The following dependencies are missing. Please
install them and try again

7za
gawk

Press ENTER to exit

I tried a sudo apt-get install 7za = does not exist.

Tried gawk also, it found and I installed but after relaunching it = same issue.

So I tried :

sudo apt-get install lzop bison gperf build-essential zlib1g-dev zlib1g-dev:i386 g++-multilib libxml2-utils bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev libsepol1-dev dpkg-dev make

... but same issue also.

Looks like this kitchen does not like me already lol :p:D

Any idea ? :good:

Cheers'
[SuperR Kitchen] SuperR.:
"sudo apt-get install p7zip-full" should sort out the 7za issue. Not sure why gawk is still showing as missing as your command for that is correct :o
[SuperR Kitchen] Er. Aditya:
bro i just rooted and nothing changed my note 4 went into bootloop ...what can be the issue ??

also does this rooting method change the kernel to permissive or keeps enforcing ?
[SuperR Kitchen] SuperR.:
Scroll up in your terminal and check to see if it says "Modifying sepolicy ...". If it does, then it modified your sepolicy. You could try the things mentioned in this post, as I can't help much without the device to test on.
[SuperR Kitchen] AndroidGX:
Thanks for the hint :good:

it installed well, but I had to unzip a whole new kitchen base to avoid this error again.

So now I'm stuck in another step :p :

------------------------------------------------------
SuperR's Kitchen
by SuperR
------------------------------------------------------

ERROR:
simg2img, img2simg, or make_ext4fs could not be built.

Try installing the following packages from terminal:
sudo apt-get install lzop bison gperf build-essential zlib1g-dev zlib1g-dev:i386 g++-multilib libxml2-utils bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev libsepol1-dev dpkg-dev make

Press ENTER to quit

I of course (as my previous post) installed this shell cmd and rebooted, but seems like still not detected :( any idea ? :highfive:
[SuperR Kitchen] SuperR.:
Try opening a terminal in /kitchen/tools/source/mkbootimg, and type "make" then enter. Maybe we can see what is going on a little better this way.
[SuperR Kitchen] AndroidGX:
Thanks,

Here it is :

androidgx@kernel:~/projects/tools/SuperR_Kitchen/tools/source/mkbootimg$ make
make -C libmincrypt
make[1]: entrant dans le répertoire « /home/androidgx/projects/tools/SuperR_Kitchen/tools/source/mkbootimg/libmincrypt »
gcc -o dsa_sig.o -ffunction-sections -O3 -c dsa_sig.c -I..
gcc -o p256.o -ffunction-sections -O3 -c p256.c -I..
gcc -o p256_ec.o -ffunction-sections -O3 -c p256_ec.c -I..
gcc -o p256_ecdsa.o -ffunction-sections -O3 -c p256_ecdsa.c -I..
gcc -o rsa.o -ffunction-sections -O3 -c rsa.c -I..
gcc -o sha.o -ffunction-sections -O3 -c sha.c -I..
gcc -o sha256.o -ffunction-sections -O3 -c sha256.c -I..
ar rc libmincrypt.a dsa_sig.o p256.o p256_ec.o p256_ecdsa.o rsa.o sha.o sha256.o
cp libmincrypt.a ..
make[1]: quittant le répertoire « /home/androidgx/projects/tools/SuperR_Kitchen/tools/source/mkbootimg/libmincrypt »
gcc -o mkbootimg.o -ffunction-sections -O3 -c mkbootimg.c -I.
gcc -o mkbootimg mkbootimg.o -L. -lmincrypt -Wl,--gc-sections -s
gcc -o unpackbootimg.o -ffunction-sections -O3 -c unpackbootimg.c
unpackbootimg.c: In function ‘read_padding’:
unpackbootimg.c:28:10: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(buf, count, 1, f);
^
unpackbootimg.c: In function ‘main’:
unpackbootimg.c:87:14: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(tmp, BOOT_MAGIC_SIZE, 1, f);
^
unpackbootimg.c:99:10: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&header, sizeof(header), 1, f);
^
unpackbootimg.c:182:10: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(kernel, header.kernel_size, 1, f);
^
unpackbootimg.c:195:10: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(ramdisk, header.ramdisk_size, 1, f);
^
unpackbootimg.c:209:14: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(second, header.second_size, 1, f);
^
unpackbootimg.c:224:14: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(dtb, header.dt_size, 1, f);
^
gcc -o unpackbootimg unpackbootimg.o -Wl,--gc-sections -s
androidgx@kernel:~/projects/tools/SuperR_Kitchen/tools/source/mkbootimg$

Any idea? :crying:
[SuperR Kitchen] Er. Aditya:
yes it does says modifying sepolicy , il try again or may be steps you said
[SuperR Kitchen] SuperR.:
Ok, so the problem is with img_tools, not mkbootimg as it seems to have compiled correctly. Unfortunately you won't get the same output with img_tools as I wrote in in bash :( I will convert it to makefile so we can see what is going on. Meanwhile, you can grab the binaries from post #4 if you just want to get it going quickly.
[SuperR Kitchen] Er. Aditya:
the first method dint worked for me and with 2nd way gives me this error

Repacking boot.img ...

7673 blocks
error: no output filename specified
usage: mkbootimg
--kernel <filename>
--ramdisk <filename>
[ --second <2ndbootloader-filename> ]
[ --cmdline <kernel-commandline> ]
[ --board <boardname> ]
[ --base <address> ]
[ --pagesize <pagesize> ]
[ --kernel_offset <base offset> ]
[ --ramdisk_offset <base offset> ]
[ --second_offset <base offset> ]
[ --tags_offset <base offset> ]
[ --dt <filename> ]
[ --id ]
-o|--output <filename>
./boot_repack_ext: line 85: [[: ./boot_repack_ext: line 86: --base: command not found
127: syntax error: operand expected (error token is "./boot_repack_ext: line 86: --base: command not found
127")

------------------------------------------------------
SuperR's Kitchen
by SuperR
------------------------------------------------------

ERROR:
There was a problem repacking your boot.img.
[SuperR Kitchen] SuperR.:
Try deleting the board line instead of commenting (#).
[SuperR Kitchen] Er. Aditya:
and keep the first edits as it is or make them stock again ?
[SuperR Kitchen] SuperR.:
I am not sure, that is the problem lol. The first edits make it so the only ramdisk edits that occur are in sepolicy. The second edit is to remove --board from the mkbootimg command. I am not sure this one helps at all but I noticed JustArchi does not have it in his command and he is a Samsung guy. This is all a shot in the dark as I really have no idea and no Samsung device for testing.
[SuperR Kitchen] Er. Aditya:
so lets test i have kept the first edits as it is and also removed the file...it repacked properly without errors ....gonna zip up and flash now if this dsnt works il revert the first edits and then try again

would that do ??
[SuperR Kitchen] AndroidGX:
I just found what was wrong, it was because I unziped first via windows and put your unziped kitchen into a shared network folder and grabbed it withing it into my virtualbox. I gave a try downloading both kitchen and 64-bits binaries directly from virtualbox, and everything is ok now :good:

Thanks for your help and fast answers, appreciated :highfive:
[SuperR Kitchen] pendor24:
Hello ,

after making a ROM for the 910F Note 4 from a stock system . img I end up with a ROM that contains no file csc system / ect

and a problem to start . img if it is incorporated in the postal outlet ROM does not start. an idea? Thank you
[SuperR Kitchen] Er. Aditya:
with the first edit and removing the line # --board "$(cat ${chosenimg}.img-board)" \

i ended up on a complete black screen and a very possible bootloop

also when i reverted the first method with line # --board "$(cat ${chosenimg}.img-board)" \ deleted it still ends up in a black screen

if you need any more tests lemme know :)
[SuperR Kitchen] SuperR.:
v0.9.4.6

Changes:

Created makefiles for all source-built binaries for easier troubleshooting.

Added a check to make sure the system.img is not sparse when using it for system partition size. Convert it to raw if it is.

Updated smali, baksmali, and oat2dex to the latest commits.

When repacking boot.img, the kitchen now only adds --board if the board file is not empty.
[SuperR Kitchen] enotar:
Too bad this is not working for Samsung SM-P600 Cannot turn on Wifi but rom building and booting is good. Deodedexed, rooted.

The same for all versions.Something still wrong, sorry. Not boo.img related as I flashed patched boot.img from the original root thread and still.

Thank you
[SuperR Kitchen] Er. Aditya:
so shall i try new kitchen or you have ideas to test .? :D
[SuperR Kitchen] SuperR.:
Please read post #4 and provide as many answers to the listed questions as possible. Have you tried without deodexing?

The new kitchen includes a workaround for the 2nd edit from earlier. Not sure it will make a difference for you. If you have a boot.img that works for your rooted device I can take a look and see what the differences are.
[SuperR Kitchen] Er. Aditya:
il ask my team mate to make one...what only stuff you would want to have included...il ask himtodo so and send here ;)
[SuperR Kitchen] SuperR.:
I just need to know what will make all these devices work with root so I can add conditions. It seems some of the Samsung 5.1.1 devices are working with the current method and others (like yours) are not. I need to know the difference and have no way to figure it out on my own. If you get your device rooted and working, send me the boot.img that fixed it so I can take a look. Thanks :)
[SuperR Kitchen] Er. Aditya:
surely bro :)
[SuperR Kitchen] :
Reading the thread it looks like root is working for the exynos devices but not the snapdragon ones but I could well be wrong
[SuperR Kitchen] ashyx:
Just a note to those having wifi issues.

Ensure you are working with the exact same firmware you already have on your device.

If the system, boot, modem images etc you are working with in the kitchen do not match the firmware already on your device you will get issues. One of them not being able to turn on wifi.

In particular a mismatched NON-HLOS.bin will cause the wifi not turning on issue.

Also mismatched bootloaders can cause bootloops and no boot symptoms.
[SuperR Kitchen] hohassan444:
same occurred for me with non-samsung phone with set_metadata option.....i solved it by using sparse_image option.try it.
[SuperR Kitchen] bcrichster:
Bangin'!!

Gratefully sent from my Rooted JollyRoger_B13
[SuperR Kitchen] sefrcoko:
In case this helps: my custom 5.1.1 rom built last week using superr kitchen wouldn't boot on my N910W8. Modded stock kernel as per chainfire's method and flashed it along with supersu 2.52. Still no boot. Ended up re-writing the auto-updater script with a different root method for supersu (used this rom's script as a basis): http://xdaforums.com/showthread.php?p=58925494

Guess what, it booted properly! Only issue was camera fc...now Alexandr built a test version of his rom that includes system.img as a block rather than the extracted files...seems to have now fixed camera fc issues. This was all before the recent kitchen updates here...tried to build a new custom rom yesterday using the latest kitchen but same boot problems as before. Just sharing my experience in case it helps for future kitchen updates...been trying to figure out this 5.1.1 Selinux stuff and got so close but not quite successfully yet. Maybe with everyone here we can figure this out and get it all working 100%.
[SuperR Kitchen] SuperR.:
Thanks for testing things. Here is a very brief summary of set_perm, set_metadata, and sparse_dat.

set_perm : The oldest of the 3. Sets file/directory permissions when flashing a rom.

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

sparse_dat: The newest of the 3, 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.

sparse_dat should be the preferred method if you are building L or M roms, however some Samsung users had some issues initially. I may have sorted some of them out now but not sure.

Very glad you got it sorted out :)

Which boot.img are you using that is working, the chainfire method or the kitchen? If you are using the chainfire modded boot.img, please try the kitchen modded boot.img along with your new updater script or just flash the kitchen created boot.img to see if everything still works. Just trying to track down the issue, whether it is the boot.img or the updater-script.

Can you send me the updater script that is working for you and the kitchen generated one for comparison?

Thanks
[SuperR Kitchen] enotar:
Oh man this is beautiful if that works, I will try tonight.......

Thanks
[SuperR Kitchen] pendor24:
hellos

even after having used knox remove it remains the dossier manager BBC apk with it (system/app).

Samsung Galaxy Note 4 sm- n910f
[SuperR Kitchen] DarkHeart Z:
Bro if the main things inside the kitchen is compiled everytime we update it then that means the kitchen will work on cygwin too ? as you know most of the tool in your kitchen have win32/64 bit executables too so that is why I am asking :)
[SuperR Kitchen] enotar:
Sparse_dat request extras step after zialign?

I dont understand there is no system folder in the zip file created. ....
[SuperR Kitchen] SuperR.:
Once again, I don't know anything about Windows or cygwin. If you would like to make it work feel free to do so but I can't offer any support.

There is no system directory in the rom when using sparse dat. The system is system.new.dat, system.transfer.list, and system.patch.dat using this method.
[SuperR Kitchen] sparks15:
sepolicy-inject could not be built... thats fix with

sudo ./superr

of course install dependencies sudo apt-get install p7zip-full gawk

and

sudo apt-get install lzop bison gperf build-essential zlib1g-dev zlib1g-dev:i386 g++-multilib libxml2-utils bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev libsepol1-dev dpkg-dev make
[SuperR Kitchen] khomsn:
I deodex this rom

P601XXUDOJ5_P601ODDDOJ3_P601XXUDOJ3_HOME.tar.md5

use "4) Change perm type (CURRENT: sparse_dat)" it works and wifi working too. But with other option, no wifi

CURRENT PROJECT: P601

ANDROID VERSION: 5.1.1

ROM Tools Menu

1) Deodex ROM (CURRENT: Deodexed)

2) Root/Unroot ROM (CURRENT: Yes)

3) User app support (CURRENT: Yes)

4) Change perm type (CURRENT: sparse_dat)

5) Asserts: Add/Change devices (CURRENT: lt033g,lt03wifiue)

6) Debloat Menu

7) Build Menu

m = Main menu

q = Quit

Built rom with this option , wifi work!

So I think , script may be missing/incorrect at some point on set perm. And at "build_rom_zip" should change to this

@

if [[ "$(cat $romdir/system/build.prop | grep "Built.with.SuperRs.Kitchen")" = "" ]]; then

bdisplay=$(cat $romdir/system/build.prop | grep "ro.build.display.id" | sed 's/\./\\./g; s:/:\\/:g; s/\,/\\,/g; s/\ /\\ /g')

sed -i "s/$bdisplay/$bdisplay\.Built\.with\.SuperRs\.Kitchen/" $romdir/system/build.prop

fi

@

Thanks for good cooking.:good::good::good:

And by the way can I clone your work to github, in case I have time, I can help.
[SuperR Kitchen] enotar:
So in case of sparse_dat how do you select system partition method. I did select Device through adb shell and it did not flash error executing updater binary in zip. I really think set_metadata would be easier to buil and customize. Can it be fixed?
[SuperR Kitchen] bcrichster:
I thought the "built with SuperR's Kitchen" in build props were removed a while ago... Which version of SuperR Kitchen are you running?

Also, Clones are welcomed since that is the easiest way to update. If you wanna do personal changes to your Clone, I believe you'll need to do some kind of "pull request" with [MENTION=5787964]SuperR.[/MENTION] to make any changes permanent. [emoji41]

Gratefully sent from my Rooted JollyRoger_B13
[SuperR Kitchen] Androidwizzard:
Yeah, I should have taken a screenshot - my fault - it is again that by_name thing on Samsung.
[SuperR Kitchen] bcrichster:
Aren't their (Samsung) perms done with metadata..? Or is this an mmcblk deal?
[SuperR Kitchen] SuperR.:
A screenshot would be helpful for sure. Alternatively, you can send me a link to your boot.img and system*
[SuperR Kitchen] nghia0423:
Nvm. Can't get by-name from boot.img as it fails and I don't have the device on me. How can I find the by-name and what is it? So, I can type it manually.
[SuperR Kitchen] bcrichster:
For us curious folk: Please tell?