Giter VIP home page Giter VIP logo

Comments (35)

rovo89 avatar rovo89 commented on September 18, 2024 1

Fixed in v83.

from android_art.

rovo89 avatar rovo89 commented on September 18, 2024

The problem seems to be specific to odexed system apps for which dex2oat fails when being run on-demand.

If dex2oat has to be run on demand, it's already too late. You can forget about the UID stuff, the question is why dex2oat isn't triggered earlier. You say that some apps were not optimized - do you have more information about that (e.g. logs where I can say that/why it fails or is skipped)? Does it try to repeat the optimization after a reboot?

from android_art.

m0vie avatar m0vie commented on September 18, 2024

Reboots did not cause the Nfc app to be compiled. It kept failing.

I just noticed that I did actually create a logcat of the first boot after xposed installation in recovery, and uploaded it: http://sprunge.us/ffKW

I could not find any indication as to why some apps would get compiled and others wouldn't.

from android_art.

rovo89 avatar rovo89 commented on September 18, 2024

You could please try https://www.dropbox.com/s/8lddtv03riu8a1r/xposed-v80-sdk23-arm64-test2.zip?dl=0? It fixes some early errors on LG devices, it might help here as well.

from android_art.

m0vie avatar m0vie commented on September 18, 2024

That build seems to work for me (flashed and cleared dalvik-cache).
No dex2oat errors in the boot log anymore.

Note however, that I did not do a complete wipe, but used the device in its current state. So some system apps such as com.google.android.gsf were already updated and the version from /data/ was used instead. But the one that kept failing all the time before (com.android.nfc / NfcNci) is still the original system app and works perfectly now.

from android_art.

purpleman2k avatar purpleman2k commented on September 18, 2024

Hey.
Having similar issues on Nexus 6P, stock 6.0.1 latest image (mmb29p).

The steps I took:

  1. Flashed stock from Google servers in fastboot
  2. Flash twrp
  3. Flash BETA-SuperSU-v2.67-20160121175247.zip
  4. Reboot. (everything works fine)
  5. Reboot back to twrp
  6. flash xposed.
  7. Reboot

and then services (namely "Nfc Service") start to force-close in a loop.

I tried the above steps with "xposed-v79-sdk23-arm64.zip" and also with "xposed-v80-sdk23-arm64-test2.zip"
Both versions result in the same issue :(

from android_art.

withlqs avatar withlqs commented on September 18, 2024

I also met these same problems in the same situation.

I try to shutdown and reboot nexus 6p, NFC problem will be solved, but some other system apps still display "stop" sometimes.

from android_art.

AziraphaleES avatar AziraphaleES commented on September 18, 2024

same scenario as purpleman2k. clean install of everything. neither v79 nor v80t2 work, both produce nfc service crash.

UPD. after playing with a device for a few hours (too many apps installed and customisations done to list all and be able to pinpoint the fix, but amongst them was unrooting from SuperSU and rerooting again) I was able to install v80t2 without NFC crash. hm.

from android_art.

scarline avatar scarline commented on September 18, 2024

Hey, I have the same issue with a brand new Nexus 6p.

  1. Flashed MMB29Q
  2. Flashed TRWP Recovery 3.0.0 angler
  3. Installed SuperSU BETA-SuperSU-v2.67-20160121175247 (all fine until here)
  4. Flashed xposed-v80-sdk23-arm64.zip
    ---> Get NFC Loop

I also tried:

  1. Flashed MMB29Q
  2. Flashed TRWP Recovery 3.0.0 angler
  3. Installed SuperSU BETA-SuperSU-v2.67-20160121175247
  4. Installed XposedInstaller_3.0_alpha4.apk (all fine until here)
  5. Flashed xposed-v80-sdk23-arm64.zip

---> Get NFC Loop

Changed SuperSu to multiuser-support, thrust for systemlevel applications and activation during boot in the options had NO effect.

I did hear that flashing xposed > do factory reset, cleaning data > install xposed installer > flash SuperSU could be a possible way that works. Does anyone have experience on this? Does it make a difference when the reboot is done by the xposed-installer?

Many people have his issue, so it must be related to the more recent versions. Is there a confirmation that v78 is working better and without FC for NFC and gaps? Is there a workaround? I would like to install xprivacy....

from android_art.

robertoandrade avatar robertoandrade commented on September 18, 2024

@rovo89 the link seems to be broken now. Is there a way to publish that fix again?

from android_art.

berlingozzo avatar berlingozzo commented on September 18, 2024

Same NFC loop problem here. My configuration/ procedure:

  1. nexus 5 lte
  2. flashed factory 6.0.1 MMB29Q
  3. flashed TWRP 3
  4. flashed SUPERSU 2.66 BETA
  5. flashed xposed-v80-sdk23-arm
  6. nfc loop

I have tried v78-sdk23-6.0-arm as well, same problem
I have tried disabling nfc first, setting SuperSU as multiuser support, start at boot, and trust system user, nothing.

Please help :)

