yashsingh1/xdaforums huggingface dataset:
[Android] rfgamaral:
No, he would always need to sign because the files were modified and they need to be resigned. And if that APK the user is hacking/themeing has a shared user id, than every APK with the same user id would need to be signed. That's why it's always better, in my opinion, to just sign everything from the get go.

Yes, the user would need to sign and all others that have share the same user id.

That's different...

Sure, some people move some apps from system/app to data/app, but the way I see it, that's their problem. The kitchen shouldn't touch the data folder at all (regarding signing and deodexing).

Normally, the data folder is for extra applications and those are normally signed and will work without doing anything to them, they probably don't share any user ids. If the user wants to move apps from system to data, then it should use the kitchen to do whatever he wants (like deodexing, signing, whatever) BEFORE moving the files from system to data. And the kitchen shouldn't be bothered with the data folder.
[Android] rfgamaral:
I'll do it later and let you know...
[Android] dsixda:
But if the user would have to sign all the apks (if he modified one for theming) regardless of whether or not I signed them earlier, then what's the point of having the kitchen sign them when deodexing? I could just leave that step out.
[Android] t2noob:
I used these files and all my problems seem to be solved Location works, able to sign into google and no more FC. Great job guys in figuring this out.
[Android] rfgamaral:
Well, I don't exactly know how everything works, the little bits about signing and why it's needed, bla bla...

However, if you leave everything to be signed (if that works on Sense ROMs, I'll test it out later) and some user needs to hack/theme some file, there might be some problem, or not, it will really depend on the file.

Let's say he's hacking the calculator (and suppose that doesn't share any user ids), he will need to sign it because he modified some files. It would be enough to sign this file and everything would work.

Now, if the user is hacking something that shares user ids (like something Google related), he would need to sign that file and all others with the same user id. Someone told me this on the "apktool" thread.

So, if you sign everything in the kitchen, all the files will be signed with the same signature. Which would mean that if the user now wants to hack something Google related, we would just need to sign that app and nothing else. We would need to sign it because the resources were changed and wouldn't need to sign anything else because the signature for all apps was the same (the one used in the kitchen, which is probably the same the user will use to sign the modified app).

But then again, this is me assuming how everything works... I think (but don't take my word for it) that in the situation where you sign everything, if the user wants to hack something with shared user ids, only that fine would need signing. If he indeed used the same signature as you used in the kitchen, otherwise he would need to sign everything that has the same user id with the same signature, of course.

Anyway, I just think it will be better to sign everything, if you don't, it may (I don't know liked I said, I'm just assuming) force the user to sign everything that shares the same user id, where areas he would just need to sign one file if you just signed everything with the same signature the user will use to sign his modified app.

Hopefully it's more clear now...

But what would be better was someone that knows better than me to come in here and chime in... Anyway, I'll test it out with my Hero ROM and let you know later. I'll also dig a little deeper into Villain and MoDaCo ROMs and try to figure it out what they did and report back.
[Android] dsixda:
Yeah I understand, I've read about Google files and the shared UID, etc.

Ok, here's what I'll do, tell me what you think:

1) Leave all files unsigned after deodexing

2) Have an option in the menu to "sign all APKs in ROM" (I have just completed this, very easy)

3) Include an option in #2 to just sign a single file.
[Android] rfgamaral:
Yeah, I think that's the best to do, to give the user the option... :)

I'm not sure if #3 is needed, I wouldn't care about it, but it's up to you.
[Android] Yay 4 Juggs:
no no i like number 3 as the sigs would not match one being from the kitchen and one being from say autosign.bat or a manual sign...3 would be perfect to keep the sig uniform guid is very very picky about sigs
[Android] dsixda:
Done anyway! :)
[Android] robocik:
mmm... cant wait for this update ;)

following this thread all time ;)
[Android] dsixda:
Agreed, that would be quite useful. Basically the menu will have the option of ALL APKs or SINGLE APK. If you choose the Single APK, then it will show a list of all the APK files in the working folder -- You just have to select the file number.
[Android] dsixda:
I have learned a LOT in one week! LOL
[Android] Yay 4 Juggs:
perfectamundo!!!

​
[Android] robocik:
i bet you have... i am learning just following this thread ;)
[Android] rfgamaral:
The signatures are the same, it doesn't matter if it was done with the kitchen or autosign.bat.

But hey, I don't have a use for it, if you do, it's fine. I was just giving my opinion :)

I'm going to test what I promised I would right now and post back the results...
[Android] nerdo:
Guys

A2SD not working on Desire...

Tried adding it to a shipped rom, kitchen says it's added but it's not working

after flashing rom!!

Any one who can kindly help with this :confused:
[Android] dsixda:
Read the last two pages. Or three ;)
[Android] t2noob:
I didn't use the kitchen add a2sd to a stock rom I followed these directions

http://xdaforums.com/showpost.php?p=7021331&postcount=4
[Android] nerdo:
c'mon.... did that before posting...... it's all about deodexing!

Yeh I stumbled on that earlier and was a bit reluctant.... but will give it a go

did you try it on Desire? working fine?

cheers
[Android] rfgamaral:
So, I compared both MoDaCo and Villain deodex ROMs and my conclusion is that they didn't sign any of the files inside the /system/app, they just placed the classes.dex inside the APK.

I concluded this by looking up for "classes.dex" inside MANIFEST.MF of each APK for each ROM. If that string was found (along with the "hash" for the file) than it would mean the APK was signed after adding the classes.dex to it.

The "classes.dex" string was only found inside 24 APKs MANIFEST.MF files for both ROMs (more or less, we'll get into that). Those 24 APKs didn't have an odex file in the first place. It's similar to any other app you download from the market, it comes in a single APK, with a classes.dex inside and the corresponding MANIFEST.MF will probably have an "hash" for the classes.dex file.

Now, the only little difference (about this whole deodex thing of course) I found between the 2 ROMs was that the "classes.dex" string inside the MANIFEST.MF file was also found in the Browser.apk, HtcFacebook.apk and Rosie.apk of Villain ROM. I cannot say why as I'm not the dev of that ROM, but my guess is that they changed or hacked those apps or those apps resources (for some reason) and needed to sign the APKs cause that's needed. And when they did that, since the classes.dex was already inside the APK, it was signed along with it.

That presented no problem because it seems that the Browser, HTC Facebook and Rosie do not share an UID with any other app, so they didn't need to resign anything else.

Well, that's my conclusion anyways...

I know I've said that I would just sign everything just in case, but since these 2 popular ROMs are not doing it, maybe I shouldn't do it too. They are more experienced than I am on ROM cooking and for this particular thing, I'm following their footsteps.

As I typed this text, the ROM finished deodexing and flashing and what I can tell you is that it also worked as expected.

So, to conclude this whole deodexing debacle... Either sign everything or don't sign anything at all, talking about the kitchen of course. Either way, signing in to Google services will work. The problem was probably one some APK that wasn't being signed where areas another different APK with a shared UID was. Which is "solved" by signing all of them or none of them.
[Android] dsixda:
I just posted the fix earlier today - three pages back.

http://xdaforums.com/showpost.php?p=7227109&postcount=1196
[Android] dsixda:
That's the summary of the whole day's posts right there :-)

And thanks for confirming it works for you!

I'll post the new kitchen shortly.
[Android] codyppc:
How do I customize my ROM with a name for it?

Something like changing the "Build Number" or something?

I see all the ROMs available for download have this customized, but I for the life of me can't figure it out. This is the last step before I start sharing it.

Thanks, Cody
[Android] rfgamaral:
You do that in the build.prop file...
[Android] dsixda:
I think it's ro.build.display.id in build.prop
[Android] puertoblack2003:
in build.prop under "ro.build.description"
[Android] t2noob:
I Tried it on stock HTC droid Eris 2.1 OTA And it worked like a charm.

If you follow the directions it should work fine.
[Android] dsixda:
No, in the Modaco ROM, I noticed that the Build Number in the "About" screen corresponded to ro.build.display.id in his build.prop.
[Android] dsixda:
By the way, you can now do this in version 0.68, which has been uploaded :-)

Enjoy, guys.
[Android] robocik:
Thanks man, i am testing it rn.
[Android] OMJ:
hey thx dsixda & all for the fix's, been following & waiting for the deodexing fix.....apps2sd is a nice bonus!

yay 4 juggs or anyone else....can u confirm apps2sd is now working?

thx

*time to test myself :)
[Android] BesFen:
HI dsixda,

i tried your 0.68 kitchen, but it can't run. it said: "bash: ./menu: Permission denied"

, I don't have this notification in your previous kitchen.

Do you any idea??
[Android] dsixda:
Yes, read the FAQ. --- use chmod
[Android] BesFen:
app2sd didn't run on Legend.
[Android] dsixda:
But you just said you can't run 0.68??
[Android] BesFen:
I mean on your previous version, :D:D.

