yashsingh1/xdaforums huggingface dataset:
[Galaxy S II General] LeoMar75:
I spent all yesterday thinking about that...

The odex file is only valid when used with the exact BOOTCLASSPATH files. dalvik enforces this by storing a checksum of each file that the odex file is dependent on, and ensuring that the checksum for each file matches when the odex file is loaded.

When you are deodexing an apk, even if you don't need to set BOOTCLASSPATH for it (because you don't get any error msg while baksmali), by default these 5 jar are already included in the classpath: core.jar, ext.jar, framework.jar, android.policy.jar and services.jar. This means that an odex file has dependencies on every "BOOTCLASSPATH" file that is loaded when it is generated.

So i was thinking about to deodexing every apk in /system/app a part Browser.apk (i.e leaving Browser.odex) and try to figure out which jar file inside /system/framework has to remain odexed.

Maybe we can still have overscroll glow mod, renounce to have the extended power menu in order to get an HW accellerated Browser!

I don't know if it make sense for you as my english need to be improved :(
[Galaxy S II General] pulser_g2:
You got any examples to hand?

The common issues I see are

- failing to read my install instructions

- trying to come from some other ROM without following the instructions

- trying to restore titanium backups entirely, depositing apps that are codes like half-polished turds in the phone

- pushing incorrect files into rom without knowing what they are doing

- stupid setcpu config

Am interested to see if you have found other issues, as camera and video player are confirmed by a fair number to be fine...

I swapped my phone with one running stock, and I had to tell my friend what I had done, as he was sure it was his :) oh, and I was underclocked to 800 max too at the time :D
[Galaxy S II General] _JKay_:
The frameword.odex is not compiled correctly!! That's a fact!! The laggy browser proofs it. Framework.odex the largest most important file in the android framework!! And that does not concern you? Is that not a bit naive?
[Galaxy S II General] pulser_g2:
I believe what I see. I have asked HomerSp if he can take a look at it, when he can, as he knows a lot about the deodexing process.

But at the end of the day, while there is clearly something not working in baksmali or smali, this seems a good opportunity to fix it and pass on the fix to JF :)

I know what is in framework.jar, and that it covers most things...

I do genuinely have interest in seeing the issues you raised, as perhaps there is disparity between methods of deodexing??? I am interested to see if I can reproduce any here too, as that would highlight a wider issue.
[Galaxy S II General] _JKay_:
Well.... I will not use deodexed custom roms so I won't find any issues!!! But some people probably will or already has...

I'd rather spend my time on fixing this and create odexed mods until its fixed!

As soon as I see that the framework.odex can be compiled without breaking the browser... I might try some custom roms again..
[Galaxy S II General] AllWin:
That's weird. I'm using Lite'ning 1,5 ROM (which is deodexed) since i bought this phone and everything runs very smooth (including browser, video playback, gaming, launcher and so on). Before i had HTC Desire Z with CM7 on it and it was freezing slow if compared to my current setup. It's just flying.
[Galaxy S II General] _JKay_:
I know that version (2.2) does not include the original stock browser but a patched version.
[Galaxy S II General] kenkiller:
You're basing all your points on 1 main problem, the browser.

That's hardly the way to go. Rather, they will work to solving the problem regarding the browser, then we can continue to have proper custom roms. Besides, KG1 is a leaked rom. Deodexing didn't affect KF2, it might not cause problems for later leaked or "official" roms.

Rather than directing others to your odexed mods, the way for things to move on is to see the problem being fixed. There's a reason why custom roms are almost always deodexed. Don't rock the boat if you don't like the status quo.
[Galaxy S II General] _JKay_:
That's actually exactly what I am saying!! Don't spend time on fixing the browser! Spend time on fixing the baksmali/smali tools!!

But until that's fixed I believe you can't really rely on the deodexed roms because framework.odex does not compile correctly!!

Some people said that you can't do mods that are odexed!! Thats the reason for the example! You actually don't need to deodex the framework!! But I admit.. it's easier not to odex files...
[Galaxy S II General] LeoMar75:
BTW guys, following the OP IDEA i got my own custom rom working with the odexed stock Browser (i.e. HW accellerated).

Basically all the apps have been deodexed apart Browser, and i left the framework jar files odexed!

