yashsingh1/xdaforums huggingface dataset:
[SuperR Kitchen] romulocarlos:
Hello.

I need some help to avoid a possible brick on my device. I will resume what I wrote here and here. The goal is have a ROM for restore in case of problems.

The phone is a Xperia C6 clone, android 5.1 (with makeup to 6.0), and MT6580 SoC. MTK Droid Tools don't work with this phone, I think because chip and/or android version. SP Flash Tools don't work either, it don't start the readback, I think because the non-removable battery. There are no ROM to download anywhere.

So, as described, I dumped boot.img and recovery.img with ADB after have unlocked the bootloader and get root access. Both files are 16Mb in size, and I can't dump /system because ADB only works with phone in normal mode. On recovery mode it shown unauthorized.

Searching, i read I must change some settings in boot.img to have ADB authorized, and then I can dump system.img correctly in recovery mode. The files I dumped was opened rightly on this kitchen, I can see the files and everything, but after repack the size downs to about 7Mb for boot and 5Mb to recovery.

Then, the first question is: as the phone can't accept fastboot boot command, can I flash these files permanently with fastboot flash command?

If yes, I'll dump system.img, work on it, and create a flashable zip, because I don't know if the phone will accept fastboot flash system.img because it size.

So, the second question: Will stock recovery accept this zip? (This phone don't have CWM or TWRP, and I have no idea or knowledge to build/port one, I don't have much info).

Any help will be appreciated. Thanks in advice.
[SuperR Kitchen] Xennet:
[MENTION=5787964]SuperR.[/MENTION]

I have donated via paypal

Receipt no : 1304050068033345

My username is Xennet. Do add me...
[SuperR Kitchen] millo1978:
I see that you have a Huawei P9...

With my Samsung S3 I never signed my ROM and all was good.

With Huawei must the ROM to be signed to boot correctly?

[MENTION=5787964]SuperR.[/MENTION]

how much RAM I need to sign a zip?

My notebook has 4GB... but the Kitchen fails... not enought RAM

My zip is 1,6GB

Thanks :)
[SuperR Kitchen] SuperR.:
Choose sparse_dat perm type and build full rom zip.

I don't know anything about your device, but you can't flash custom roms from stock recovery. You can flash system.img, boot.img, and recovery.img using fastboot if your device allows it. You can also use something like FlashFire to flash from your rooted Android.

Added, thanks :)

You will need approximately 5.7GB ram to sign a 1.6GB zip.
[SuperR Kitchen] Xennet:
[MENTION=5787964]SuperR.[/MENTION]

I am on OnePlus 3t 128gb

Downloaded the official OOS 4.1.1 zip

Extracted it with kitchen using sparse dat

Then debloat it added my custom fonts

Extracted boot.Img Patched kernel with disable DM Verity and disable force encryption and repacked

Then repacked into system.new.dat as it was like in the original zip

Then signed

And flashed via twrp

But bootloop...

What is wrong?

Do I need to disable secure boot also in the kernel?

I am a newbie in this.

Sorry if I missed something..

Can you or anyone else share the exact steps to cook a modified ROM from official OP3T zip...

Can I add a custom kernel like Franco to replace the official boot.img...If so how to convert the Franco to boot.img or other methods

Is there a method to root using magisk other than supersu??
[SuperR Kitchen] romulocarlos:
Thanks for reply. Is a low profile and unknow device, for sure. That was what my pocket could afford. Hehehe.

You mean I can flash the img files generated by your kitchen, that's it?

And reading about these 'signing', if I sign the ROM, I still can flash with stock recovery? My PC have 16Gb of RAM.
[SuperR Kitchen] theimpulson:
Hey! Thanks for helping, Also when I makes zip file and try to flash I am getting error 7 due to updater script. Kitchen is messing with the name of my device. It has actually happened 3 times. My device is Asus Zenfone 2 Laser/Z00L. If I am tweaking Lineage it changes device name to lineage zool, if it is stock it again changes it to something else, why? Am I doing something wrong? Also I tried removing assert but after it I am getting symlinks failed error. Help!

---------- Post added at 04:44 PM ---------- Previous post was at 04:38 PM ----------

Sorry to reply as you asked this question to SuperR. Actually I also have a collection of low profile devices which has got no recovery, rom and anything else. Recently I used MTK droid tools to create a modded recovery and bootlooped my device. I think even low profile devices needs bootloader unlocked with somekind of key. BTW I used flashfire on almost all my devices to flash certain flashable zips and all have got success. If you find any way to make ROM, let me know too. I got almost 5 low profile devices and 3 offical devices (Offical means supported by TWRP )
[SuperR Kitchen] romulocarlos:
No problem. I have unlocked the bootloader of my device, maybe the links I posted above can help you to unlock your devices. As SuperR's told, maybe fastboot can flash the image files for us. I'll wait for the reply to test. If we successfully dump system partition, we have a ROM to try.
[SuperR Kitchen] SuperR.:
Unfortunately, since I don't own a OP3T I can't help much. I suggest trying to build the rom without any modifications first to see if it works. If it does, modify one thing at a time and try it so you can figure out where the problem is.

You can replace your boot.img if you want, but I only support the features included in the kitchen.

You can flash kitchen created img files using fastboot if your device supports it. Beware, if you don't have a functional backup you may end up with a bricked device.

It is not possible to flash a custom rom from stock recovery, signed or otherwise, unless you have the OEM signing keys which is highly unlikely.

The device name comes from the build.prop in the rom directory. If you use a different rom, the build.prop changes and so does the device name. You can change the asserts from the asserts menu if you want.

If you send your recovery.log after flashing we might be able to see where the symlink error is happening.
[SuperR Kitchen] romulocarlos:
This is the problem, I don't have a stock ROM and it is not found anywhere on internet. Thanks for your time and support!
[SuperR Kitchen] ballerd:
What phone you use and it is possible to pull your system.img using adb and dd commands if your familiar with it there is probably eaiser methods depends on you device and like others said if you have no backup or custom recovery you could be knackerd pal the benefits will be small up to you I'd buy a new phone with better dev support just my thoughts
[SuperR Kitchen] romulocarlos:
Thanks. My phone is a 'china phone', a clone of Xperia C6. I'm familiar with dd, fastboot and ADB, but, as I sayed, I can't dump system because ADB only works with phone in normal mode. In recovery (I only have stock one), I get device unauthorized. I already dumped boot and recovery.

So, I asked here some posts ago if I can use these files after I edit them in SuperR's kitchen to get ADB authorized in recovery, because I'm affraid to use and lose the device, because the original ROM simply don't exists.
[SuperR Kitchen] ballerd:
I might be completely on wrong track but would adb insecure not work by chain fire and I thought adb unauthorized was that you didn't click the allow thing when you plug in to allow USB debugging
[SuperR Kitchen] romulocarlos:
Sorry, I didn't understand what you say. I'll try to explain better.

I got root on my phone with Kingo Root, this was told on the links some posts above. I have bootloader unlocked.

On normal mode, adb recognizes my phone, and the warning about ADB appears on my phone when I plug it on computer. Then, I was able to dump boot and recovery. I can't dump system because the partition is in use by the android itself.

On recovery mode, adb recognizes my phone, but the recovery don't have a way to show the warning. So, ADB is unauthorized, and I'm unable to dump system!
[SuperR Kitchen] _that:
Why can't you dump /system? It should be mounted read-only, and with root, dd should work.
[SuperR Kitchen] romulocarlos:
Well, with past phones I had, system in normal mode have links with some files and folders with boot partition, especially /dev and others I don't remember. dd enter in a loop on some these symlinks, and never finish the job.

On this phone I think is the same situation, because dd never finishes it job also.

This work for you anytime?