Thanks.
[Android] Yay 4 Juggs:
i cannot confirm that it is working...yet...users are getting this as they test with darktremor apps2sd

C:\Users\gdesir>adb shell

# a2sd check

a2sd check

--- Checking ext filesystems

e2fsck: not found

cp: cannot stat '/data/app-private/*': No such file or directory

+++ Apps-to-SD successfully enabled

a2sd check

a2sd check

# --- Checking ext filesystems

e2fsck: not found

mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: Device or resource bu

sy

+++ Apps-to-SD successfully enabled

# a2sd check

a2sd check

--- Checking ext filesystems

e2fsck: not found

mount: mounting /dev/block/mmcblk0p2 on /system/sd failed: Device or resource bu

sy

+++ Apps-to-SD successfully enabled

#

Looking in the scripts i see nothing about e2fsck and nothing in the apps2sd script to even trigger it. perhaps thats the problem?
[Android] Yay 4 Juggs:
below is the info provided about the kitchen recognizing the ap2sd being present...

Working folder information

-------------------------------------

Android OS version : 2.1-update1

Build Number : FrEak E Evo v2.1

Rooted (unsecured boot.img) : YES

Rooted (Superuser.apk + su) : YES

BusyBox installed : YES

Apps2SD enabled : YES

Wireless tethering installed : YES

/data/app enabled : YES

Custom boot animation allowed : NO

Nano text editor installed : NO

Bash shell support : NO

/system/framework is deodexed : YES

/system/app is deodexed : YES

radio.img found : NO

ROM will wipe all data : NO

Press Enter to continue
[Android] dsixda:
I'm using the classic method of apps2sd ... did they use an ext3 filesystem?
[Android] Yay 4 Juggs:
yes as it was recommended in the tut i believe...
[Android] dsixda:
That output is a mess... is that one command or a bunch of commands?
[Android] Yay 4 Juggs:
I honestly couldnt tell you...i couldnt ever get it to work on any of my cards as they are all cl2 cards...orded a cl6 last night from amazon...will have it tuesday
[Android] Yay 4 Juggs:
ok looking back on it its a series of commands used to test the script...usually if all goes well it stops after finding the ext3 and reports...user kept repeating process
[Android] dsixda:
Probably means he didn't partition his card for ext3 properly
[Android] Yay 4 Juggs:
i thought that too when i walked a user through partitioning...seems it partitions proper but the call in the dark script is to change from 2 to 3 so it only looks for 3...

if you have not setup your sd card (for those new to a2sd):

A. backup your sd card to your computer. can't stress this enough, as partitioning will wipe the entire card.

B. Reboot into recovery

c. In android system recovery, select partition sdcard

d. In the partition sdcard menu, select partition sd

e. Follow the instructions on the phone to partition your sd card. You can optionally set a swap file while you are partitioning your sd card.

F. In the partition sdcard menu, select sd:ext2 to ext3. Follow the instructions on the screen.

G. only perform this step if you want ext4 and your rom supports it: in the partition sdcard menu, select sd:ext3 to ext4. Follow the instructions on the sdcard.

h. Press the back button on the phone to go back to the main menu.

I. Put the a2sd file on the sd card (and all your other files you backed up earlier) by selecting usb-ms toggle and transfer the files to your computer.
[Android] BesFen:
Is it picture mean app2sd work well??

I add "e2fsck" file in bin directory

Here is the file: http://www.4shared.com/file/QQFv3c-O/e2fsck.html

I try to deodex framework, and my legend get boot loop, never get in.
[Android] dsixda:
I have no idea, I never use apps2sd myself so I have never tried it. Although other users have had success with the one in the kitchen, it may be better to revise the kitchen so that it uses the method mentioned yesterday.
[Android] Yay 4 Juggs:
if you can launch and run those apps then yes it is correct...can you post the the file please?
[Android] BesFen:
here it is: http://www.4shared.com/file/QQFv3c-O/e2fsck.html

I try to deodex framework, and my legend get boot loop, never get in.
[Android] Yay 4 Juggs:
thanks you put this in the bin of your working forlder/system/bin? then rebuilt rom?
[Android] Yay 4 Juggs:
deodex none or all...cant deodex framework without doing apps too
[Android] BesFen:
Yes like that.
[Android] Yay 4 Juggs:
thanks!!! would be so much easier if i knew how to just make this into a patch...
[Android] BesFen:
I port modaco legend ROM just want to know it, and it only deodex framework only, the ROM is work well.
[Android] magic55:
I have problem with update. Show me error, then abort.

