yashsingh1/xdaforums huggingface dataset:
[SuperR Kitchen] chevycam94:
[MENTION=5787964]SuperR.[/MENTION] I did a comparison of my old updater script vs my new one. It seems that now there are the following lines missing from the updater-script. When I add these lines into the new builds updater-script, and flash it, it boots perfectly.

set_metadata("/vendor/bin/ATFWD-daemon", "selabel", "u:object_r:atfwd_exec:s0");
set_metadata("/vendor/bin/cnd", "selabel", "u:object_r:cnd_exec:s0");
set_metadata("/vendor/bin/imscmservice", "selabel", "u:object_r:ims_exec:s0");
set_metadata("/vendor/bin/imsdatadaemon", "selabel", "u:object_r:ims_exec:s0");
set_metadata("/vendor/bin/imsqmidaemon", "selabel", "u:object_r:ims_exec:s0");
set_metadata("/vendor/bin/ims_rtp_daemon", "selabel", "u:object_r:ims_exec:s0");
set_metadata("/vendor/bin/InputEventFind", "selabel", "u:object_r:inputeventfind_exec:s0");
set_metadata("/vendor/bin/irsc_util", "selabel", "u:object_r:irsc_util_exec:s0");
set_metadata("/vendor/bin/loc_launcher", "selabel", "u:object_r:location_exec:s0");
set_metadata("/vendor/bin/mm-qcamera-daemon", "selabel", "u:object_r:camera_exec:s0");
set_metadata("/vendor/bin/msm_irqbalance", "selabel", "u:object_r:irqbalance_exec:s0");
set_metadata("/vendor/bin/perfd", "selabel", "u:object_r:perfd_exec:s0");
set_metadata("/vendor/bin/pm-proxy", "selabel", "u:object_r:per_proxy_exec:s0");
set_metadata("/vendor/bin/pm-service", "selabel", "u:object_r:per_mgr_exec:s0");
set_metadata("/vendor/bin/qseecomd", "selabel", "u:object_r:tee_exec:s0");
set_metadata("/vendor/bin/rmt_storage", "selabel", "u:object_r:rmt_exec:s0");
set_metadata("/vendor/bin/thermal-engine", "selabel", "u:object_r:thermald_exec:s0");
set_metadata("/vendor/bin/time_daemon", "selabel", "u:object_r:time_exec:s0");
[SuperR Kitchen] SuperR.:
v2.1.4.4 (Donate version)

Changes:

Fixed vendor contexts not being added to the updater-script.

v1.1.3.4 (Standard version)

Changes:

Fixed vendor contexts not being added to the updater-script.

This should be fixed now.

Update the kitchen

Delete /kitchen/superr_projectname/00_project_files/file_contexts2

Change perm types to something else and then back to whatever you want

:)
[SuperR Kitchen] chevycam94:
I believe that solved it! Thanks!
[SuperR Kitchen] tanish2k09:
[MENTION=5787964]SuperR.[/MENTION]

I have a system folder and a META-INF folder with all required files ready in it.

The script in META-INF folder only flashes the system folder and doesn't have any symlinks or meta-data.

So, I chose perm set-meta..(for KitKat+) for my AOSP Android 6.0.1 ROM.

When I build the full ROM zip, I can see that the updater-script has included many set-meta lines.

But the #SYM section is empty. There are no symlinks.

Also, I don't encounter any error while building.

Since there are no symlinks, my ROM doesn't start even after being fully compatible.

Is there a way to force-create symlinks?

No use without them.

(Oh, and I tried system.img but the size was bigger than my partition)
[SuperR Kitchen] roybevan:
Donate Gitlab username?

[MENTION=5787964]SuperR.[/MENTION]

Hello, I've donated 10$, and how can I show you the result of this? My Gitlab username is: roybevan@163.com
[SuperR Kitchen] SuperR.:
The kitchen gets the symlinks from the files you provide. Sometimes they come from files in system, sometimes they come from an existing updater-script. If there are no symlinks in either location, you could start from a Nandroid backup or system.img, both of which have symlinks still intact. If you have another project for the same device you could try copying /kitchen/superr_projectname/00_project_files/symlinks to the same location in the new project.

Regarding the system partition size, I already told you all I can tell you about it. Find the size in bytes and enter it manually or tell me how to find it using adb while booted to your custom recovery.

Hint: Look for your device tree on github, navigate to BoardConfig.mk, and find the line that says BOARD_SYSTEMIMAGE_PARTITION_SIZE

Added, thanks :)
[SuperR Kitchen] raimondomartire:
[MENTION=5787964]SuperR.[/MENTION] Huawei mate 9 (mha-al00) this is recovery.fastab. Boot_a give a problem with your new mod in updater_script. Thanks

/boot	emmc	/dev/block/platform/ff3b0000.ufs/by-name/boot_a	flags=display="boot";backup=1

/cache	ext4	/dev/block/platform/ff3b0000.ufs/by-name/cache	flags=display="cache";backup=1

/cust ext4	/dev/block/platform/ff3b0000.ufs/by-name/cust_a flags=display="cust";backup=1

/data	f2fs	/dev/block/platform/ff3b0000.ufs/by-name/userdata	flags=display="data";backup=1

/external_sd	vfat	/dev/block/mmcblk1p1	/dev/block/mmcblk1	flags=display="MicroSD Card";storage;wipeingui;removable

/misc	emmc	/dev/block/platform/ff3b0000.ufs/by-name/misc

/modem_secure	ext4	/dev/block/platform/ff3b0000.ufs/by-name/modem_secure	flags=display="modem_secure";backup=1

/oeminfo emmc	/dev/block/platform/ff3b0000.ufs/by-name/oeminfo	flags=display="oeminfo";backup=1

/product	ext4	/dev/block/platform/ff3b0000.ufs/by-name/product_a	flags=display="product";backup=1;wipeingui

/recovery emmc	/dev/block/platform/ff3b0000.ufs/by-name/recovery_a	flags=display="recovery";backup=1

/splash2	ext4	/dev/block/platform/ff3b0000.ufs/by-name/splash2	flags=display="splash2";backup=1

/system	ext4	/dev/block/platform/ff3b0000.ufs/by-name/system_a	flags=display="system";backup=1

/uboot emmc /dev/block/bootdevice/by-name/uboot

/usb-otg	vfat	/dev/block/sde1 /dev/block/sde	flags=display="USB OTG";storage;wipeingui;removable

/vendor	ext4	/dev/block/platform/ff3b0000.ufs/by-name/vendor_a	flags=display="vendor";backup=1;wipeingui

/version	ext4	/dev/block/platform/ff3b0000.ufs/by-name/version_a	flags=display="version";backup=1
[SuperR Kitchen] tanish2k09:
Hmmm... I don't know how the kitchen finds the system size from adb in the first place...:confused:

If you would provide that mechanism, maybe I can help. Just need to know your current method of getting system size.
[SuperR Kitchen] SuperR.:
Please be more specific:

What problem with boot_a?

How to fix it in the updater-script?

Send firmware link for testing

Here is a one-liner that should work. You will need to replace /dev/block/bootdevice/by-name with your device by-name first which you can find in your updater-script.

adb "wait-for-device"; imgblock=$(adb shell su -c "ls -al /dev/block/bootdevice/by-name" | grep system | tr " " "\n" | grep mmcblk | cut -d"/" -f4); rawsize=$(adb shell su -c "cat /proc/partitions" | grep "$imgblock" | gawk '{ print $3 }'); echo $(($rawsize * 1024)))
[SuperR Kitchen] SuperR.:
v2.1.4.5 (Donate version)

Changes:

Added support for TWRP that appends _a to by-name in recovery.fstab.

Fixed by-name not being detected on devices that contain fstab.zram* files.

v1.1.3.5 (Standard version)

Changes:

Added support for TWRP that appends _a to by-name in recovery.fstab.

Fixed by-name not being detected on devices that contain fstab.zram* files.

NOTE: Update kitchen, change perm type to something else, then back to whatever you want

Hopefully this will work now. Thanks for testing those commands :)
[SuperR Kitchen] tanish2k09:
Well, the problem is, that the command keeps waiting for the device, even when the device is available to adb in recovery mode.

Using adb devices clearly shows that it detects the device, and almost all commands work in adb from recovery. The shell is no exception.
[SuperR Kitchen] skulldreamz:
For the pixel xl the correct boot path i believe is...

/dev/block/platform/soc/624000.ufshc/by-name/boot_a

and

/dev/block/platform/soc/624000.ufshc/by-name/boot_b

Above ^ would be to get the correct updater-script correct and you would obviously add boot.img to the end of the above path

Like I said though I'm not %100 sure as I've never used the kitchen but it looks amazing so I will be trying it out very soon, thanks [MENTION=718594]super[/MENTION]R
[SuperR Kitchen] roybevan:
[MENTION=5787964]SuperR.[/MENTION]

My device has su in /system/xbin originally, then I use kitchen2 menu 4) Extract for new ROM to extract my system.img, then build a new rom without anything changed. I do not use root menu, so the new ROM has su in /system/xbin also.

When I flash this new ROM to my device, and run "su" in adb shell, it tells me "su: permission denied", su in xbin path permission like below:

-rwxr-xr-x root root 67160 2008-08-01 12:00 su

And originally su in my device is:

-rwsr-x--- root shell 108464 2016-08-01 16:31 su

So what's wrong with this?
[SuperR Kitchen] Captain_Throwback:
I don't believe the kitchen sets any permissions/contexts on existing su binaries in ROM. You'll have to add that yourself in a "set_metadata" line. But you'll need to ls -lZ to get the original context as well.
[SuperR Kitchen] miich43l:
Hi [MENTION=5787964]SuperR.[/MENTION]

thanks for your work!

Awsome kitchen all the way ! :good:

Just donated and wanted to ask whether you could add me to the private repo to check out the donated version!

GitLab User: "@michi43l"

Thanks for your effort mate - really appreciate your work.

cheers Michael
[SuperR Kitchen] SuperR.:
Try without the wait and if you are running this while in recovery, without the su. Still need to replace the by-name line with the correct by-name line from your device:

imgblock=$(adb shell "ls -al /dev/block/bootdevice/by-name" | grep system | tr " " "\n" | grep mmcblk | cut -d"/" -f4); rawsize=$(adb shell "cat /proc/partitions" | grep "$imgblock" | gawk '{ print $3 }'); echo $(($rawsize * 1024)))

Use the kitchen root menu to remove root and add it again. This will fix your problem. [MENTION=1162986]Captain_Throwback[/MENTION] is correct, the kitchen does not deal with su permissions. It is left to the SuperSU zip when it is flashed with the rom.

Added, thanks :)
[SuperR Kitchen] Sh0X31:
[MENTION=5787964]SuperR.[/MENTION] can you update busybox to v1.26.1?
[SuperR Kitchen] bcrichster:
Just DL the new busybox and replace in kitchen

Sent from my N9515 PAC-ROM
[SuperR Kitchen] roybevan:
[MENTION=1162986]Captain_Throwback[/MENTION]

I found something wrong in tools/updater/set_perm-data:

set_metadata("/system/xbin/su", "uid", 0, "gid", 0, "mode", 0755, "capabilities", 0x0, "selabel", "#CONTEXT");

then I change this line to:

set_metadata("/system/xbin/su", "uid", 0, "gid", 2000, "mode", 04750, "capabilities", 0x0, "selabel", "#CONTEXT");

It's OK now.
[SuperR Kitchen] zainifame:
[MENTION=5787964]SuperR.[/MENTION] sir can i join system part file e.g. system_1.img ... system_30.img with your tools? this file i got from firmware qcom device. thanks
[SuperR Kitchen] bcrichster:
Is that from one of those clickbait 3-part ROMs? If so, I wouldn't do it.. Those ROMs are fake, Might get a brick no matter what you do.

Sent from my N9515 PAC-ROM
[SuperR Kitchen] zainifame:
this is stock firmware sir i download it from manufacture site, not fake
[SuperR Kitchen] zainifame:
is this tools can join those file sir?
[SuperR Kitchen] SuperR.:
I will update when [MENTION=4544860]osm0sis[/MENTION] updates. As [MENTION=5297774]bcrichster[/MENTION] said, you can replace the current Busybox. /kitchen/tools/root/busybox/AnyBusyboxYouWant.zip

