yashsingh1/xdaforums huggingface dataset:
[SuperR Kitchen] pmterp:
Verizon Note Edge

Background: Recently someone assisted those of us with the Verizon Note Edge (similar to the Note 4) by making a tool that changes the retail version of the phone to the Developer Edition which has an unlocked bootloader. We were also able to get a custom version of TWRP for our device. However, since there are only a few of us using the device, that has been the understandable extent of any interest from real developers.

So, I'm trying and thanks to your tool I've been able to make a rooted, debloated, stock based ROM which is nice. However, now I want to take it further and start implementing some of the things from tdunham's tw guide, but as far as I understand, the ROM needs to be deodexed for most of them.

I tried deodexing within the kitchen tool but got errors and read that at this point there is no solution. So I took the system directory and deodexed it with svadev's tool with no erros. But this is where I'm stuck. I tried replacing the system folder generated from the kitchen tool, making a flashable zip and got no errors. It also flashed in TWRP without error. However, then on first boot it stuck on the Verizon splash screen for 30 minutes before I finally pulled the battery (that sucker was getting pretty hot). It wasn't froze up because the gleam on the Verizon logo was still moving and the LED was still pulsating. Any suggestions from here? There may be a much better way or ways to troubleshoot but I just started a week ago and still have a lot to learn.

What Kitchen version? v1.0.7.8

What Linux are you running (OS and architecture (32/64-bit))? ubuntu 16.04 LTS (64-bit)

What device are you working on (make/model)? Samsung Galaxy Note Edge N915V tbltevzw

What was the source you started from (system.img, system.ext4.tar, rom.zip, etc.) Originally system.img but this build is based off the debloated ROM I've made from it. I did try making a new system image but got the same result.

What Android version? 5.0.1 (I know that's sad but Verizon has forgotten us)

What perm method (set_perm, set_metadata, sparse_dat, raw_img)? sparse_dat

What did you do after extracting and before building? deodexed system/app system/priv-app and system/framework with svadev's tool

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

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

Feel free to upload your boot.img AND the build.prop from the same rom so I can check to see if I can fix it.

Any suggestions would really be appreciated.
[SuperR Kitchen] SuperR.:
Extracted without issues for me. Here is the system.img and boot.img so you can move forward (feels like deja vu lol)

LE_X2_X820-CN-FN-FEXCNFN5601405314S-5.6.014S_SYSTEM_BOOT.zip

Just create a new project, add this zip to it, and extract with the kitchen :)