Basically i got the same features/mod as before, the only think i have to renounce is the overscroll glow effect (i don't like it at all, i prefer the stock Samsung bounce effect) and the extended power menu (we can easily replace it by using quickboot).

That's it

thanks _JKay_ for the IDEA! :cool:
[Galaxy S II General] _JKay_:
But I do think the problems wont fix itself in the future. The SGS facing the same problems with XXJVQ!!
[Galaxy S II General] _JKay_:
No problem! Actually my mod gives you the extended power menu ;)
[Galaxy S II General] LeoMar75:
I agree with you, but at least, since a lot of people complain about the stock browser, we can stay happy with it!

I reckon we need new tool for deodexing, smali backsmali are dated now...
[Galaxy S II General] kenkiller:
Another much simpler way?

Don't use the default browser for now. All the other browsers work fine. That's a much better way for all the rom chefs, rather than throw out the whole pot because of one stinking app.

It doesn't matter whether it's easy or not. Deodexed roms have been working fine for so any roms across so many phones across so many versions. To take your word for 1 bloody leaked rom just defies belief.

Whether you like it or not, custom deodexed roms bring more benefits that largely overrule 1 faulty stock browser. And it will be fixed in future, so your words will still be in vain because it's pointless. :(
[Galaxy S II General] kenkiller:
That's just the wrong attitude. Stop pushing your own odexed stuff. They will fix it, and your mods will be left in the dust. :D
[Galaxy S II General] _JKay_:
heh... You still dont get it!
[Galaxy S II General] LeoMar75:
lol your words sound so aggressive! :eek:

Ok, i agree with you, if we can't fix the deodexing process we can just stay happy without this stock browser!

BTW the stock Gs2 browser is the best browser available so far! Don't try to deny it..

That said, as we can share our ideas, i think we are trying to put effort in order to to find a temporary solution!

Of course I'd like to see the deodexing process fixed rather than using a simple way to get the browser working!
[Galaxy S II General] _JKay_:
Actually Id rather have people learned how to do it themself! And Id rather fix the smali/baksmali problem!!

I'm just showing that its possible that's all! I gain no profit from this! Just ask my wife :)
[Galaxy S II General] bruflot:
I cant seem to deodex any apks from the app folder not any from the framework folder..

Just comes up bunch of errors
[Galaxy S II General] _JKay_:
There are many tools for deodexing... try xUltimate
[Galaxy S II General] pulser_g2:
Right, I might need to check the framework odex and get some errors out it, to try and put this one to bed some time...
[Galaxy S II General] nightranger73:
Just a little thought... is the CRT effect related to deodexing problem too? There's a way to try it on odexed rom?

Sent from my GT-I9100

If you find this post usefull please press the "Thanks" button
[Galaxy S II General] pulser_g2:
It looks more like a graphic issue, but easy enough to try it...
[Galaxy S II General] sicopat:
I would be interested in how you are able to add extended power menu without deodexing framework folder.

If you need to deodex then odex back the files then you will have errors ( you said that in first post) so for me no difference in a deodexed rom and a deodexed re-odexed ROM ...

Or you have an other way to add extended power menu ?

The solution to deodex re-odex is interesting for KG1 to keep hardward acceleration with browser.apk

But are you shure you don't add others errors when odexing back a file (errors when deodexing + errors when odexing back)
[Galaxy S II General] _JKay_:
I modify the com/android/internal/app/ShutdownThread class as everyone else (I think) but I leave the framework.odex untouched.

I don't think odexing adds any new issues because we use the original '/system/bin/dexopt' utility from the XXKG1 rom to odex with. I think its only baksmali and smali that has issues.
[Galaxy S II General] sicopat:
Where can we find an how to use dexopt tool to odex back framework ?

Thanks
[Galaxy S II General] _JKay_:
Its called 'dexopt-wrapper' as stated in the first post. Google it and you will find many hit with guides, scripts etc..
[Galaxy S II General] LeoMar75:
Amazing thanks a lot jkay for the explanation. I mentioned your name several time in my thread for all your effort and help.

I am very interested in your theme settings app and I'd like to know how it works or just receive any clue. I already knew how to modify shutdown thread class in order to get the extended power menu working. But the coolest feature is the possibility to customize items by using your app.. very useful.

Sorry if I am so curious but i like to understand how things work rather than use it.

Inviato dal mio GT-I9100 usando Tapatalk
[Galaxy S II General] AdamG:
I was trying to refrain from posting until I saw this, deodexing the filesystem brings only 1 benefit and that is for themers.

There is more benefits for keeping the filesystem as odex and any developer should be aware of this.

Quicker initial bootups of custom ROMs

Less memory is consumed