Keep the current one handy but remove it from the busybox directory. You may have issues updating the kitchen without the original file in it's original location.

I will make this change in the next version.

I went to the manufacturers site, and downloaded the latest firmware for the HOT3 (x553) as indicated in your screenshot. It is a sparse_dat rom, not a multi-part system.img and the kitchen will handle it without issues. Here is the exact link to the firmware I downloaded.
[SuperR Kitchen] osm0sis:
People seem to think it's easy to maintain the NDK patchset or just literally have no concept of development; lots changes between major busybox versions. :rolleyes:

By the way everyone, busybox 1.26.2 came out yesterday, so switch your complaining to use that version. :p
[SuperR Kitchen] SuperR.:
Please don't think I am complaining or rushing you. I will skip the @ next time I answer this same question lol. Your work is worth the wait which is why I am not updating to the other versions ;) Thanks again for all you do :)
[SuperR Kitchen] osm0sis:
No no, sorry, I specifically wrote "everyone" there, since that really wasn't directed at you in the least - just the complainers. :)

I've been working on 1.26.2 yesterday and today (about twice as long as planned :(). A few things broke with the NDK in 1.26.x that previously worked, so I'm attempting to fix them with new patches. :highfive:
[SuperR Kitchen] zainifame:
sorry sir my bad, i mean i download firmware from link on infinix forum, i mean not ota infinix firmware but firmware that flash with qloader qcom flash tool, thanks for your respon sir :)
[SuperR Kitchen] SuperR.:
If you provide a download link to the firmware, I will take a look.
[SuperR Kitchen] :
That's because bgcngm's tools uses pure perl to unpack and only for repacking it uses mkbootimg module. In his thread OP you can find more info about the page on Android DLS wiki where his scripts where originated. You can learn more reading that page too.
[SuperR Kitchen] Er. Aditya:
hi my good dev ,

have some questions popping up

i am using 0.9.2.4

first i extracted system.ext4 image into my project folder and had all files placed accordingly

then i tried cache.img in same folder and it moved all rom files to another folder outside my project folder *if this can be undone" ??

then simply extracting cache.img inside is Recover > sec_csc.zip and inside are the related files cant our awesome kitchen extract this zip and place files into the described folders ??

or if am doing something wrong please advice me

thankyou brother :)
[SuperR Kitchen] DarkHeart Z:
Thanks bro but I really liked your kichen so much gui and also superr's kitchen's bootimg unpacking sectors are based on yours so I got upset when it didnt work mainly mtk development was my purpose for coming into linux :(
[SuperR Kitchen] SuperR.:
v0.9.2.5

Changes:

Fixed M deodex for priv-app.

Fixed deodexing M 64-bit. (Big thanks to [MENTION=1299419]JesusFreke[/MENTION] for his continuous support and dedication)

Fixed deodexing KK and previous which was broken a few versions ago. (thanks [MENTION=1299419]JesusFreke[/MENTION] again)

If you extract zip, tar, or system.img and cache.img exists in project directory you will be asked if you would like to extract it.

Added support for by-name/APP and by-name/LNX as found in Nexus 9 running Marshmallow.

Changed sudo username to be compatible with Arch Linux and most others.

Added cpio and whoami to dependencies list.
[SuperR Kitchen] BeansTown106:
My buddy asked me to send this your way superR. http://pastebin.com/KAKsq8QR it's a patch to not hard code arm for deodexing at the moment there is an issue with deodexing x86

Also thanks again for your dedication to the kitchen it's a very helpful utility
[SuperR Kitchen] SuperR.:
That was fixed in v0.9.2.5 ;)
[SuperR Kitchen] Er. Aditya:
hey super dev , i was just testing 0.9.2.5

and cant seem to get this option

If you extract zip, tar, or system.img and cache.img exists in project directory you will be asked if you would like to extract it.
[SuperR Kitchen] SuperR.:
Create a project, put a system.img, boot.img, cache.img in the project directory. Choose extract new and select system.img. During the process, you will be asked if you want to extract cache.img. If you say yes, cache.img will be extracted and csc will be extracted to the system directory.
[SuperR Kitchen] Er. Aditya:
strangely its not working when i select system.img.ext4 it extracts the files and goes to preparing updater script and then to main menu
[SuperR Kitchen] SuperR.:
Make sure your system.img is named exactly "system.img". The ext4 part will prevent it from working. If it still does not work, please link the files you are using so I can have a look.
[SuperR Kitchen] Er. Aditya:
awesome superman.... :D bro i have a note 4 910G