system/etc/bluez set_perm .........

kitchen 0.68, new korean rom FRF91, Nexus One.

BTW. Where change default lang ?
[Android] robocik:
Hi ;)

I tested to deodex couple of roms i am working on now...

I have HTC Hero.

First rom i was deodexing was my rom based on original WWE EU ruu, deodexing went without problems, rom boots and is working as the odexed one :) nice.

Second rom is a Legend rom i am porting to Hero, it is based on newest Legend ruu, it is deodexing without any problems, rom is working as the odexed one ;) nice too :)

Third rom is a Slide rom i am porting to hero, deodexing went with some problems with profilemanager.apk, deodexing ended with one file not deodexed, Faves.apk was left... rom was not booting with the odexed faves but booted fine without Faves.apk in it... had no time to test everything but i saw missing Swype even that it was deodexed.

that was some quick tests... gonna test some more later.

As i see people have problems with Apps2sd, i am always enabeling it in your kitchen, adding a2sd support and then i use Apps2sd by Darktremor copying all needed files, which are in his zip file, to my rom and everything works great. has tested it in all my roms and ports.
[Android] BesFen:
darktremot have e2fsck.

did you edit init.rc and repalce a2sd?
[Android] robocik:
I dont change any thing in boot.img, what kitchen does is enough.

Then i am copying all files which are in Darks Apps2sd package.

I am also updating my update.script with some setperm, look in the update.script found in apps2sd package... but i dont know if it is needed ;)
[Android] BesFen:
I just copy e2fsck into bin folder :D:D:D
[Android] zach.xtr:
HTC Eris ROM and ALL apk signing

Question for those odexing and resigning the apks in their ROMs...

[EDIT] already answered sorry...
[Android] t2noob:
I already have a working OTA eris rom I'm just running it this weekend to make sure nothing fishy goes on after i deodexed.

On monday (tomorrow) I'll be releasing PlainJaneT2 V2.0
[Android] dsixda:
Most of the discussion the last three or four days was about that ;) The reason is that there were some APKs in the app folder that did not have any ODEX files, and I missed signing those. That fixes the issue.

But in the end I decided not to sign anything -- that even worked. You can either sign all or none.
[Android] dsixda:
Can you send me a link to that ROM please?
[Android] dsixda:
Don't worry about the errors in profilemanager.apk, because it seems the script managed to fix it on its own. By the way, which jar file worked with it?

Can you provide the error message on your screen when deodexing Faves.apk?

Also, is that apps2sd link required for the feature to work with my kitchen, or are my kitchen files enough? Thanks
[Android] robocik:
I am deodexing it again right now, when it is done i send you the report.

I have not tested your new apps2sd, the old one didnt worked. I am gonna test it for you later ;)
[Android] dsixda:
Thanks, please let us know :) Yeah, the problem before was that the script was unsuccessful in changing the init.rc file, but it should be able to do that now.
[Android] sabianadmin:
May i suggest adding png optimization, APK manager will give you the scripts necessary. http://xdaforums.com/showthread.php?t=695701
[Android] dsixda:
hehe I knew someone was going to mention PNG optimization soon ;) I can't do that because it will need to work across Mac OS / Cygwin / Linux and 32-bit and 64-bit variants, and that's not possible without a source code that is easily compilable through the kitchen (just like mkbootimg/mkbootfs/unyaffs were). This one requires a Makefile which is kind of complicated to make work for all three platforms. I haven't worked with Makefiles in years, so I'm not going to try it on my own ;-)
[Android] rfgamaral:
I thought the Kitchen was Linux only since the whole thing is written in Bash?
[Android] dsixda:
Linux only? Have you seen the title? ;-)

I'm talking abou the binary for the PNG Optimizer - it has to be compiled for different platforms. The script themselves are universal so we don't need to worry about them.
[Android] rfgamaral:
You need Cygwin for Windows though :P

You could always use different PNG optimizers for different OSs...
[Android] dsixda:
A binary for Linux won't work for Mac and neither will it work on Windows/Cygwin. Plus as we saw in the first posts of this thread, the 32-bit processors usually won't work with 64-bit binaries and vice versa. You'd need to compile the source code from your own computer to ensure it works.

And then... having different optimizers for different OSs.. haha.. too many combinations .. forget it :-P

