In the continuing OmniRom saga, another day with another fail:

[CODE]FAILED: /bin/bash -c “(mkdir -p out/target/product/h811/obj/APPS/CaptivePortalLogin_intermediates/oat/arm64/ && rm -f out/target/product/h811/obj/APPS/CaptivePortalLogin_intermediates/oat/arm64/package.odex ) && (find out/target/common/obj/APPS/CaptivePortalLogin_intermediates/ -maxdepth 1 -name \”classes*.dex\” | sort | xargs zip -0qjX out/target/product/h811/obj/APPS/CaptivePortalLogin_intermediates/oat/arm64/package.odex ) && (mv out/target/product/h811/obj/APPS/CaptivePortalLogin_intermediates/oat/arm64/package.odex out/target/product/h811/obj/APPS/CaptivePortalLogin_intermediates/oat/arm64/package.odex.input ) && (rm -f out/target/product/h811/obj/APPS/CaptivePortalLogin_intermediates/oat/arm64/package.odex ) && (mkdir -p out/target/product/h811/obj/APPS/CaptivePortalLogin_intermediates/oat/arm64/ ) && (ANDROID_LOG_TAGS=\”*:e\” out/host/linux-x86/bin/dex2oatd –runtime-arg -Xms64m –runtime-arg -Xmx512m –runtime-arg -classpath –runtime-arg \”&\” –boot-image=out/target/product/h811/dex_bootjars/system/framework/boot.art –dex-file=out/target/product/h811/obj/APPS/CaptivePortalLogin_intermediates/oat/arm64/package.odex.input –dex-location=/system/app/CaptivePortalLogin/CaptivePortalLogin.apk –oat-file=out/target/product/h811/obj/APPS/CaptivePortalLogin_intermediates/oat/arm64/package.odex –android-root=out/target/product/h811/system –instruction-set=arm64 –instruction-set-variant=generic –instruction-set-features=default –include-patch-information –runtime-arg -Xnorelocate –no-generate-debug-info –abort-on-hard-verifier-error –no-inline-from=core-oj.jar   –compile-pic ) && (rm out/target/product/h811/obj/APPS/CaptivePortalLogin_intermediates/oat/arm64/package.odex.input )”dex2oatd E 16505 16505 art/runtime/gc/heap.cc:324] Could not create image space with image file ‘out/target/product/h811/dex_bootjars/system/framework/boot.art’. Attempting to fall back to imageless running. Error was: Failed to load /system image ‘out/target/product/h811/dex_bootjars/system/framework/arm64/boot-telephony-ext.art’: Failed to mmap at expected address, mapped at 0x2b038dbfd000 instead of 0x70ddd000 : Requested region 0x70ddd000-0x70dde000 overlaps with existing map 0x70ddd000-0x70dde000 (/home/alaskalinuxuser/compile/20170727_aospa7/out/target/product/h811/dex_bootjars/system/framework/arm64/boot-telephony-ext.art)dex2oatd E 16505 16505 art/runtime/gc/heap.cc:324] 0x70ddd000-0x70dde000 rw- /home/alaskalinuxuser/compile/20170727_aospa7/out/target/product/h811/dex_bootjars/system/framework/arm64/boot-telephony-ext.art[/CODE]
It took me a while to figure this out, but the heart and soul of this problem lies with ART’s AOT (Ahead Of Time) preoptimization. Fortunately, I found a helpful tidbit on how to disable the preoptimization of this app. I did so here, in the /frameworks/base/packages/captiveportallogin/AndroidManifest.xml file:

[CODE]
    <application android:label=”@string/app_name” android:vmSafeMode=”true” >        <activity            android:name=”com.android.captiveportallog
[/CODE]
By adding android:vmSafeMode=”true”, the AOT of ART is disabled for this app. You can read more about that here: https://developer.android.com/guide/topics/manifest/application-element.html#vmSafeMode
Linux – keep it simple.

Leave a Reply

Your email address will not be published. Required fields are marked *