EDIT: even if I dump sytem by this way, my question still alive: can I use these files to flash my phone in case of problems?
[SuperR Kitchen] AnonVendetta:
I have a quick question. I noticed the Kitchen has the option to add su.d support. But it looks like you have to add root first. The problem is, I don't use SuperSU. Phh's Superuser is my preferred root option of choice. It does everything I need but can't execute su.d scripts yet. I use the standalone non-Magisk version. Phh Magisk version can execute su.d, but it is actually done by Magisk, not Phh itself. I have had issues with Magisk and prefer not to use it. A su.d script is nothing more than a standard script, there's no reason these cant be ran without SuperSU. It's very much like init.d. Is there a way to add native su.d without building a ROM or using SuperSU root?

Thanks!
[SuperR Kitchen] zengfu94:
You could build a script to just execute everything in su.d and put it in init.d. Not much difference between the two if you want init.d to run earlier like su.d change the on-boot-completed property in the .rc to on-post-fs or on-post-fs-data.
[SuperR Kitchen] _that:
dd is block based, it doesn't care if those blocks are directories with files or symlinks, file contents, or unused space. Also /dev is not part of /system. It should be possible to make a full binary image of /system using dd, and depending on your device's fastboot implementation, flash it back. If it doesn't work with fastboot you may need to make a custom recovery, or at least a working boot image with root access and adb support.
[SuperR Kitchen] chevycam94:
[MENTION=5787964]SuperR.[/MENTION] Is it just me, or does enabling init.d through the kitchen not actually work? I couldnt find the line that adds the oneshot service to run scripts from the init.d folder. Looked in init.rc and init.angler.rc. So far, I have yet to get init.d to actually work after "enabling" it in the Kitchen.
[SuperR Kitchen] bcrichster:
You may need to add a folder and scripts..
[SuperR Kitchen] Wonders_Never_Cease:
Getting fatal: repository 'https://gitlab.com/superr/superrs-kitchen2.git/' not foundwhen cloning...Issue on gitlabs end?
[SuperR Kitchen] chevycam94:
it added the folder and a placeholder file init. It did that just fine. Thats where I added a few test scripts, and so far, none of them run. Doing a test now, where I added my own service at the end of init.rc. Going to see how that goes.
[SuperR Kitchen] SuperR.:
It is certainly possible that I broke it at some point. I have not tested it in a long time. I will take a look when I get a chance if you don't figure it out first :)

Hopefully fixed now. Sorry for the trouble.
[SuperR Kitchen] chevycam94:
Nope, looks like I cant seem to fix it. I'm just not sure what I'm doing wrong.
[SuperR Kitchen] Wonders_Never_Cease:
Thank you...
[SuperR Kitchen] romulocarlos:
Man, you're right. Your thanks is granted.

Yesterday I put the phone in airplane mode, plugged it on computer, start dd and left it at night. Today, dd was completed.

I don't know yet if kitchen will open these files (I think it will), because my linux virtual machine is at work. I'll test and post here.

Unfortunately, the question remains: even if kitchen open these files, can I use them after edit (with fastboot in case)?
[SuperR Kitchen] dkionline:
[MENTION=906966]millo1978[/MENTION] i never sign stock roms.
[SuperR Kitchen] Xennet:
Anyone here can advice me on building a debloat ROM from from stock OOS for OnePlus 3t

Whether to enable disable DM veritt., Force encryption, secure boot...

Whether to deodexed, sign the final zip or not...

Anyone has an experience of cooking a ROM from stock OOS on onrplus3t...
[SuperR Kitchen] romulocarlos:
Well, kitchen opened the files I dumped. I compared with the files inside my phone, open some files, play some sounds, see some images... everything seems ok. So, there is the question opened: can I use this files with fastboot?

Thanks!
[SuperR Kitchen] bigrammy:
Once the kitchen has unpacked the system and if required the boot.img make any edits you wish like remove or add any apps deodex etc etc etc or whatever you want to do.

Then from the project menu choose (8) Rom Tools then (2) Change perm type then choose raw.img this will repack the rom as a system.img which you can maybe then flash it using fastboot. :fingers-crossed:
[SuperR Kitchen] romulocarlos:
Thanks #1588 from me to you! I was analyzing this, and make sense.

