yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Themes and Apps] MCOGW:
Thx for porting this :)

It's really fast and it saves Win-Users from using a VM for converting those img-files. But maybe you should simply catch this (...) [args] "thing".

Nobody (but Chuck Norris) likes AIOOB-Exceptions ;)
[Galaxy S II Themes and Apps] sicopat:
+1 -- Realy quicker than the original tool i gave first.
[Galaxy S II Themes and Apps] sicopat:
I asked the question there : ...showthread.php?p=15152354#post15152354

Waiting for reals answers ...
[Galaxy S II Themes and Apps] saturn_de:
This looks suspicious :)

W/libdbus (17022): Failed to start message bus: Failed to open "/etc/dbus.conf": Permission denied
[Galaxy S II Themes and Apps] Mackzen:
thanks, I have checked this file and its permission and I couldn't find anything strange about it.
[Galaxy S II Themes and Apps] BuHaneenHHHH:
i am having trouble with deodexing email and mobileprint apks

always giving errors and not transfering the apk to the deodexed app folder

i am trying to deodex i9100JPKF3

any ideas
[Galaxy S II Themes and Apps] alesscam:
I have tryed also with dsixda kitchen but same problem with Mobile print.apk and MMS.apk
[Galaxy S II Themes and Apps] ransagy:
MMS worked for me, Email and MobilePrint work for no one, apparently.
[Galaxy S II Themes and Apps] mostyle:
There HAS to be a method since there's an abundance of deodexed roms floating around.. I too have tried 3 or 4 different methods to no avail..
[Galaxy S II Themes and Apps] Mackzen:
How is the interest for an stock deodexed rom? Maybe is good for people who just want a new theme via CMW?
[Galaxy S II Themes and Apps] sicopat:
Edit 06/30/2011 : How to manually deodex Email.apk and MobilePrint.apk

Thanks to pulser_g2

Solution in first post.

Still errors when deodexing BUT apk fully working :)
[Galaxy S II Themes and Apps] ransagy:
That's odd, That's pretty much what i did for Email/MobilePrint already (-I tells it to generate output while ignoring errors) and mine didn't work, they FC on launch.

Maybe i did something wrong.
[Galaxy S II Themes and Apps] sicopat:
I was able to configure my Email.apk, to check my emails and whrite / receive one.

did you sign / zipallign it after deodexing (I am shure you have)

Did you delete the cache and datas in Manage your applications ?
[Galaxy S II Themes and Apps] ransagy:
Can't remember. I don't use either anyway, Was just interested in the technical solution. So if everyone else are just using the -I flag.. That settles it for me too ;)
[Galaxy S II Themes and Apps] drphrozen:
now with gui

im not exactly sure what you meant, but i updated the app, so that it prints usage if the wrong number args is given, and now there is an gui included too...

just start the jar without any args, and drop those .img :-) it has an internal queue, so just drop them all at once :)
[Galaxy S II Themes and Apps] BuHaneenHHHH:
thanks it worked with me too

thanks for sharing these tools and infos
[Galaxy S II Themes and Apps] D.O.C:
Thank you.....very, very nice.......is good when people that really knows his stuff share....thanks bro, is things like this that make xda so great.
[Galaxy S II Themes and Apps] sicopat:
WOAW Man, I am going to try it. :) I am not at home now, but this tool seems to be exelent.

I will shure add it in the first post
[Galaxy S II Themes and Apps] Mackzen:
Fix For Deodexed Browser On The SGS2

HowtoHowtoHowto?????
[Galaxy S II Themes and Apps] sicopat:
Perhaps Pulser will release his Mod for other devs ...
[Galaxy S II Themes and Apps] D.O.C:
Dude, your tool works blazing fast and makes things much much easier (noob firendly as myself)....thank you!!!
[Galaxy S II Themes and Apps] MCOGW:
Yes, just handling the ArrayIndexOutOfBounds-Exception was exactly I was talking about :)

Thank you once again!
[Galaxy S II Themes and Apps] antoniomistretta:
sicopat

Ypu're the man! :)

