yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] jubeh:
The speed boost in r1 is not exactly the kernel, though it's related. The problem comes from the odex files, those files are dalvik bytecode optimized for the build they're compiled at, that's why r1 is so fast, the app code was compiled for it (actually, for htc sapphire, which is exactly the same phone as the dream except for internal storage), google went one further and removed all the .dex code from inside the apk to save space in /system. The reason you have so much space free w/o a2sd on /data is because of the odexes, /dalvik-cache is only being used for /data/app, anyway, when haykuri changed to dayproy's kernel, he just re-packaged the update with the new kernel, but with the odexes having been optimized for the former kernel and no .dex inside any apks to re-dexopt the apks for the new kernel, the old apks would force close when an unexpected error was found because of the new kernel.

What can you do about it? Hunt down all the odexed apks and replace them (and their odex) with full apks (with .dex still inside) with another cbr34 based apk (maybe from jf 1.51), run dexopt_wrapper on all of them, which should optimize the apk for the new kernel, and if you want to go the google way, re-sign the apk after removing the (now useless) .dex. I've already done this in my jf 1.5 adp build and it works perfecly

---edit---

forgot, if you're going to re-sign apks without .dex, make sure you do them one by one (you can do all the ones in system/app that show up in your app drawer (except maybe for phone) at one time since those aren't system critical) because some of those apks dont work right after removing the .dex file. i still don't know why (working on it), so replace one by one, that way if something breaks, you know which one did it, and just leave that one w/o odex.
[G1 Android Development] AustinKnight45:
Ya I like Ion r1 better too:D
[G1 Android Development] androidmonkey:
Thanks jubeh for the explanation. On that note, what exactly did the .dex code that was removed do?

Also, when I go to the "About" screen, the firmware is listed as 1.5, not 1.51. Does this mean that ION rev1 does not have the security updates?
[G1 Android Development] dwang:
I don' think thats true. Whenever you switch to a new kernel, the dex files get rebuilt on the fly. I don't see how it makes a difference if its done with a script outside the phone or done inside android itself.

If odex files are the only reason for the speed increase, then stock tmobile 1.5 ROM would be much faster than the stock dev 1.5 ROM since the tmobile 1.5 rom contains odex files while the dev ROM doesn't. But it isn't.

Plus, the ION r1 build is much faster than a stock tmobile 1.5 ROM, and both have odex files.
[G1 Android Development] dwang:
Plus the improvements aren't from the ION dalvik vm library even though lots of people are including them in their ROMs.

"Disconnect," in one of the earlier posts in this thread, compared the dalvik vm file from the ION ROM with that of the JF 1.5 ROM and they were exactly same byte for byte.
[G1 Android Development] jubeh:
the dex files are rebuilt on the fly only when they're available, open up an ion apk and find the dex file, it's not there

the odex is already optimized for the kernel, so the dalvik optimizer (the one that places the dex at the dalvik-cache) picks that one by default and doesn't even check for a .dex inside the apk, not that it could find one, and it can't do anything about the ones that have already been optimized.

I don't know why the 1.5 t-mo rom is slower, has anybody checked if it's odexed? i know the 1.0 was, but that one also had a different version of the dalvik vm, so that might explain the speed difference, maybe the 1.5 still has the old dalvik vm and kernel (precisely because they're using the old odexed apps) and they only pushed 1.5 improvements (vk, voice services, etc), mainly to not break compatibility with myfaves?

The .dex file is the pseudo machine code that the dalvik vm (the portable virtual machine that runs all android programs) can understand and run faster than source code. I think dalvik, like jvm, is able to run source code with jit compilation, but it takes a performance hit (from having to compile on the fly), so having bytecode is better.

.odex is .dex bytecode that has been further optimized, it's not portable as .dex code, because it's compiled explicity for the extensions available in that particular platform (for example, the arm processor your phone runs). you can always take .dex code and run it on an x86 version of the dalvik vm, but you can't take .odex and run it on x86 dalvik because x86 and arm are architecturaly incompatible.

dalvik takes the .dex code and, again, does jit compiling to pass those instructions to the arm cpu, and this has performance overhead, running odex, though, dalvik doesn't have to do jit compiling, it just passes the instructions straight to the cpu and arm is able to process the code right then and there.

i skipped explaining where the linux kernel comes in, because it's a world of hurt.
[G1 Android Development] dwang:
dalvik vm doesn't do JIT. Do a google and you see.

1.5 tmo is odexed, I checked myself and its running the exact same dalvik vm as the ION rom.
[G1 Android Development] jubeh:
i also didn't adress one of your points, it doesn't make a difference wether you odex the files from adb, or from the terminal, the ones i did were made from a script to automatically dexopt-wrapper all /system/app apks from the phone's terminal, then i just pushed back my modified apks w/o the .dex on them.

also, even if dalvik vm and libraries are the same in ion and jf 1.5, you must remember that ion is odexed, where jf 1.5 is not, so you wouldn't see the speed optimization in jf 1.5 unless you odex the apks.

i'm not trying to prove you wrong, i know all of the speed from ion doesn't come from dalvik and odex alone, but it does help a lot. specially when you odex something like jf adp 1.5.

something i forgot to mention, and something that a lot of people have been overlooking, is the best reason to pull that .dex out of the apk once you've odexed, and the factor that might contribute to a better speed.

even if an apk is already odexed, dalvik still has to parse the whole apk just to get to the manifest and resources it needs. the smaller the archive is, the faster it parses, that's why it's important to get that .dex out of there, it's small speed hacks that add up.

I do encourage you to try it with jf 1.5, you can always nandroid back to your build, again, it won't be ion fast, but there will be a marked speed improvement (plus more space in your /data partition and less usage of system cache, which means faster app switching (specially when jumping back to home).

Again, it's not all of the reason for ion's speed (it might be on crack or something), but it's something that indeed does contribute to it
[G1 Android Development] dwang:
What about this comment from cyanogen.

http://xdaforums.com/showpost.php?p=3859608&postcount=8

"The dex file is already inside the APK. What dexopt does is create optimized bytecode from it. This is either done at runtime (files stores in dalvik-cache), or using a tool called dexpreopt which does the same thing but in a static way."

If I understand what he is saying, the dex files in dalvik-cache are already optimized for the platform.

EDIT: Here's the logcat after I upgraded to cyan 3.4.1. You can see that its running dexopt

D/installd( 64): DexInv: --- END '/data/app/com.usatoday.android.news.apk'

ccess) ---

I/dalvikvm( 84): DexOpt: mismatch dep signature for '/data/dalvik-cache/sys

@framework@android.policy.jar@classes.dex'

D/installd( 64): DexInv: --- BEGIN '/data/app/teeter.apk' ---

D/dalvikvm( 170): DexOpt: load 30ms, verify 225ms, opt 5ms

D/installd( 64): DexInv: --- END '/data/app/teeter.apk' (success) ---

I/dalvikvm( 84): DexOpt: mismatch dep signature for '/data/dalvik-cache/sys

@framework@android.policy.jar@classes.dex'

D/installd( 64): DexInv: --- BEGIN '/data/app/com.google.tts.apk' ---

D/dalvikvm( 171): DexOpt: load 24ms, verify 100ms, opt 2ms

D/installd( 64): DexInv: --- END '/data/app/com.google.tts.apk' (success) -

I/dalvikvm( 84): DexOpt: mismatch dep signature for '/data/dalvik-cache/sys

@framework@android.policy.jar@classes.dex'

D/installd( 64): DexInv: --- BEGIN '/data/app/com.android.dxtop.theme.aero.

' ---

D/dalvikvm( 172): DexOpt: load 14ms, verify 4ms, opt 0ms

D/installd( 64): DexInv: --- END '/data/app/com.android.dxtop.theme.aero.ap
[G1 Android Development] yochaigal:
no wick with r1 or r2.

Hi. Successfully rooted Google ion and put new recovery plus all haykuro revisions. On both wii is unable to start. Only with rootme does wifi work. Found similar posts but no answers.

Would love a working ion rom with superuser.

Thanks
[G1 Android Development] yochaigal:
no wifi with r1 or r2.

Hi. Successfully rooted Google ion and put new recovery plus all haykuro revisions. On both wii is unable to start. Only with rootme does wifi work. Found similar posts but no answers.

Would love a working ion rom with superuser.

Thanks
[G1 Android Development] jubeh:
did you.... flash this rom to an ion?..... this is a dream rom
[G1 Android Development] yochaigal:
This is only for the G1, then? I was a bit confused... the only real ion roms I found were here:

http://andblogs.net/2009/05/ion-update-available/

So if I want something like JF1.51US on the Ion, I'm out of luck? I just want to be able to use root apps...

thanks
[G1 Android Development] garsim:
i've problem to install better keyboard on this rom...someone else has my same problem?
[G1 Android Development] mak213:
will we ever see an update for this or just a fix im dieing for the fix for like i can listen to music and txt or multi task while music playing

because i cant listen to music and txt or it will lag it really is annoying i love this rom i havnt found anything compared to its speed but when it comes to playing music as u do other stuff its horrible
[G1 Android Development] androidmonkey:
Are you running rev2? If so, flash to rev1.
[G1 Android Development] soulife:
I'm post an ion remix tomorrow. I wouldn't call it r3 as its not from haykuro. I've been testing my build all week and there's definately no lag.
[G1 Android Development] setspeed:
I agree on this point - pretty much unusable whilst using the music player :(
[G1 Android Development] androidmonkey:
Since ver2 is broken, why not just use ver1 ?
[G1 Android Development] setspeed:
I am currently using r1, after i tried r2 - theyre both just as bad with lagging when listening to music unfortunately :(
[G1 Android Development] setspeed:
Great, I'll definitely give it a try! Is it based on the kernel from r1 or r2? I found r1 to be faster, but both gave me a few force closes...
[G1 Android Development] soulife:
Cyanogens kernel, odex re-optimized for it. Among other improvements. No lags that I've experienced, no force closes, and hero's music player is playing nice as well :)
[G1 Android Development] androidmonkey:
Thats odd. rev2 was very laggy for me but rev1 is speedy.

Did you do a full wipe before going from rev2 to rev1?
[G1 Android Development] Canute:
I just switched to it from JF1.51 and so far I'm quite pleased.

For some reason JF would stutter a lot on my system. It would go unresponsive quite often.

I'm kind of thinking these guys making their own ROMs can't quite do the same level of QA.

I also still have my root prompt.

I had to wipe it to get Ion R1 to boot, though. Otherwise it would spin at the "A N D R O I D" screen.

I think I'll also have to make some PTYs so I can get telnet again.
[G1 Android Development] dwang:
nevermind......
[G1 Android Development] JESTERcl:
Hi guys, here from chile, there es is a problem if a pass from the hero to ion rom?...thanks a lot for everything JF, H, Lucid every body.
[G1 Android Development] mak213:
patiently waiting............NOT i have no more nails lol
[G1 Android Development] tato22:
am still waiting on him
[G1 Android Development] soulife:
patients is a virtue... i dont wanna hijack this thread. almost...
[G1 Android Development] mak213:
ahaha "patience" but no ur not hijacking this thread so assisting it before it dies! ur like the life line i dont want to switch to any other roms that need apps2sd

but hows the progess on it ? if ur just using it more to find more bugs ill help lol i wanna use :)
[G1 Android Development] androidmonkey:
What do you mean "any other roms that need apps2sd" ? The OP of the thread should post ION ROM ver1 in the first post since that is the best one. Ive been running it for 2 weeks now and its great. (with LucidREM apps2sd)
[G1 Android Development] setspeed:
No, I didn't. Haven't had much chance to mess with my phone for the last week or so - but I've been getting hacked off with the number of force closes i'm getting on Ion r1. Will need to wipe and flash it again, or try something different.
[G1 Android Development] r_dub:
So does Ion support appstosd2 anybody know or a better way to do apps to sd?
[G1 Android Development] androidmonkey:
I am running ION rev1 with Lucid Apps2SD script, everything works speedy.
[G1 Android Development] JC-LGMS:
Is it possible to install ION r1 without the new SPL on a Dream (Orange)?

