Search This thread

PradeepMurugan

Senior Member
Oct 2, 2013
255
316
30
Karur
What is ART?
ART stands for Android runtime which is a new runtime like Dalvik which is introduced experimentally in the 4.4 release. This is a preview of work in progress in KitKat that can be turned on in Settings > developer option.n 4.4 both runtimes are now available, Dalvik runtime (libdvm.so) and the ART (libart.so).The user can choose it from developer options.

Difference between Dalvik and ART
Dalvik
Dalvik runtime uses JIT(Just-In-Time) compilation to interpret Bytecode
Now lets understand the technical info and terms in the above sentence.

Compiler
A compiler is a program or set of programs that transforms source code written in a programming language (the source language) into another computer language
Bytecode
Bytecode also known as p-code (portable code), is a form of instruction set designed for efficient execution by a software interpreter
Interpreter
Interpreter is a program which translates the source code into computer/machine language
JIT compliation
JIT compliation interprets the bytecode into machine language at it's runtime (at the time when the apps are executed).

Now summing up all these Dalvik runtime does everything when the apps are executed. Now this is where we must discuss odexed and deodexed ROM. usually all stock ROMs released by OEMs are only odexed only due to this reason. odex means a part of the app is already compiled and it is written into dalvik VM(VM=Virtual Machine). and it runs at boot so while execution of apps JIT has to compile only the remaining part of the code when the apps is executed, this is why odexed ROM is faster than deodexed ROM.

But the disadvantage of odexed ROM is it cannot be edited/themed easily as a part of code is seperated in a separate file, and deodexing means the odex part of the file is put back into the apk/jar itself which makes editing/theming easy since the full code is packed inside a single file but it decreases speed because JIT has to compile full code when the app is executed

ART

ART uses AOT compilation to interpret bytecode.

I hope you can refer to dalvik paragraph to know about these technical terms. :p
what is AOT compilation
AOT is a method of compilation which compiles the code into machine language when the app is installed itself, means no compilation is done at the time of execution of app. This makes the apps launch speed amazingly fast.

Advantages of ART over Dalvik

  • The apps launch speed is amazingly fast in case of ART since nothing is compiled at execution.
  • Boot speed is faster than dalvik since nothing is execued from dalvik partition as in case of odexed ROM in dalvik
  • Increases battery backup by reducing CPU work due to absence of compilation work on apps execution.
  • And finally it is a great reward to developers because most of developers are worried that odexed ROMs are faster than deodexed ROMs but they will deodex their ROMs since they heavily theme it. In case of ART whether the ROM is odexed or deodexed it doesn't matter, it compiles the full code into machine language on installation of apps. so even deodexed ROMs are as fast as odexed in ART

Some disadvantages of ART
  • Since ART precompiles apps on installation, it takes 10-20% more space upon installation than dalvik. But this can be simply solved by using apps like apps2sd/link2sd/gl2sd when your apps storage partition is full
  • One more is since it is only experimental feature now some apps are incompatible in ART which will be made compatible soon on their updates.

Here is the list of apps which are compatible and incompatible in ART.
http://www.androidruntime.com/list

Finally ART is one of the best feature that google brought up in android 4.4 (kitkat)
 

gigawatt

Senior Member
Nov 19, 2008
140
16
so, what if I get a rom like that which is on the nexus 6, and it has apks and odex files, how can you deodex these apks, there oviously odexed, because apks like maps are split compared to the deodexed apk, so are they not able to be odexed, or how can this be done
What is ART?


Difference between Dalvik and ART







Now summing up all these Dalvik runtime does everything when the apps are executed. Now this is where we must discuss odexed and deodexed ROM. usually all stock ROMs released by OEMs are only odexed only due to this reason. odex means a part of the app is already compiled and it is written into dalvik VM(VM=Virtual Machine). and it runs at boot so while execution of apps JIT has to compile only the remaining part of the code when the apps is executed, this is why odexed ROM is faster than deodexed ROM.

But the disadvantage of odexed ROM is it cannot be edited/themed easily as a part of code is seperated in a separate file, and deodexing means the odex part of the file is put back into the apk/jar itself which makes editing/theming easy since the full code is packed inside a single file but it decreases speed because JIT has to compile full code when the app is executed








Here is the list of apps which are compatible and incompatible in ART.
http://www.androidruntime.com/list

Finally ART is one of the best feature that google brought up in android 4.4 (kitkat)
 

PradeepMurugan

Senior Member
Oct 2, 2013
255
316
30
Karur
so, what if I get a rom like that which is on the nexus 6, and it has apks and odex files, how can you deodex these apks, there oviously odexed, because apks like maps are split compared to the deodexed apk, so are they not able to be odexed, or how can this be done

I would first ask you have you seen any such rom first? Mostly 5.0(Lollipop) ROM doesn't have odex files. I own a Nexus 7 2013 LTE version and I am using 5.0. Still now I have used many Lollipop ROMs but i haven't came across any odex files because In lollipop ART is the only Runtime unlike in 4.4. So There is no need of .odex files in lollipop.

P.S : Some claim that they have .odex files in lollipop rom But i haven't seen it. If i get to know it is true or not then we may get a clear conclusion
 

gigawatt

Senior Member
Nov 19, 2008
140
16
well, on the nexus 6 there is a folder for each app and inside is an apk file for the app, in some cases a lib folder with lib files inside and then an arm folder with a .odex file, so, either this is an odexed rom, or the files are there as place holders, but there rather large for place holders
I would first ask you have you seen any such rom first? Mostly 5.0(Lollipop) ROM doesn't have odex files. I own a Nexus 7 2013 LTE version and I am using 5.0. Still now I have used many Lollipop ROMs but i haven't came across any odex files because In lollipop ART is the only Runtime unlike in 4.4. So There is no need of .odex files in lollipop.

P.S : Some claim that they have .odex files in lollipop rom But i haven't seen it. If i get to know it is true or not then we may get a clear conclusion
 

PradeepMurugan

Senior Member
Oct 2, 2013
255
316
30
Karur
well, on the nexus 6 there is a folder for each app and inside is an apk file for the app, in some cases a lib folder with lib files inside and then an arm folder with a .odex file, so, either this is an odexed rom, or the files are there as place holders, but there rather large for place holders

well even I have lib folder and arm folder but there is no odex file inside them
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    What is ART?
    ART stands for Android runtime which is a new runtime like Dalvik which is introduced experimentally in the 4.4 release. This is a preview of work in progress in KitKat that can be turned on in Settings > developer option.n 4.4 both runtimes are now available, Dalvik runtime (libdvm.so) and the ART (libart.so).The user can choose it from developer options.

    Difference between Dalvik and ART
    Dalvik
    Dalvik runtime uses JIT(Just-In-Time) compilation to interpret Bytecode
    Now lets understand the technical info and terms in the above sentence.

    Compiler
    A compiler is a program or set of programs that transforms source code written in a programming language (the source language) into another computer language
    Bytecode
    Bytecode also known as p-code (portable code), is a form of instruction set designed for efficient execution by a software interpreter
    Interpreter
    Interpreter is a program which translates the source code into computer/machine language
    JIT compliation
    JIT compliation interprets the bytecode into machine language at it's runtime (at the time when the apps are executed).

    Now summing up all these Dalvik runtime does everything when the apps are executed. Now this is where we must discuss odexed and deodexed ROM. usually all stock ROMs released by OEMs are only odexed only due to this reason. odex means a part of the app is already compiled and it is written into dalvik VM(VM=Virtual Machine). and it runs at boot so while execution of apps JIT has to compile only the remaining part of the code when the apps is executed, this is why odexed ROM is faster than deodexed ROM.

    But the disadvantage of odexed ROM is it cannot be edited/themed easily as a part of code is seperated in a separate file, and deodexing means the odex part of the file is put back into the apk/jar itself which makes editing/theming easy since the full code is packed inside a single file but it decreases speed because JIT has to compile full code when the app is executed

    ART

    ART uses AOT compilation to interpret bytecode.

    I hope you can refer to dalvik paragraph to know about these technical terms. :p
    what is AOT compilation
    AOT is a method of compilation which compiles the code into machine language when the app is installed itself, means no compilation is done at the time of execution of app. This makes the apps launch speed amazingly fast.

    Advantages of ART over Dalvik

    • The apps launch speed is amazingly fast in case of ART since nothing is compiled at execution.
    • Boot speed is faster than dalvik since nothing is execued from dalvik partition as in case of odexed ROM in dalvik
    • Increases battery backup by reducing CPU work due to absence of compilation work on apps execution.
    • And finally it is a great reward to developers because most of developers are worried that odexed ROMs are faster than deodexed ROMs but they will deodex their ROMs since they heavily theme it. In case of ART whether the ROM is odexed or deodexed it doesn't matter, it compiles the full code into machine language on installation of apps. so even deodexed ROMs are as fast as odexed in ART

    Some disadvantages of ART
    • Since ART precompiles apps on installation, it takes 10-20% more space upon installation than dalvik. But this can be simply solved by using apps like apps2sd/link2sd/gl2sd when your apps storage partition is full
    • One more is since it is only experimental feature now some apps are incompatible in ART which will be made compatible soon on their updates.

    Here is the list of apps which are compatible and incompatible in ART.
    http://www.androidruntime.com/list

    Finally ART is one of the best feature that google brought up in android 4.4 (kitkat)