Sounds like a deodexing issue since the rom works before deodexing. You are correct (thanks for reading :) ) I don't know how to fix it on my end. You could try asking on svadev tool thread about it.
[SuperR Kitchen] STEVE_MARS:
Many many thanks, but the problem are when I compiled new ROM, and I test withouth anyt change, only decompiled. If I choose system partition via ADB, connect to phone OK (SuperSU granted permission) but when created raw system.img say: ERROR, something went wrong. Same if I choose "Project system directory" :(
[SuperR Kitchen] SuperR.:
I am not sure why you are having trouble. I just created a system.img, chose to get system partition size from the system.img. You could try it that way, or you can enter the system partition size manually. 4294705152 is the size of your system.img and it worked without issue after extracting the zip you provided.

If you are using sparse_dat there could be other issues. set_metadata works for just about everything at this point. I should remove the recommended sparse_dat text lol.
[SuperR Kitchen] STEVE_MARS:
Ok, Ok... I always use sparse_dat and never, on LeTV X900, I have a problem.

Ok, I try with this method.

Thanks a lot again :highfive:
[SuperR Kitchen] romulocarlos:
Hello:

I installed Cygwin 64bits with all packages, in a Windows 10 64bits machine, and install kitchen as well. But when I try to start it, I receive this error:

ps: unknown option -- A
Try `ps --help' for more information.
ps: unknown option -- A
Try `ps --help' for more information.

Can anyone help me?
[SuperR Kitchen] SuperR.:
v2.0.8.5 (Donate version)

Changes:

Do not show zip files in available plugins list.

Added a5xelte to device database.

Added more knox apps to be removed.

Removed the sparse_dat recommendation.

v1.0.7.9 (Standard version)

Changes:

Added a5xelte to device database.

Added more knox apps to be removed.

Removed the sparse_dat recommendation.
[SuperR Kitchen] STEVE_MARS:
Thanks for your work and for your help.

Donation code 0H706907GD2118005

Gitlab account STEVE_MARS

Regards.
[SuperR Kitchen] shoey63:
Well you are right. According to Official Documentation, there is no tags_offset for XZ. However, the boot.img can't be compiled without it, and setting the value to 01E00000 results in a black screen. Command line is fixed BTW, thanks for that :good:

So if tags_offset is not found, could you make the default 00000100, with an option to change it?
[SuperR Kitchen] bigrammy:
Not sure if this is valid for the Sony but when compiling the mediatek boot.img (from source that is) they use ( "" ) double quotes this means defaults apparently. I do see this quite often in the name= so maybe it will work for your tags_offset if it has to have something. :fingers-crossed:
[SuperR Kitchen] romulocarlos:
So, I setup a virtual machine with Ubuntu, and install kitchen on it. Everything working.

So, I made a system.img to be fhashed through fastboot. When I run the command "fastboot flash system system.img", it gives me a information:

target reported max download size of 268435456 bytes
Invalid sparse file format at header magi

I check the system.img file size, is a little smaller than that message. The phone is flashed and boot ok anyway, but I wanna know... what this means?
[SuperR Kitchen] SuperR.:
It seems that no matter what tags_offset value I use for the XZ, I always end up with 7feXXXXX after unpacking the created boot.img. For example, if I enter 00000100 as suggested, I get 7fe00100. If I leave the tags_offset parameter off completely, it builds fine and I get 7fe00100. Using 0 produces 7fe00000. Not sure how to deal with it.

[MENTION=4675598]shoey63[/MENTION] - I have not gotten 01E00000 for tags_offset value on the XZ. I get that value for the XZ3 however. Have you tried to boot the generated boot.img for the XZ created with elf2boot5? I assume the tags_offset is 7fe00100.

The kitchen does not create sparse img files which is probably why you get that message. Glad everything is working :)
[SuperR Kitchen] romulocarlos:
Thanks for fast reply. I made the system.img by using option 1 on build screen (via adb). So, maybe it is getting the wrong partition size, is it?

I'm suspecting this, because I generate 3 images until now: one with very original firmware, other with all apps updated, and the last with root and lightweight. All 3 files have the same file size. This is normal?

I ran 'df' in adb terminal, and it told the system partition have 2,4Gb.
[SuperR Kitchen] SuperR.:
All the images should have the exact same file size. The file size should be the exact same size as your system partition. Again, the message you are getting from fastboot is about sparse files. The kitchen generated system.img is not a sparse image so fastboot is correct to say that it is not sparse.
[SuperR Kitchen] romulocarlos:
Thanks again.

So, only for my understanding... A 'normal' system.img have a bunch of files inside that must be flashed in sequence, and the kitchen generate a one single file inside the system.img?

I ask this because the original ROM (that must be flashed with a program, QFIL from Qualcomm) have A LOT of system.img files, numbered from system_1.img to system_36.img. QFIL flashes one to tone, in sequence defined in a separeted XML file.

And, another question, I promess don't take your time. I have another ROM, from Lenovo A7010 (is a Mediatek Lollipop based phone). That ROM is different of my ROM (my phone is a Qualcomm Lollipop), and have only one system.img, but kitchen can't extract it contents. How I can know why it don't get extracted? There is a log or something?
[SuperR Kitchen] bcrichster:
I know the one time I played with a mediatek Official firmware, it looked like the files were set up to "compile" itself within the actual device upon installation. I could easily be wrong but that was the impression I got from the files because I then asked for a complete unmodified stock backup and ended up with a completely different set of files.. [emoji41] Just a thought..
[SuperR Kitchen] bigrammy:
I have encountered this before also. :(

Strange thing I found was that in windows OS ext2explore could mount and extract the one I had :eek:

I fixed things by simply flashing the system.img to the phone then doing a dd readback without booting the rom, the system.img then unpacked fine. :cowboy:

I know that don't help you too much if you do not have a phone to flash it to. :(

My Theory is that If it's a manufacturer rom (for SPFlashtool) they sometimes trim them so much some of the header info is missing which identifies it.
[SuperR Kitchen] romulocarlos:
I think you're right. Or maybe, the tools we have today don't understand the file. I really don't have A7010 to flash. I ask for some apps in another thread, but no answer. I finished the ask installing and integrating third part apps. Was better
[SuperR Kitchen] shoey63:
Yes, sorry tags offset is 7fe00100 after Unpacking the converted elf file. Flashing the boot.img made with elf2boot5 results in a black SOD.

It's fine though. Only takes a few seconds to unpack, change tags offset to 00000100 (the only value that will allow it to boot) and repack.

I wouldn't worry about it, seeing as it works fine on other elf images.
[SuperR Kitchen] Ram121:
[MENTION=5787964]SuperR.[/MENTION]

Following is information about my setup

What Kitchen version? - v2.0.8.5

What Linux are you running (OS and architecture (32/64-bit))? - Ubuntu 16.04 LTS 64 bit

Java version - openjdk version "9-internal"

OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)

OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)

What device are you working on (make/model)? - Galaxy Note 4 (N910G)

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

What Android version? - 6.0.1

What perm method (set_perm, set_metadata, sparse_dat, raw_img)? - set_metadata

What did you do after extracting and before building? - Added S7 apps

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

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

I am trying to sign ROM zip but primarily I am getting error

You may not have enough ram to sign this zip.

After continuing I am getting error

Signing RamROM.zip ...

Exception in thread "main" java.lang.NoClassDefFoundError: sun/misc/BASE64Encoder

at com.android.signapk.SignApk.addDigestsToManifest(SignApk.java:182)

at com.android.signapk.SignApk.main(SignApk.java:468)

Caused by: java.lang.ClassNotFoundException: sun.misc.BASE64Encoder

at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base@9-internal/BuiltinClassLoader.java:366)

at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base@9-internal/ClassLoaders.java:184)

at java.lang.ClassLoader.loadClass(java.base@9-internal/ClassLoader.java:419)

... 2 more

java.io.FileNotFoundException: RamROM-signed-fixed.zip (No such file or directory)

at java.io.FileInputStream.open0(java.base@9-internal/Native Method)

at java.io.FileInputStream.open(java.base@9-internal/FileInputStream.java:195)

at java.io.FileInputStream.<init>(java.base@9-internal/FileInputStream.java:138)

at java.io.FileInputStream.<init>(java.base@9-internal/FileInputStream.java:93)

at eu.chainfire.minsignapk.MinSignAPK.main(MinSignAPK.java:154)

at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531)

at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)

mv: cannot stat 'RamROM-signed2.zip': No such file or directory

I am trying to sign zip as cocktailbar application is force closing for me, and I am unable to get any action from logcat so trying for different options and one of observation is system apps needs similar signing so I am trying to sign zip but can not. Please help
[SuperR Kitchen] romulocarlos:
Try generating an image (system.img) and flash it with fastboot or your flashing program.
[SuperR Kitchen] shoey63:
[MENTION=5229173]fyh[/MENTION]

You NEED java openjdk version 8. Not 9

Edit: Sorry 8 or above, so 9 should work too.
[SuperR Kitchen] Ram121:
Actually I am having both JDK 8 & 9 installed but i will try uninstalling jdk9

Thanks
[SuperR Kitchen] shoey63:
Or

sudo update-alternatives --config java
#select JDK 8, then
sudo update-alternatives --config javac
#select JDK 8, then
java -version

And see if you have something like this

openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~14.04-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
[SuperR Kitchen] Ram121:
Uninstalled java9 now signing working but now showing out of memory

My laptop is having 3gb ram, how much ram is expected for this operation
[SuperR Kitchen] hurray:
Thank you very much for the kitchen!

I was able to debloat, deknox, root and deodex my Samsung Galaxy Tab S2 T810 with the new Android 6.01 with it. :)

It was a little bit tricky to get the wifi working again but modifing the default.prop does the trick:

ro.securestorage.support=false
ro.config.knox=0
security.knox_kap_mode=false
ro.securestorage.knox=false

I use the permissive kernel from this thread: [KERNELS]Permissive_MM - 815/710/715/810 so far.

If you want to expand the device database: in the Folder with the device-files is a new folder "gts210wifi". In it is a file named "superr_byname" with following content:

\/dev\/block\/platform\/15540000.dwmmc0\/by-name

and an empty file named "superr_capbyname" with 0 byte.

I am able to build booting ROMs in two different ways:

- with the settings "spares_dat" I have to enter the size of the system-partition manually: "3145728000" Bytes is the correct value. As the automatic lookup via adb don't worked I looked by myself with a little bit modifing the search command:

echo $(($(adb shell "cat /proc/partitions" | grep "mmcblk0p19" | awk '{ print $3 }') * 1024))

- the setting "set_metadata" works also good and this is the setting I use for now

Thanks again for this good kitchen! It makes the process of building a working ROM truly a lot easier. :good:
[SuperR Kitchen] bigrammy:
See Here http://xdaforums.com/showpost.php?p=67058077&postcount=3236 ;)
[SuperR Kitchen] Ram121:
I should have searched for that

Thanks
[SuperR Kitchen] SuperR.:
Ok, I have no idea why the tags_offset won't stick when building it the first time, but as you mentioned if I build the boot.img, unpack it, change it, repack it...it works fine. So, that is what the plugin does now. I have the tags_offset being set to 00000100 if it is not in the kernel.elf to begin with. Let me know how it goes :)

elf2boot6.zip

[MENTION=3924647]bigrammy[/MENTION] - Please let me know if your mtk boot.img still boots with this change, thanks :)
[SuperR Kitchen] shoey63:
boot.img boots with elf2boot6. Thanks :cool:
[SuperR Kitchen] diegonnc:
This maybe a super noob question, but i tried a bunch of things with no success,I get missing dependency problem , LZ4 and just couldnt install it , also the automatic installer fails to do it.

Edit: im on ubuntu if that counts.
[SuperR Kitchen] Er. Aditya:
[MENTION=5787964]SuperR.[/MENTION] bro i have no idea of these plugins i tried but dont want to mess up something , i need a simple plugin that takes content from download link and installs in app or priv-app ..can you help
[SuperR Kitchen] bigrammy:
Hi,

No problem although It maybe a week or so before I can do the testing as my dual boot PC has developed GPU problems so it's looks like I will have to buy another. :(
[SuperR Kitchen] SuperR.:
Install lz4 from Ubuntu software center or Synaptic package manager and run the kitchen again. If you are on an old version of Ubuntu it might not be there and you should probably update. I only test on 16.04.

Send me the link you want the plugin to download from so I can see what needs to happen. Thanks
[SuperR Kitchen] Er. Aditya:
this needs to go into /system/framework

https://db.tt/jn8iyITu

thanks alot :)
[SuperR Kitchen] SuperR.:
This plugin should do the trick, but you will need to change your download link to a direct download. The one I used in this plugin is your file uploaded to a server with a direct link. Once you upload to a place that will give you a direct download link you can change the link in the plugin to match your file. There are instructions at the top of the plugin.

If you want to be asked the url to the file download instead of editing the script, that can be added too.

dl_extract.zip

edit: keep in mind that your zip must contain a system directory in the root of the zip to work with this plugin.
[SuperR Kitchen] Floating Point:
SuperR's Kitchen is failing me to create symlinks with the proper permissions and ownership.

e.g.:

/system/bin/getprop should be 0755 root shell (UID 2000).

updater-script is creating as 0777 root root

symlink("toolbox", "/system/bin/getprop");
...
set_metadata_recursive("/system/bin", "uid", 0, "gid", 2000, "dmode", 0755, "fmode", 0755, "capabilities", 0x0, "selabel", "u:object_r:system_file:s0");

The last line above seems to be ignored

Same goes for many other symlinks.
[SuperR Kitchen] SuperR.:
There is no chance the kitchen is generating an updater-script with 0777 permissions. The kitchen does not even generate permissions for symlinks. Permissions are inherited from the linked files.

Read post #4 for the information needed to help you. Additionally, I will need to see the kitchen generated updater-script you speak of.
[SuperR Kitchen] Ram121:
[MENTION=5787964]SuperR.[/MENTION]