i just made a simple deodexed version and it bootlooped

unable to think of what could be the reason

edit :

[MENTION=5787964]SuperR.[/MENTION] bro after whole day of tests and trials and bootloops i have finally found the reason for bootloops

when we remove knox and it removes libs related to know it gives bootloop

can this be fixed bro //??

thnks
[SuperR Kitchen] morissio:
[MENTION=5787964]SuperR.[/MENTION] you are the best! With the last version i solved all deodex problems wrote here: xda

Thanks a lot!!

Maurizio
[SuperR Kitchen] SpasilliumNexus:
I've noticed an issue with enabling data apps, with some having libraries with them, which needs to be manually extracted to work properly.

Using Google Camera as an example:

/data
/app
/com.google.android.GoogleCamera-1
base.apk
/lib
/arm64 (or arm or x86)
somelibrary1.so
somelibrary2.so

This is the incorrect way to do it:

/data
/app
/com.google.android.GoogleCamera-1
base.apk

With these kinds of apps, having them install via recovery with the current method the kitchen does (which is just dropping the APK(s) into /data/app) causes them to force close.

Extracting the libraries (as required for some) and laying them out as above will cause them to not show up on a launcher, which turned out to be a problem with their metadata.

To fix this, I've added this line after the data installation part in the kitchen generated updater-script:

set_metadata_recursive("/data/app", "uid", 1000, "gid", 1000, "dmode", 0755, "fmode", 0644, "capabilities", 0x0);

Now those types of apps work perfectly as if they were installed from the Play Store.

I've attached a copy of Android Pay with the layout these certain kinds of apps with libraries inside of them are supposed to be like.

Hopefully this makes sense. I've literally been up all night trying to figure out why most of my apps wouldn't show up until I came across the solution.
[SuperR Kitchen] fhem:
[MENTION=5787964]SuperR.[/MENTION] --- Thanks for great work it is much appreciated. FYI: -> please look at PSA: note in this post.
[SuperR Kitchen] SuperR.:
Glad you tracked down the problem :) I do not have a Samsung device to test on so if you tell me exactly what to keep in the ROM I will remove them from the knox bloat list.
[SuperR Kitchen] morissio:
I just create a .zip deodex (the first one). In the flash seems do nothing, so I check the updater-script and I see that are missing this strings where I specify the partition layout:

mount("ext4", "EMMC", "/dev/block/mmcblk0p22", "/system");
mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/data");
mount("ext4", "EMMC", "/dev/block/mmcblk0p23", "/cache");

Is it correct?

Thanks

M.
[SuperR Kitchen] Er. Aditya:
bro first remove these libs from knox remover , if anyone with samsung device removes it , will end up in bootloop and will spam here

i am on windows right now so dont remember exactly what this awesome kitchen clears regarding knox please cross check

apps :

KnoxSetupWizardClient

SwitchKnoxI

SwitchKnoxII

Bridge

KnoxAttestationAgent

KnoxFolderContainer

container : complete

priv-app :

KLMSAgent

etc :

secure_storage > com.sec.knox.store

just those damn libs create bootloop
[SuperR Kitchen] :
I've deknoxed the same rom with both archi and your kitchen. I can't see any libs missing but this is the difference in knox if it helps

ARCHI contains knox folder container apk and kioskdefault.apk (don't think its knox related but don't know what it does ).

ARCHI doesn't contain klmsagent apk or spdclient apk but your kitchen does.

Don't know if that helps

Edit

Archi contains theses 2 libs you don't

Libopencl.so.1.1:dangling symlink

Libopencl.so.1 :dangling symlink

Sen t from my SM-N920C using Tapatalk
[SuperR Kitchen] SuperR.:
v0.9.2.6

Changes:

Edited the knox remove list based on comments above.

Added ability to detect mmc and create mmc file from recovery.img (stock and custom should both work).

