-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PlatformBuildVersion information changes unexpectedly #1909
Comments
So the aapt internal to Apktool, I imagine has those properties. Our best solution in this case is to not touch those properties. |
Hi, |
Hi |
Thanks, |
@gino247 Not in my understanding, the platform is the version that is built. Frameworks have nothing to do with that. Apktool introduced the notion of frameworks so it could keep resources from OEMs / other versions, instead of referring to the internal SDK set of resources. It would be a patch to send those versions to aapt so it can include that version information - which is too much work. The real fix is to prevent clobbering those fields and keep them unchanged. |
Hi, Finally managed to get a build working on a mac. Any how added the following to Resource.cpp:
Inside function A quick test seems to generate the right out. Also if the values are not set in bundle then it gets pulled from the framework (1.apk) apk. So if these changes are ok, what is next to get it a fix released? Regards, |
Forgot to mention I only made the changes on aapt not aapt2. As that just fails. |
Hi, If you need me to push these changes via git then I can also do so, might just need access then. Regards, |
Hi, You are welcome to "fork" the frameworks_base repo I have and make a pull request. I can't currently accept the PR unless both aapt2/aapt1 have the feature. If you submit just aapt1, I'll have to spend some time creating a patch for aapt2. After we review the patches, then it'll be merged in and be in the next release. |
Hi, Ok. I will see if I can find the spot in aapt2, but I have no way of testing aapt2 since it just fails without any changes. Regards, |
Hi, Any ideas? Regards, |
Hi, I have forked and created a pull request. Regards, |
Hi, Ok I have forked and made changes on my side. Regards, |
@gino247 I don't see any pull-requests. Confirm you are using
To submit pull-requests. |
My bad it should be there now. |
Hi @gino247 @iBotPeaches, Is it possible to get a version of apktool with this fix? Or is the only option to compile it ourself? Thanks in advance! |
Thanks! We’re currently also trying to compile ourselves to get a version with this fix. Would be extremely handy if a release could be provided. |
Hi, @prabhu-bsft , @mkilling e.g. (Linux)
Hope this helps, till the next release. |
@gino247 Thanks a lot. I will try it out. |
Rebuilding with appt2 fixes PlatformBuildVersionName but I still get: android:compileSdkVersionCodename="6.0-2438415" Not sure if this can be deployed to play store. Will have to try later. I suppose both android:compileSdkVersion and android:compileSdkVersionCodename come from framework so don't really matter? Will deploy it to play store later. |
Hiya folks. I've looped back to this ticket after clearing a backlog of tasks. I've merged the fix for aapt1 in regards to inheriting platform* values during build. This fix is only in aapt1 as of now. Patching this same change for v2 is under investigation, but anyone can help with that stage. My low level AOSP knowledge, especially in regards to C++ is not good so it will take me effort to patch aapt2 for this change. The patch for aapt1 if anyone is interested in contributing the aapt2 patch - iBotPeaches/platform_frameworks_base@4b10686#diff-e7a93bfac1c422acb7946f9512eb2712 |
Okay, so this is good to go. aapt1 has been patched to act the same way aapt2 does. I confirmed this by building an application in Android Studio, then decoding it and rebuilding it both aapt1/aapt2. I compared the output of There is regression for the |
Information
apktool -version
) 2.3.4 -Steps to Reproduce
platformBuildVersionCode="27" platformBuildVersionName="8.1.0"
platformBuildVersionCode="23" platformBuildVersionName="6.0-2438415"
So now playstore is rejecting the apk.
What am I missing or is this a real issue?
Questions to ask before submission
apktool d
,apktool b
without changing anything? yesThe text was updated successfully, but these errors were encountered: