yashsingh1/xdaforums huggingface dataset:
[SuperR Kitchen] bcrichster:
Which tools? [emoji41] Doing Android with Windows is kind of like using some kind of conversion of a conversion.. Do that in mechanics or electrical and see how well it goes. While it is possible, it usually isn't easy or 100% right. Just my 2.5Â¢ on using Windows these days. I only use my Windows OS for stuff like ODIN and general electronics (TV's, MP3 flash drives, ect..) Cuz they don't seem to read Linux well. Yet. But Android? Less BS and strange errors with Linux up to this point.

Sent from my N9515's cm12.1
[SuperR Kitchen] andy_zhang:
Can Really success.
[SuperR Kitchen] bcrichster:
I believe you, but which tools? I gave up on building with Windows a while ago so I'm actually interested in finding out what exactly you're using

Sent from my N9515's cm12.1
[SuperR Kitchen] andy_zhang:
Private letter to me, I sent you
[SuperR Kitchen] Mentalmuso:
The issue with the pixel is that the normal system directory resides as a folder within the system.img. Meaning when superr unpacks the system.img, all the files are getting messed up from the get go. The structure is different when you mount the img in ubuntu, see pics

This is the root of system.img
[SuperR Kitchen] Mentalmuso:
And this is the system folder. After mounting system_a or system_b to /system in twrp. Im then flashing mods using /system/system as my system directory...
[SuperR Kitchen] SuperR.:
That is the problem for sure. Thanks for the info :)

When making "ramdisk" edits on the Pixel, are they made in the:

1) boot.img ramdisk and the /system directory

2) just in the /system directory

3) just the boot.img ramdisk
[SuperR Kitchen] elektrik2001:
Thanks, though that was indeed *a* problem, fixing the owner and permissions didn't solve the problem. Here's my dmesg| tail again:

jhorgan@ubuntu:/kitchen/superrs-kitchen$ dmesg |tail

[ 19.117047] 00:00:00.002173 main 5.1.10 r112026 started. Verbose level = 0

[ 19.136066] 00:00:00.021174 automount vbsvcAutoMountWorker: Shared folder 'Downloads' was mounted to '/media/sf_Downloads'

[ 19.138580] 00:00:00.023692 automount vbsvcAutoMountWorker: Shared folder 'Kitchen' was mounted to '/media/sf_Kitchen'

[ 19.287673] init: plymouth-stop pre-start process (2087) terminated with status 1

[ 46.166702] audit_printk_skb: 150 callbacks suppressed

[ 46.166706] type=1400 audit(1481473115.867:62): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/cups/backend/cups-pdf" pid=2449 comm="apparmor_parser"

[ 46.166711] type=1400 audit(1481473115.867:63): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/cupsd" pid=2449 comm="apparmor_parser"

[ 46.167136] type=1400 audit(1481473115.867:64): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/cupsd" pid=2449 comm="apparmor_parser"

[ 1946.729152] EXT4-fs (loop0): VFS: Can't find ext4 filesystem

[ 2170.529958] EXT4-fs (loop0): VFS: Can't find ext4 filesystem

---------- Post added at 09:02 AM ---------- Previous post was at 08:55 AM ----------

more specifically, here's the permissions for my system.img and boot.img

-rwxrwxrw- 1 jhorgan jhorgan 15443968 Nov 23 17:18 boot.img

-rwxrwxrw- 1 jhorgan jhorgan 838848060 Nov 23 17:19 system.img
[SuperR Kitchen] SuperR.:
Still seems like your image is not ext4. Mounting an image as ext4 will not work if the image is not ext4.
[SuperR Kitchen] _that:
The boot.img ramdisk is for the recovery. The root filesystem for Android is on the system (a or b) partition.
[SuperR Kitchen] SuperR.:
Thanks for the info. Could you please correct the following updater-script lines for flashing on the Pixel devices?

format("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/system");
symlink("toybox", "/system/bin/acpi");
set_metadata("/system/bin/app_process64", "uid", 0, "gid", 2000, "mode", 0755, "capabilities", 0x0, "selabel", "u:object_r:zygote_exec:s0");
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");

I am confused about system_a and system_b. Are they separate partitions? Can you flash different things to each of them? How do you decide whether to choose system_a or system_b?

Sorry for the ignorance. I am sure with research I could find the answers to most of these, but I have very limited time lately and want to get this working for the Pixel owners. Thanks again for your help :)
[SuperR Kitchen] Mentalmuso:
What I've done in my Rom is made an option in aroma to choose system_a or system_b as a boot slot option. Basically they alternate whenever there is a Google OTA update. It's how they make it seamless.

Instead the mount points are either

/dev/block/bootdevice/by-name/system_a

or

/dev/block/bootdevice/by-name/system_b

You can essentially flash to both at once if you wanted. But I see that as a waste of time in twrp. But there are fastboot commands to see which boot slot is active. I just don't know them off hand but that is a way you could determine which partition to mount to /system.
[SuperR Kitchen] elektrik2001:
Hmm.... any idea how i could find out what type of fs it is?
[SuperR Kitchen] _that:
Run "file" on it.
[SuperR Kitchen] SuperR.:
According to the Sailfish fstab:

#<src> <mnt_point> <type>
/dev/block/bootdevice/by-name/system / ext4

Does this mean we can mount "/" instead of "/system" or "/system_a" or "/system_b"? If we mount "/", can we bypass the need for _a and _b? If so, it seems we could leave the updater-script syntax the way it is instead of having to use /system/system/. Basically we do this:

mount("ext4", "EMMC", "/dev/block/bootdevice/by-name/system", "/");
package_extract_dir("system", "/");
symlink("app_process64", "/system/bin/app_process");
set_metadata_recursive("/system", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");

No clue if this will work but it seems like it should.

Do we flash the boot.img in Pixel roms? Seems like maybe not.

edit: Do Pixel roms have to be img files containing the full "/" partition or can they be separated into system and / ? Just started thinking about all the new complications lol. I assume all the "ramdisk" files in / need to keep their original perms like the boot.img ramdisk starting with M. Just trying to figure out how all this works and the ideal way to deal with all of it. Thanks for the help :)
[SuperR Kitchen] _that:
The system fstab relies on the fs_mgr to append the current slot name to the partition name. So this will only work if your update-binary does something similar. AFAIK the Android update-binary doesn't, because updates for A/B devices don't use an update-binary at all. (Note: I have no Pixel device and no plans to buy one, my only knowledge comes from reading the code and from occasional discussions with Dees_Troy, so I cannot guarantee that everything I say here is really true.)

Also, you want to mount the system partition over the running recovery ramdisk? This sounds like a bad idea. Even if it may appear to work, I don't think that I want to support a situation where the recovery can't find its own files anymore.
[SuperR Kitchen] elektrik2001:
it just says 'data'.
[SuperR Kitchen] _that:
Then you need to look inside using a hex editor. Or run "hexdump -C system.img | head -n 100 > dump.txt" and attach the file to your answer, then I or someone else can try to tell you what it is.
[SuperR Kitchen] dkionline:
We have some changes in Huawei Firmware structure with Nougat. The vendor.img folder also the product.img folder gets a separate partition beside system.img. To unpack that properly, we need a changed unpack method. The best, if we can unpack cust.img also.

Edit; vendor works, but product.img and cust.img not. [MENTION=5787964]SuperR.[/MENTION]
[SuperR Kitchen] Sh0X31:
Is this the Pixel fix and the reason for my error?

my error :(
[SuperR Kitchen] bluflight:
[MENTION=5787964]SuperR.[/MENTION] Any news about update of make_ext4fs file? We have problems on op3 N beta firmware, kitchen are not able to build working system.img or dat

Thanks in advantage if you can take a look about it [emoji106]

Inviato dal mio ONEPLUS A3003 utilizzando Tapatalk
[SuperR Kitchen] bigrammy:
Are you using the 32bit version of 7zip on your 64bit system. :confused:

Mine says

7-Zip [COLOR="Red"][B][64][/B][/COLOR] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_GB.UTF-8,Utf16=on,HugeFiles=on,4 CPUs)

While yours says

7-Zip [COLOR="red"][B][32][/B][/COLOR] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=de_DE.UTF-8,Utf16=on,HugeFiles=on,32 bits,8 CPUs Intel(R) Core(TM) i7-6820HK CPU @ 2.70GHz (506E3),ASM,AES-NI)

I assume you don't have root on the Pixel do you?
[SuperR Kitchen] Sh0X31:
I don't chance much system. One week ago I build with the same system.
[SuperR Kitchen] bigrammy:
Not sure what you mean :o

The image in your post shows you are using Ubuntu 16.10 x64

So you should use the 64bit version of 7zip to prevent any errors I think. :o
[SuperR Kitchen] Sh0X31:
yes, my system is 64bit. I mean I build 1 week ago for the Nexus 6P my Rom but not with the Pixel Firmware I get this error and I dont chance or update my PC.
[SuperR Kitchen] JayZeppelin01:
donation

Hello! i donated for this software, its my account name: jayzeppelin
[SuperR Kitchen] Astrako:
Hi there!

I have deodexed a stock LG G4 MM rom, with baskmali method, but when I try this rom in the G4, the performance is very bad, with lots of lags everywhere. Also, the CPU seems to work hard and it heats more than usual.... These problems are not present with odex rom (as stock is).

Do you know what is the reason for this low performance? Is there any solution to this?

Thanks in advance, and thanks for this awesome tool!
[SuperR Kitchen] bcrichster:
OK, NP. [MENTION=5787964]SuperR.[/MENTION] is looking into this at the moment, plus he's found out there have been some significant changes to the files structure as well which can cause major issues. Please give him time to figure out his approach to solving this problem. Plus, also make sure your 7zip application is indeed 64bit and upgrade if it isn't or maybe downgrade the kitchen to an earlier version to see if something in an update inadvertently broke a function on your PC for whatever reason. These are not definite answers to your issues but really good points to consider. [emoji41]

Sent from my N9515's cm12.1
[SuperR Kitchen] SuperR.:
Send a link to the firmware and I will take a look.

No. Pixel devices are not supported yet. I am still trying to figure out what the kitchen needs to do which is difficult without owning the device. Here is what I need to know:

Do we need to unpack/pack the system.img as root to preserve file permissions on the included ramdisk files?

How can the kitchen determine which slot (a or b) to mount/format/flash without plugging in the device?

Do we flash boot.img with Pixel roms?

Do pixel roms need to be img files only?

What happens if we wipe system_a and system_b and then flash to system_a? What if system_b was the active slot?

what happens if system_a is currently the active slot and we flash to system_b?

If we extract the system.img in the kitchen and have system and system/system, do we make ramdisk changes in system instead of boot.img?

I certainly will as soon as I get a chance. Send a link to the firmware

Added, thanks :)

No clue, but if you figure it out please let me know.

The kitchen includes 32-bit p7zip. I did this to not need to include two versions and have not seen any issues so far. I don't think this is the problem, but you are right, I am trying to fix the issues on Pixel devices :)
[SuperR Kitchen] elektrik2001:
Ok, will do. Thanks.
[SuperR Kitchen] Sh0X31:
Here is a custom that is based on the Google factory image maybe it helps.

And who I can help you to find out what you need?
[SuperR Kitchen] SuperR.:
Thanks for posting the rom. Unfortunately, I have already looked at this rom and it is an img file that uses aroma to allow the user to choose which slot to flash. I am trying to determine a way to not require this choice. It might not be possible, but so far I am not sure what the kitchen should do when it encounters a Pixel rom.

I have already addressed the system.img not being extracted properly, but beyond that I am not sure.

Additional need to know:

Can we still use set_metadata or sparse_dat or are we limited to raw_img only?

If we can use set_metadata, should the symlinks and metadata be set to system/system instead of system?

It is not your fault, but I am asking questions and not getting answers so there is not much I can do :(
[SuperR Kitchen] Sh0X31:
We will get it working :)
[SuperR Kitchen] bluflight:
Here latest firmware: download OnePlus3Oxygen_16_OTA_017_all_1612141448_c46e72f660ae4891.zip MD5: 62e9c8e8aa6cc2a33943ad11f325858e android N based)

Thanks again mate :good:
[SuperR Kitchen] dkionline:
[MENTION=5787964]SuperR.[/MENTION], this have the related parts to be unpacked with kitchen, EVA-L09C432B330

or if u need the full package with update.app
[SuperR Kitchen] _that:
Again some answers from my theoretical knowledge:

I don't know how you unpack the image, but it's just a normal ext4 filesystem. How do you preserve the permissions of all the other files in /system? For the root filesystem, it's the same. Instead of preserving, you could also see how the ROM build process assigns the permissions and do the same.

TWRP reads a property to do that:

property_get("ro.boot.slot_suffix", slot_suffix, "_a");

The kitchen obviously can't do that, it needs to be decided on the device at installation time.

Maybe, but this will overwrite the recovery, unless you repack the boot image with the current recovery. And AFAIK the kernel zImage needs to be patched to disable dm-verity.

I guess not (if you disable dm-verity), but you will probably need to extend the update-binary to support the slot selection properly. Regular update zips for A/B devices use a completely new installation method (using update_engine_sideload which is part of the recovery, instead of an update-binary inside the zip). TWRP supports both based on what it finds inside the zip.

