Git Product home page Git Product logo

Comments (7)

qyzhaojinxi avatar qyzhaojinxi commented on June 4, 2024

zipalign at first and signer apk at last

from apktool.

iBotPeaches avatar iBotPeaches commented on June 4, 2024

Sorry you are encountering this, as mentioned above - depending on the type of signature you have to zipalign prior now. However, you are using jarsigner which is quite old. So that isn't the problem.

Theres just not enough details here to work from - so apologies I'm not positive.

from apktool.

DieselDriver avatar DieselDriver commented on June 4, 2024

Hm ok, I always ziped after signing.

But this seems not to be the problem.

I tried only unpacking and packing my apf file.
apktool d -s compiled.apk -o whatever / apktool b whatever -o whatever_repacked.apk

Here I got several errors.
/whatever/res/values-v31/colors.xml:34: error: resource android:color/background_floating_material_dark is private.

This I could fix with replacing @android with *@android.

But then I got this errors.
whatever/res/color-v31/m3_ref_palette_dynamic_neutral24.xml:4: error: attribute android:lStar not found.

So, since I compile my app for Android 10+, I can not unpack and repack the apk file with apktool any longer.
Maybe my recompiled ans smaller app is not running, because there are some things missing while recompiling.

from apktool.

DieselDriver avatar DieselDriver commented on June 4, 2024

This test worked:

apktool d -r compiled.apk -o whatever
apktool b whatever -o whatever_repacked.apk

apktool 2.5dirty / 2.8.1 / 2.9 / 2.9.1:

release 1:
37M compiled.apk
38M whatever_repacked.apk

latest release:
54M compiled.apk
43M whatever_repacked.apk

You can see, that the latest release is quite smaller than the original apk file.

This does not work while recompiling (values-v31/colors.xml problems and so on):

apktool d -s compiled.apk -o whatever
apktool b whatever -o whatever_repacked.apk

from apktool.

iBotPeaches avatar iBotPeaches commented on June 4, 2024

I see, so skipping resource disassembly leads to a proper build.

from apktool.

DieselDriver avatar DieselDriver commented on June 4, 2024

Yes, but only on older release I compiled with older Android Studio.
Since I changed to Android 10+ apps, it also do not work with skipping resource disasselmbly. Then the recompiled apk file has 10 MB less size. It can be installed but it will not start.

Same procedure on 2.9.1. :-(

from apktool.

DieselDriver avatar DieselDriver commented on June 4, 2024

Noone any idea?

Please re-open this issue.

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.