Thank you! ;)
[Galaxy S II Themes and Apps] D.O.C:
Antoniomistreta, where do I know u from?

....hd, hd2, sgtab?....lol, seems after 5 yrs on xda im getting to know almost all of u now...
[Galaxy S II Themes and Apps] sicopat:
Just modified the initial HOW TO including the new drphrozen tool to extract .img

Please don't forget to THANK HIM :)
[Galaxy S II Themes and Apps] MCOGW:
Right now the -I flag only works because the two apks aren't really using/needing them. (if they really DO work 100%, didn't see any unit-tests on these).

Afaik atm Sammy included those java classes for testing purposes only.

But I'm sure this will become default in the upcoming firmwares (2.3.4?).

So in the future we need to dx the missing classes and add the .jar to the BOOTCLASSPATH to get the files fully deodexed (and working)...

I just tested it with these two apps and it works ;)

xeudoxus from -droidforums dot net- just made one of this custom .jar files.

You can get it here. Just copy this over to the framework-directory and add it to the BOOTCLASSPATH while deodexing. This is the only clean method to fully deodex those files...
[Galaxy S II Themes and Apps] dtosun:
When i do deodex, it couldnt finished? What is problem. I m try to do it for XWKF3
[Galaxy S II Themes and Apps] omrij:
Thanks to xeudoxus from droidforums we can deodex without warnings (and without ignore switch)

http://www.droidforums.net/forum/xeudoxus/47283-release-xultimate-47.html

only add 1 line in app-dep.txt

and it works :)
[Galaxy S II Themes and Apps] MCOGW:
:D :D :D :D :D
[Galaxy S II Themes and Apps] ransagy:
Yeah, the apparent missing dependency. Thanks!

I wonder where it came from. Could you ask, Omrij? I'm not registered over there.

Does it satisfy the second requirement as well? (javax.swing.*)
[Galaxy S II Themes and Apps] omrij:
It's also working great with Kit_Deodexage

just add it to the framework directory (maybe replace the link in first post with one who have this jar already)
[Galaxy S II Themes and Apps] sicopat:
Great :)

I will test that and will modify my initial How To make it as simple as possible.
[Galaxy S II Themes and Apps] sunwee:
thanks sicopat for making it noob friendly. some of the more complicated steps really is confusing...haha.

now, any trick left to deodex browser.apk without causing the lag??
[Galaxy S II Themes and Apps] MCOGW:
Just some postings before I already wrote

- why these dependencies are there

and

- who finally provided this custom .jar to us ;)

Or did I missunderstand you?

And yes, it resolves all of the missing class requirements (which are at first sight "Ljava/awt/Component" and "Ljavax/swing/table/AbstractTableModel",

but there following many many others after these two are resolved).

You can simply de-dex the classes.dex file inside of the java.awt.jar to see all of the dependencies those two files really need.
[Galaxy S II Themes and Apps] sicopat:
I saw your post and thanks for sharing with us this custom .jar witch solve all issues we had dedodexing GS2 ROMs :)

Thanks to xeudoxus too who gave us this .jar :D

EDIT : I have modified the _Kit Deodexage including the custom .JAR.

Now, no more errors when deodexing :) :)

Just Tried the Email.apk deodexed : seems to work well (configuration of account, receiving mails, sending one ... OK)

Will modifiate the HOW TO Tomorrow
[Galaxy S II Themes and Apps] ransagy:
Nice. Just wanted to know how that jar was made, that's all. It looks like pulser/someone else went and converted certain java libs to something dalvik can read. Was just interested to know where the JAR came from or how it was made.

But i guess this will have to do for now. Thanks :)
[Galaxy S II Themes and Apps] xeudoxus:
Basically

-Looked up the dependency (See the error when deodexing)

-Put the source file/s in eclipse

-(Rename package to javaa or javaxx)

-Build into .apk

-Dedex .apk

-Rename (javaa and javaxx to java and javax) and only use the .smali it calls for (for most of the files)

-Redex

-Put into classpath and try deodexing again.

-Repeat