It will fail to boot and the bootloader will then switch to the other slot (from what I've read).

This is actually what the regular update engine is doing, not from recovery but from the live system. Then it switches the active slot using the "bootctrl" HAL module. In https://gerrit.omnirom.org/#/c/20725/2/partitionmanager.cpp you can see how TWRP does it.

Yes. I'd call it "root file system" instead of ramdisk. It just happened that prior to the Pixel devices, the root filesystem was a ramdisk. Now it's a regular partition.
[SuperR Kitchen] minz1:
[MENTION=5787964]SuperR.[/MENTION]

When I try to open a firmware file in the latest version of the Kitchen, donater version, I get this error:

Mounting system.img ...
[sudo] password for minz1:
mount: wrong fs type, bad option, bad superblock on /dev/loop1,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.

And after that...

Copying files to system ...
cp: cannot stat 'output/*': No such file or directory
umount: output/: not mounted

Link to ROM used: http://xdaforums.com/devdb/project/dl/?id=22043
[SuperR Kitchen] Sh0X31:
[MENTION=5787964]SuperR.[/MENTION] the first build from source custom Rom released for Pixel
[SuperR Kitchen] SuperR.:
v2.1.3.5 (Donate version)

Changes:

When extracting system.img, check for all img files in ROM directory and ask if you want to extract and include them.

Add support for xz compressed system.new.dat files in CM builds.

Alpha testing for Pixel devices.

v1.1.2.5 (Standard version)

Changes:

When extracting system.img, check for all img files in ROM directory and ask if you want to extract and include them.

Add support for xz compressed system.new.dat files in CM builds.

Alpha testing for Pixel devices.

NOTE: This is the best I have come up with so far on the Pixel. I am sure there are some bugs, and some things that are just plain wrong. I need testers that will let me know what is wrong. Thanks :)

This one extracted and built with no issues for me. I did raw_img perm type and built a rom, then I built a system.img alone with no issues. Not sure what is going on. I did it after the changes in this update so maybe something I did fixed it. Let me know.

This should be working now.

This should be working now.

I have never seen this format of rom before. I will try to figure out what is going on when I get a chance.
[SuperR Kitchen] anandmore:
[MENTION=718594]super[/MENTION]R I am not able to run the kitchen after today's update. I am getting this -

What Kitchen version? v1.1.2.5 (Standard version)

What environment are you running the kitchen in (OS, 32/64-bit, cygwin, Bash on Windows, etc.)? Ubuntu 16.04 64-bit

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

Terminated
[SuperR Kitchen] nalas:
+1 - the same - Terminated
[SuperR Kitchen] Fap4k:
Terminated

Why it is showing terminated it was working earlier in previous version of linux mint
[SuperR Kitchen] flamendless:
Hey guys, after searching in many place on how i could root my acer t07 phone. It seems that custom recovery does not work, so ive decided to pre-root my phone using its source code. Does anybody can provide tutorial/instructions on how to pre-root system.img using this wonderful tool? oh, acer t07 is mt6735 device. should i use fastboot or sp flash tool for flashing?

---------- Post added at 01:57 PM ---------- Previous post was at 01:52 PM ----------

i also got a mt6735 phone. have you managed to root yours?
[SuperR Kitchen] SuperR.:
v1.1.2.6 (Standard version)

Changes:

Fixed kitchen terminating right when it starts.

Fixed the Terminated error. Sorry for the inconvenience.

The kitchen does not pre-root system.img. It only adds SuperSU.zip (or other root zip) to your rom for flashing with the rom.
[SuperR Kitchen] nalas:
The kitchen does not pre-root system.img. It only adds SuperSU.zip (or other root zip) to your rom for flashing with the rom.[/QUOTE]

Do You know any method for add root to system.img file ? exaplle to stock rom - and no custom recovery in my device - i want to add root for only system.img file without another zip files - bcose no chance to flash it without custom recovery...

Thx for Your answer and thx for fix the terminate problem :)

Regards

nalas
[SuperR Kitchen] bluflight:
We tried but unfortunately once flashed still broken first configuration (got fc and impossible to go away) and not work wifi. Building process is not a problem, but is final system.img that are no working. The same procedure on mm firmware made a full working system.img (once flashed phone and system boot without any issue or fc)

We tried without any mod, all odex, the issue is something about N firmware system.img compiling (maybe make_ext4fs file) ? In one pm, some day ago, you say to my mate luigimak maybe need to compile make_ext4fs file from new source, but we not found the way about it)
[SuperR Kitchen] Sh0X31:
[MENTION=5787964]SuperR.[/MENTION] Which perm type you to use with my Shield k1 Tablet, OnePlus 3 and Pixel?
[SuperR Kitchen] bcrichster:
Then open the system, add the su and busybox binaries to xbin and SuperSu.apk to system, with corresponding folder and permissions. Then repack into an image

He's mentioned set_metadata as being the most reliable at the moment.. Other perm types would be noteworthy experiments, but only metadata and newer deal with selinux

