yashsingh1/xdaforums huggingface dataset:
[Android] kiljacken:
It'll revert to the normal bootanimation
[Android] dsixda:
Ok, I can't do this, because I need to build it in Ubuntu, and I have Java 6 (which is required for the kitchen). The source code requires Java 5. I did downgrade the java version, but it messed up some other stuff so I couldn't build smali.jar :-(

Anyone able to build it?

http://code.google.com/p/smali/wiki/BuildProcedure
[Android] BlaY0:
You can have multiple versions of JRE/JDK installed and switch with alternatives.
[Android] dsixda:
I know, I've set JAVA_HOME to switch versions before when playing with the AOSP code, but this time it broke "mvn" functionality, I can't run it or install it anymore.
[Android] dsixda:
Actually, it looks like Java 5 is supported in the kitchen, because the new signing tools for building a ROM and also for de-odexing work fine with JDK 5 (at least in Cygwin)...

When we used to use testsign.jar, that required JDK 6, but now with SignApk.jar, it looks like we can use JDK 5 or 6.
[Android] dsixda:
Ok guys, I managed to get the ROM to deodex properly.. Although, on my Nexus One ROM it is now looping at the animated boot screen (it was stuck at the first boot screen until today's fix). I think it may just be my problem with wiping. Anyways I hope it works for you guys now in version 0.65.

Also, I am uploading from a computer that doesn't have Ubuntu Linux, so the permissions on the "menu" file may not be set. So if you can't run it with "./menu", then do a "chmod +x menu" first.

Enjoy...
[Android] rfgamaral:
If you got stuck on a boot loop than I'm afraid it will be the same for the rest of us still having problems with that...

I'll give it a spin and report back though...
[Android] dsixda:
Thanks for trying it, I've seen this issue before on custom ROMs, I don't know why some users get that problem but others don't. I'll post the logcat perhaps later when I get home. It has to do with KeyLock or something like that, under framework-tests.jar.
[Android] rfgamaral:
I'm currently deodexing /system/app (only that for now) and see how it goes...

By the way, I don't know how do you detect what's "installed" and what not (on the info about the ROM) but I prefer to have nano and bash installed on /system/xbin instead of /system/bin and both are detected as "not installed" but they are actually installed and working just fine.
[Android] dsixda:
I was only looking under bin folder. I will fix that for you next time, sorry.
[Android] rfgamaral:
No worries, it was just a suggestion to check both folders. Better yet, maybe provide the option to install them either to one of those folders ;)
[Android] dsixda:
No, then it will start getting complicated for normal users and they will start asking questions.
[Android] Yay 4 Juggs:
so i decided to give this a go...got everything set up nice...updated the kitchen to .65 built the rom...flashed the rom...stuck in bootloop...cannot figure out what went wrong or how to even begin to fix it...ugh!

http://pastebin.com/wrLX9Q5j
[Android] dsixda:
adb logcat --- See the FAQ.

Mention all the steps you did. Be very specific.
[Android] Yay 4 Juggs:
logcat...using the rooted rom put up by calkulin(odex version) i put that into the original_update folder and started creating the working folder...once that was done i went on to allow for install from data so i can add the apps people want most while leaving out the crap...once those apps were set i then added boot animation ability. that set up the data local folder...from there i replaced the rosie with my modified/themed version along with frameworkres and htcresource in framework folder with my own modified versions. zipaligned...deodexed...built...flashed...bootloop
[Android] dsixda:
Deodexing is the reason ;)

I have a potential fix for that. Sorry about that.
[Android] Yay 4 Juggs:
ok so what do i do now? i cant reodex...
[Android] dsixda:
Did you follow the instructions in the first deodex screen? Restore the backup of your framework and app folder if u made one.
[Android] Yay 4 Juggs:
everything was backed up
[Android] dsixda:
Actually, keep those files in your kitchen the way they are. If you wait a couple of hours I will send u a patch that will sign two more files in your framework folder. Ok?
[Android] Yay 4 Juggs:
ok sounds good to me
[Android] rfgamaral:
I had a few problems so it took a little bit longer...

Anyway, it still didn't work, I still got a boot loop after deodexing only /system/app.

Here's a logcat with a couple of loops on it, I can't really understand what's going on...

http://pastebin.com/gtL4WGmk
[Android] dsixda:
Signature issue.. I finally got my N1 ROM booted.. this is what I did --

Can you sign framework-res.apk:

1) Go to WORKING_*/system/framework

2) From the kitchen's tools folder, copy signapk_files/* to system/framework

3) Then do this

mv framework-res.apk framework-res.zip
java -jar signapk.jar testkey.x509.pem testkey.pk8 framework-res.zip framework-res.apk
rm -f framework-res.zip

4) Then remove these files

rm -f testkey.*
rm -f signapk.jar

This worked for me, just that one file. If you still get a boot loop, then start all over and do both folders with the attachment enclosed (put it in scripts folder).
[Android] Yay 4 Juggs:
just got mine to boot...everything works so far...however the screen lag and touch response are dreadful since flashing...is there a way to improve that?
[Android] dsixda:
Maybe you shouldn't zipalign. Also do a wipe before flashing them ROM... because after deodexing your ROM a bunch of references to your apps change.

BTW did you sign framework-res.apk?
[Android] Yay 4 Juggs:
i started over with a new working folder with no deodexing did zipalign however...looks like im going to have to start over again...
[Android] Yay 4 Juggs:
started all over again now it wont boot...
[Android] rfgamaral:
It finally booted but it's still not working properly...

Now I have force closes at startup in com.htc.android.htcime (Touch Input). I tried 2 versions, one zip aligned and the other not zip aligned. Both produce the force closes...

This is problematic because that process is responsible for the keyboard, which is not working...

By the way, why shouldn't we zipalign? The Android docs recommend it but your suggestion not to... Why?
[Android] dsixda:
Oh I never said you shouldn't, but some people say it doesn't work for them. Others swear by it.
[Android] t2noob:
Well I was able to get a fully deodex rom that actually booted up but now I'm noticing some problems.

Looks like some apps can't get the location of my phone ie the HTC clock Widget that shows you the weather.

And everytime I try to type something i get this FC

"SORRY The application Touch Input (process com.htc.android.htime) has Stopped unexpectedly. Please Try again."

I'm going to post the catlog of the boot in case something can be seen there, and a logcat of me going to txt app and trying to compose a msg and getting a fc. I hopes this helps fix the problem if it can. Hope this helps.

Boot.txt -the boot process

KBFC.txt -me getting a FC on the Keyboard.
[Android] Yay 4 Juggs:
Just want to chime in installed updated kitchen files...built rom worked great after i signed the rom using another method...not sure if this is an issue or not but would not flash till it was signed outside the kitchen...rom is exactly how i wanted it!!! thank you for your hard work putting this together!!!
[Android] dsixda:
How did you sign it? testsign.jar?
[Android] rfgamaral:
That's basically the same problems I'm having...

I believe that (as I've read around here) the problem lies on .apk file compression.

The best way to try this is to not recreate the .apk file, instead, just

add

the classes.dex file to the .apk without extracting/archiving the whole file.
[Android] rfgamaral:
Like I said before, I tried both... One with zipalign, the other without, both produced force closes.

Can you please create a patch with what I said above? Just add classes.dex to the .apk file without extracting and re-archiving the contents.
[Android] Yay 4 Juggs:
yes...using a created autosign.bat
[Android] dsixda:
Ok I forgot about your previous statement, haven't had much sleep over this so I can't think ;)

I can't do that now because I am at work, please tell me how it's done.. I don't have the time anymore to investigate these things on my own ;)

BTW you will still need to sign the APK if you change it, i guess the only thing that would be different is not using compression.
[Android] Yay 4 Juggs:
ok one more question i swear...can you make it so non stock roms can be used for adding data/apps please that was causing half of my trouble last night...
[Android] rfgamaral:
Yes, but I believe the way that signapk.jar works is different, it probably doesn't extract everything and re-archive again, but that's just a guess...

It's worth the try though...

Basically, you're doing this in the

do_deodex_file

script:

mkdir work
mv $main_file work
mv classes.dex work
cd work

echo "Unzipping $main_file ..."
unzip -q $main_file
rm -f $main_file

zip_file=$no_ext.zip
echo "Zipping $zip_file with classes.dex ..."
zip -r -q $zip_file *

mv $zip_file ..
cd ..
rm -rf work

You're creating a work folder, placing the needed files instead that work folder, extracting the contents there and re-archive everything back into another file.

You just need to archive classes.dex into the zip file, a command like this should suffice:

zip -r -q $zip_file classes.dex

I'm not doing it myself because you know your script better than me and I'm not yet very comfortable with bash scripting. And the code needs to be cleaned cause the work folder is no longer need and I don't want to mess things up.

As conclusion, you're creating a work folder and recreating the zip with the contents of that folder. Ignore that, clean the code and put the classes.dex inside the zip file with the command above.

I'll wait for the patch until you get off of work (or until you have time) if I have to. I don't want to mess the script up by trying to do the change myself :P
[Android] dsixda:
Wow, thanks - I never knew you could add to a zip file like that. I'll try it out later.

And no I wasn't telling you to write a script ;-)
[Android] dsixda:
I don't understand you question, please rephrase.
[Android] Yay 4 Juggs:
ok i want to be able to install apps from the data/app folder so they can be easily removed...however the kitchen doesnt allow for that unless you're original update is stock...i would like to be able to do it with custom roms too...
[Android] dsixda:
I still don't understand. Install apps in the kitchen or on your phone?
[Android] Yay 4 Juggs:
I want to be able to create the data/app folder...using the kitchen so that when my rom is flashed it will install certain apps that can easily be uninstalled by the user...say for instance me personally i do not use the facebook...twitter...friendstream apps so i would not want to include them in my personal rom...however others may want them so i would just add them via data/app so that i can just uninstall them...
[Android] dsixda:
Yeah so then use the menu option to enable /data/app functionality... then copy your apps under that folder.
[Android] Yay 4 Juggs:
cant...errors out when flashing as it's not supported using non stock rom
[Android] dsixda:
Ok.. so what's the error, you need to be specific.
[Android] Yay 4 Juggs:
error regarding data/local line 393? something like that
[Android] nickiberli:
I still have the boot problem.

These two files couldn't being deodexed:

Maps.odex (/system/app)

core.odex (/system/framework)

This is the logcat file:

http://ul.to/rcdjuq

I hope you can help me :)
[Android] dsixda:
Can you use pastebin.com because I am behind a firewall at work.
[Android] dsixda:
I don't know. data/local has nothing to do with data/app.
[Android] Yay 4 Juggs:
Im sorry i can remeber the exact error i have it written down at home so when i get back ill post it for you...i believe it was when i tried adding custom bootani via the kitchen. that's that the local folder was created for in data
[Android] dsixda:
Oh I know what you mean -- yes, I just realized there is a problem with the script. The person who suggested the /data/local thing forgot to mention the other lines that are necessary in the update-script:

delete DATA:local
copy_dir PACKAGE:data DATA:

Put these somewhere in your update-script before the line with the DATA:local entry.

Thanks
[Android] nickiberli:
Other uploaders:

http://www.multiupload.com/KZK3ARXOB9

http://rapidshare.com/files/407143652/logcat.txt

http://www.megaupload.com/?d=BEUBFOX8

http://depositfiles.com/de/files/il94fkv53

http://hotfile.com/dl/55037176/a1a25d0/logcat.txt.html

http://www.zshare.net/download/783579399eec13c6/

http://uploading.com/files/94e39mb3/logcat.txt/

http://www.sharingmatrix.com/file/13003729/logcat.txt

I hope one of these sites isn't blocked ;)
[Android] dsixda:
None of them work - please paste to pastebin.com.

Also, I am really busy at work, I can't keep up. You guys can bug me in 5 hours.
[Android] nickiberli:
okay, here's the link:

http://pastebin.com/E6Eymxp8

I'm sleeping in 5 hours ;)
[Android] rfgamaral:
I was finally able to completely boot and without any force closes (at least so far).

I ended up messing around with the do_deodex_file script and managed to do what I suggested before. To recapitulate, the idea is to "move" the classes.dex file into the existent .apk/.jar file without extracting and re-archiving the whole thing.

I tried to flash two versions, one with and one without zipalign. They both seem to be working okay without any force closes. But I'm not really using this ROM for what's it worth, I'm just playing chef for the time being.

I've attached the file I used. You need to remove .txt extension of course. By the way, I didn't remove anything, just commented the unnecessary lines and modified/added what was necessary. Just so you can easily see the changes I did.
[Android] t2noob:
I tried a non zipaligned version of the rom deodexed it and Im still getting the FC on the Keyboard any more ideas?
[Android] rfgamaral:
I just explained the potential problem above your post...
[Android] t2noob:
Ahh thanks I'll give it a try

will post back results

Edit: I don't get Fc anymore but the htc widget still isn't able to get the weather. If i go into Maps I can't see my location unless i turn on the gps, where before i was able to see an approximate location, now i can't even see that.