It would have been easier to use dx to .dex rt.jar, but I could never get it to work. The java.awt.jar took more then 12+ hours to make (Mainly because I could not find a good source for the java.swing). If a good source for all the dependencies were found, it would have only taken about 1 hour.

-Matt
[Galaxy S II Themes and Apps] smbh9099:
Hello

I've been by your tutorial, step by step operation, but still does not work

Can you help me?
[Galaxy S II Themes and Apps] sicopat:
Edit : I rebuilt the HOW TO trying to make it as simple as possible :)

I put the custom jar from xeudoxus in the _Kit_Doedexage, it's working well

The last fix would be the Laggy deodexed Browser FIX

We know that Pulser_g2 found the way to fix it.

Please Pulser_g2, give us the tips :)
[Galaxy S II Themes and Apps] sicopat:
That's strange.

Did you install JAVA SDK ?

You can try the old way with CMD Promt, look for it in the changelog
[Galaxy S II Themes and Apps] brenopapito:
With this tutorial i can extract the stock firmware?
[Galaxy S II Themes and Apps] sicopat:
That is the purpose :D
[Galaxy S II Themes and Apps] sunwee:
yes, that is final fix...

maybe we have to ask him in villainrom thread?
[Galaxy S II Themes and Apps] ransagy:
Now that's the interesting part i wanted to get at :)

Thanks, Matt!
[Galaxy S II Themes and Apps] sicopat:
already asked. Waiting for answers ;)
[Galaxy S II Themes and Apps] sicopat:
YEAH !

Got the fix from Mr Pulser_g2 himself :D

I tried using the .smali from LitePro Browser FIX injecting them in the stock KF2 Browser.apk.

No Lag anymore :p

I am going to add the How To in first post
[Galaxy S II Themes and Apps] ransagy:
Thank you all for you efforts :)

This is a great way to go ahead and try things for yourselves. Always better to know how to do something rather then wait others to do it (Even if we are somewhat spoon-fed the information here in a way ;))
[Galaxy S II Themes and Apps] xinfinityoO:
awesome.. now something to play around in spare time.. great guide and hard work

Edit

---

@sicopat

I couldn't find the fix for the lagy browser in the guide. Is it automatically incorporated in the steps you provided??

Thanks
[Galaxy S II Themes and Apps] sicopat:
I just finished the modifications of the HOW TO, just see in the last edit of the ChangeLog.

I added the smali files coming from a non bugy browser.apk. These files will have to be pushed in the classes.dex - inside the stock deoodexed browser.apk following my How To.
[Galaxy S II Themes and Apps] BuHaneenHHHH:
thanks for you hard work

i just want to report that i am having some problems with the sgs2converter.jar when converting the img files

i noticed that it gives less files in the app folder sometimes

from the rom i am using it gives me 307 files in app folder using the first converter Convert_sgs2img.exe

however using the new sgs2converter.jar it gives me 306 and the deodexing is not working on them

just wanted you to know to check it out
[Galaxy S II Themes and Apps] sicopat:
Ok, I didnt notice.

I will check that.

Do you have the name of the missing file ?

However, i didn't get any error when deodexing with the 2 sgs2converter.jar provided
[Galaxy S II Themes and Apps] BuHaneenHHHH:
the missing file is Superuser.apk
[Galaxy S II Themes and Apps] mostyle:
SGSConverter is indeed producing different file sizes than the original converter..

When I converted KF2 filesystem.img with the new converter my framework directory was empty.. Went back and used the old converter and all the files were there..
[Galaxy S II Themes and Apps] SamHaLeKe:
I also noticed that it is not only the framework folder but all the folders are empty :eek:

only the system/app folder contains files :eek:

looks like the new convertor need some work :o
[Galaxy S II Themes and Apps] sicopat:
Superuser.apk is already added in the skeleton ROM.

It's an apk for having the ROOT

If you have troubles using the new GS2converter.jar, keep the first one, using CMD prompt.

I will put back my first tool in .exe at the end of first post.
[Galaxy S II Themes and Apps] drphrozen:
Ah yes, i forgot to close the stream after conversion, so each file is probably a bit smaller than what it should be.. will fix
[Galaxy S II Themes and Apps] drphrozen:
Fixed..