Sent from my N9515's cm12.1
[SuperR Kitchen] nalas:
Thx. I did but after run sepersu.apk i have intall binariers error and still not rooted.

Wysłane z mojego SM-N930F przy użyciu Tapatalka
[SuperR Kitchen] aaron74:
[MENTION=5787964]SuperR.[/MENTION]

Awesome work. I'm not a hardcore dev, but when I want to debloat and customize a rom, this tool makes it so easy.

Thank you! :D

I have one suggestion, if it's worth while for everyone. On Samsung Note 4 firmware, they hide the CSC files in the cache.img.ext4 image. It's buried as follows:

cache.img.ext4 => /recovery/sec_csc.zip

Then inside that zip files is the /system dir that needs extracted. Attached photos.

I don't know if only note 4 is like this, or if all samsung roms. It's no problem manually extracting it. But i thought if all samsung roms were like this, that it'd be a nice addition to your code.

Thank you once again. :good:
[SuperR Kitchen] ShinySide:
Because you need more than just that lol you need the .sh scripts that tell su to run when the device boots.

And you're most likely gonna need an older version of supersu back when it was system root and not systemless lol
[SuperR Kitchen] nalas:
Hi. Thx for advice.

Have you maybe those files?

I have android 6.01.

Aha.... i have to get init.d support for sh script yes? And put this to init.d ?

Regards

Nalas

Wysłane z mojego SM-N930F przy użyciu Tapatalka
[SuperR Kitchen] ShinySide:
I don't but you can find them in the supersu zip. Believe all that is in the folder named common

Na you don't. Would go in system/bin
[SuperR Kitchen] ale8530:
[MENTION=718594]super[/MENTION]R

[MENTION=718594]super[/MENTION]R

Thanks for your response, the command line I intend to have the option of not using the graphical interface, you can make a change on your part to get the command line to use the part deodex? I need to be able to process the ROM automatically without the GUI

If the change requires a cost you your money :).
[SuperR Kitchen] bcrichster:
The Kitchen is fine the way it is, no need to make it difficult because you wanna do things the hard way..

Sent from my N9515's cm12.1
[SuperR Kitchen] ale8530:
When you're working on 40 different ROM the automated system was important, however I would like to answer your [MENTION=718594]super[/MENTION]R is his and not yours.
[SuperR Kitchen] bcrichster:
That's fine you don't want my answer, but I was stating the OBVIOUS. If you're working on a system that is doing 40+ ROMs then it sounds like you may need to change YOUR method of approach instead of egregiously asking someone to completely change a program or code design they have made over the last year+. Like I said.. Stating the obvious. His kitchen is fine with the GUI.

Sent from my N9515's cm12.1
[SuperR Kitchen] ale8530:
I asked if I can add a new feature, I do not think I asked for no changes, if you want Superr will otherwise do anything, I do not think he needs a defender, but the developer can answer how and when he wants.

I do not want to change anything about his work will be missed.

I want to be able to interact with him and not with third parties.
[SuperR Kitchen] bcrichster:
You may be right.. I may have misunderstood and if so, my apologies.

Sent from my N9515's cm12.1
[SuperR Kitchen] ale8530:
No problem :).

I do not want to change the SuperR tool, but only if they can add a feature that allows you to launch the deoodex via command line :)
[SuperR Kitchen] mauronofrio:
I have made a donation, my email is poronofrio@gmail.com and that is also my username on gitlab [MENTION=5787964]SuperR.[/MENTION]
[SuperR Kitchen] SuperR.:
The donate version has an AutoROM feature that uses a plugin to set up config files and automate the build process.

Added, thanks :)

I will compile make_ext4fs from the latest sources so you can give it a try. Will post once I have some time.

The kitchen already deals with csc inside cache.img. Just make sure the cache.img is in your project directory when you extract the system.img. You will be asked if you want to extract and include the files. Say yes :)
[SuperR Kitchen] mauronofrio:
[MENTION=5787964]SuperR.[/MENTION] i have some problem with Partition Zip plugin. I have copied it in the right folder but the tool doesn't recognised it. Some help?

SOLVED:

I changed the foledr and script name and it now works
[SuperR Kitchen] SuperR.:
[MENTION=1367408]bluflight[/MENTION] [MENTION=4884393]luigimak[/MENTION]

Attached is the latest AOSP make_ext4fs binary and libs (64-bit Linux).

Rename the existing /kitchen/tools/make_ext4fs binary

Extract and copy the new binary and lib64 directory into /kitchen/tools.

Make sure the new binary is executable.

Let me know how it goes :)