Could this be part of the problem

E/PackageManager( 228): Package com.google.android.location has no signatures that match those in shared user android.uid.system; ignoring!

Also something about location setting here

http://pastebin.com/uDCxDBKq
[Android] dsixda:
We already talked about the Maps.apk issue, remember? ;) DON'T include the Maps.apk + Maps.odex if everything else has been de-odexed... you'll mess up the ROM like above.

I asked JesusFreke to do me the favour of uploading the smali.jar that has the fix. I am unable to build it on my crappy install of Ubuntu.

Good work, thanks a lot.
[Android] dsixda:
That looks like a signature issue.

Ok, so you didn't de-odex anything, right? Did you happen to sign framework-res.apk by mistake? You might have messed up the signatures. If you de-odex everything, then you must sign framework-res.apk (it's already done in the script). Otherwise, don't sign it.
[Android] t2noob:
only thing i did was do the deodex with the option b and then chose the build a rom option 99 and i got that error.
[Android] rfgamaral:
Just so you guys know, the deodexing is still not completely fixed...

For some reason, I can't login to Google services so there's basically no Google integration (no contacts sync and stuff like that) :(

At least it boots and doesn't force close, only one (hopefully) problem to solve... It seems to has something to do with signatures but I can't understand why

Read after this:

http://xdaforums.com/showthread.php?p=7201934#post7201934
[Android] puertoblack2003:
confirming that the deodeing for the evo rom, has now been deodex... no force close issue at all during boot up unlike other method this bootup is alot quicker.

nice job buddy
[Android] rfgamaral:
Please confirm that you can login to your Google account and sync contacts, login to Market, etc...
[Android] dsixda:
I can login into Google services like market, gmail, calendar and contacts with my Nexus One, even before your compression fix.
[Android] puertoblack2003:
I see what he's talking about i'm getting that touch input process com.htc.android.htcime force close... wow and i thought it was cool ahahah but you getting close tho ;)
[Android] dsixda:
I wonder if this has something to do with com.htc.resources.apk under the framework folder. This APK is found on the Desire ROM but not on the Nexus One. Nexus One behaves fine. This file has an ODEX, so it was deodexed, and the APK was signed in the end too.
[Android] dsixda:
Did you apply the compression fix that Nazgulled uploaded today?
[Android] puertoblack2003:
ok in a few im going to redo it again but taking put the com.htc.source.apk and resource out of framework and put it in app folder..i'll let you know either tonight or tomorrow i need a nap...lol
[Android] puertoblack2003:
no because the issue he's facing is like mines but with out the fix
[Android] puertoblack2003:
ok thanks to nazgull for supplying us with a fix everything appears to be 98% now there seem to be an issue trying to log on to google "can't establish reliable data" thats the error
[Android] dsixda:
Ok I have uploaded version 0.67 which has all the updates for the deodexing stuff we have already discussed so far, so that everybody is up to date.

Also, now a backup folder will be made for the folder that you are deodexing. I really needed that feature for myself ;)

There are a couple other fixes I had to make in this version as well, that are not deodexing-related.
[Android] dsixda:
Damn, you guys are like wolves! 4 downloads within the first minute LOL
[Android] dsixda:
BTW, for those with the Sense ROM issues, I did use these dependencies with the following ODEX files, because otherwise they would generate an error during the deodexing:

if [ "$odex_file" == "HtcFootprints.odex" ] || \
[ "$odex_file" == "HtcLocationPicker.odex" ] || \
[ "$odex_file" == "Weather.odex" ]
then
classfile=com.google.android.maps.jar

elif [ "$odex_file" == "GmailProvider.odex" ] || \
[ "$odex_file" == "gtalkservice.odex" ] || \
[ "$odex_file" == "Talk.odex" ] ||
[ "$odex_file" == "Vending.odex" ]
then
classfile=com.google.android.gtalkservice.jar

I don't know if this helps with the problem-solving..
[Android] puertoblack2003:
that may be the issue because all of the above is not working on my end
[Android] dsixda:
I was trying out a Desire ROM, it had issues with deodexing if I left those conditions out.

Try to remove those lines and try again. If they generate errors then don't worry, because the script will try to find the required class on its own (by testing each file in the framework folder until it finds a match).
[Android] puertoblack2003:
taking out the "if" statement wouldnt that cause errors anyways?
[Android] dsixda:
It was actually an "else if" statement in the script but I turned it into an "if" when I put it into the post, so that it made sense ;)

Ok, before I go to bed, I will try one more thing. I just talked to Calkulin, and he's done a few deodexed ROMs on his own. He gave me a tip.

If my Sense ROM (the Desire one) deodexes fine without errors, then I will upload the script files for any of you guys to try out. I don't have a Desire for flashing though (pardon the dirty pun)!
[Android] dsixda:
Ok guys, this willl probably work..

Unzip the files in the attachment below into the 'scripts' folder.

These are the changes I made:

1) While disassembling with "baksmali", I added the "-c" parameter which is followed by the entire BOOTCLASSPATH list of files (in addition to the existing "-d" parameter)

2) Removed the conditions for services.odex and android.policy.odex in do_deodex_file. The BOOTCLASSPATH in Step 1 already has their dependency file in it.

Let me know if your Sense ROM can now login into Google services if you deodex everything from the beginning.
[Android] rfgamaral:
Just tried the new version with that latest patch and still doesn't work. I still can't login to Google servers :(
[Android] dsixda:
Can you do a logcat while trying to log in?
[Android] dsixda:
You can also edit do_deodex_file and take out the references to GmailProvider etc. near the top. See if it deodexes without complaints.
[Android] Yay 4 Juggs:
After flashing i had no problems logging in to google services...and that was using build .66...just wanted to give you a heads up on it...

Is there any way of incorporating a custom bootsplash into the kitchen for devs to use their own as opposed to the stock bootsplash? I know users can add their own after they flash but would be nice if we can add something nice to compliment the rom in another way.
[Android] dsixda:
You mean QVGA, HVGA and WVGA-compatible splash screens?? I'm not putting any themes in my kitchen, that's too much extra work. I just want to walk away from this once the de-odex is fixed.

BTW you are welcome to write your own plugin scripts.
[Android] Yay 4 Juggs:
fair enough...can you then tell me how to add one myself?
[Android] dsixda:
LOL you're asking the wrong person. :) I just write scripts, I never play with themes and crap.
[Android] dsixda:
BTW, based on some reading and searching around this forum, it appears to me that com.htc.resources.apk is the reason for the Google syncing/login problems. This is an APK found under the /framework folder and also has its own ODEX. In my script it gets deodexed when the framework folder is selected, not when the app folder is selected.

So somehow we need to fix this file. If someone can post a logcat of the reboot as well as when you try to sync something unsuccessfully, that would be great. Just cut and paste it into http://pastebin.com.

I can't do anything because I have a Nexus One and it works fine because it doesn't have Sense! (Although, Yay 4 Juggs above has said that it works on his Evo, which has Sense.)
[Android] rfgamaral:
I'm not sure what you mean...

Is the script signing every single .apk both in "app" and "framework" folders? Or skipping some?
[Android] dsixda:
Some of the .ODEX files refer to .JAR files that are not included as part of the BOOTCLASSPATH list, so you have to specify those JARs when you run baksmali.

All APKs get signed in the app folder, and the framework-res.apk in the framework.

EDIT: Actually, do you have any APK files in the "app" folder that didn't have ODEX files??
[Android] dsixda:
That looks like the part causing the problems. Can you check to see if your com.htc.framework.jar has the classes.dex file inside it after deodexing? Just open it like any ZIP file.
[Android] puertoblack2003:
there's no odex file at all
[Android] dsixda:
No I mean classes.dex.
[Android] rfgamaral:
And what are you suggesting exactly?

What about the com.htc.resources.apk in the framework folder?

I'm just trying to make any sense here... But I'm failing lol...
[Android] puertoblack2003:
here is the file attached just remove .rar
[Android] dsixda:
Go to the script file I mentioned and you will know what I am talking about. e.g. If the current odex file is GmailProvider.odex, then classfile=com.htc.framework or whatever.

That file, which is found under the framework folder, already had an ODEX, so it would be deodexed and signed IF you selected the framework folder.

For the app folder, if you deodex and sign all the APKs there, then you must sign the framework/framework-res.apk file. The script handles that automatically.

You can deodex the app folder but you don't have to do the framework folder, but I don't see why someone would do that, unless for debugging. However, if you do the framework you must do the app folder as well, because of the app folder's dependencies on framework.
[Android] dsixda:
Ok, so it has classes.dex.
[Android] rfgamaral:
Yes, I see the code you are talking about... But I'm still not sure what you are asking me to do... I'm just too confused right now. Sorry.

Just tell me exactly what you want me to do to test it out...