-
-
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
error: Error: Resource is not public. #2033
Comments
No idea, too many variables to know.
SharedUserId helps Android know how to share application data among apps. So I imagine something would break with removing it.
Might be a bug, not sure at this point. You could try building with aapt2 via |
I got a similar error:
|
Sorry I took a year+ off basically and this link is a 404 and we have 2.4.1 out and v2.5.0 due in a few weeks. Closing as old and new versions on horizon. |
Seems this problem can still occur, even with apktool v2.7.0. I guess if an app is compiled in such a way that it accesses private properties, this problem can occur, as I'm guessing apktool simply doesn't generate the @* syntax but generates just the @ syntax. When I had this problem with an app, I changed the syntax to @* just like the bug reporter and that worked. For example, I changed this ...: After that, building the app worked, and the app worked fine. I think this issue can be reproduced with any app, just by accessing a private property. (Maybe some app developers do it on purpose to make rebuilding an app harder?) Also, useful to know: |
in my case i fixed it by changing the version of material dependency to 1.3.0 implementation 'com.google.android.material:material:1.3.0' but if you do not have the source code use older version of Apktool, try 2.6.1 |
Error
Installing AOSP Contacts.apk on a factory image on Nexus 5 produces this error:
[INSTALL_FAILED_SHARED_USER_INCOMPATIBLE]
I used apktool to decompile Contacts.apk and removed android:sharedUserId="android.uid.shared" from the AndroidManifest.xml
When I rebuild, I get this error. However I fixed it by renaming lines 162 and 169 to @*android:bool and signed it. Now the application installed and it's working fine.
My questions are,
1. Will there be any crashes in the app because I edited it? What part of the app will have errors or missing icons or text due to this?
2. Will there be any implications for removing android:sharedUserId="android.uid.shared"?
3. Why do I get this error for an unmodified apk? Is this a bug in apktool? Because it can't build back an unmodified AOSP apk
Thank you!
Stacktrace/Logcat
Information
apktool -version
) - Tried v2.0.0 to v2.4.0 with different errors.Steps to Reproduce
apktool d Contacts.apk
apktool b contacts
APK
https://drive.google.com/open?id=1mZ93G83ylEMoIO23SqizCJ_xQiL7dBdK
Questions to ask before submission
Have you tried
apktool d
,apktool b
without changing anything?Yes
If you are trying to install a modified apk, did you resign it?
Yes
Are you using the latest apktool version?
Yes
The text was updated successfully, but these errors were encountered: