yashsingh1/xdaforums huggingface dataset:
[SuperR Kitchen] risx:
Going to try this on my S6 edge this weekend
[SuperR Kitchen] SuperR.:
v0.8.9.6

Changes:

Added ability to create ROMs with sparse dat images for Lollipop and above. This method should be the most reliable.

Some UI changes
[SuperR Kitchen] jtash01:
Still having problems with custom debloat

I get numerous errors stating:

mv: cannot move ‘/home/jtash/superr/superr_OH1_bloated/.’ to ‘/home/jtash/superr/devices/jfltespr/project_OH1_bloated/debloated_files/./.’: Device or resource busy
[SuperR Kitchen] SuperR.:
What are you putting in your bloat_custom file? I gave examples of what is acceptable.

edit: you can also take a look at the bloat file in the same directory for more examples.
[SuperR Kitchen] not-i:
Not sure if it's possible with the kitchen but I'm trying to get my custom rom to boot (Moto X Pure/Style 2015) and having trouble with the normal flash method. Tried this kitchen and manually.

Anyway what I want to try is to repack my system into system.img to fastboot (or twrp flash).

I've never tried to repack one before any idea where I should start? I don't think there is anything wrong with my rom is just getting it to boot is the trouble. I get all the normal boot screens but after a time screen goes black and doesn't get past it.
[SuperR Kitchen] jesus183095:
Work on windows? I have a Galaxy grand prime SM-G530H and oficial rom with lollipop bot i use the dsxdiag quitchen and not deodexed the roms.

This kitchen deodexed lollipop and kitkat? :D thnx for the answer. Very thnx
[SuperR Kitchen] mcqaissi:
its not work for me always given err.

any help
[SuperR Kitchen] SuperR.:
v0.8.9.7

Changes:

Added ability to switch between sparse dat, set_perm, and set_metadata in change perm type menu.

Added ability to build a system.img
[SuperR Kitchen] SuperR.:
Saw your post and added the feature. Let me know how it goes :)

edit: You may also want to try sparse dat. It should be more reliable for Lollipop roms
[SuperR Kitchen] SuperR.:
Are you following the usage instructions on post 3 exactly? Seems like you might be running the kitchen from the wrong directory.
[SuperR Kitchen] sebastiandg7:
Hey [MENTION=5787964]SuperR.[/MENTION] ,

After flashing a cm12.1 based rom and reboot system it automatically goes to bootloader mode....

But if I just unzip the rom and re zip it without no changes i works perfectly. Do you know why could it be?
[SuperR Kitchen] Stephen:
[MENTION=5787964]SuperR.[/MENTION] Hey got the rom to boot OK, but still getting an FC on the camera, I'll get you a logcat shortly and a copy of my updater-script as well.
[SuperR Kitchen] SuperR.:
Is the vendor.img something that you want to modify? If not, we can just include the img in the rom or convert it to dat without extracting which will almost certainly fix your issues. Just wondering if I am going about this the hard way for no reason.
[SuperR Kitchen] fhem:
That makes much more sense to me. We don't want to edit the vendor image we just to make sure people are using the rom compatible vendor image.
[SuperR Kitchen] Stephen:
Hmmm hadn't thought about that, best of both worlds? Use package_extract_dir for system directory and use block image update for vendor. That might work well! Here is a copy of my updater-script and a log cat for the camera, just so you can have a look. I simply added a .txt extension to the updater script so I could post it here.

In fact thinking about it, that would be 100% That was more ignorance in my end! I thought it had to be one or the other! I didn't think you could use both. That would really be the perfect solution! Could set_perm_recursive be used in this scenario?
[SuperR Kitchen] SuperR.:
It really depends on the update-binary whether it can do both block image update and package extract. To be honest, I am not sure. However, we can definitely use block image update when building a sparse dat rom, and something like the following for set_perm and set_metadata builds:

package_extract_file("vendor.img", "/dev/block/bootdevice/by-name/vendor");

You would not need to use set_perm_recursive with either of these methods as they are basically the same as fastboot flash vendor vendor.img.
[SuperR Kitchen] Stephen:
I have tried that script before, package_extract_file("vendor.img", "/dev/block/bootdevice/by-name/vendor"); - I could never get it to boot past the initial Google screen.
[SuperR Kitchen] SuperR.:
What about this:

run_program("/sbin/busybox", "dd", "if=vendor.img", "of=/dev/block/bootdevice/by-name/vendor");
[SuperR Kitchen] Stephen:
Trying now!

EDIT: Nope still stuck at initial Google screen with unlock symbol! :(

I think the way forward is to use package_extract_dir("system", "/system"); along with symlink and set_metadata tags for the system partition, then use block_image_update for the vendor folder. The problem is just getting a updater-binary file that allows me to run all the commands I need. Ideally I also need set_perm_recursive as it seems to play the best with setting xposed permissions on the data partiton.
[SuperR Kitchen] Er. Aditya:
any fix for my issue ??
[SuperR Kitchen] SuperR.:
Did you use a raw vendor.img? I believe you should with the dd command, but I am not 100% on that. You could try with the sparse dat update-binary included in the kitchen. I really don't know if it has legacy commands built-in. It is located here:

/kitchen/tools/updater/META-INF-DAT/META-INF/com/google/android/update-binary

Sadly, no. I am not able to reproduce the issue. Does it happen on all roms? When did it start happening? Does it work in an older kitchen version? If so, what is the newest kitchen version that it works in so I can see when it broke.
[SuperR Kitchen] Stephen:
I pulled the vendor.img directly from the factory image and used it.
[SuperR Kitchen] SuperR.:
If you feel like experimenting, you can extract the vendor.img using the kitchen. The vendor.img left in the project dir will be raw (It deletes the sparse img and replaces it with the raw one). Once you have the raw vendor.img, you can try the dd command again with it.
[SuperR Kitchen] Stephen:
CAMERA IS WORKING!!!!!!!!!!!!!!!! :D

So finally got it working, I can't believe it. This is what I did.

package_extract_dir("system", "/system");

package_extract_dir("vendor", "/vendor");

set_metadata_recursive("/vendor", "uid", 0, "gid", "1000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0"); _<- removed this line under extract vendor

Add following lines:

Quote:

Originally Posted by SuperR.

Can one or both of you toss these lines in your updater script to make sure they work properly before I make all the changes to the kitchen? Thanks

Did not need to add:

symlink("/vendor/lib64/libimscamera_jni.so", "/vendor/app/ims/lib/arm64/libimscamera_jni.so");

symlink("/vendor/lib64/libimsmedia_jni.so", "/vendor/app/ims/lib/arm64/libimsmedia_jni.so");

These were included in the script already

Here is an attached copy of my script to show you.

http://pastebin.com/rmrH0JW3

Happy days, looks like we have a preferred solution!!!!! It means very little change to my existing scripts to implement this :D I am shattered and off to bed! :D
[SuperR Kitchen] SuperR.:
That is great news. I am so sorry I was not clear that you should remove the existing line, but that was my intention. Again, my apologies.

So in the end, using only the set_metadata lines I posted originally are the answer, correct?
[SuperR Kitchen] SamuriHL:
Hey just wanted to give a big thanks for this because I used it to create an sepolicy patched kernel for my Note 10.1 2014 SM-P600 and it worked flawlessly. Really appreciate this util. Well done, man!
[SuperR Kitchen] Stephen:
Yup, thank you again for all your help. Really, really appreciated! Will you be able to add the script into the kitchen?
[SuperR Kitchen] Er. Aditya:
i tried a few versions and found that if i zip up odexed rom without deodexing it work fine

but just the zipllign dsnt seen to work

il setup everything again and let you know if i get sucess
[SuperR Kitchen] SuperR.:
Yes :)

v0.9.5.8

Changes:

Added vendor metadata for Nexus 6p and Nexus 9.

Added space to ui_print in updater-script.

Busybox now installs before SuperSU.

Preparing updater-script with set_metadata is now at least twice as fast.

Fixed a bug where the old perms could remain when changing to a new type.
[SuperR Kitchen] KrishnaSagar:
Thanks a lot for this :) Been looking around for a while.
[SuperR Kitchen] enotar:
Thank you
[SuperR Kitchen] Stephen:
[MENTION=5787964]SuperR.[/MENTION] check your PMs!
[SuperR Kitchen] Stephen:
Just built a test ROM using the latest version of the kitchen using set metadata tags and included vendor. Worked perfectly, thank you very much!
[SuperR Kitchen] SamuriHL:
HELP. I try to unpack and repack the attached boot.img for my whale (NX6 shamu) and when I flash it, it fails to boot. I get the dead android icon instead. Flash back the original boot img and she boots fine. Anyone have any ideas? I'm trying to learn to make system less root boot img files myself and I was able to for my S4 GPE no problem, but, the NX6 boot img is just not playing nice. Even with no changes at all, just unpack and repack, it won't boot.
[SuperR Kitchen] enotar:
I am not lucky with latest versions:

What Kitchen version?

0.9.5.8

What Linux are you running?

Ubuntu latest

What device are you working on (make/model)?

SM-P600 Samsung Galaxy note 10.1 2014

What was the source you started from (system.img, system.ext4.tar, rom.zip, etc.)

System.img, boot.img

What Android version?

5.1.1

What perm method (set_perm, set_metadata, sparse_dat)?

all, set metadata boot well and load the UI but no Wifi as you already know, set perm boot well but load black screen as UI, and sparse_sat dont flash for error in the updater script

What did you do after extracting and before building?

deodex, remove Knox, unsecure boot, root, data folder

Were there errors on the screen if you scroll up in the terminal?

for sparse_dat yes for others and I test all no errors

Can you send a link that does not require registration to the files you started with (nandroid, system.img, boot.img, etc)?

I use with succes sprevious versions but since few version sparse_dat doesnt work anymore for problem with updater script (doesnt flash) and meta data as the same issue with wifi.

I have a rom working that I made previously but the last Samsung I want to customize doesnt work, not sure they change so much.

This wifi issue with metadata is driving me nuts as rom boot perfectly...
[SuperR Kitchen] guzanu:
you can run from cygwin, sorry for my English. thank you
[SuperR Kitchen] SuperR.:
I am pretty sure some people have been able to build roms successfully for the Nexus 6. Hopefully someone will chime in and be able to help you

I still have no idea about the wifi issue, but I would like to know what the error says when building sparse_dat.

I will not provide support for cygwin or windows. Some things may work and others probably not. Good luck :)
[SuperR Kitchen] tirta.agung:
What Kitchen version?

0.9.5.8

What Linux are you running?

Ubuntu latest

What device are you working on (make/model)?

Micromax Yu Yureka

What was the source you started from (system.img, system.ext4.tar, rom.zip, etc.)

rom.zip

What Android version?

5.1.1

Hi there SuperR., I just tried your 0.9.5.8 version of your kitchen on my latest ubuntu laptop to unpack Micromax Yureka latest CM 12.1 nightly, however, with no luck. The kitchen manage to unpack the rom, but all files in the system look broken, for instance the build.prop which can be open with gedit, appears gabbled. Is there something wrong with what I've done?

By the way I've also tried xpirt guide on "Compressing and Decompressing Lollipop/Marshmallow DAT files", but also with no luck.

I guess there is something written to the new nightlies which prevent us to unpack it correctly, any idea what is it?
[SuperR Kitchen] Er. Aditya:
tried a clean linux setup with the latest kitchen and everything worked flawlessly

thanks aton bro :)

just rooting the kernel gives a bootloop , can someone help me out on this...thanks
[SuperR Kitchen] hohassan444:
[MENTION=5787964]SuperR.[/MENTION].please i have a problem in latest versions ( v0.9.5.7 and v0.9.5.8) in getting system.img size if i use sparse_dat option ;

1 - if i enter it manually (using cat /proc/partitions X 1024)...i get rom zip of only 12.5 mb.

2 - if i select adb shell option ..the rom zip builds without problems.

Reverting back to kitchen v0.9.4.6.....every thing goes normally ( whether i use manual or adb shell option)..from rom building...to installing...to booting).

I use :

ubuntu 15.10 64 bit

MTK 6752 based device

lollipop 5.1 64 bit

thanks in advance .
[SuperR Kitchen] enotar:
I am sure that wifi is only about permissions.

For sparse dat

Log:

Extracting sytem

E: Error executing updater binary in Zip '/external_sd/Rom/LLP600B2.zip'

Error flashing zip '/external_sd/Rom/LLP600B2.zip'

Updating partition details

...Done

I post here my Meta Inf Folder
[SuperR Kitchen] SuperR.:
I just downloaded the cm12.1 rom you linked, and I also get the same garbled files. I have no idea why. The kitchen uses the same method xpirit uses which is why it does not work either. Unfortunately I did not write the tools being used for dat extraction so I can't do anything about it until they are fixed :(

I think you might be choosing the wrong mmcblk when entering it manually. The adb shell option does exactly what you did manually (cat /proc/partitions, system mmcblk X 1024).
[SuperR Kitchen] SamuriHL:
Yea I've no idea why that particular boot img refuses to work after a simple unpack repack operation. I've managed to successfully modify boot img files for the s4 gpe and the note 10.1 2014 with no issue. The attached nx6 img however doesn't boot. Very odd. I'm hoping we see a new factory image for the nx6 soon so when it comes I'll try again with the new kernel.
[SuperR Kitchen] hohassan444:
I enter it exactly right in both versions (v0.9.4.6 & v0.9.5.8).....it builds normally in v0.9.4.6...but in v0.9.5.8 , gives only 12.5 mb (if i select manual option).
[SuperR Kitchen] Androidwizzard:
I would really like to learn for what purpose you want to extract cyanogen in the kitchen.

Implied it would work, what then? Needs not to be rooted or deodexed, has already the correct kernel, right?

Only thing I see is zipping with folder structure. Maybe I'm getting old without fantasies ;)

BTW: Did you try this tool -> LINK
[SuperR Kitchen] enotar:
can someone post 0.9.4.6 to test if that works better_

Thanks
[SuperR Kitchen] hohassan444:
I have no relation to cyanogen..i try to port zopo 920+ rom to my jiayu S3..every thing goes smooth in older kitchen versions but not recent one....thanks again for your patience.
[SuperR Kitchen] hohassan444:
that is
[SuperR Kitchen] enotar:
tried 0.9.4.6 but same issue, no go. Update bynary is the issue but I compare the one that flash with the new one and no differences.It looks something change in the original Rom

I think I had enough with sparse dat I will try to dig in the Wifi issue with metadata should be lib or permissions.
[SuperR Kitchen] SuperR.:
Try replacing the main superr script with the attached one and try entering your partition size manually again. Let me know how it goes.
[SuperR Kitchen] DarkHeart Z:
Bro a new feature request . please add userdata.img extraction support . There are some crucial files which is needed so much after reflashing the stock . You extraction option shows userdata.img but don't extracts it . Instead it ends up in an error called : error : there is no system directory .
[SuperR Kitchen] SuperR.:
Try renaming userdata.img to generic.img and extract generic.img.
[SuperR Kitchen] hohassan444:
thanks for your help...it works now .
[SuperR Kitchen] DarkHeart Z:
tried it . . It didn't work . :(
[SuperR Kitchen] SuperR.:
Is this a factory userdata.img? If so please send a link.
[SuperR Kitchen] udh2k:
ERROR

Hi all, I am getting this error, my device is rooted 5.1

ERROR:

Something went wrong. Most likely you lack permission

to pull img's from your device.

Press ENTER to return to the Main menu

Is it because I have a locked bootloader? Please help... :crying:
[SuperR Kitchen] fhem:
If you want cook in this kitchen you best unlock your bootloader, root your device, enable adb debugging.
[SuperR Kitchen] udh2k:
My phone is already rooted, USB debugging is also enabled, but the bootloader is not unlocked. Could you please guide me? The manufacturer of this Phone doesn't give any single info on how to unlock this bootloader. I am really lost here... :confused: I wanted to make a flashable zip of my stock 5.1 ROM.
[SuperR Kitchen] Stephen:
Hey, is it possible to use the updater-script to install an apk into the data/app directory, just as if you downloaded the app and installed it via android? I tried installing the xposed installer app then taking the folder in data/app and using extract-dir to copy the apk into the data directory.

The app loads in the app drawer, but when I try to run it I get an FC. If remove the app, then install it, it works perfectly!
[SuperR Kitchen] DarkHeart Z:
Here it is . It's an android one devices factory image :(
[SuperR Kitchen] SuperR.:
The kitchen is supposed to be doing that already if you enable user apps and use the correct directory structure in the project directory. I guess I am not following completely, sorry :(

I also had trouble extracting the userdata.img. I even tried the userdata_8g.img with no luck. My guess is that they are not ext4 filesystems. Either way, I am not sure how to get it extracted. You could fastboot flash or dd it if you need it to be installed with your rom. If you find another way to unpack it, let me know and I will see about adding it to the kitchen.
[SuperR Kitchen] DarkHeart Z:
But bro it is ext4 filesystem image . i have attached my partitions info , emmc info and also filesystems info I got from proc . And i have checked sp flash tool scatter files . it also said this is a ext4 filesystem .
[SuperR Kitchen] bigrammy:
userdata or partition may be Encrypted in which case you can't unpack them?
[SuperR Kitchen] DarkHeart Z:
It will be strange if they are . Because i was able to successfully unpack the system.img without errors . Why would userdata.img be encrypted I don't know . If it is then why oem will leave sprout system.img unsecured thats a lot confusing though :eek:
[SuperR Kitchen] Stephen:
I will definitely check that out, sounds like what I need cheers!
[SuperR Kitchen] duniel:
When I try to use the kitchen, it shows tune2fs missing dependency.

[IMG="Missing dependency"]http://i63.tinypic.com/2j50vv6.jpg[/IMG]

It doens't install anything typing y, and I don't know how can I install tune2fs dependency.

My OS is debian 8 jessie 64 bit.

Regards & thanks :D
[SuperR Kitchen] bcrichster:
You may need to update to a newer OS..??

Gratefully sent from my Rooted JollyRoger_B13
[SuperR Kitchen] duniel:
Debian 8 isn't outdated OS... but I'll try the kitchen on other OS...

EXTRA:

I read that tune2fs is in "e2fsprogs" package (in debian jessie).

Checking this link, I've found tune2fs under /sbin/tune2fs.

Maybe changing location of tune2fs on the kitchen's script or files solves the issue... Any ideas about this [MENTION=5787964]SuperR.[/MENTION] ?

Regards
[SuperR Kitchen] SuperR.:
The kitchen is not using tune2fs anymore so you can open /kitchen/tools/dependencies and delete the tune2fs line. Save the file and try again. This is left over and should have been removed. I will take it out for the next version. Sorry for the inconvenience.
[SuperR Kitchen] duniel:
Thanks for the quick reply!

I will try the patch :)
[SuperR Kitchen] SuperR.:
v0.9.5.9

Changes:

Fixed manual entry of partition size.

Removed tune2fs from dependencies.
[SuperR Kitchen] oak:
Awesome kitchen, SuperR. Thanks for this. Very easy to use. Fantastic work. You should have a donation link.
[SuperR Kitchen] abkareino:
i have problem when i need extract new room

hi Sir

rely You made a wonderful project ;):good:

but i have problem when i need extract new room

it's a Log

step 1
CURRENT PROJECT: GT-i9300-eng
ANDROID VERSION: Copy a rom zip, tar/boot.img,
win/boot.win, or system.img/boot.img to the following
directory and choose option 4 to extract it:
/home/abkareino/Desktop/SUPERSlast/superr_GT-i9300-eng
step 2
Extract Options:

1) I9301IXXUANE3_I9301IOXXANE2_I9301IXXUANE3_HOME.tar
2) system.img.ext4
Should we extract system.img.ext4 to GT-i9300-eng? y/n
ERROR:
There is no system directory.

Press ENTER to return to the Main menu
:(:confused:

before i make updated like v 9.3 and 9.4 i make extract and I Create flashable zip it's ok working 100% :good:

but now i don’t know what happened :confused:

also i need to make file ext4 because when i make Build The resulting file system.img only i cant flashd by odin :eek:

i try to convert system.img resulting file to ext4 but always filed :(

can you help me pls :angel:

Thanks in advance :cowboy:
[SuperR Kitchen] Er. Aditya:
deleted
[SuperR Kitchen] abkareino:
i try to change name for system file form system.img.ext4 to system.img and i will try extra room

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

step 1

The answer to this question will show when flashing

the zip and will be converted into the zip name when

the zip is built.

What is the name of your zip? ....

step 2

Which perm type would you like to use?

1) set_metadata

2) set_perm

3) Sparse dat (For Lollipop and beyond)

Please enter your choice:

so it's also my problem :(

watch one select :confused:
[SuperR Kitchen] DarkHeart Z:
Thanks dude . If you can make a way to extract it , a lot of Android one user will be so grateful for your contribution . here is the link .
[SuperR Kitchen] SuperR.:
Rename system.img.ext4 to system.img and extract from kitchen menu. After you build your system.img, rename it back to system.img.ext4 to work with odin.

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.

Once again, I do not know how to extract it but if you find a way I will look into adding it to the kitchen.
[SuperR Kitchen] udh2k:
Hi, I am now past over my first reply, I am now getting this error:

[IMG="symlink error"]http://i67.tinypic.com/biwg1h.png[/IMG]
[SuperR Kitchen] DarkHeart Z:
Got it bro . But android one devices are quite much new . But I think the methods used in google nexus devices can work here also :(
[SuperR Kitchen] abkareino:
Thank you to attention :cowboy:

i do same way you told me

step 1

Rename system.img.ext4 to system.img and extract from kitchen menu. After you build your system.img, rename it back to system.img.ext4 to work with odin.

but when i make Build new rom

2) Build system.img

system.img has been created in GT-i9301-eng

Press ENTER to return to Build menu

but no any new file system.img

i try for two model

before u update i do no any problem :(