yashsingh1/xdaforums huggingface dataset:
[SuperR Kitchen] dkionline:
[MENTION=5787964]SuperR.[/MENTION]

strsymlink("data/hw_init/system/app/Bluetooth/lib/arm/libbluetooth_jni.so -> /system/lib/libbluetooth_jni.so");

I have problems with some lines like this. It can be a binary problem, because i get error 6 in twrp. Since i never had some strsymlink before. Are they kitchen kompatible or not?
[SuperR Kitchen] Captain_Throwback:
"strsymlink" doesn't exist in the Android updater code. So I'm not sure where that comes from, but I'd assume you'd need to use an OEM update-binary if they've added support for such a custom function. It looks just like a regular symlink to me, though? Did you try just changing it to "symlink" and see if it works? I do find it odd that a system/lib would be symlinked from /data.
[SuperR Kitchen] dkionline:
Thats really bad. I tried to move apps and rewrite this lines, but at the end it cant find apps after booting.

http://pastebin.com/72SWJyiM, maybe this gives more informations about it. Im testing a binary from that zip, lets see if all works, or gives me errors.
[SuperR Kitchen] Captain_Throwback:
I also have never seen "mountencrypt" before. Definitely some custom stuff going on there. Using the update-binary that came with whatever zip that is should be able to parse those commands with no issues.
[SuperR Kitchen] dkionline:
I fixed it, but i have some other errors. Before i started building with that kitchen, i had developer options FC. The help of kitchens generated symlinks, it got fixed. Now with 7.0, i get the same again + security FC, but cant find any missing lib or anything else. I dont know if theres more to build in, for a working build or root/encryption is the cause.
[SuperR Kitchen] Svan987:
Hi there,

Trying to do a custom .zip with "app, priv-app" when flashed it's deleting the 2 directories (normal) but nothing is installed from "app" directory.

If I remove in the script "delete_recursive" lines, nothing is copied from "app" directory too.

I got nothing to install from "priv-app". Should I just leave the empty directory in .zip ?

Thanx for help in advance.

(Original script with .txt extension to upload it)

View attachment 4009158
[SuperR Kitchen] Captain_Throwback:
Recovery log?
[SuperR Kitchen] Svan987:
Sorry i forgot can help a lot here we go :

View attachment 4009512
[SuperR Kitchen] Captain_Throwback:
And just to confirm, there is a folder called "system" in the root of your zip, right? Not just "app" and "priv-app" folders?
[SuperR Kitchen] Svan987:
Bingo how i can not see that :laugh: Thanx a lot you are great :good:

I will modify manually the zip and create system folder. Will give you feedback soon ;)

Update : Working 100% thanx a lot again Captain_Throwback for your help
[SuperR Kitchen] SuperR.:
go here and click on "Download repository".

Keep in mind the kitchen updater will not work if you install it this way so you will need to manually update.

Would you be willing to test this make_ext4fs? I did all the work last year isolating make_ext4fs from M source. I am having a tough time doing the same with N source. libcutils is being a pain to compile outside the main source tree. In any case, I updated the 6.0.1 version with all the permissions and capabilities from 7.1.1 source. I tested on the firmware you linked and everything seems good on the mounted image after building.

1) in terminal:

cd /path/to/clone/to
git clone https://github.com/superr/make_ext4fs.git
cd make_ext4fs
make

2) replace existing make_ext4fs binary with new in /kitchen/tools directory

Thanks :)
[SuperR Kitchen] Kinanizer:
My Gitlab username is Kinanizer, same as here. If you have trouble finding me this link should help https://gitlab.com/Kinanizer. Also if I'm upgrading from the free version is it okay to install over it or should I uninstall first?
[SuperR Kitchen] SuperR.:
Added, thanks :)

There is no upgrade path from standard to donate so you will need to git clone the donate version and move your projects over manually.

This is actually really great work, thank you :)

Since it seems you are interested in learning, here is the edited line and the reasons:

We don't need a for loop since we are only looking for the result of a single find command

We don't need to grep by-name since we are searching only for things called by-name

We need to make sure we only get 1 result (there should only be 1 anyway but just in case)

We need to suppress error messages so we are sure to get an empty result if something goes wrong.

The line becomes:

BYNAME=$(find /dev -name by-name 2>/dev/null | grep -m 1 "")

I tested this on my Nexus 5X and got the correct result as well so this is good. Attached is a new slotdetect.sh with the new changes. I left the fstab detection in as a backup in case find does not work for one reason or another. Make sure you include the updater-script edits from the post a while back when you try this. Let me know how it goes :)
[SuperR Kitchen] bigrammy:
Glad to be of help :o

I will run the script tonight when I will hopefully get a little time. :fingers-crossed:

Thanks for the clear explanation very helpful indeed :good:
[SuperR Kitchen] Captain_Throwback:
Tried this version, and it set capabilities just fine in my sparse_dat ROM :). Thanks for figuring it out!
[SuperR Kitchen] Captain_Throwback:
[MENTION=5787964]SuperR.[/MENTION]

One thing before I forget - You're going to want to slightly change how you're installing mod zips that use an update-binary shell script. In versions of TWRP built with the android-7.1 tree, busybox sh is broken, so mksh has replaced it. Calling busybox sh on such TWRP builds will result in nothing being flashed. The easiest fix for this is to simply call /sbin/sh directly, so that whether it's a version of TWRP built on an older tree where sh is a symlink to busybox, or is sh is mksh, the command should properly execute. So in other words, change this:

run_program([B]"/sbin/busybox", "sh"[/B], "/tmp/rootzip/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/rootzip/#ROOTZIP");

to this:

run_program([B]"/sbin/sh"[/B], "/tmp/rootzip/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/rootzip/#ROOTZIP");

for any instances where busybox sh is specifically being called.
[SuperR Kitchen] SuperR.:
I am actually going to use this in the kitchen for by-name adb detection as well. It is better than what I came up with for sure so thanks again :)

I look forward to your results on the new slotdetect.sh with the updater-script edits :)

I am glad this worked. Now I have a base to add to when needed. Thanks for testing :)

This explains why all the Pixel owners are saying Busybox and SuperSU are not flashing from the ROM. Thanks for pointing this out along with the fix. Changes will be in the next update :)

FYI, I already updated all the related plugins.
[SuperR Kitchen] bigrammy:
Hi,

The slotdetect.sh appears to work fine

Recovery.log for the flash

I:Set page: 'install'
I:Set page: 'flash_confirm'
I:Set page: 'flash_zip'
I:operation_start: 'Flashing'
Installing zip file '/sdcard/acer-tab-kernel.zip'
Checking for MD5 file...
Skipping MD5 check: no MD5 file found
I:Zip does not contain SELinux file_contexts file in its root.
I:Legacy property environment initialized.

acer-tab Kernel Installer
bigrammy

Checking config ...

minzip: Extracted 1 file(s)
about to run program [/tmp/slotdetect.sh] with 1 args
sh: : unknown operand
Testing Script...
Mounting System
Flashing Logo
Unmount System
Logo Installed
script succeeded: result was [Logo Installed]I:Updater process ended with RC=0
I:Legacy property environment disabled.
Updating partition details...

Works PERFECT even with two by-names in /dev

I had not noticed that the recovery created another /dev by-name on this tablet before but it does and the slotdetect.sh handled it just as you described. :o
[SuperR Kitchen] SuperR.:
v2.1.4.8 (Donate version)

Changes:

Removed setcap as it is not required.

Updated make_ext4fs source to support Nougat.

Added custom HTC 10 file capabilities to make_ext4fs (thanks [MENTION=1162986]Captain_Throwback[/MENTION]).

Changed SuperSU and Busybox updater-script lines to use /sbin/sh instead of busybox sh (thanks again [MENTION=1162986]Captain_Throwback[/MENTION]).

Renamed slotdetect.sh to configure.sh.

Added on-device by-name detection (thanks [MENTION=3924647]bigrammy[/MENTION]).

Changed by-name detection through adb to use the find command (thanks again [MENTION=3924647]bigrammy[/MENTION]).

Added ability to get by-name from device while booted in custom recovery (previously it only worked from Android).

Updated smali/baksmail to latest commit.

Updated SuperSU to v2.79-SR3.

v1.1.3.8 (Standard version)

Changes:

Removed setcap as it is not required.

Updated make_ext4fs source to support Nougat.

Added custom HTC 10 file capabilities to make_ext4fs (thanks [MENTION=1162986]Captain_Throwback[/MENTION]).

Changed SuperSU and Busybox updater-script lines to use /sbin/sh instead of busybox sh (thanks again [MENTION=1162986]Captain_Throwback[/MENTION]).

Renamed slotdetect.sh to configure.sh.

Added on-device by-name detection (thanks [MENTION=3924647]bigrammy[/MENTION]).

Changed by-name detection through adb to use the find command (thanks again [MENTION=3924647]bigrammy[/MENTION]).

Added ability to get by-name from device while booted in custom recovery (previously it only worked from Android).

Updated smali/baksmail to latest commit.

Updated SuperSU to v2.79-SR3.

NOTE: You will need to change perm types to something else, then back to what you want to use some of the changes included in this update.
[SuperR Kitchen] zainifame:
any news for join system_*.img? :) thanks
[SuperR Kitchen] Kinanizer:
Hey I recently encountered a little bug while using the kitchen and by accident I found a fix for my problem. First off I should state I was using donate version 2.1.4.7, which I had just recently upgraded to from the standard version 1.1.3.7. I think a combination of the way I upgraded along with some messing around with things I didn't completely understand caused this issue. But hopefully my story might help someone else looking for answers in this thread. After flashing the custom ROM I had made I was unable to use bluetooth. Oddly though I was still able to open the bluetooth settings and move the toggle, it's just that nothing happened. Due to the fact that I could go into the bluetooth settings I knew it wasn't an apk and this problem was deeper. I decided to pull a logcat while I played with the bluetooth toggle. Lucky I found the problem easily as:

E AndroidRuntime: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/javax.obex.jar", zip file "/system/app/Bluetooth/Bluetooth.apk"],nativeLibraryDirectories=[/system/app/Bluetooth/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libbluetooth_jni.so"

So simple issue "libbluetooth_jni.so" is missing and needs to be replaced. Except when I looked in my "/lib/" it was there. Being late at night it took a little while but I realized the problem was my symlinks weren't being set right. I figured I might as well update the kitchen and see if anything changes, and on the post right above mine you'll see SuperR said to reset the perm type after the update. Well resetting the perm type resets you updater script and while I lost my fancy signature, I got bluetooth working. So moral of the story if you have bluetooth issue or something similar try resetting the perm type.
[SuperR Kitchen] skywalker-live:
Please add me

Donation id 1V590321N7253415P

Gitlab skywalker-live

Thank you
[SuperR Kitchen] SuperR.:
No, and please don't keep asking. If I get some extra time I will look into it again and will let you know.

Glad you got it sorted out, but what is the bug?

Added, thanks :)
[SuperR Kitchen] Kinanizer:
It's not so much a programming bug that needs an immediate rewrite of all your code, just a problem that happened when moving from the free version to the paid version. I wasn't so much hoping to ask you to figure it out and fix it, just that if someone else has a similar issue they can search this thread and find my solution.
[SuperR Kitchen] Surge1223:
So I was intrigued so I investigated what was up, it seems they didnt want these tools on device, given the Makefiles and the dependence on a few libraries not in AOSP (libattr, etc). It took me a bit to get all of it to compile statically for ARM , but I'm sure that and Android.mk could be made to build them.

I noticed that Dees and __that wanted to go for a minimal implementation due to code size etc. Did you ever happen to do any more investigating in the the capability discrepancies?
[SuperR Kitchen] tuandung.bmt:
how to install superR's Kitchen.

I installed the program, the error message shown in the photo. Please help me fix this. I am a new member are programming your Android.
[SuperR Kitchen] SuperR.:
I ended up updating the make_ext4fs source included in the kitchen for Nougat and added custom capabilities for the HTC 10. That device is being set properly now. I am sure there are more devices with custom capabilities so if any need to be added let me know :)

Use Linux instead of WSL (Windows Subsystem for Linux). If you want to continue using Windows, cygwin is still crippled but probably a better choice for now.

If you want to continue using WSL or cygwin, you can open the /kitchen/tools/dependencies file and delete the line with getcap on it. You won't be able to use that feature anyway since you can't mount img files in WSL.

I will fix getcap dependencies requirement for cygwin and WSL in the next update.
[SuperR Kitchen] SuperR.:
v2.1.4.9 (Donate version)

Changes:

Removed getcap requirement for WSL/cygwin.

Fixed regression in updater-script for vendor, data, misc partitions, and devices that do not use by-name.

Only get permissions and capabilities if we are extracting api 19+.

Added option to return to main menu or quit from by-name detection menu.

v1.1.3.9 (Standard version)

Changes:

Removed getcap requirement for WSL/cygwin.

Fixed regression in updater-script for vendor, data, misc partitions, and devices that do not use by-name.

Only get permissions and capabilities if we are extracting api 19+.

Added option to return to main menu or quit from by-name detection menu.

NOTE: Once again, you will need to update, change perm types to something else, then change them back to what you want.

edit: I also updated the 32/64-bit binaries in the Bitbucket downloads section. The only change is make_ext4fs.
[SuperR Kitchen] boostermbkking:
with latest firmware of g935f when unpack stock kernel the kitchen say that forceencrypt its disabled but its not true and the phone doesn't boot with this kernel, and not possibility to forced remove encription, can you fix this?
[SuperR Kitchen] rkharat98:
Is there any way you can make this work for windows 7?
[SuperR Kitchen] bcrichster:
NO. READ POSTS #1 - 5
[SuperR Kitchen] SuperR.:
Send the firmware and I will have a look

For Windows... I guess a VM running Linux is best. I think cygwin mostly works now. WSL should partially work.

I only test on Ubuntu 16.04 so using anything else is on you :)
[SuperR Kitchen] chudy_85:
Vbox work very good I use all time. Can you added to your kitchen unpack and repack dat file???
[SuperR Kitchen] ciko84xp:
Hi guys, i want start to build ROM for my Lemfo Lem 5 standalone smartwatch. This device is Android 5.1 based with MTK6850 core. Is this Kitchen ready for me? I've Ubuntu on VM (Win10), i hope it's enough.
[SuperR Kitchen] bcrichster:
Just make sure you have a way to install the ROM and/or make backups for just in case
[SuperR Kitchen] Captain_Throwback:
[MENTION=5787964]SuperR.[/MENTION]

Just auto-updated the donate version of the Kitchen to 2.1.4.9 (running Ubuntu 16.10), and I now get prompted to install getcap as a dependency. However it won't install, and I'm just looping on the getcap install. If I choose "N" it just exits. It seems that my issue is that I'm logged into my PC through xrdp, and that /sbin isn't in PATH by default. Once I manually added /sbin to PATH, the Kitchen is able to install the dependency and start properly. Just something you might want to keep in mind for people that could be in the same (or similar) situation. Not sure how you'd fix it, though, besides adding confirming /sbin is in PATH on startup, and if not, adding it ;).