I have now fixed the jar and verified that it creates identical files as Convert_sgs2img.exe :-)

Sry about that :-)
[Galaxy S II Themes and Apps] mostyle:
Thank you! This tool is so much faster than the other!

@ sicopat

I just wanted to say thank you for this thread. It got me underway and now I understand the concepts behind Deodexing, boot paths, recompiling, and rebuilding much better than before I followed the thread here..

I am actually running my own Stock KF2 with mods applied by me that had it not been for this thread I would have never been able to do.

Thank you!
[Galaxy S II Themes and Apps] SamHaLeKe:
Working!

One thing I noticed is that when I manually deodex, zipalign an sign f.e. the email.apk following the manual guide at the end of first post, the filesize is different :confused:

the manual file is smaller than the automatic file :confused:

any thoughts on that one?

cheers!
[Galaxy S II Themes and Apps] SamHaLeKe:
I can't believe you didn't got any errors using the new sgsconvertor.jar as it contained flaws in the script :confused:

Oh well, any way, thx for the guide!

Cheers!
[Galaxy S II Themes and Apps] SamHaLeKe:
any chance you could make it work for SGS I files (f.e. convert factoryfs.rfs and dbdata.rfs)? That would be a blast :D
[Galaxy S II Themes and Apps] sicopat:
Well, I just tried to convert and mount the .ext4.img files. It worked.

I have a folder with all the odexed apps and framework, obteined using the first tool and I always use it. I didn't make comparisons. Sorry :(
[Galaxy S II Themes and Apps] sicopat:
For extracting rfs files, just use free version of MagicIso : http://www.magiciso.com/download.htm
[Galaxy S II Themes and Apps] sicopat:
I tried your new tool, extraction with no error and really fast :)

I compared with the extracted files obtained with the initial Convert_sgs2img.exe and exactly the same size.

I make the modification in my How To with this new tool

Thanks once again :)
[Galaxy S II Themes and Apps] sunwee:
great! no errors so far and i fixed the laggy browser with pulser and sicopat instructions :)

now, i will try to learn some theming myself...

i've added my own battery mod, now i am trying to add advance power menu

http://xdaforums.com/showthread.php?t=1112713

i understand i will have to decompile framewor-res.apk and add the xml files and recompile. no prblem here, i use apktools.

but for the .jar files....what do i do? do i have to decompile using baksmali and then recompile them? is the instruction to use same as the guide to fix the laggy browser, ie java -Xmx512m -jar baksmali.jar framework.jar

thanks for any pointers.
[Galaxy S II Themes and Apps] sicopat:
For .apk files, find and download APK_Manager 4.9 HERE

in APK_MANAGER, when recompiling, don't forget to delete ressources.arsc if you have edited any xml files.

For .jar Files : use Smali/baksmali.

decompile

:

java -Xmx512m -jar baksmali-1.2.6.jar framework.jar

"out" folder created

Recompilation

:

once mofifications done :

java -Xmx512m -jar smali-1.2.6.jar out -o classes.dex

push the new classes.dex in the jar file

-Xmx512m : for big jar for allocating 512 Mo RAM

If you want to make modifications in classes.dex in .APK use smali/baksmali
[Galaxy S II Themes and Apps] sunwee:
after recompile framework.jar to classes.dex, i just add it back to the original framework.jar without touching any other files?

thank you, i shall try it! :)
[Galaxy S II Themes and Apps] sicopat:
Yes. Open the .jar with 7-zip without extracting. Delete old classes.dex and drop your new classes.dex.

You can re-use the script kit Deodexage (copy the jar in framework folder) in order just to re-zipallign

You can see one of my customROM :HERE

with advanced power menu
[Galaxy S II Themes and Apps] JJEgan:
If i want to add a Data folder to a custom rom to install a few apps what for i need to change in the updater -script .

So far i have failed unlike SGS1 .

jje
[Galaxy S II Themes and Apps] sicopat:
Hi,

You have to add if not already :

run_program("/sbin/mount", "/dev/block/mmcblk0p10", "/data");
.
.
# After extracting system #
.
.
ui_print("Extracting /data");
package_extract_dir("data", "/data");

You put your apps in data/app/
[Galaxy S II Themes and Apps] SirM2X:
OK so I know this sounds crazy, but all the ROMs I've cooked with this method are missing the "Accounts & Sync" entry in the "Settings" menu! (Particularly after running the batch file to deodex and zipalign the ROM!)

I don't get any error while deodexing or whatsoever and all of the files are deodexed properly.

Anybody faced the same issue?!

It's kinda' weird not having that as it won't sync my contacts automatically!
[Galaxy S II Themes and Apps] sicopat:
I cooked KF1 and KF2 ROMs so far and no problem wih Account & Sync when flashed ...

witch ROM do you try to cook ?

Did you try with the first converter tool in .exe to see if present ?
[Galaxy S II Themes and Apps] SirM2X:
I've cooked both KE2 and KE3 with the same thing happening.

I don't think the converter tool is the issue here. Because I've tried cooking an ODEXed (purely extracted stock) version and it didn't have any issues.

All of my ROMs are obtained from samfirmware and I've cooked like 9 ROMs since yesterday all of them having the same issue! :confused:

I've followed the tutorial to the letter and would appreciate any help :rolleyes:
[Galaxy S II Themes and Apps] sicopat:
Do you mean, after running Deodex_Gingerbread.cmd, AccountAndSyncSettings.apk just desappear ?

Do you have the AccountAndSyncSettings.apk/.odex files present BEFORE deodexing ?

Or it's present but not working ?
[Galaxy S II Themes and Apps] SirM2X:
Now here's the thing! BEFORE deodexing, it's present with its corresponding ODEX file. After deodexing, it's still present but the entry is not there in the settings menu. I know it's not typically what we're supposed to do but manually running the file via RootExplorer gives me a "There is a problem parsing the package" error. I'm assuming the file gets corrupted while it's being deodexed!
[Galaxy S II Themes and Apps] sicopat:
You can try to manually deodex the apk, using the how-to i gave for deodexing email.apk and then push it with root explorer changing the permissions.

I just tried with the last tool from drphrozen, the kit deodexage and the skeleton ROM. I succed in deodexing, flashing stock KE7 firmware. The Account & Sync is present and works well.

so far, this script is working well for me, for KE7, KF1 and KF2 firmwares.

Don't know what is the problem ;;; :confused:
[Galaxy S II Themes and Apps] L00n3y2k8:
Nice tutorial.

Works for me, i'm working on my personal KF2 Rom now :P

Mostly stock so far, but it's working for me :D

Also need to learn alot, but this tutorial was a nice start to cook my own private Rom :D
[Galaxy S II Themes and Apps] xinfinityoO:
do you have the link to the original sgs2converte.. the one not built with java.. thanks

edit

----

found it

the reason i asked was becasue when using the java one i get errors while deodexing on some files.. but not with the exe one( its so slow though)
[Galaxy S II Themes and Apps] sicopat:
That's strange too lol,

did you download last version of Kit_Deodexage.ZIP with the custon .jar in framework in order to prevent errors when deodexing ?
[Galaxy S II Themes and Apps] xinfinityoO:
yup... the latest version..

even tried the java one on a freshly installed PC. something is strange with it. once the framework folder was empty .. had to do it again..

so at the moment i trust the exe version.. even though its slow..but havnt received any errors on that
[Galaxy S II Themes and Apps] SirM2X:
Thanks again!

Alright so I tried to deodex that file manually but then I got several exceptions while trying your Email.apk tutorial. I did however cook another ROM and guess what! Here's what I got at the middle of the process while deodexing the AccountsAndSync.apk:

Wonder why I'm getting this and why I can't manually deodex the file.

God I hate Java :p Used to be a Java dev a while back but with C# and Microsoft's premium stuff, who would still look at good ol' Java?! ;)
[Galaxy S II Themes and Apps] sunwee:
hi sicopat, maybe this is not so related to deodex...but i saw you create your own theme rom. (very beautiful!) and you seem like helpful guy, so i am trying to ask you this.

