Git Product home page Git Product logo

Comments (7)

iBotPeaches avatar iBotPeaches commented on June 11, 2024 1

Problem with Apktool though, it can't know a resource is unused till it's done parsing application. It then further would have to rewrite files. It seems that more invocation with aapt2 to dump resources prior (to detect unused) may be best path forward.

from apktool.

iBotPeaches avatar iBotPeaches commented on June 11, 2024 1

Sorry - as you saw above. I cannot replicate.

from apktool.

iBotPeaches avatar iBotPeaches commented on June 11, 2024

This appears to be same issue I disclosed in this comment: #3129 (comment), which in short I believe might be resource shrinking killing an unused resource, but not removing it from all usage.

This is ignored on Android (host), but during rebuild since the source attribute is gone - it fails.


➜  3432 aapt2 d xmltree MiuiSystemUI.apk --file res/drawable/miuix_action_icon_cancel_dark.xml
N: android=http://schemas.android.com/apk/res/android (line=1)
  N: app=http://schemas.android.com/apk/res-auto (line=1)
    E: drawable (line=1)
      A: http://schemas.android.com/apk/res/android:height(0x01010155)=26.000000dp
      A: http://schemas.android.com/apk/res/android:width(0x01010159)=26.000000dp
      A: http://schemas.android.com/apk/res/android:viewportWidth(0x01010402)=26
      A: http://schemas.android.com/apk/res/android:viewportHeight(0x01010403)=26
      A: http://schemas.android.com/apk/res-auto:actionIconDisabledAlpha(0x7f04004f)=0.5
      A: http://schemas.android.com/apk/res-auto:actionIconNormalAlpha(0x7f040050)=0.8
      A: http://schemas.android.com/apk/res-auto:actionIconPressedAlpha(0x7f040051)=0.9
➜  3432 aapt2 d resources MiuiSystemUI.apk| grep 'actionIconDisabledAlpha'
➜  3432 aapt2 d resources MiuiSystemUI.apk| grep 'actionIcon'             
    resource 0x7f0a0052 id/actionIcon

from apktool.

HassanMirza01 avatar HassanMirza01 commented on June 11, 2024

@iBotPeaches 1 more thing, if i add missing attributes in attr.xml file then it repack apk fine without any issue, with both aapt1 and aapt2, so its only linked to decompile them well with proper values in xml, i saw all those values messed up too in layout xmls which are missing from attrs,

from apktool.

HassanMirza01 avatar HassanMirza01 commented on June 11, 2024

@iBotPeaches sorry mate, mentioning at wrong place, but 2.9.1 has same issue of that miui related, largeui and godzillaui if i repack with new apktool, when i was compiling 2.9.0 snapshot, it was fine but as i downloaded new 2.9.1. even with --aapt1 usage, those errors are arising, can you confirm if you added that miui patch in 2.9.1?

from apktool.

iBotPeaches avatar iBotPeaches commented on June 11, 2024

@HassanMirza01 - I'm not replicating, I confirm the patch is added - a9eacf6

from apktool.

HassanMirza01 avatar HassanMirza01 commented on June 11, 2024

@HassanMirza01 - I'm not replicating, I confirm the patch is added - a9eacf6

i redownloaded binary and used it again for a fresh unpack/repack, and same result. it was all fine if i compile 2.9.1 from codes.

image

from apktool.

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.