[TEST][MOD] Enable Art Runtime on Galaxy S4 KitKat

adojames

Member
Nov 29, 2006
27
4
0
I can confirm that with all files copied over including the files in system/bin that it currently doesn't work for me.

Also checked Odex using Odexertool and don't have Xposed installed. Rom I9505XXUFNC9.

lucky for all people who can get this working! Are there any improvements in battery life or performance?
 

locofocos

Senior Member
Jul 5, 2010
65
45
0
I've tried this on Echoe rom v20.3 ported to Verizon. It's based on 4.4.2, build I9505XXUFNBH. My device also returns to the Dalvik runtime on reboot.
 

deathst

Senior Member
Dec 24, 2009
301
191
0
Singapore
Yep for now this mod didn't work.
This would not work... HOWEVER!

If you take the files from CM or Paranoid.. It will show progress on logcat.. HOWEVER.. it will be stuck on boot (Samsung Logo) cause the /system/framework has files in there without classes.dex even on pure Samsung Stock roms.

Nice try though.
 

pramod_bem

Senior Member
Mar 17, 2011
108
13
0
Bangalore
Not working!!!

My phone is S4 19500 exonys.
Rooted but no custom rom installed

1.Uninstalled xposed and related modules
2.copied the files into right folders and set the permissions as rw-r--r--
3.rebooted and enabled art runtime from dev options
4.asked to reboot
5.rebooted still in dalvik.

please help.
 

dibartolodroid

Senior Member
Mar 29, 2013
406
96
0
My phone is S4 19500 exonys.
Rooted but no custom rom installed

1.Uninstalled xposed and related modules
2.copied the files into right folders and set the permissions as rw-r--r--
3.rebooted and enabled art runtime from dev options
4.asked to reboot
5.rebooted still in dalvik.

please help.
I am exactly in the same situation. Here is the screenshotuploadfromtaptalk1399288603104.jpg
When reboot the phone is always on Dalvik mode.
What can i do now ?
Thanks guys ....
Envoyé depuis mon GT-I9500 avec Tapatalk
 
Last edited:

deathst

Senior Member
Dec 24, 2009
301
191
0
Singapore
My phone is S4 19500 exonys.
Rooted but no custom rom installed

1.Uninstalled xposed and related modules
2.copied the files into right folders and set the permissions as rw-r--r--
3.rebooted and enabled art runtime from dev options
4.asked to reboot
5.rebooted still in dalvik.

please help.
I am exactly in the same situation. Here is the screenshotView attachment 2726729
When reboot the phone is always on Dalvik mode.
What can i do now ?
Thanks guys ....
Envoyé depuis mon GT-I9500 avec Tapatalk

there is no working solution at the moment!
 

MeThisGuy

Member
Jul 2, 2014
7
4
0
Xposed complete uninstall fix

http://forum.xda-developers.com/google-nexus-5/help/phone-wont-change-to-art-t2574626

"copy /system/bin/app_process.orig back to /system/bin/app_process using a root file explorer. turn on ART."

this is key. if you EVER installed Xposed, there will be an app_process.orig backup file which doesn't get reverted back upon uninstall. To change to ART after this you have to use a root file explorer to restore the original

took me a while to find. let me know if that helps and if this setup enabling ART runtime on the Galaxy s4 works after

more info about the Xploded installer here:
http://forum.xda-developers.com/showpost.php?p=24364236&postcount=8
http://forum.xda-developers.com/xposed/framework-xposed-rom-modding-modifying-t1574401
 

pgriffinsc

Senior Member
Dec 20, 2010
319
72
0
Charleston,S.C.
I tried this on my Sprint S4, and it wouldnt stick, so I went a step further.i downloaded a deodexed S5 rom and pulled the files from that, and still a no go . it'll let me select ART, but when I reboot, back to Dalvik. I'm on a stock, rooted and odexed rom without xposed installed

Sent from my SPH-L720 using XDA Premium 4 mobile app
 

sorg