(I am currently on ION r2 but I want to try the r1 but I don't want to change my SPL)
[G1 Android Development] alexdancer2:
hey guys i am having a problem i am running ion r2 and i cant get mms to work for me at all. Does anyone else have this problem or anyone know a solution? please help thanks
[G1 Android Development] androidmonkey:
use ion rev1
[G1 Android Development] mer6:
Yeah, I'm just not sure why Ion r2 was ever released when r1 worked so well @_@
[G1 Android Development] androidmonkey:
Ive been happily using ION rev1 for about a month now but today I tried streaming music over bluetooth to my car stereo. Bluetooth works for phone calls but not for music. Any ideas why this doesnt work? It worked on the cupcake update but not before that.
[G1 Android Development] tmobilewinguser:
sorry for the dumb ? but where can i download ion rev 1 i searched and searched but all i come up with is ion rev 2 thnx in advance
[G1 Android Development] androidmonkey:
yea, not sure why the OP doesnt have the link in the first post, but here it is

http://xdaforums.com/showthread.php?p=3945279&highlight=signed#post3945279
[G1 Android Development] tmobilewinguser:
thanx alot man
[G1 Android Development] androidmonkey:
Nevermind. AD2P works, for some reason it started working today.
[G1 Android Development] mvanwyk83:
ion 2 runs very well for me thanks!!
[G1 Android Development] taker888:
I have the HTC Magic vadafone. It has been already rooted. Now do i Flash the ion r1 rom on this phone.. Plz help!.. I need instuctions.
[G1 Android Development] maxisma:
Wrong section my friend, wron section.

Just scroll down to the sapphire section :O

*fascinated*
[G1 Android Development] taker888:
Is this ROM only for the G1??
[G1 Android Development] maxisma:
It's ported for the G1, there is an ION ROM for Magic in the Sapphire scetion, believe me.
[G1 Android Development] androidmonkey:
FAQ tells all.
[G1 Android Development] jaaronmoody:
This IS the fastest, most stable rom with apps2sd, in my humble opinion. I use lucid script and have 88mb free with no lag. I even have data, dalvik, and media on sd.... no force closes. no overclocking. just a great daily driver. Thanks Haykuro. And yes, i have flashed just about everything here, with a freshly partitioned sd. I will say as a disclaimer... if it doesn't have working a2dp, it doesn't stay on my droid long.
[G1 Android Development] cdubb32390:
Is Apps to Sd automatic on this rom? If not how do i go about running it easily?
[G1 Android Development] shelay:
just flashed it now. went from Hero Rom to this. its a really small ROM. i noticed a massive difference. i got 87MB worth of free internal space. i was also able to install the quickoffice.apk which works fine. i also changed the keyboard to the Hero keyboard. works fine as well. App2SD did not work for me . did manage to install the .apk, but it wasnt just working. i have to say the camera quality compared to when i was on Hero Rom aint that great or maybe its just me eyes. will keep u guys posted when i install other .apks or apps..
[G1 Android Development] jaaronmoody:
app 2 sd by lucid script! sdsplit by martin fick. look in my sig
[G1 Android Development] shelay:
tried both methods for apps to sd from the link fro the guy above me but no luck. anyway, one other thing i think that is worth mentioning is the battery life. since i installed this rom, my fone hasnt ran out of Juice. is it me thinking this or is it actually happening? lastly, my pair of bluetooth headphones work perfect with this. i read somewhere about some1 complaining about this.
[G1 Android Development] cdubb32390:
thanks for the info! i've tried just about every rom on here and i have to say that i've found the one for me!
[G1 Android Development] shelay:
its amazing how the simplest things in life are usually the answers to complex questions. i too tried every rom here but finally decided to go for this one. hope u enjoy it.:):D
[G1 Android Development] Mr wyngaard:
does your phone need to be rooted for this rom
[G1 Android Development] JC-LGMS:
Does anyone know how to put iptables on ION r1?
[G1 Android Development] shelay:
hey, your phone does not need to be rooted. just make sure you do a wipe before you flash the ROM. happy flashing.:rolleyes:
[G1 Android Development] Mr wyngaard:
thanx but i am to scarred to root my phone :(
[G1 Android Development] Dyonas:
I never noticed this ROM before. For any that have it or have used it, how does it compare to Cyanogen's ROMs or the Hero builds floating around? Obviously needing opinions of those that have used this and one or both of the others :P I'm currently floating between Cyanogen and Hero ROMs but there's room in my SD card collection for a third ROM if this is worth it.
[G1 Android Development] david1171:
why? all you have to do is read the thread a few times. have all the files you need downloaded. some time and some patience. just stay away from the "danger" spl until you are ready to flash it if you ever feel you want to flash it.
[G1 Android Development] brios86:
i still have root

did a wipe then flash ROM and root is still there

$SU (asked me to allow or deny)allown then:

#(still have root rigth)???
[G1 Android Development] DMaverick50:
yes that means you still have root
[G1 Android Development] brios86:
yay!!!! this is pretty fast :D can it be confirm that apps2sd run stable? i know some ppl have manage, just making sure
[G1 Android Development] gsgleason:
Where can I add a call to my custom configuration script for cpu frequency scaling, swap, etc? I'm not very familiar with the init scripts for android.
[G1 Android Development] gsgleason:
Also, when I set /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq to 528000, the scaling_cur_freq is always at max - it never goes below.
[G1 Android Development] brios86:
can i customize this ROM, i would like the new camera.apk from Cyanogen new ROM (stable ROM that is) would it work i like the way that camera is and i believe it takes better pictures also
[G1 Android Development] brios86:
for some reason the browser is not the best i cant download a few things from it on other ROM's it would let me, any 1 have the same problem
[G1 Android Development] mer6:
Just letting the people know in this thread that the ROM is not really supported anymore, as Haykuro has moved onto other things (IE trying to root new phones). I personally have had mixed experiences with this ROM. It's all good and great that it's fast and small, but in the end its few bugs drive me nuts since I know they'll never be fixed. If you guys want to try out a more up to date ROM like this, look at Soulife's ION Remix or CyanogenMOD.
[G1 Android Development] brios86:
how is this possible if i flashe like 3 times and i get no more then 71 free and you said without apps2sd?
[G1 Android Development] Erickomen27:
He Probably Has The New Radio And SPL
[G1 Android Development] DMaverick50:
Its true that this is an older and largely unsupported build. If you want a similar look with simiar speed but newer features and current support, use JACMyTouchSkiv2.5.2
[G1 Android Development] Dyonas:
I figured it wasn't supported any more when I saw the original post but it is fast and thanks to you and DMaverick50 I can look at those other few builds.
[G1 Android Development] blazedj:
I have flashed ION rev. 1 and when I try to run an app that requires root the Superuser Permissions app only shows black screen without any text so I can't add the app to whitelist.

Does it mean that I lost root?

I tried to replace Superuser Permissions app with JF one but the phone says apk is not correctly signed.
[G1 Android Development] wddglr:
blazedj - dont use this rom. youre better off with a cyanogen build
[G1 Android Development] blazedj:
I just don't need 99% of Cyanogen features, including apps2sd :)

And I'm feeling better with vanilla kernel from Google or HTC

EDIT: ok, Google search is god. Found the solution: http://xdaforums.com/showthread.php?p=3898991
[G1 Android Development] Six6Sicks:
Anyone have this available to download?

Yes, I know, way outdated. Whatever.

Just looking for the original zip that Haykuro posted.

OP's Link can not be found.
[G1 Android Development] CharonIDRONES:
http://code.google. com/p/sapphire-port-dream/
[G1 Android Development] Six6Sicks:
Same link as the original post. Thanks for trying though.

NEXT!
[G1 Android Development] DirectMatrix:
Oh nevermind, I guess I should have looked for it before I clicked "reply". I used to have an archived version of this on my HDD forever and I guess I must have recently go rid of it....sorry
[G1 Android Development] jcarrz1:
http://rapidshare.com/files/318547925/ionr2-signed.zip
[G1 Android Development] Six6Sicks:
You always come through in the clutch. Thanks.
[G1 Android Development] jcarrz1:
anytime bro.
[G1 Android Development] dwang:
Ok, you're right after playing with it for a while, I do notice an increase in speed.
[G1 Android Development] Robot Teapot:
Just took a peek into why this build is so much faster than the others, and it appears that Google (or whoever is responsible for it's creation) has made ODEX Files (Optimized DEX Files) for each app in the build. Basically (from what i gather) these ODEX files can be created to speed up the execution of any specific application, but in doing so decreases it's security and ties it to that specific platform. For example, if that's true this build can only be run on a G1. This guy posts up a helpful bit of info on his experiences with ODEX Files, and what they're for: http://mylifewithandroid.blogspot.com/2009/02/optimized-dex-files.html

Anyways, im diggin the speed, maybe this is something that can be done for future builds to speed em up? who knows...
[G1 Android Development] mer6:
What?

If it can only be run with a G1, then how is it running on a G2?

Mind = Blown.
[G1 Android Development] mikedmeyer:
It would have to, since the ION/Magic doesn't have a physical keyboard.
[G1 Android Development] fdisk81:
2nd Word of Warning:

Applications built for rooted phones do not work: e.g. SetCPU (Overlocking) and Backup for Root Users (Backup and restore bookmarks, etc) do not work because they cannot gain root access.
[G1 Android Development] dwang:
Tmobile builds have the odex files built-in as well though.
[G1 Android Development] kptc21:
I would like to ask whether this rom includes CIME and chinese interface. Thanks...:D
[G1 Android Development] Robot Teapot:
Hmm... perhaps it just ties it to Android then, since that would technically be the "platform" not the device itself. And i know other builds have ODEX files as well, but when you look in this build almost EVERY app as an ODEX file to accompany it, especially the ones where you'd notice the speed difference, like Launcher.apk

So if these core applications have the ODEX files to get them up and running quick, then that's probably where we are seeing the speed boost?

EDIT - is this also true for TMO builds? ODEX's for nearly every app in the /app folder? (Launcher.apk + Launcher.odex etc.)