I had the same problem with the RUU Decrypt Tool yesterday, which is how I figured out the fix :).
[SuperR Kitchen] ciko84xp:
Ouuuuu yesssss bro.. i've just prepared TWRP for Lem5 how u can see here:

https://xdaforums.com/smartwatch/other-smartwatches/twrp-lemfo-lem-5-twrp-t3544569 ;)

I've TWRP backup stok ROM apart (downloaded), but when i finally recieve my smartwatch (under delivery) the 1st thing out of the box will be do a TWRP ROM backup directly on my device (previous rooted by Kingroot ;) )

Sounds good? :laugh: ;)

I hope kitchen is useful for Android 5.1, because smartwatch is full Android 5.1 equipped!
[SuperR Kitchen] bcrichster:
Yep! Should be good from KK 4.4.2 on up to 7.1 at this point..
[SuperR Kitchen] ciko84xp:
Damn... good! :laugh:

Thanx for the quick replay, i proceed to set my kitchen... ;)
[SuperR Kitchen] bcrichster:
Possibly even as far back as ICS 4.0..
[SuperR Kitchen] TheHiman:
Enhancement-Request:

Can you make different smali/baksmali-Versions in the same directory selectable, same like oat2dex ?
[SuperR Kitchen] SuperR.:
v2.1.5.0 (Donate version)

Changes:

Added option to choose smali/baksmali when there are more than one in tools/smali/current.

Added visual confirmation for oat2dex, smali, and baksmali file selection on the deodex confirm page.

Cleaned some badly formatted code.

v1.1.4.0 (Standard version)

Changes:

Fixed not adding the main menu and exit options in the by-name detection menu.

Added option to choose smali/baksmali when there are more than one in tools/smali/current.

Added visual confirmation for oat2dex, smali, and baksmali file selection on the deodex confirm page.

Cleaned some badly formatted code.

NOTES:

Do not delete the existing smali/baksmali.

Make sure all smali / baksmali jars are named like smali-*.jar / baksmali-*.jar (*indicates any text you want without spaces)

Only put new smali/baksmali jar files in /kitchen/tools/smali/current.

There is no need to remove your files when updating. The kitchen will only track the smali/baksmali it includes.

Make sure you choose the same version of smali/baksmali as they are chosen separately.

Yes :)

It already does this. Let the kitchen extract the zip containing the dat files.
[SuperR Kitchen] ciko84xp:
Hi dear.. i've set my kitchen this night. I've 1.1.3.x version, and i've set the auto check for update at start. I'ts enough? Or i should download new 1.1.4.0 release and restart at all?
[SuperR Kitchen] ciko84xp:
I've updated by auto update.. i think it's enough.

But please help me, i've this problem: i can't extract recovery.img

I've ubuntu 16 on VBox, and the file is named exactly "recovery.img", but when i put the file in new project folder, the point 4 doesn't finds the recovery.img

In Windows "mtkextractor" works fine, why in this kitchen i can't extract it? Damn! Why? Help me please! :crying:
[SuperR Kitchen] Saarliner:
Hi, have a problem with donate version. Updatet to last donate version and now i become this message:

MISSING DEPENDENCY:

You need at least Java 8 to use this kitchen.

The following package is recommended:

default-jre

Would you like to install now? y/n

When i type "y" the it say this:

Checking dependencies ...

And then directly come the message i have to install java and again and again ;)

What i have to do now?

Greetz Dirk / Saarliner
[SuperR Kitchen] bcrichster:
May just need to manually switch the Java version

sudo update-alternatives --config java

sudo update-alternatives --config javac
[SuperR Kitchen] tanish2k09:
I just had a general question. I always make a backup before I flash any ROM.

I had my SD card formatted as internal storage. Then I made a nandroid backup which also backed up the Android data present in the SD card.

Then I formatted my SD card as portable storage.