thanks!

from android_art.

Inrego avatar Inrego commented on September 18, 2024

Just wanted to let you know, I had the same problem on AOSP 6.0 on Xperia Z2 tablet.. I then did factory reset, delete cache and dalvik from the recovery, and then it worked fine.

from android_art.

watchmakerful avatar watchmakerful commented on September 18, 2024

Confirmed on Nexus 5x on stock and Omni (both odexed), xposed v78..v80.

from android_art.

watchmakerful avatar watchmakerful commented on September 18, 2024

PS, it works after a factory reset until a dalvik cache wipe.

from android_art.

watchmakerful avatar watchmakerful commented on September 18, 2024

Many people have his issue, so it must be related to the more recent versions. Is there a confirmation that v78 is working better and without FC for NFC and gaps? Is there a workaround? I would like to install xprivacy....

Try a custom deodexed ROM (even simply a deodexed stock ROM). But it's strange to get this error on 32-bit.

from android_art.

pdc1 avatar pdc1 commented on September 18, 2024

Confirmed on Nexus 5 (32-bit). Stock MMB29V + SuperSU 2.68 (beta) + ElementalX kernel 6.14 + V80. Dirty flashing v78 resolved the problem.

from android_art.

PerfectSlayer avatar PerfectSlayer commented on September 18, 2024

Confirmed on Nexus 6 (32-bit). Stock MMB29V + SuperSU 2.67 (beta) + v79 and v80.

It's not the first time it happened to me.
I flash every monthly update and it happens about one times on three...
I could not find a rule to get rid of it… (dalvik cache wip? reboot? flash system again?)

If you need any log or test, ask me! Thanks πŸ‘

from android_art.

michaelprager avatar michaelprager commented on September 18, 2024

Have the same problem on my Nexus 5 (hammerhead) after Stock update MMB29V.

I fixed the FC by executing the failed command via adb root shell:

/system/bin/dex2oat --runtime-arg -classpath --runtime-arg /system/framework/XposedBridge.jar --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -Xnorelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/system/app/NfcNci/oat/arm/NfcNci.odex --oat-file=/data/dalvik-cache/arm/system@app@NfcNci@[email protected]

Interestingly, after the next reboot, 13 further apps were optimized which were obviously skipped on the initial run.

When I clear the dalvik-cache now, everything is properly optimized in one run.

from android_art.

rovo89 avatar rovo89 commented on September 18, 2024

Please avoid "me too" comments. I'll let you know when I have time to analyze this further. I might need further logs then, especially of the initial boot where it misses to compile certain apps. I would like to see if they're mentioned at all and why they're skipped.

from android_art.

kwatkins avatar kwatkins commented on September 18, 2024

This worked for me, what @michaelprager did but for Nexus 6P/arm64:

/system/bin/dex2oat --runtime-arg -classpath --runtime-arg /system/framework/XposedBridge.jar --instruction-set=arm64 --instruction-set-features=smp,a53 --runtime-arg -Xnorelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m -j2 --instruction-set-variant=cortex-a53 --instruction-set-features=default --dex-file=/system/app/NfcNci/oat/arm64/NfcNci.odex --oat-file=/data/dalvik-cache/arm64/system@app@[email protected]@classes.dex

from android_art.

stangri avatar stangri commented on September 18, 2024

Had the same problem on Nexus 6. @michaelprager's trick didn't help, besides NFC there were problems with the other services. Even with the trick above I've had only a handful of apps (sometimes 13, sometimes 31, sometimes 31 and the count up would start from 10) which would optimize after cleaning cache.

TL;DR version -- before flashing Xposed I've flashed LED Enabler and I believe that was the reason Xposed flash "didn't take".

What did help me was:

  1. dirty-flash shamu-mmb29v
  2. adb reboot bootloader; fastboot boot twrp-3.0.0-1-shamu.img
  3. flash chainfire's SuperSU-v2.68.zip
  4. restart system
  5. ensure I have root, uninstall Xposed apk and all Xposed modules
  6. adb reboot bootloader; fastboot boot twrp-3.0.0-1-shamu.img
  7. make room in /system/ for Xposed (mount /system in twrp, adb shell and remove some IMEs)
  8. restart system
  9. make sure nothing is broken yet
  10. adb reboot bootloader; fastboot boot twrp-3.0.0-1-shamu.img
  11. flash xposed-v80-sdk23-arm.zip, use "clean dalvik/cache" option of twrp
  12. restart system
  13. reinstall (redownload) Xposed apk and modules
  14. adb reboot bootloader; fastboot boot twrp-3.0.0-1-shamu.img
  15. reinstall LED Enabler

from android_art.

yrom avatar yrom commented on September 18, 2024

Came across the same problem:

03-29 18:21:44.900 24452-24452/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/system@app@[email protected]@classes.dex: Permission denied
03-29 18:21:44.902 24434-24434/? W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg /system/framework/XposedBridge.jar --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -Xnorelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/system/app/CloudPrint2/CloudPrint2.apk --oat-file=/data/dalvik-cache/arm/system@app@[email protected]@classes.dex) because non-0 exit status

Thanks @michaelprager, I re-exec the command of dex2oat manually via adb shell as root user.

➜~ adb shell
shell@hammerhead:/ $ su
root@hammerhead:/ # /system/bin/dex2oat --runtime-arg -classpath --runtime-arg /system/framework/XposedBridge.jar --instruction-set=arm --instruction-set-features=smp,-div,-atomic_ldrd_strd --runtime-arg -Xnorelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/system/app/CloudPrint2/CloudPrint2.apk --oat-file=/data/dalvik-cache/arm/system@app@CloudPrint2@[email protected]

The CloudPrint2 does not FC again..

from android_art.

rovo89 avatar rovo89 commented on September 18, 2024

Could you try this please?
https://www.dropbox.com/s/2wqrzrydabq4qbp/xposed-v83-sdk23-arm-test2.zip?dl=0
https://www.dropbox.com/s/473up554s3d07ax/xposed-v83-sdk23-arm64-test2.zip?dl=0
(you should propably clear the Dalvik cache if you have used some work-around before)

If this works, please just let me know and I'll release an official version with the fix soon. There's no need to create guides how to use these test versions, upload them to alternative places, ...

from android_art.

m0vie avatar m0vie commented on September 18, 2024

Just flashed Nexus 6P mhc19q + xposed v83-sdk23-arm64-test2 and cleared the Dalvik cache. All apps were compiled on the first boot, and no crashes afterwards.

from android_art.

rovo89 avatar rovo89 commented on September 18, 2024

Great! Further tests would still be welcome, I'll do some more myself.

Just out of curiosity: Is there really a compiled file for NfcNci.apk in the Dalvik cache afterwards? There might not be one, and the trick is actually that apps should be able to run even if they haven't been recompiled.

from android_art.

m0vie avatar m0vie commented on September 18, 2024
/data/dalvik-cache/arm64/system@app@[email protected]@classes.dex   856744  2009-01-01 09:00:00

is there. Il'l have another detailed look later, but so far everything looks good.

from android_art.

rovo89 avatar rovo89 commented on September 18, 2024

OK. The issue is actually a bit more complex... Android sometimes decides to skip some apps when they haven't been used for a longer time. This behavior was even intensified on 6.0.1: aosp-mirror/platform_frameworks_base@71d3260

In your case, it seems that the system has decided to compile the app anyway. My fix is especially about those case where the app wasn't compiled.

from android_art.

m0vie avatar m0vie commented on September 18, 2024

Does that mean that the app will be compiled on-the-fly? Is that going to degrade performance in some way?

from android_art.

rovo89 avatar rovo89 commented on September 18, 2024

As far as I could see so far, these apps aren't compiled at all, but interpreted. That will certainly have a little performance impact, but keep in mind that these are very few apps, and especially those which haven't been used for a longer time. Android might still decide to compile them at a later time if they're actually used. And the point is: AOSP already has the same behavior. It just wasn't used when Xposed is installed because Xposed forces the image to be recompiled, so checksums didn't match, and also it checks that the file is recompiled for Xposed. My changes allow the interpreted usage of the odex file when everything else has failed. And that's still better than a bootloop, right? 😊

from android_art.

giantpune avatar giantpune commented on September 18, 2024

I experienced this issue on a nexus 5x with factory images (mhc19q). I was able to get the system to actually boot using this approach. #28 (comment) I grep logcat looking for the Failed execv( and then manually running those commands as root.

However, even though the system boots up, even some 3rd party apps installed from the play store are crashing with this same type of issue.

from android_art.

rovo89 avatar rovo89 commented on September 18, 2024

@giantpune Did you try the test version I posted above?

from android_art.

giantpune avatar giantpune commented on September 18, 2024

It seems like that test2 zip did fix the issue with the app I was having. I'll play with it some more and report back if I notice some other app misbehaving.

from android_art.

Modzon avatar Modzon commented on September 18, 2024

Test version did worked. Apps are decompiled. But apps moved to external-sd won't load and some apps won't uninstall/install

EDIT: Apps moved to external-sd are loading, but it takes very long to load. The same for uninstalling apps

from android_art.

rovo89 avatar rovo89 commented on September 18, 2024

@Modzon Could you please be more specific? Does it affect all apps that you have moved? How have you moved them? Does moving them back to internal space help? Does the issue come back when you move them to external SD again? Which apps can't be installed/uninstalled? What's the error message? Can you provide logs for any of these issues?

from android_art.

Modzon avatar Modzon commented on September 18, 2024

@rovo89 The problem of the apps that won't load is already fixed. The most app's I've moved to the external sdcard with the adoptable storage of Android MM. The uninstallation problem only affects the smaller apps moved to the external sdcard but it is also fixed.

from android_art.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.