rovo89 / android_art

Android ART with modifications for the Xposed framework.
Other
371 stars 211 forks source link

Do not abort on additional SYSTEMSERVERCLASSPATH #14

Closed arter97 closed 8 years ago

arter97 commented 8 years ago

It'll be not a major fix, but I'll still appreciate it if you apply it.

http://forum.xda-developers.com/android/development/fixing-boot-custom-kernels-support-t3170606 Patch is attached.

rovo89 commented 8 years ago

If I understand the problem correctly, CM requires an additional file in the SYSTEMSERVERCLASSPATH, which doesn't exist on other ROMs, so you have a problem when you want to build a kernel that works for both. Right?

Hm, I'm not so convinced of your patch. Some issues I have with it:

From my point of view, better solutions would be:

  1. Only add the additional file to SYSTEMSERVERCLASSPATH if it exists or if a certain ROM is detected.
  2. Limit your patch to the SYSTEMSERVERCLASSPATH, e.g. by checking the package (if possible) and whether getenv("SYSTEMSERVERCLASSPATH") contains the file. Also keep logging that the file wasn't found and return that no dexopt is needed.
  3. Adjust the SYSTEMSERVERCLASSPATH dynamically.

I would definitely prefer option 1, if somehow possible. Not sure if conditions are supported in init.rc, but maybe there's a similar way.

Otherwise, option 3 might be possible. Not sure about the best place, but maybe when the runtime is created, it could check SYSTEMSERVERCLASSPATH and remove any non-existent files from the environment variable. Or maybe in app_process, and only when the Zygote for the system_server is started? Obviously, it would still have to log what it did.

rovo89 commented 8 years ago

Any progress here? Is this still needed or can it be closed?

arter97 commented 8 years ago

Nah, just close it. This is a rare case and I don't think it's worth it to "code" for a better fix. On Sep 30, 2015 6:32 PM, "rovo89" notifications@github.com wrote:

Any progress here? Is this still needed or can it be closed?

— Reply to this email directly or view it on GitHub https://github.com/rovo89/android_art/issues/14#issuecomment-144338201.