For issue of more ram required for signing of zip, can the process of singing be done on individual apk before creating zip (don't know this is useful or not), this might require less ram, just idea....
[SuperR Kitchen] SuperR.:
The updater-script looks good to me and I have not heard of this issue before. I am not sure what is going on with your device.

Signing zips is not the same as signing apks. You can sign all the apks you want but the zip will still not be signed. The solution to the needing more ram issue is to either get more ram or don't sign your zips :)
[SuperR Kitchen] kennylam:
Could some APK files can be excluded in deodex-ing?

Because in MediaTek's Android 5.1, there is a MPluginGuard will check the checksum of each files in /system/plugin

The most important apk is "/system/plugin/FwkPlugin/FwkPlugin.apk"(com.mediatek.fwk.plugin) , that contains Mediatek's own classes for media playing and Telephoney features.

When FWkPlugin is deodexed, it will fail to pass MPluginGuard's checking and serval classes will not be loaded, therefore some problem will be raised, e.g. Some video player will be broken.
[SuperR Kitchen] SuperR.:
I am pretty sure you can't run apk files that have not been deodexed with a deodexed framework. I suggest you remove MPluginGuard if possible, or don't deodex the rom. Unless you are planning to modify apk's, deodexing is pointless.
[SuperR Kitchen] Captain_Throwback:
That's actually not true - I'm doing that exact thing on my HTC 10 right now ;).
[SuperR Kitchen] tdunham:
All play store apps are odexed now. Actually they are hybrid because the base.apk also contains classes. But the system will still use dex class first if it sees it.

---------- Post added at 09:59 PM ---------- Previous post was at 09:59 PM ----------

At least for Samsung this is the case.
[SuperR Kitchen] marxses:
Hey SuperR!

I've made the donation but I'm having issues signing up to GitLab as it won't send out the confirmation email. I emailed them to fix the problem but the administrator is away until the 13th of June!

Thought I'd post my username now regardless; if you could add it to the repo so I can access the donate version once my account comes online that would be great.

Username: marxses

Thanks!

M.
[SuperR Kitchen] insestito:
Hi, i have a question.

I have enabled init.d on the rom, but i not rooted the rom. The init.d files work in the rom without root?
[SuperR Kitchen] SuperR.:
It could work without root since it is in /system already, but as it has been stated in this thread, su.d is probably a better option for most devices at this point.

You need to enter the correct system partition size when building the rom. If you are sure you did, I am not sure what to tell you other than set_metadata will work for you and not cause this issue :)
[SuperR Kitchen] livlogik:
Hey [MENTION=5787964]SuperR.[/MENTION] I dontated and want to say thanks for all your hard work and thank you for creating this awesome tool!

My gitlab user name is livlogk
[SuperR Kitchen] insestito:
thank you!

how i can auto install .zips mods when the rom is installing on Recovery?
[SuperR Kitchen] kennylam:
Well, I did that on my 2 mediatek devices and worked fine, at least those classes from "FwkPlugin" can now be loaded via "MPluginGuard".

The reason I did that because I am using Xposed Framework, deodexing can save some space and make the /data partition larger, to store the enlarged "dalvik-cache".

Anyway, thanks for the great tool, just made a donation

Username on GitHub: kennylam777

Confirmation number: 2F429043YM654843K
[SuperR Kitchen] Er. Aditya:
bro i think gitlab is down ?
[SuperR Kitchen] bcrichster:
Need to have a Gitlab account name for this one.. Not Github. [emoji41]

Sent from CM12.1 *N9515*
[SuperR Kitchen] SuperR.:
I am not sure what you are asking. SuperSU and Busybox are installed this way when you add them from the kitchen. Not all zips can be installed this way. They must use an update-binary script instead of an updater-script.

In this case, you can simply move the things you don't want to deodex out of the system directory before deodexing and move them back after :)

Thank you for your support. As [MENTION=5297774]bcrichster[/MENTION] mentioned, the private repo is on gitlab.com, not on github. Please send a gitlab username so I can get you added :)

SuperSU does not get added to system.img. If you want to use system.img and install SuperSU, choose the raw_img perm type and build a rom :)

Seems to be working fine here. Unfortunately if it is down, I can't do anything about it since I don't run the server. I hope it starts working for you again soon :)
[SuperR Kitchen] kennylam:
:eek:

my GitLab username is "kennylam"
[SuperR Kitchen] AndroidGX:
Hi everybody :good:

Long time I didn't used SuperR Kitchen and wanted to make a rom, but after updating (fresh install via git clone) to latest version, I have the following problem :

------------------------------------------------------
SuperR's Kitchen
by SuperR
------------------------------------------------------

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

Java is already properly installed on my Ubuntu virtualbox, I don't know why it don't find it ? :confused:

Any idea ?

Cheers'
[SuperR Kitchen] :
Is it java 8 that is installed?
[SuperR Kitchen] AndroidGX:
You were right :D I really thought java 8 was already installed, but it was not (still java 7), so I followed this article and problem solved :cool:

Thanks! :highfive:

Cheers'