yashsingh1/xdaforums huggingface dataset:
[SuperR Kitchen] Saarliner:
I have a script "permissive.sh" with only one line: setenforce 0 !! Is there anything else to add? It dont work correctly i think, Private Mode isnt working, only if i flash a permissive kernel. It would be great if i can set the stock kernel to permissive. My Rom is for Galaxy Note 4 N910F
[SuperR Kitchen] Captain_Throwback:
That script won't run without a header telling system what shell to use to run it. Usually it's something like this:

#!/system/bin/sh
[SuperR Kitchen] Saarliner:
Where i have to add this? My Script is in etc/init.d
[SuperR Kitchen] Captain_Throwback:
At the very top of your script (header).
[SuperR Kitchen] Saarliner:
Thank you, will test it!
[SuperR Kitchen] tanish2k09:
[MENTION=5787964]SuperR.[/MENTION]

Is deodexing now working properly?

If not, would you please be kind enough to suggest a good tool for deodexing?:angel:
[SuperR Kitchen] Saarliner:
For me deodexing works fine
[SuperR Kitchen] tanish2k09:
With which method?

Details please.
[SuperR Kitchen] :
Afaik it won't work on samny kernels, I've tried everything to make a samny kernel permissive in the past and only way was to compile from source
[SuperR Kitchen] ShinySide:
Should theoretically work on kitkat. Kit Kat was the only version on the s5 you could set to permissive via init.rc with setenforce 0. Never tried using init.d to do it. Although doubt he's still on kitkat lol

Lollipop and marshmallow it quit working and have to set it in the kernel source.
[SuperR Kitchen] TheLogicalGamer:
Try su -c setenforce 0
[SuperR Kitchen] baloo30310@gmail.com:
Hello Saarliner !!

You do not encounter a bootloop problem with the N910F configuration.

By what I do with my SM-N910F.

I suspect the deodexing.

See even the symlink ..:mad::eek:

---------- Post added at 11:43 AM ---------- Previous post was at 11:38 AM ----------

Hello tanish 2k09!

I encounter the same problem as you.

But with a bootloops has the configuration of the N910F.

To deodexing on my fulmics advisor: https://xdaforums.com/android/software-hacking/tooll-03-12-fulmics-deodexer-1-0-t3512081;)
[SuperR Kitchen] ladislav.heller:
[MENTION=5787964]SuperR.[/MENTION]

I can't update and use kitchen. It always reports the following:

I did not modify anything.
[SuperR Kitchen] Saarliner:
No, everything works fine. I choose deodex rom and then i choose 1, 1, 1 i think.

---------- Post added at 03:21 PM ---------- Previous post was at 03:20 PM ----------

su -c setenforce 0

Should i write this in my permissive.sh script in /system/etc/init.d ?
[SuperR Kitchen] TheLogicalGamer:
Yes, but first I would also make sure init.d is working via this script.

#!/system/bin/sh

mkdir /data/test

su -c mkdir /system/test

If they do both work, then your good to go, make sure you delete both directories every time you test.

If the su -c command doesn't work, but data/test did.

Try this

su -c "mkdir /system/test"
[SuperR Kitchen] Saarliner:
Did i have to make a second script for that like data.sh and put it to init.d. folder?
[SuperR Kitchen] TheLogicalGamer:
You can, or you can add it into your existing script, but remember if one command fails in an init.d script it stops the current script and moves onto the next (if I'm not mistaken).

Edit: Also when I say delete the existing directories before each test. I mean the directories that are made with the script(s). Because if there is already one there it will fail.

Also if init.d isn't working you can try su.d, but however from what I understand it can be hit or miss with selinux, because it runs a little later than init.d if I understand correctly.
[SuperR Kitchen] deadlock9x:
Dear [MENTION=5787964]SuperR.[/MENTION]

Do your tool support this ROM: http://www.mediafire.com/file/48ts5fz6ay1n12p/ZIDOO_X9S-v1.2.11.zip

I was try to unpack it and have this notice:

"

------------------------------------------------------

SuperR's Kitchen

by SuperR

------------------------------------------------------

ERROR:

Either your kernel does not support selinux, or the

kitchen can't find what it needs. If you are sure your

device supports selinux, you can copy the file_contexts

file from the ramdisk to your 00_project_files directory

to use this feature.

For now, you will need to use set_perm or raw_img.

Press ENTER to continue

"

----------------------

Edit, I can extract it now, thanks to [MENTION=718594]SuperR[/MENTION]
[SuperR Kitchen] SuperR.:
Teaser for the donate users attached below. Pay attention to the details :)

Did you try cloning the kitchen again as the error message suggests?

The problem is there is no boot.img. You can use the kitchen for that rom if you copy the file_contexts from the zip into your 00_project_files directory.
[SuperR Kitchen] Captain_Throwback:
Nooooo don't do it [MENTION=5787964]SuperR.[/MENTION]! It's better for people to use Linux distros...:eek:
[SuperR Kitchen] bcrichster:
Lmao! True.. [MENTION=5787964]SuperR.[/MENTION] introduced me to Linux and I don't regret not looking back!
[SuperR Kitchen] SuperR.:
I must admit, I was hoping for a more positive response to the most requested feature lol. While I completely agree Linux is far superior in every possible way, people are going to use this kitchen on Windows. Python is a much better solution than trying to hack your way into using the Bash version. And, don't forget about the OSX users. What if you wanted to run the kitchen on your Android device? Python :)
[SuperR Kitchen] bcrichster:
You are absolutely a Genius, [MENTION=5787964]SuperR.[/MENTION]!! I was just bustin' balls. [emoji41] I wasn't sure what you had done was even possible. Madd props. Holy crap.. Lmfao. Just.. Wow! You just sidestepped a ton of WynnDoze whining. All but speechless.. (Loving Linux Mint) [emoji41]
[SuperR Kitchen] Captain_Throwback:
Now if I could do it on my device, that's a whole nother world. I've been trying to get [MENTION=2605798]nkk71[/MENTION] to get me a working decrypt tool for arm too - that combination would be unstoppable :o
[SuperR Kitchen] OMJ:
:) I wouldn't mind getting rid of VM
[SuperR Kitchen] dkionline:
I'd either stick with linux, because it has java and python out of the box, just install needed source and it works fine. A beginner would definitly forget to change java path.
[SuperR Kitchen] bcrichster:
I remember early on when someone got it to deodex a ROM on their Nexus or something, tripped me out
[SuperR Kitchen] Svan987:
Hi SuperR,

Thanx a lot for the fix about customs zip. I tested again a custom zip "app, priv-app" it's working great except that empty directories are not flashed (like lib/arm in the app directory) (Tested on 2.1.5.4).

Cheers.
[SuperR Kitchen] Captain_Throwback:
Why would empty directories need to be flashed?
[SuperR Kitchen] Svan987:
You got interface settings error pop up if empty lib directory is not present for Wifi-Direct in my case (symlink)
[SuperR Kitchen] vincom:
when creating a rawimg type flashable zip it formats the system when installing the rom, i removed the "format system" line in the updater-script but it still formats.

my goal is to keep the zip as a rawimg type and making it a nowipe update to existing installed rom
[SuperR Kitchen] SuperR.:
Are the empty directories in the zip or is the kitchen removing them when it deletes the symlinks? Sorry, I have a lot going on and I don't remember how I did it lol. If the empty directories are in the zip, there is not much I can do.

I don't think you can do what you want with system.img as it is a 1-to-1 copy of your system partition. sparse dat roms have patch capabilities using system.patch.dat but I don't know how to implement it. Regarding the kitchen, set_metadata is the best option to accomplish your goal.

edit: Does twrp support mounting loop devices? If so, you could run a shell script to mount the system.img in recovery and place the files.
[SuperR Kitchen] _that:
How would you expect this to be installed? You'd need an updater that knows how to merge two filesystem images, and the question is why you'd want to do that?
[SuperR Kitchen] bigrammy:
Interesting I like that idea :good:

Pretty sure TWRP does and I do not see why most recovery's wouldn't support it. :confused:

SuperSU uses a loop for the su.img I seem to recall. :D

Maybe size could be an issue as some system.img's are pretty darn big so I guess you would need to check for enough free space before trying the mount.
[SuperR Kitchen] Svan987:
When creating custom zip the empty directories are in zip. So kitchen is doing a good job :D

I created a full custom rom with those system apps and I found the solution in the "updater-script" file. I copied the symlink lines in the custom zip "updater-script" and it's working 100%

symlink("/system/lib/libasf_fileshareserver.so", "/system/app/AllshareFileShareServer/lib/arm/libasf_fileshareserver.so");

symlink("/system/lib/libasf_fileshare.so", "/system/app/AllshareFileShare/lib/arm/libasf_fileshare.so");

symlink("/system/lib/libasf_mediashare.so", "/system/app/AllshareMediaShare/lib/arm/libasf_mediashare.so");

I should have checked earlier if any app or priv-app got a symlink in a non debloated custom rom build by the kitchen :p

Cheers.
[SuperR Kitchen] SuperR.:
Glad you figured it out. The kitchen will add those symlinks for you if you choose app, priv-app, lib custom zip. The reason it does not add them for app, priv-app is that I can't be sure you have the libs we are linking to unless they are in the zip.

I agree with [MENTION=4878287]_that[/MENTION], but attached below is an example of how you might be able to do it. I created a small system.img that includes a fake app (testfile.apk). When you flash it, a script will run and check free space against the system.img size. If you have enough free space to hold the system.img, it will be extracted to /tmp. Another script will run that mounts the system.img and copies the fake apk to /system/app/testfile. I have not tested it so keep that in mind :)

edit: I made a mistake. The first one extracts the system.img along with the script that checks to see if you have enough room. v2 attached now fixes this.

edit2: removed attachment as it was broken. v3 link is a few posts ahead
[SuperR Kitchen] gomangoo:
Hello everyone and thank you for your kitchen [MENTION=5787964]SuperR.[/MENTION]

I am trying to create a stock rooted ROM(Kitkat 4.4.2) for Samsung Galaxy S4( I9515 or jfvelte) for personal usage from firmware extracted from sammobile website.

However, I am unable to deodex the ROM as am having the error( attached a screenshot as well):

basename: missing operand

Try 'basename --help' for more information.

METHOD:

basename: missing operand

Try 'basename --help' for more information.

I am using Ubuntu 16.04 and latest version of the standard kitchen.

Note:

I have tried using old version 1.0.4.2 and having success with that with no such error however I used that version on Ubuntu 14.

On Ubuntu 16.04 I am having issues with the old version where the extraction process crashes with some I/O error.

I have some packages installed:

sudo apt-get install lib32stdc++6 lib32z1 build-essential libc6-i386 lib32gcc1 lib32ncurses5 bison g++-multilib git gperf libxml2-utils make python-networkx zip gawk git binutils libc6-i386 coreutils cpio e2fsprogs findutils gawk gcc grep gzip libc-bin liblz4-tool lzop mount ncurses-bin perl-base sed tar util-linux vim-common wget xz-utils 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 ccache automake squashfs-tools schedtool zlib1g:i386

I have searched through XDA thread and search engines, but to no avail.

I found a post same as mine in this thread but it did not help me.

Is there any dependency issue?

Please guide me through this!
[SuperR Kitchen] bigrammy:
Hi SuperR first off thanks for this :good:

It seems the configure.sh needs a little tweaking. :confused:

First I got a status 7 error and twrp reported no "config" found.

I added a empty "config" file and re-flashed the .zip but got a "signal 11" error :confused:

TWRP recovery.log

Test Updater
by SuperR

Extracting data ...

minzip: Extracted 2 file(s)
about to run program [/tmp/configure.sh] with 1 args
Checking config ...

/tmp/configure.sh: line 16: syntax error: unexpected end of file (expecting "fi")
run_program: child exited with status 2
Updater process ended with signal: 11

and some screenshots attached.
[SuperR Kitchen] SuperR.:
I guess you are the first one to deodex KitKat in over a year because this bug has been there for at least this long lol. I will fix in the next update. For now, you can open the superr file in a text editor and do a find/replace. Find "smalio" and relpace with "smali"

There should be 4 total. Save the file and try again :)

Oops, my python/shell switch must have gotten stuck in the middle :o

The missing "fi" is the reason twrp reported the missing /tmp/config file. Without the fi, test could not complete, the script exited with an error, and the config file was not written. Here is v3. Hopefully you will at least get past that part now and into the fun stuff :)
[SuperR Kitchen] aaron74:
Deodex Note 4 Rom?

Can someone please tell me which deodex method works to use on Note 4 roms?

Thank you!
[SuperR Kitchen] bigrammy:
It works :victory: :victory:
[SuperR Kitchen] tanish2k09:
I edited the superr terminal file with Linux editor.

Saved the file. Next thing, "child process ended with error" in terminal...
[SuperR Kitchen] kevintm78:
I use oat2dex and then pick the official version. I just deodexed the latest CQB2 firmware for the 910V and all went well.
[SuperR Kitchen] vincom:
is config.sh new, never seen it in the older superr versions, any good links on learning to use/edit this type of .sh files during flash or how to avoid in them getting created in the first place
[SuperR Kitchen] aaron74:
Thank you!
[SuperR Kitchen] SuperR.:
I am not sure how useful it is, but thanks for testing. Now we know a way to do what [MENTION=4057370]vincom[/MENTION] asked :)

Pixel devices (and probably many new devices that have not come out yet) use slots a and b for seamless updates. There are also devices where the by-name reported by Android and/or the boot.img is not the same as the by-name recovery uses. The configure.sh script detects the by-name recovery uses and the active slot (if it exists) and uses them to flash things in the correct places.

If you want to learn, the file is a shell script. There are many tutorials on how to write them :) If you want to remove it, make sure you replace the associated lines in your updater-script with your correct device info otherwise the flash will fail.

I just made the change to the superr file, and deodexed the only 4.4.2 rom I have with no issues. Attached is the edited superr file. Replace the one you have with this one to be sure. If it still does not work, send a link to the firmware.
[SuperR Kitchen] vincom:
just to clarify, i can flash this test zip "as is" for testing purposes on any phone, mines an s5

the reason for my wanting to do this is to keep newbs away from the rom zip file, many do not know how to open .img ext4 files, is it absolutely necessary, no but ty for trying
[SuperR Kitchen] bigrammy:
Yes it should be fine on the s5 :good:
[SuperR Kitchen] gomangoo:
Thanks for your help [MENTION=5787964]SuperR.[/MENTION] Regarding kitkat usage, I felt 5.0.1 stuttered more than 4.4.2 on my device. Hence wanted to try the old look.

The replacing part worked perfectly on the deodexing part and right now am using the stock rooted ROM and replying from my device.

Thank you again [MENTION=5787964]SuperR.[/MENTION] for your work!
[SuperR Kitchen] vincom:
when i try your test zip, it all works

i copied my system.img to replace yours, changed the size in config.sh but i get no tmp/output, files are copied(not extracted) to the tmp folder but no output folder is created and no error messages

edit. odd, i also found your output in my ext sdcard

edit: i copied my image that was extracted to the tmp folder to open in superr, but it seems corrupted as it states problem extracting, the copied img is ~800mb but partition is 2.5gb but w/only 380mb of used space.

my head hurts, just going to do it the meta way

my update.sh
[SuperR Kitchen] SuperR.:
Your cp command should be:

cp -R * /system/
[SuperR Kitchen] vincom:
still a no go, files are copied to tmp folder but theres no output folder
[SuperR Kitchen] SuperR.:
You mentioned before that you found an output directory on your external sdcard. If that is where your /tmp is the mount may not work (fat32 filesystem). You could try extracting to /data instead but you will need to remove the tmp files at the end of your update.sh since /data is not automatically wiped after rebooting recovery.

Example attached. Additionally, you must be using a valid ext4 system.img. If it doesn't mount in Linux, it won't mount in TWRP. If you can't get it working, I don't have any more suggestions. Good luck :)
[SuperR Kitchen] vincom:
further testing reveals its size dependant on the system.img raw size, not compressed size. at 840mb it works as files are copied to output folder on internal sdcard at /tmp, at 900mb it fails so somewhere in between those sizes it stops and no output folder is created. all images were created using your kitchen, set as raw_img

further testing reveals the config script will set free even if theres not enough free space, i tested this by stating size of img was 10gb but i only had 6gb free .

all in all i can get it to work if rom is ~830 uncompressed, thanks superr for delving into a rabbit hole w/me, im the type that if i see a nail sticking out i'll use my head to hammer back in, lol

the size issue, well, its like a nail.......

edit. just noticed you attached a file, testing it now

edit. same issue w/size, no output folder if img is too large, an 830mb img works
[SuperR Kitchen] tambok_15:
Good day :)

Just asking if are there any possible ways/tools to run SuperR's kitchen in Windows OS or in Cygwin tool ??

i tried to run it in Cygwin and rename Super's kitchen folder to kitchen then copy and paste it to specific location of Cygwin folder .. When im going to run the kitchen using ./superr command, this error will come out (view the picture below) but when i use dsixda's kitchen and run this command, ./menu then dsixda's menu run successfully ..

Is SuperR's kitchen will run in Linux only ??? is there any trick to run it in Windows OS ??? PLEASE help me :(
[SuperR Kitchen] vincom:
vbox
[SuperR Kitchen] bdorr1105:
Running mine on Linux Mint, VM
[SuperR Kitchen] bcrichster:
See this post: https://xdaforums.com/showthread.php?p=71243200
[SuperR Kitchen] svandasek:
7.1.1 supported?
[SuperR Kitchen] nightcervant:
I downloaded the official fw for P9 Plus, and extracted from it the file (system.img and boot.img), but unfortunately no version seems to be able to extract the file, giving me back the error mentioned above
[SuperR Kitchen] SuperR.:
Yes

I just downloaded official firmware for the p9 (HWVIE), used the updateapp plugin to extract the system.img and boot.img, and the system.img extracted without issues. Send a link to the exact firmware you are having problems with and I will take a look.