Less storage used in /data due to the fact that pre-optimised dex files are stored on /system already

Yes you can accept a slightly smaller data partition due to the fact the SGS2 has 2GB and the initial boot is a 1 time thing, however de-odexed apps/framework will always consume slightly more memory.

De-odexing is not a method of optimizing an OEM image and that is just blaintant rubbish.

There is reasons as to why OEMs choose not to de-odex factory installed ROMs.

I guess it doesn't matter at the end of the day but there really is no benefit in de-odexing other than to theme a ROM.

I'm with the op on this one.
[Galaxy S II General] sicopat:
Themes and mods too.

You can theme without deodexing (battery, icons ...)

But in order to mod the code, like potatoman camera fix, Email security fix ... You need to de-odex.
[Galaxy S II General] soyef:
And arabic fix
[Galaxy S II General] LeoMar75:
As far as i know when you odex back, the signature of the file is not compatible with the other framework files, so we should fix it.

We need to patch the signature, a possible solution is to copy signature bytes from the original odex file!

I am just trying to do it!

\EDIT

I was right infact without patching the odex signature i wasn't able to boot my phone!

Hope it can help!
[Galaxy S II General] no.one.writeme:
Hi there LeoMar75,

I tried it out also but did not have any success. I deodex framework.jar, make the changes to the smali files. Then I odex back with:

dexopt-wrapper /system/framework/framework.jar /sdcard/framework.odex [$BOOTCLASSPATH]

Looking at this post : http://xdaforums.com/showthread.php?p=9369187#post9369187

I did:

dd if=/system/framework/framework.odex of=/sdcard/framework.odex bs=1 count=20 skip=52 seek=52 conv=notrunc

I tried to boot but no go.

Any experience you would like to share would be very welcome.

Best regards,

Luis.
[Galaxy S II General] LeoMar75:
I was able to succesfully change odex code with no problem at all (i spent a lot of time trying to figure it out)

I will share everythings with you as soos as i have 5 minutes free :(
[Galaxy S II General] no.one.writeme:
That would be super! Thank you so much for your time.

Best regards,

Luis.
[Galaxy S II General] sicopat:
How do you patch the signature ?

Pleeeaaase :)

Is this the way JKay is doing to mod framework.odex, android.policies.jar ?

Edit : found the way here :http://xdaforums.com/showthread.php?t=779803
[Galaxy S II General] LeoMar75:
Correct m8, that's the simple way otherwise you need to do it by using an HEX editor!
[Galaxy S II General] sicopat:
Are always same offset to copy with hex editor for every .jar files ? X34 to x47 ?
[Galaxy S II General] LeoMar75:
I will tell you soon, as i am working on a fully odexed custom rom!

Stay tuned!
[Galaxy S II General] sicopat:
Yup yup :-)

I already tried this method without success for the moment ...
[Galaxy S II General] LeoMar75:
For me it worked, i baksmali android.policy.odex, ext.odex, i changed stuff inside (some class in the dex file).

I used dexopt-wrapper with the right BOOTCLASSPATH, and i patched byte signature!

If your phone doesn't boot, i guess that it's releated on stuff you have changed inside the dex file!
[Galaxy S II General] sicopat:
When you used dexopt-wrapper, did you had a deodexed framework or odexed for your BOOTCLASSPATH ?

Yes but it was working well when deodexed.

I am still trying :D
[Galaxy S II General] kva:
Just read notices from Google:

1) You must check for dependencies.

2) You must odex only libs which have already odexed dependencies.

3) Repeat step 2 until you have all libs odexed.

4) Repeat step 2 for all applications you want to odex.
[Galaxy S II General] LeoMar75:
I use odexed framework!

dexopt-wrapper android.policy.jar patched_policy.odex /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar

cp /sdcard/MOD/original.android.policy.odex /system/framework
cp -f /sdcard/MOD/android.policy.jar /system/framework

dd if=/system/framework/original.android.policy.odex of=/system/framework/patched_policy.odex bs=1 count=20 skip=52 seek=52 conv=notrunc

mv /system/framework/patched_policy.odex /system/framework/android.policy.odex

rm -f /system/framework/original.android.policy.odex

Note:

First you have to copy in /system/framework android.policy.jar deodexed and hacked with your stuff, which means that it has classes.dex inside

cp -f /sdcard/MOD/android.policy.jar /system/framework

is the original android.policy.jar (i.e. without classes.dex inside)

Hope it can help!
[Galaxy S II General] sicopat:
Thanks,

In fact, I used (with success for this step) the Bootclasspath shown in /system/init.rc

I think the troubles came from last step : modify checksum signature to match original odex one :)
[Galaxy S II General] sicopat:
Many thanks for this :)

I was close ...

Why did you copy original.android.policy.odex from SDcard to system/framework ?

the original android.policy.odex should be already present in system/framework right ?
[Galaxy S II General] ownhere:
the keypoint is:You need place the deodexed android.policy.jar to /system/framework before dexopt-wrapper it. otherwise the new android.police.odex will staled.

and the file name must be "android.policy.jar"
[Galaxy S II General] sicopat:
Thanks i understood that :)

Can I do the same for framework.odex? With the same command to copy the original framework.odex signature to the new patched one ?
[Galaxy S II General] ownhere:
any .odex can be replaced signature via 'dd' :)
[Galaxy S II General] sicopat:
I have an error when trying to patch the signature :

dd if=/system/framework/original.android.policy.odex of=/system/framework/patched_policy.odex bs=1 count=20 skip=52 seek=52 conv=notrunc

conv option disabled

If someone got an idea about that ?

edit found the solution :

having busybox installed and add busybox at the begining of command line :

busybox dd if=/system/framework/original.android.policy.odex of=/system/framework/patched_policy.odex bs=1 count=20 skip=52 seek=52 conv=notrunc

I succeed : mod extended Power odexed KG2 :D
[Galaxy S II General] sicopat:
Oh NO :-(

I succeed in odexing back framework.odex and android.policy.odex with power extended menu Mod.

But i have now a lagy odexed browser. I don't understand why ?

I follow the How To, I re-wrote in this section to mod power menu.

If someone got an idea ?
[Galaxy S II General] _JKay_:
Dont change the framework.odex... Currently this will break the browser.
[Galaxy S II General] sicopat:
yes i supposed so. but could you explain us how-to, without moding framework.odex ?

Please. i just don't want to steal your job and want to my my own customROM.

I am ready for a donation :)
[Galaxy S II General] ownhere:
call com/android/internal/app/ShutdownThread;->reboot directly from android.policy.odex

origin android.policy include reboot support, you don't need change framework.odex.

code:

const-string v1,"recovery"
const/4 v2, 0x1
invoke-static {v0, v1, v2}, Lcom/android/internal/app/ShutdownThread;->reboot(Landroid/content/Context;Ljava/lang/String;Z)V
[Galaxy S II General] sicopat:
I dont have com/android/internal/app/ShutdownThread in my android.policy.

I have to add it ?

Thanks,

Ah I found this thread : (perhaps will help) : http://xdaforums.com/showpost.php?p=11193071&postcount=2
[Galaxy S II General] sphinx02:
Thank you very much, _JKay_ for providing this information to mod the ROM while let it odexed!

Used all the information from this Thread for my MODs for SGS 1, since XXJVQ and XXJVR we have the same Problems there ;)
[Galaxy S II General] Brotuck:
So if i am understanding correctly, in order to odex back to a phone.apk and phone.odex i need to:

1. Place dexopt-wrapper in my phone's system/bin/ directory using root explorer or adb

2. Place my modded apk file (phone.apk) in a folder of the sdcard (sdcard\app)

3. Do the command: dexopt-wrapper sdcard/app/phone.apk /sdcard/app/phone.odex

4. Grab both files from sdcard\app to my computer

4. Open the file phone.apk with 7zip

5. Delete the classes.dex in the file.

6. Package the apk and the odex in a cwm file

Q1; Do i need the dependencyfile "twframework-res.apk" on another place then where it original is ?

Q2; Is this procedure right ?

--edit--

It works if you follow this procedure

--edit--
[Galaxy S II General] kahvitahra:
After step 1. give dexopt-wrapper proper busybox permission

adb shell

su

busybox chmod 755 system/bin/dexopt-wrapper

Other than that it seems ok to me.
[Galaxy S II General] karl999999:
no reason to bash _JKay_, just for the lockscreen with the slider he is my hero.

if those slider will be configurable, than people will be very happy.

for now there is no real good custom ROM for the SGSII, thats my opinion.

all of them are lacking some things.
[Galaxy S II General] sphinx02:
smali tools are updatet!

now you can deodex framework.odex without brake anything!

see: http://code.google.com/p/smali/issues/detail?id=75
[Dash 3G, Snap General] ovigt71:
hi all ! I just got couple days ago from E-bay a HTC Mapl 100....I was wondering because basically i was ordering HTC Snap...whatever.. nevermind, anyway is to late. I placed the order on 8 May and I got it after 2 month+... ok, so, I have the following details:

About:

Windows Mobile 6.5 Standard

CE OS 5.2.21.854 (build 21854.5.0.80)

Radio Version 61.36t.25.29U_3.47.25.29

RIL Version 2.002

Hardware:

T-Mobile_dash3G

ROM Version 2.06.531.4(71798)

ROM Date 12/16/09

Radio Version 3.47.25.29

Protocol Version 61.36t.25.29U

yesterday I was trying to do a Hard SPL from http://xdaforums.com/showthread.php?t=550620 , but any version chosen it fails. Can someone to help me with a Hard SPL and a suggestion about a custom rom?
[Dash 3G, Snap General] Hakim Rahman:
are you sure you 've done with the instructions given ?? :confused:
[Dash 3G, Snap General] ovigt71:
yes. everything was done as per instruction......if you can give me a hand, i'll really do appreciate !
[Windows Phone 7 Apps and Games] stilatore:
Hi everyone, it's now avaiable on zune marketplace my new game Catch the Mouse LITE (it's free).

It's the LITE version of a game i'm still developing so i need the best possible feedback in order to improve the full version.

The download link is http://bit.ly/nb1gnr

Thank you :)
[Windows Phone 7 Apps and Games] biper4x4:
Very entertaining game. Which advertisement provider You are using ?
[Windows Phone 7 Apps and Games] stilatore:
Thanks :)

I do not use any kind of advertising in my game if that's what you mean.
[Windows Phone 7 Apps and Games] stilatore:
UP!

Pls i need more feeddback
[HTC Sensation] swellthekitty:
Anyone figured out how to create folders within the apps drawer or at least reorganize the apps yet?

I was looking at another home launcher like GO Launcher EX, but want to really test out Sense 3.0 since I've never used it before...
[Hero CDMA General] gab2012:
Okay so I am on my stock rom with root....when I try to ruu I get usb disconected failure after the official sprint RUU tries to get into bootloader before flashing.

any idea what I'm doing wrong?
[Hero CDMA General] aiwetir:
No, but you could try this one

http://xdaforums.com/showthread.php?t=804692
[Galaxy S II General] TudorMondialul:
Hello everyone I'm a newbie in Android. A had a Nokia N97 mini and now i bought a Samsung Galaxy S 2. Beeing new to Android it was kinda hard the first days to adapt. But i did. And now to tell you about my problem.

Whenever i try to copy some movies/sounds/photos from pc to S2 it gives me this error "The path is too deep". So i tried to copy in a more direct path.. Still nothing... But the big problem is that i cannot update my phone through Odin. Wheter is Android 2.3.3 KE7 or 2.3.4 KG1 or a ROM I'm not able to do it. And I decided to update thru Kies. All good but the update failed... It said it need to enter Recovery Mode. I clicked ok and then my pc rebooted. Then i got this image on my phone with a pc and a phone, chained together by an exclamation mark inside an orange triangle... And now i cannot restart my phone, i can't do anything.

Is it bricked? Please help me...
[Galaxy S II General] stoney73:
Ok. Stop. Breath. Your phone isnt bricked...yet.

Your phone is currently in 'download mode'.

Im not sure which directions you were following, did you download the software from intratechs thread in development? If so, he has step by step directions in the opening post.

You should be looking to install kf2.

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

[ROM + Guide]Official i9100 KE7/KE8/KF1/KF3/KF4/KF2/KF3/KG2 download and Root Guide.

Remember, your phone is already in download mode. So just connect it to the pc, and then dont touch it .
[Galaxy S II General] daleski75:
If your pc is rebooting when you try to perform an update then it's more than likely an issue with your pc.

I don't think your phone is bricked as stoney73 has stated as well it's in download mode
[Galaxy S II General] beWater:
bricking a phone isn't that simple unless something abnormal happens (e.g. unplugging the cable while flashing a rom), I am sure your phone is fine. The feeling I have is the drivers in your PC are not installed/working properly, since I don't see the reason that flash via Odin will fail (Kies is another story...), try reinstall the driver and flash again;)

you may like to read this amazing thread to understand some fundamental terms (such as recovery and download mode)

http://xdaforums.com/showthread.php?t=1134290
[Galaxy S II General] tjtj4444:
Also remember that Kies often gets in conflict with Odin, so open task manager in windows and kill all kies processes before using Odin.