Now if I wish to restore my nandroid, would I need to reformat the card as internal storage?? What will happen if I try to restore the nandroid on portable storage?? [MENTION=1162986]Captain_Throwback[/MENTION] I could use some of your experience.
[SuperR Kitchen] Saarliner:
That work, thank you
[SuperR Kitchen] ciko84xp:
Solved recovery.img issue by putting build.prop into my new project folder.

One noob question.. The "Build Flashable Recovery" feature what mean? Packed recovery.img isn't good for fastboot or flashify? Sorry for noob question!
[SuperR Kitchen] bcrichster:
Makes it a flashable zip

Sent from my PAC-ROM N9515
[SuperR Kitchen] SuperR.:
Sorry for the long delay. Been crazy busy. I was able to extract the ramdisk from your boot.img. It was fairly complicated, the method I used may not work for other boot.img with a similar layout, and I have no idea how to repack it. Therefore, I won't be adding it to the kitchen yet.

However, here is a zip that includes the file_contexts and the device files for grandprimevelte. The full ramdisk is also included in case you want it.

1. Download zip

2. Extract zip

3. Copy file_contexts to your project 00_project_files directory

4. Copy grandprimevelte directory into /kitchen/tools/devices

That should get you sorted out to use the kitchen, but you won't be able to unpack/repack your boot.img until I figure it out.
[SuperR Kitchen] janjan:
Is it possible to add extracting of payload.bin file? Actually don't know it is possible to extract the payload.bin. thanks.
[SuperR Kitchen] ciko84xp:
Yes.. i've supposed this.. :laugh:

But where is the .zip? :eek: i can't find it in my project folder.
[SuperR Kitchen] SuperR.:
v2.1.5.1 (Donate version)

Changes:

Fixed building boot/recovery flashable zips.

Updated mkbootimg/unpackbootimg by [MENTION=4544860]osm0sis[/MENTION].

Added grandprimevelte to devices.

v1.1.4.1 (Standard version)

Changes:

Fixed building boot/recovery flashable zips.

Updated mkbootimg/unpackbootimg by [MENTION=4544860]osm0sis[/MENTION].

Added grandprimevelte to devices.

That's because I broke it at some point :eek: Fixed now :)

I don't know how to extract them yet. As soon as I do I will add it.
[SuperR Kitchen] skywalker-live:
The partition_zip tool is not being loaded in my kitchen.

It is extracted properly, as my screen shot shows.

Where can I find the logs of my plugins being loaded?

Kitchen ver. 2.1.5.1

Ubuntu 16.04.1
[SuperR Kitchen] SuperR.:
You are correct. I will fix this in the next update. For now:

I just updated the partition_zip plugin a few minutes ago so download a fresh copy.

extract it into the tools/plugins directory like normal

rename the directory from "partition_zip" to "partition_zip1"

enter into to partition_zip1 directory and rename the the script from "partition_zip" to "partition_zip1"

That should get it working :)
[SuperR Kitchen] KaMyKaSii:
I had already deodexed the same rom with an earlier version of Kitchen, now have this error "permission denied"
[SuperR Kitchen] SuperR.:
The problem is most likely the files are no longer executable. This can happen if they are extracted in windows and copied to Linux for example.

You can make the files executable by issuing the following commands:

cd /path/to/kitchen
chmod a+x tools/oattools_m/bin/oatdump
chmod a+x tools/oattools_m/bin/dexrepair

Alternatively, you can delete the entire directory /kitchen/tools/oattools_m. The next time you deodex M with oatdump the kitchen will ask if you want to download it. Both of these options should fix your issue.
[SuperR Kitchen] KaMyKaSii:
But I had just cloned the kitchen from scratch and downloaded oatdump. No Windows or other tool.

Linux Mint Sara 64bit
[SuperR Kitchen] SuperR.:
I am not able to reproduce the issue on Ubuntu 16.04.

Try the commands I posted.

edit: Also, if your files are not on a Linux file system you may not be able to set files executable.