Well, maybe I don't make the question in the right way... Let me try again: after edit the files, can I safely (or safety, sorry for my English) use them without brick the phone?

Again, thanks for you and for all people helping me.
[SuperR Kitchen] SuperR.:
It is not "safe" to flash your system partition without a custom recovery and a backup. With that said, I have done it more times than I can count without issue. The system.img you got using dd will probably work as long as your device is currently booting properly. However, I can't guarantee your device will allow fastboot flashing in the first place.

Bottom line...you will need to take a risk if you want to modify your system.img and fastboot flash it. Chances are that if your new system.img fails you can fastboot flash the original system.img back to the device but there are no guarantees. Good luck :)
[SuperR Kitchen] rajatgupta1998:
I created the flashable zip from the stock ROM (7.0 ) twrp backup of athene (Moto g4 plus xt1643) and the installation proceeds properly and the ROM boots...the hello moto boot sound/animation work well as expected but I'm unable to get past the 'Just a sec' screen on setup. And there's no option to choose the Wifi .Also I'm getting a few force stops like Play music and calendar. Any help will be appreciated. I have used the raw method.
[SuperR Kitchen] SuperR.:
There may be perms/capabilities missing for your device in make_ext4fs. Try set_metadata, it will probably fix your issues. If it does not work, try extracting a system.img so the kitchen can get all the correct perms/capabilities. You should be able to make a system.img backup from twrp.
[SuperR Kitchen] rajatgupta1998:
Used stock fastboot firmware and the set_metadata. ROM working fine. Thanks. :good:
[SuperR Kitchen] chevycam94:
[MENTION=5787964]SuperR.[/MENTION] I've tried several things to get init.d working, and been unsuccessful. Guess I'll leave that up to you. You have more experience with it than I do. Maybe I'm just going about it the wrong way. Can't rattle my brain any more. lol
[SuperR Kitchen] chevycam94:
[MENTION=5787964]SuperR.[/MENTION] Donation sent. My GITLab username: ChevyCam94
[SuperR Kitchen] Xennet:
[MENTION=5787964]SuperR.[/MENTION]

Aroma installer plugin can be used only if extract with perm or metadata type?

Can it be used with sparse dat type extraction because my stock ROM for OnePlus 3t zip has only system.new.dat file....

Can the aroma plugin be configured in such a way that it can be used to remove the apps after the system.new.dat is extracted....That may be posible right...
[SuperR Kitchen] SuperR.:
I will look into it :)

Added, thanks :)

It would be possible, but the plugin does not do this. I don't have plans to deal with Aroma any further as I don't use it and don't know much about it.
[SuperR Kitchen] Xennet:
[MENTION=5787964]SuperR.[/MENTION]

Is there any difference in extracting and repacking the boot.img with the native kitchen and by using the osmosis android image plugin?

Just a newbie question..
[SuperR Kitchen] SuperR.:
Not anymore. I should remove the plugin since the kitchen uses the mighty AIK out of the box :)
[SuperR Kitchen] The Sickness:
Here is a script to enable init.d

https://drive.google.com/file/d/0B9KksqB_19BANkt2NWZnSFpMRjQ/view?usp=drivesdk

#!/sbin/sh

if [ -z "`cat /system/etc/init.qcom.post_boot.sh | grep "run-parts"`" ] ; then
echo "" >> /system/etc/init.qcom.post_boot.sh
echo "# Init.d support" >> /system/etc/init.qcom.post_boot.sh
echo "run-parts /system/etc/init.d" >> /system/etc/init.qcom.post_boot.sh
echo "" >> /system/etc/init.qcom.post_boot.sh
fi

if [ ! -d /system/etc/init.d ] ; then
mkdir /system/etc/init.d
fi