It may also be that your system.img is corrupt after extracting it from UPDATE.APP. You could try using a different tool to get the system.img.
[SuperR Kitchen] ROBERT CM:
help..!!

v9.2.6

-Remove the knox

-Which Perm type would you like to use?

1) set_metadata

2) set_perm

3) Sparse dat (not recommended for Samsung)

choice

2) set_perm

all this gave me bootloop

in addition boot.img not int.d can be added, to create the zip rom remove ramdisk he says.

only the zip is created without changing anything the boot.img

Thanks

Galaxy S5 G900M
[SuperR Kitchen] Er. Aditya:
1. check which one your device supports , set meta deta and try

2. its really easy to create kernel flashable zip , dont understand correctly wht your trying to do and say
[SuperR Kitchen] ROBERT CM:
thanks for answering

I will try what you say

choice set_metadata

is safe to remove the knox without giving bootloop? with v0.9.2.7 or v0.9.2.6

I read in previous comments to remove knox gives bootloop

Thank you again :o ;)
[SuperR Kitchen] DarkHeart Z:
Don't pm if it's not personal . Rather post it here . Can be helpful for lot of person . Device support is automated just like [MENTION=718594]super[/MENTION]R said .
[SuperR Kitchen] Er. Aditya:
just add the libs file back into rom zip and your good to go

on cygwin bro
[SuperR Kitchen] DarkHeart Z:
just like in linux .
[SuperR Kitchen] jesus183095:
you help me [MENTION=5787964]SuperR.[/MENTION]
[SuperR Kitchen] :
After running the kitchen update zip everytime I select search for updates in the kitchen it fc. Not sure if it's related
[SuperR Kitchen] SuperR.:
I can almost guarantee it is related :( The kitchen setup script was an attempt to make things easier but maybe it made things worse. The best way might be to start from scratch, but I did not want everyone to have to lose their current work. This update is a major change to the kitchen and I believe it to be worth it in the long run. Sorry for the trouble :o
[SuperR Kitchen] :
It's no trouble at all . I just deleted the kitchen and git cloned it again, all of 20 seconds work. Thank you for your continual support and updates
[SuperR Kitchen] Er. Aditya:
love this kitchen , bro any how to make an list of our own to remove bloat everytime ?
[SuperR Kitchen] SuperR.:
Turns out it was not the setup script that caused the kitchen updater to fail. I overlooked a "fi" that was left over from my changes and it caused it to crash. I have pushed the fix so if you do a manual git pull from terminal it will be fixed for you.

I will make a new version for those that did not git clone asap. Unfortunately, everyone that is not git cloning will need to start from scratch now that the updater in v0.9.2.7 is not working. Sorry everyone.

edit: Actually, nobody will need to start over. I will make a zip with the new kitchen_update script and you can replace the broken one before updating. I will explain details when I release the next version :)
[SuperR Kitchen] SuperR.:
Yes. You can create a new file /tools/root/bloat_custom and put anything you want in there. Have a look at /tools/root/bloat file to see how it works and use the same format in your custom_bloat file.
[SuperR Kitchen] DarkHeart Z:
Bro will you add support for cygwin ? I am requesting for compatibility of cygwin please add support for it :(
[SuperR Kitchen] SuperR.:
I have said this before and I will say it again...I will not be supporting cygwin. If you want to try to make it work, be my guest. I don't even have a windows machine to test on.
[SuperR Kitchen] DarkHeart Z:
you got the man :)

i can be your tester . I have set the kitchen for cygwin properly and also fixed all dependencies too . Except the boot/recovery portion needs a little touch . just the repacking boot.img doesn't work . Whenever i tried repacking both with keeping and deleting ramdisk Boot.img didn't repacked at all . i checked the boot.log . It says in the last line that couldn't repack the boot.img . I have put carliv's window's kitchens executables in .bin folder and changed the unpack_mtk_img script's first few lines with just .exe extensions . And kitchen update needs a little bit rework . I have commented out the ping and internet check and It fetched the update without any error . Just the unexpected behavior else came in . But i just restarted the script and it is updated and working . Just need your help with boot/recovery tools . It's exactly same as linux . Just with help I can make it will be properly functional . Please just tell me what I have missed here ? every other feature is working perfectly :)

Edit : Maybe for cygwin Internet checker needs to be reworked . As /dev/null device and grep 0 arguements shows server is temporarily down issues . So I think normal update checker will be good for cygwin .
[SuperR Kitchen] jesus183095:
[MENTION=5787964]SuperR.[/MENTION] Yoy can help me pliss.. :)
[SuperR Kitchen] Er. Aditya:
regarding what bro ??