[Android Software Development] DiamondJohn:
This is my first attempt. I have tried reading all the examples I can find, but it still fails.

I am doing this on windows 7. I have the SDK installed, and apktool.

I am simply trying t change the icons/images used in a widget APK (com.bartat.android.elixir.widget.apk freely available on the playstore) Its method for theme'ing does not work under under the new security restrictions of Android 11, so I am trying to change the default built in images used.

So I run the following, with the following output.

G:\Transfer\APK\APKTool\_Working>java -Xmx512m -jar "..\apktool.jar" d com.bartat.android.elixir.widget.apk
I: Using Apktool 2.5.0 on com.bartat.android.elixir.widget.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\John\AppData\Local\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...

I manually change the image files in

G:\Transfer\APK\APKTool\_Working\com.bartat.android.elixir.widget\res\drawable-hdpi\*

And then run the following:

G:\Transfer\APK\APKTool\_Working>java -Xmx512m -jar "..\apktool.jar" b com.bartat.android.elixir.widget -o new_com.bartat.android.elixir.widget.apk
I: Using Apktool 2.5.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: warning: string 'backup_title' has no default translation.
W: warning: string 'changelog_title' has no default translation.
W: warning: string 'param_color' has no default translation.
W: warning: string 'param_transparency' has no default translation.
W: warning: string 'widget_name_5x4' has no default translation.
W: warning: string 'widget_name_5x5' has no default translation.
W: warning: string 'widget_size_5x4' has no default translation.
W: warning: string 'widget_size_5x5' has no default translation.
W: warning: string 'widgeteditor_keep_on_top' has no default translation.
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...

So that all seems to work, and produces my APK at

G:\Transfer\APK\APKTool\_Working\new_com.bartat.android.elixir.widget.apk

HOWEVER, when I try to install it, I get the following:

C:\Java\x86\Android\android-sdk\platform-tools>C:\Java\x86\Android\android-sdk\platform-tools\adb install "G:\Transfer\APK\APKTool\_Working\new_com.bartat.android.elixir.widget.apk"
Performing Streamed Install
adb: failed to install G:\Transfer\APK\APKTool\_Working\new_com.bartat.android.elixir.widget.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed collecting certificates for /data/app/vmdl1851775806.tmp/base.apk: Failed to collect certificates from /data/app/vmdl1851775806.tmp/base.apk: Attempt to get length of null array]

Ive tried numerous little variations such as " -c / --copy-original" and deletoing the meta-inf folder and manually doing it as a simple zip, to no avail.

I also looked at the logcat of an install, and I didn't see anything providing anything better than what I got from the command line. But if someone needs the info, I could run it again and post a link to an upload.

Has anybody got an idea where I am going wrong / failing?