Added metadata for /data/app
[SuperR Kitchen] bcrichster:
KaBOOM!! :cool:
[SuperR Kitchen] zainifame:
here sir

[MENTION=5787964]SuperR.[/MENTION]

and here to the forum
[SuperR Kitchen] AndroidTutorials:
When i make the rom it installs but restarts in twrp
[SuperR Kitchen] SuperR.:
I will take a look as soon as I get a chance :)

Check the top of post #4 and provide more information.
[SuperR Kitchen] zainifame:
ok sir thanks :)
[SuperR Kitchen] nkk71:
I have absolutely nothing to say or add to that post, except... WOW

It's an honour and a privilege to work with you and and the people you have mentioned in your post :highfive:
[SuperR Kitchen] osm0sis:
Fantastic work! I was totally stumped when I tried to figure capabilities out for my set_metadata shell script replacement.

So... is there a setcap to go with getcap (I couldn't find one at the time), and could both be built into TWRP since it contains everything needed for every other file attribute? :D
[SuperR Kitchen] kevintm78:
Thank you sir for your hard work!

Username for gitlab:

kevintm78

Transaction Id:

6VR49317DR936541Y
[SuperR Kitchen] LeeDroid:
+1 to that... Its been an experience & a serious learning curve!
[SuperR Kitchen] Captain_Throwback:
Yes, both setcap and getcap exist. They're in the Android tree here: https://android.googlesource.com/platform/external/libcap/+/android-7.1.1_r13/progs/ (no Android.mk though?)

I believe [MENTION=912474]Dees_Troy[/MENTION] and [MENTION=4878287]_that[/MENTION] will be working on adding these capabilities to TWRP so that file capabilities are included in backups and restores and Advanced Calling functions no longer get broken.
[SuperR Kitchen] SuperR.:
Very nice write up, and yes I will automate it. Nice work and thanks to everyone involved in figuring this out :)

Added, thanks :)
[SuperR Kitchen] osm0sis:
That's great news! :D

I'll make the adjustments to my shell set_metadata in anticipation. :cowboy::good:
[SuperR Kitchen] tanish2k09:
[MENTION=5787964]SuperR.[/MENTION]

I hope you successfully got the credit on my thread...

SWIFT_AOSP for Lenovo a7000.;)

Your tool has been ultra handy to me since I heard about it. I really wish I could donate to you, but I'm just a student...

Keep up the good work :good:

*Oh, and if some important dev from this forum thinks I haven't mentioned him, please pm me*
[SuperR Kitchen] zegovernator:
Hi, I am really looking forward to using the plugins for deodexing xperia roms so I donated. My git username is "haltdurchdigger" . Thank you for your work ;)
[SuperR Kitchen] Er. Aditya:
hi dev , hope everything's fine

new samsung device j7 prime , i get this error
[SuperR Kitchen] Captain_Throwback:
adb pull /tmp/recovery.log

Screenshot isn't as useful as a log.
[SuperR Kitchen] Er. Aditya:
thankyou sir and sorry for stupidity
[SuperR Kitchen] Has.007:
[MENTION=5787964]SuperR.[/MENTION] Hi, Thank you, the root issue is now fixed. However, I'm facing a new issue.

I'm trying to get the block details but the kitchen is unable to extract. The ramdisk cannot be extracted.

Here's the firmware on SamFirmware

I've attached some screenshots to let you've a better look. I tried unpacking Boot.img & Recovery.img by myself with MTKBootimg tools but I don't get the Ramdisk in extracted form. Instead it is just a file so I can't access the fstab file as well.

Picture #1: When I tried to let it read from boot.img while extracting firmware.

Second: I tried to extract through Boot/Recovery tools option but it couldn't.

Third: I don't get all the ROM options or anything in Kitchen, probably because of incomplete procedure.

Forth: The default script which is created.

I know it is not an issue in the Kitchen but could you somehow tell how to tackle with this firmware.

I attached the boot.img if you want to have a look on it.

Thank you for taking time. :)
[SuperR Kitchen] The Sickness:
Have you cloned mkboot from Github?

https://github.com/xiaolu/mkbootimg_tools

Easy way to extract the ramdisk.