Senior Member
Sep 5, 2006
1,049
1,136
143
台灣
This mod enable Art Runtime on Galaxy S4.
I've made some checks why ART doesn't work. It's because some limitation of ART compiler. Framework should be edited to remove JNI calls in static definitions. In SM-G900/901 Samsung had been made fixes, while non-art frameworks (in I9505/I9500) haven't been tweaked.
Unless these fixes in framework will be applied, ART won't work.
It requires a large time to find all these fixes and apply them correctly.
 
  • Like
Reactions: Albe95

citymen34

Senior Member
Feb 9, 2013
633
3,908
133
istanbul
I've made some checks why ART doesn't work. It's because some limitation of ART compiler. Framework should be edited to remove JNI calls in static definitions. In SM-G900/901 Samsung had been made fixes, while non-art frameworks (in I9505/I9500) haven't been tweaked.
Unless these fixes in framework will be applied, ART won't work.
It requires a large time to find all these fixes and apply them correctly.
art runtime require dex2oat file in system/bin from S5 firmware. i try but doesn't work. don't convert deodexed firmware.
 

sorg

Senior Member
Sep 5, 2006
1,049
1,136
143
台灣
Of course i know it. I've fixed all problematic static initializations in framework. Now i don't have any JNI errors while compiling in ART compiler, but at the end i have unclear exception:
Code:
I/Process ( 1063): Sending signal. PID: 1063 SIG: 3
I/dalvikvm( 1063): threadid=3: reacting to signal 3
F/libc    ( 7640): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 7640 (main)
I/SELinux (  348): Function: selinux_android_load_priority [0], There is no sepolicy file.
I/SELinux (  348):
I/SELinux (  348): Function: selinux_android_load_priority [1], There is no sepolicy version file.
I/SELinux (  348):
I/SELinux (  348): Function: selinux_android_load_priority , loading version is VE=SEPF_SHV-E330S_4.4.2_0011
I/SELinux (  348):
I/SELinux (  348):
I/SELinux (  348): get_selabel_handle: file_contexts is loaded from /file_contexts
I/DEBUG   (  348): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (  348): Build fingerprint: 'samsung/ks01ltexx/ks01lte:4.4.2/KOT49H/I9506XXUCNI1:user/release-keys'
I/DEBUG   (  348): Revision: '13'
I/DEBUG   (  348): pid: 7640, tid: 7640, name: main  >>> /system/bin/dex2oat <<<
I/DEBUG   (  348): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
I/DEBUG   (  348):     r0 84000000  r1 c2000000  r2 fffffeb4  r3 00000000
I/DEBUG   (  348):     r4 ad5fa778  r5 00000000  r6 300200c2  r7 2c80e308
I/DEBUG   (  348):     r8 b6f063b8  r9 00000000  sl 00000001  fp 00000000
I/DEBUG   (  348):     ip b6f00828  sp beffe760  lr b6ea5197  pc b6ea4fcc  cpsr 80070030
I/DEBUG   (  348):     d0  0000001100000010  d1  0000001300000012
I/DEBUG   (  348):     d2  0000001500000014  d3  0000001700000016
I/DEBUG   (  348):     d4  47f0464102c4f8df  d5  0000000000000000
I/DEBUG   (  348):     d6  0000000000000000  d7  0000000000000000
I/DEBUG   (  348):     d8  0000000000000000  d9  0000000000000000
I/DEBUG   (  348):     d10 0000000000000000  d11 0000000000000000
I/DEBUG   (  348):     d12 0000000000000000  d13 0000000000000000
I/DEBUG   (  348):     d14 0000000000000000  d15 0000000000000000
I/DEBUG   (  348):     d16 0000000100000000  d17 0000000300000002
I/DEBUG   (  348):     d18 0000000500000004  d19 0000000700000006
I/DEBUG   (  348):     d20 0000000900000008  d21 0000000b0000000a
I/DEBUG   (  348):     d22 0000000d0000000c  d23 0000000f0000000e
I/DEBUG   (  348):     d24 0000000000000000  d25 0000000000000000
I/DEBUG   (  348):     d26 0000000000000000  d27 0000000000000000
I/DEBUG   (  348):     d28 0000000000000000  d29 0000000000000000
I/DEBUG   (  348):     d30 0000000000000000  d31 0000000000000000
I/DEBUG   (  348):     scr 60000010
I/DEBUG   (  348):
I/DEBUG   (  348): backtrace:
I/DEBUG   (  348):     #00  pc 00075fcc  /system/lib/libart-compiler.so (art::MIRGraph::DoConstantPropogation(art::BasicBlock*)+67)
I/DEBUG   (  348):     #01  pc 00076193  /system/lib/libart-compiler.so (art::MIRGraph::PropagateConstants()+158)
I/DEBUG   (  348):     #02  pc 00077eb3  /system/lib/libart-compiler.so
I/DEBUG   (  348):     #03  pc 000782d3  /system/lib/libart-compiler.so (ArtQuickCompileMethod+34)
I/DEBUG   (  348):     #04  pc 0008a551  /system/lib/libart-compiler.so (art::CompilerDriver::CompileMethod(art::DexFile::CodeItem const*, unsigned int, art::InvokeType, unsigned short, unsigned int, _jobject*, art::DexFile const&, art::DexToDexCompilationLevel)+1200)
I/DEBUG   (  348):     #05  pc 0008a9d7  /system/lib/libart-compiler.so (art::CompilerDriver::CompileClass(art::ParallelCompilationManager const*, unsigned int)+494)
I/DEBUG   (  348):     #06  pc 0007f39d  /system/lib/libart-compiler.so
I/DEBUG   (  348):     #07  pc 001a8eed  /system/lib/libart.so (art::ThreadPool::Wait(art::Thread*, bool, bool)+136)
I/DEBUG   (  348):     #08  pc 0008299f  /system/lib/libart-compiler.so
I/DEBUG   (  348):     #09  pc 00089d09  /system/lib/libart-compiler.so (art::CompilerDriver::Compile(_jobject*, std::vector<art::DexFile const*, std::allocator<art::DexFile const*> > const&, art::ThreadPool&, art::base::TimingLogger&)+224)
I/DEBUG   (  348):     #10  pc 00089e1d  /system/lib/libart-compiler.so (art::CompilerDriver::CompileAll(_jobject*, std::vector<art::DexFile const*, std::allocator<art::DexFile const*> > const&, art::base::TimingLogger&)+60)
I/DEBUG   (  348):     #11  pc 00008d03  /system/bin/dex2oat
I/DEBUG   (  348):     #12  pc 0000b9c5  /system/bin/dex2oat
I/DEBUG   (  348):     #13  pc 0000e513  /system/lib/libc.so (__libc_init+50)
I/DEBUG   (  348):     #14  pc 00005060  /system/bin/dex2oat
I/DEBUG   (  348):
Google gives some links about similar problems, but don't give any exact solution.

I'm trying it on my SHV-E330S which is very close to SM-G900F by hardware and firmware - so i have more freedom in libraries swapping. I even compiled ART separately from AOSP sources and got the same result. May be some other libraries need to be swapped, but i couldn't track which one.
Actually i was just curious about porting ART feature, without any practical use because it's not compatible with xposed framework. May be i stop now. I'm tired and ran out of ideas...
 
Last edited:

donny2901

New member
Jun 5, 2014
4
0
0
Cant change on art. I use s4 with imperium rom. I select art in dev settings , it reboot but remain on dalvik, i unistalled xposed.
 
Last edited:

Lucasalexander11

New member
Jan 19, 2016
1
0
0
So I have a question, I have a note S4 and when I switched to ART runtime my phone was unable to reboot, it basically was able to load the window showing the T-Mobile icon and then would not go any further. It would retry to reboot until the phone ultimately overheated the battery. Keep in mind my phones data storage was nearly full. To reset to Dalvik I had to wipe cache partition and wipe data or factory reset. Luckily the data I needed was Backed up via my Google account. Should I just stick with Dalvik until the new OS runtime is released or should I open up the space required, and retry ART? For a good hour or so I had a dead note 4 which sucked! Don't want to have to go through all that again but I'd like to try the ART Runtime hence the faster system. Has anyone used it gotten good results?