echo "#!/system/bin/sh" > /system/etc/init.d/00test
echo "# Init.d test" >> /system/etc/init.d/00test
echo "" >> /system/etc/init.d/00test
echo "if [ -f /data/Test.log ] ; then" >> /system/etc/init.d/00test
echo " rm /data/Test.log" >> /system/etc/init.d/00test
echo "fi" >> /system/etc/init.d/00test
echo "" >> /system/etc/init.d/00test
echo 'echo "Init.d is working !!!" >> /data/Test.log' >> /system/etc/init.d/00test
echo 'echo "excecuted on $(date +"%d-%m-%Y %r" )" >> /data/Test.log' >> /system/etc/init.d/00test
echo "" >> /system/etc/init.d/00test

echo "#!/system/bin/sh" > /system/etc/init.d/08setperm
echo "# Set correct permissions to init.d scripts" >> /system/etc/init.d/08setperm
echo "" >> /system/etc/init.d/08setperm
echo "mount -o remount,rw /system" >> /system/etc/init.d/08setperm
echo "chmod 777 /system/etc/init.d/*" >> /system/etc/init.d/08setperm
echo "mount -o remount,ro /system" >> /system/etc/init.d/08setperm
echo "" >> /system/etc/init.d/08setperm

echo "#!/system/bin/sh" > /system/etc/init.d/99SuperSUDaemon
echo "# Additional way of loading SuperSU daemon" >> /system/etc/init.d/99SuperSUDaemon
echo "" >> /system/etc/init.d/99SuperSUDaemon
echo "/system/xbin/daemonsu --auto-daemon &" >> /system/etc/init.d/99SuperSUDaemon
echo "" >> /system/etc/init.d/99SuperSUDaemon

chown 0:0 /system/etc/init.qcom.post_boot.sh
chmod 644 /system/etc/init.qcom.post_boot.sh
chcon u:object_r:system_file:s0 /system/etc/init.qcom.post_boot.sh

chown 0:0 /system/etc/init.d
chmod 777 /system/etc/init.d
chcon u:object_r:system_file:s0 /system/etc/init.d