Pay me a salary and then I'll reconsider :D
[Android] rfgamaral:
I'm not the one who requested to implement that feature, I was just suggesting an alternative to the problem :P
[Android] dsixda:
I know :D But after all that de-odexing B.S., I'm going to step away from stuff like that for now LOL
[Android] zach.xtr:
Only read back two pages worth so my apologies on a dup question :o great kitchen updates as always!

One item that may be worth mentioning that I did not see on resigning is that if a market available app is resigned it will no longer be updateable from the market... a good example would be facebook or maps...

Hope this helps!
[Android] robocik:
ok first here is the whole deodexing log of my slide rom.

and second... hehe i have not tested the apps2sd yet. it is 2.45 am here, so i dont know if i am gonna do it today ;) but... never knows hehe
[Android] robocik:
Bug with updater-script

i discovered a major bug, if a rom dont have a update-script but a updater-script and a update-binary, the kitchen is not upacking it but creating an empty update-script !

:/

i tested 0.66 and it has the same bug.

0.18 unpacks it ok ;) i still have such old clean kitchen :)
[Android] dsixda:
Oh I guess I forgot to handle that case. I do delete those two files you mentioned but I assumed that an update-script was also there in the ROM (eg. on Nexus One)! I will take care of that later. Sorry.
[Android] dsixda:
Thanks! Looks like Faves.odex, FavesWidget.odex and ProfileManager.odex all relied on TMobile classes.. Only Faves bombed out, as the script managed to figure the other two out automatically.

Can u send me a link to that ROM? Maybe I can try to fix it.
[Android] dsixda:
The kitchen doesn't sign the files during deodexing, but that's good to know, thanks :-)
[Android] robocik:
You cant recive PM's and i dont wanna send the link here ;)

Bed time now man, it is 4.23 am here.4

ttyl
[Android] dsixda:
You can add me as a friend then send me a PM, or send me a direct message through Twitter :-) No problem, I'll send you one...

Sorry, I had to stop the PMs because it was getting annoying after a while, because all my PMs were from ppl who expected me to spoonfeed them information and apps, even stuff that had nothing to do with my ROMs. Hey there's nothing wrong with asking me for info, but almost always it was trivial stuff found in a FAQ. Imagine getting this 5-10 times a day for almost 2 years.. LOL :-)
[Android] magic55:
http://www.xda-developers.com/forum/showthread.php?t=722281

I have removed bluez from update script, and changed KR lang to GB ( en ) in build.prop. Bluez exists in this rom as plugin.
[Android] dsixda:
No problem, I have solved the problem with a Nexus One ROM of my own. There was an error in the script. Thanks anyway :)
[Android] BesFen:
:D:D:D You are very busy person....:D:D
[Android] magic55:
Great !!! Thank you so much :D
[Android] dsixda:
Ok guys, I've added another update just now. I've fixed some of the issues reported from the last release. Please read the release notes for all the details.

Going to bed finally.. bye.
[Android] magic55:
0.69 works great with korean rom for N1, no errors :)
[Android] robocik:
Hi,

the new kitchen managed to deodex the slide rom successfully :) faves and swype are working...

Gonna take a clean ruu now and test the new apps2sd.
[Android] dsixda:
Does the apps2sd in the kitchen work for you (since 0.68)?
[Android] robocik:
success!!

Used 0.69 kitchen

Ok, just finished some tests ;)

i took a clean HERO ruu, took out boot.img and system.img, putted it in your kitchen and successfully rooted, deodexed, added data/app functionality and added apps2sd :)

so everything seems to work :) NICE!
[Android] dsixda:
Awesome! :-) Thanks for testing this.

BTW, for the Hero RUU, you can just put the rom.zip in the orginal_update folder, you don't need to pull out boot.img/system.img from it. The kitchen will remove the unnecessary files like recovery.img.
[Android] robocik:
wow, didnt know that...

i am using "OpenRUU-Xtract-beta2" for linux to get the zip out of the ruu.exe

is it possible to somehow implement it to the kitchen ?
[Android] dsixda:
Oh, that's a cool idea. But it basically makes you install and run the Windows emulator "Wine" and then launch the EXE from there. Probably not what I am looking for, and it will also add more complexity to the installation instructions for the kitchen.

EDIT: I could include the Wine source code in the kitchen, so that it gets compiled for your OS/platform automatically when the kitchen needs it, but, the source code is > 16MB... so forget that :D

I'm looking more for a shell script or Linux binary that can crack the EXE and extract the rom.zip out of it.