I am trying to get Advance Power menu into the rom. I got the files from here http://xdaforums.com/showthread.php?t=1112713 At first I thought just replace the files public.xml and string.xml, but the apktools can't recompile (error)

so now I know that I cannot just replace but have to edit the public.xml and string.xml, but what are the sections that I need to edit and replace??

thank you for the pointers!
[Galaxy S II Themes and Apps] sicopat:
Try with KF2, KF1 or KE7 firmware to see if the problem is the same.

If the problem still here : delete and reinstall Java JDK

re-download _Kit_Deodexage

use the GS2 Converter.EXE

And try again.

I hope it will work :)
[Galaxy S II Themes and Apps] sicopat:
Hi, if you try to add the extended power menu for version KE7, you can try to use the files of the MOD.

For Framework-res.apk, you need to add in /drawable-hdpi : 3 .png (icones for)

ic_lock_reboot.png"

"ic_lock_recovery.png"

"ic_lock_download.png"

If you don't add them (and don't delete ressources.acrs using APK-MANAGER 4.9), you will have errors
[Galaxy S II Themes and Apps] mostyle:
2.3.4

@sicopat

Have you tried this method with 2.3.4? I did, was able to decompress the 'factoryfs.img' but when I decompressed 'cache.img', Linux Reader did mount the file but said there were 'no recoverable files' so so this step fails. I could attempt to pull them directly from the device but I was curious if anyone else had tried?
[Galaxy S II Themes and Apps] MCOGW:
I guess you tried to extract the cache.img which came out of this file:

CODE_I9100XXKG1_CL349526_REV02_user_low_ship.tar

That's the wrong one,because it's only some kind of placeholder.

You need to extract the one from this file:

GT-I9100-CSC-MULTI-OXAKG1.tar

It's about 10 MB larger than the first one...
[Galaxy S II Themes and Apps] mostyle:
Thank you!
[Galaxy S II Themes and Apps] SirM2X:
Do these same steps apply for cooking a ROM using a 3-filed official ROM?

I'm asking because I cooked another one using KG1 (obviously used the modem.bin from the corresponding odin modem .tar file and the CSC from the cache.img extracted from the odin CSC.tar file) and it's stuck at the very first logo of SGS II (the one with the yellow triangle).

Wonder why this food that I'm cooking is kicking my butt! :-p
[Galaxy S II Themes and Apps] TAEL:
If you want to flash 3 files (including your custom ROM), you should compress your custom ROM files into factoryfs.img then include that into related *.tar files.
[Galaxy S II Themes and Apps] sicopat:
If blocked at this step, you did wrong when building your update.zip.

You did not mention the zImage, must be placed with the modem.bin in the root.

When extracting CSC part, did you get all files like in the sceenshot. If not perhaps you should try to find the missing file. If .txt is missing, you can find it from others/olders firmwares
[Galaxy S II Themes and Apps] tygoger:
Thank you. Have been looking for a "how to" for this! Gonna try it out

Edit:

Awesome! Works great!!!

Is there maybe a way to change the "SicopaT's ROM F1" (just before the update starts in CWM) to "Custom ROM XXX"? That would be great, our own ROM name included.

Thank you for the "HOW TO"!!!

Edit: Nvm, got it!!
[Galaxy S II Themes and Apps] ferreinf:
Hi all,

do i think i can use this How to, with other samsung devices?

for example Galaxy i5500?

Thanks :)
[Galaxy S II Themes and Apps] sicopat:
I don't know extension of the fimware files (in the .tar)

But for the _Kit_Deodexage, just try it and you will know
[Galaxy S II Themes and Apps] Emporioo:
Thanks very much for the information... Literally been searching for hours on how to extract files from the dam factoryfs.img !!!
[Galaxy S II Themes and Apps] Dark_Lord0122:
Does this work with KG6/KG5? cause sometimes if it deodex apps the apps don't appear in the folder ..