chown 0:0 /system/etc/init.d/*
chmod 777 /system/etc/init.d/*
chcon u:object_r:system_file:s0 /system/etc/init.d/*

sync
[SuperR Kitchen] jawee:
Hi,

I'm using version 1.1.4.9 of this application now !!

When I use option "4" the process normally starts, my root password is requested later to finish the extraction and error

IMG can not be extracted "there was problem extracting your rom"

An idea and or soluce?

- rom nougat 7.0 for s6 edge plus

- linux mint bit

- java 8.0.121

thanks in advance
[SuperR Kitchen] SuperR.:
Nice, thanks :)

Does it work on most devices?

Do you mind if I use it in the kitchen? It would run during flash if someone adds init.d to their rom.

Send a link to the problem firmware and I will take a look. Make sure the link is fast and does not require registration.
[SuperR Kitchen] The Sickness:
[MENTION=5787964]SuperR.[/MENTION] it has worked for me on Sammy roms for quite some time. Not too sure on others. I don't see why it shouldn't work tbh. It's pretty straight forward.

You're more than welcome to use any/all of it as you see fit.
[SuperR Kitchen] rajatgupta1998:
Umm noob question maybe...can I use this for Mediatek devices too? ? ? I have the twrp backup for the same.
[SuperR Kitchen] jawee:
hi SuperR,

What kind of link do you want?

Video, image ... little you tell me!

THANK
[SuperR Kitchen] shoey63:
Send him a link to download the whole firmware so he can run it through the kitchen himself.
[SuperR Kitchen] jawee:
So the linux version used?

sorry To do the noob I'm starting with linux

thank
[SuperR Kitchen] shoey63:
No. A link to the firmware package of the rom itself. How can he troubleshoot it if he doesn't have the full set of files?
[SuperR Kitchen] c.c.dll:
I am using kali linux and i cant find a package called getcap so is there any way to modify the tool to work with libcap2 and libcap2-dev?

thank you for your time
[SuperR Kitchen] bcrichster:
Nice catch, good on the pkg specifics. [emoji41]
[SuperR Kitchen] jawee:
https://1fichier.com/?ypyo7ejyd1

https://mega.nz/#!hkZFEQ7I!3cwEZDitruME8Sw2tEfFag9wcNLgLVWjpZ33qHe-oTg

Hello,

Here is the link requested.

I renamed the file by omitting anything that it finds after F until .zip Because error otherwise

thank
[SuperR Kitchen] c.c.dll:
can it be modified to suet my purpose?

I try to do my research before asking anything because thats the way i learn but i got stock on this one so please help
[SuperR Kitchen] SuperR.:
Thank you. Unfortunately, /system/etc/init.qcom.post_boot.sh only exists on Samsung devices apparently.

Most things should work with Mediatek. The only thing I am not sure about is the by-name detection which you may not even need for your purposes. If you can't get past the by-name detection, enter something manually so you can continue. by-name is no longer used in roms the kitchen builds..

getcap comes with libcap, so try installing it and see how it goes.

I downloaded your firmware zip into my project directory and let the kitchen unpack all of it. It worked without issue. Make sure you enter the correct sudo password
[SuperR Kitchen] jawee:
Here is what goes in the kitchen.

Yes I enter the correct password

But I will review but right ...

Can be a missing file problem I am under linux mint 32 bits :

with MM 6.0.1 stock Rom Same message with N 7.0

Preparing to extract ...

Extracting G928FXXS3BQA7_G928FOXX3BPJ3_G928FXXU3BQA1_HOME.tar.md5

Extracting images ...

tar: Bloc zéro solitaire repéré à 8038520

tar: Bloc zéro solitaire repéré à 8038520

Checking/Converting if sparse ...

Mounting system.img ...

[sudo] Mot de passe de """""""""" :

mount: wrong fs type, bad option, bad superblock on /dev/loop0,

missing codepage or helper program, or other error

In some cases useful info is found in syslog - try

dmesg | tail or so.

Copying files to system ...

cp: impossible d'évaluer 'output/*': Aucun fichier ou dossier de ce type

umount: output/: not mounted

ERROR:

There was a problem extracting your ROM.

Press ENTER to return to the Main Menu

thank
[SuperR Kitchen] bcrichster:
You need 64bit system to get proper function from the kitchen
[SuperR Kitchen] jawee:
Ok I installed a 64 bit version of linux mint and it works thank you guys for your feedback
[SuperR Kitchen] Xennet:
[MENTION=5787964]SuperR.[/MENTION]

Kitchen working superb!!!

One question...

Can we add multiple zip files that can be flashed one after the other... after installing the cooked ROM or added inside the ROM like magisk , kernel, UI mod zip files etc???
[SuperR Kitchen] Xennet:
[MENTION=5787964]SuperR.[/MENTION] Or anyone else who can help

The ROM I installed was on oneplus2

Everything is working fine booted and good.

But twrp showed an error screenshot attached

Update script, twrp log and configure.sh attached

Twrp log shows error:

Mount error...

about to run program [/tmp/configure.sh] with 1 args

sh: : unknown operand

And in the final page:

TEENUs ROM Installed

script succeeded: result was [TEENUs ROM InstalledE:unknown command []]
[SuperR Kitchen] SuperR.:
Take a look at the Mods Install plugin on post #5

The mount error is most likely happening because /system is already mounted. It is ugly but should not cause any issues. I will take a closer look at the updater-script and try to eliminate this when I get a chance.

The sh error, not sure why you are getting it. The script is obviously succeeding because it flashes to the correct place and would not otherwise.

The unknown command at the end I am aware of. It is due to the update-binary. [MENTION=1162986]Captain_Throwback[/MENTION] explained it a while ago and it is harmless.
[SuperR Kitchen] Xennet:
Thanks for the reply

Hope you get it rectified when you get time

Anyways it is good to have them corrected for cosmetic reasons even though the errors may be uarmless.

The mod plugin description tells that it can add only flashable zips with update binary and not updater script??? Can I use updater script flashable scripts with the mod plugin?