abforce / xposed_art_n

ART module for a built-in enabled Xposed firmware based on AOSP 7
Other
171 stars 43 forks source link

Some questions about recompiling #2

Closed aviraxp closed 7 years ago

aviraxp commented 7 years ago

Thx for your excellent work!

But as you are leaving out the force recompiling part (maybe the most difficult part), I guess it will not work on an existing rom, even if shipping the files you modified? Or it will work if clearing up all the oat/odex files (full wipe, for end users) and using a not pre-odexed rom? From the code I suspect it.

Thx again!

abforce commented 7 years ago

My primary goal is to build a fully built-in Xposed custom ROM, not a patch intended for applying on existing ROMs, exactly what rovo89 did and does. So, at the build time of ROM all dex files are compiled using our own modified compiler, which takes care of those concerns that rovo89 had to recompile lots of files because of them (e.g. method inlining and so forth).

Please note that, the compiler itself doesn't change a lot. Only 2 or 3 lines are commented out or changed, those relating to method inlining and method direct call. However majority of rovo89's efforts devotes to how to recompile system compiled files again with the modified compiler, which in my goal, this requirement doesn't matter anymore.

aviraxp commented 7 years ago

I see. I omitted the dex part. You remind me of this, https://github.com/rovo89/android_art/issues/61, I believe rovo has reached this state, but recompiling should be the most difficult part.

But as for dex, do you mean the dex files (inside apk) is different from the regular ones? Shouldn't that be odex or oat files, or I missed something?

abforce commented 7 years ago

Yes, recompiling is the most difficult part.

When you build AOSP, in the meantime dex2oat (which is a command line tool for ART compiler) runs and compiles a lot of system dex files to odex files.

aviraxp commented 7 years ago

Yes, but we can always disable dex2oat when building (build a userdebug build etc.), so the /system will not contain any odex or oat files, and the jars and apks will be optimized when device first boots. So if we replace the file before first boot, I simply think this would work too?

And would you like to give a prebuilt binary of relevant files (as rovo does), to let us give a test?

vipzrx commented 7 years ago

My primary goal is to build a fully built-in Xposed custom ROM, not a patch intended for applying on existing ROMs, exactly what rovo89 did and does. So, at the build time of ROM all dex files are compiled using our own modified compiler, which takes care of those concerns that rovo89 had to recompile lots of files because of them (e.g. method inlining and so forth). @aviraxp 得找个支持aosp的手机,用作者修改过的编译器来编译xposed,并打包进rom了

aviraxp commented 7 years ago

@vipzrx What you said does not make any sense.

aviraxp commented 7 years ago

Just heads up, I am sure that that it can run on any rom similiar to AOSP (not many modification with ART), we just need to clear /cache and /data (ensure all oat/odex files are deleted), and make a userdebug build to let ART compile odex/oat files at first boot.