Giter Site home page Giter Site logo

Comments (8)

petefoth avatar petefoth commented on August 20, 2024

I believe what's happening is that the APK is getting its libs unpacked but then being repacked and not signed. I have attempted to remedy this by adding the following to each APK definition:

I remember bumping into issues like this a while back, when working on IodéOS not los4microg. I don't think the APK should be getting its libs unpacked and then signed because i is already pre-signed. In our Android.mk we have the line
LOCAL_CERTIFICATE := PRESIGNED
Are you using our Android.mk? If not, have you got the LOCAL_CERTIFICATE := PRESIGNED line in yours?

from android_vendor_partner_gms.

cawilliamson avatar cawilliamson commented on August 20, 2024

Are you using our Android.mk? If not, have you got the LOCAL_CERTIFICATE := PRESIGNED line in yours?

I'm using your configs so yep - PRESIGNED is present. This issue is baffling me - not sure why the APKs are being messed with. I believe it's just because GmsCore contains libs but still... very strange.

from android_vendor_partner_gms.

petefoth avatar petefoth commented on August 20, 2024

I'm using your configs so yep - PRESIGNED is present. This issue is baffling me - not sure why the APKs are being messed with. I believe it's just because GmsCore contains libs but still... very strange.

Then I'm baffled too. Just for information, here's the issue where we dealt with this in IodéOS
https://gitlab.com/iode/os/public/lineage/vendor_extra/-/issues/4

Maybe worth looking at the second fix -

adding the following line to the Android.mk files means that the original apk is installed rather than the signature stripped version.
LOCAL_REPLACE_PREBUILT_APK_INSTALLED := $(LOCAL_PATH)/$(LOCAL_MODULE).apk

But I think I'm clutching at straws here :(

from android_vendor_partner_gms.

cawilliamson avatar cawilliamson commented on August 20, 2024

But I think I'm clutching at straws here :(

Well - great clutching because that was EXACTLY the issue and your fix worked wonderfully. :)

Thanks a lot for the advice - very greatly appreciated. May be worth noting that in the README for any other poor soup facing the same issue with other ROM. :)

from android_vendor_partner_gms.

petefoth avatar petefoth commented on August 20, 2024

May be worth noting that in the README for any other poor soup facing the same issue with other ROM. :)

I'll do that before I close this issue. Please can you give me a bit more information about how you are / were trying to use the components from this repo? In particular,

  • which Android version(s) you were building?
  • how you were including these components? Just adding this repo to a local manifest as described in our README.md or...?

I've had a quick look at @VoltageOS and your treble_voltage repo but there's quite a lot there to take in :)

from android_vendor_partner_gms.

petefoth avatar petefoth commented on August 20, 2024

Draft text for the README


Note 3. If you encounter problems related to APK / app signing when using these components you may need to add the following line in the Android.mk for the component in question:

LOCAL_REPLACE_PREBUILT_APK_INSTALLED := $(LOCAL_PATH)/$(LOCAL_MODULE).apk

Such problems can occur when

  • the app / APK is resigned with your keys; (this should not happen if the line LOCAL_CERTIFICATE := PRESIGNED is included in the app makefile)
  • app / APK signatures are 'stripped` during the during the deodexing phase of the build. For some apps the deodexed app ends up unsigned, and so will not run.

(Some background to this can be found [here](link to this issue) and [here](link to the IodéOS gitlab issue))


from android_vendor_partner_gms.

cawilliamson avatar cawilliamson commented on August 20, 2024

Exactly that @petefoth! :)

I was trying to build Android 14, I included them with this patch: https://github.com/cawilliamson/treble_voltage/blob/14/patches/personal/platform_device_phh_treble/0011-Add-microG-to-build-script.patch

It's a GSI meaning it can be made to run on many devices with one image but that's more just FYI - not really relevant to the ticket. 👍

Not sure if you want to go in to this detail but the symptoms can display as certain apps (in my case, FakeStore and GmsCore) missing completely from your launcher and acting like they're not installed. To check users can run:

$ adb wait-for-device logcat | grep "unable to parse SigningDetails"

Again - not sure if that's too much info - I'd imagine anyone getting to the point where this becomes a problem would have checked logcat already although I'll admit it took me an embarrassing amount of time to find the problem! :)

from android_vendor_partner_gms.

petefoth avatar petefoth commented on August 20, 2024

README.md updated.

Closing

from android_vendor_partner_gms.

Related Issues (17)

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.