[UTIL][JAN 20, 2024] Apktool - Tool for reverse engineering apk files

Search This thread

iBotPeaches

Recognized Developer
Apr 8, 2011
951
4,500
Tampa
connortumbleson.com
@iBotPeaches the issue 885 and 1389 is the new protection method issue where xml files was stored in root of app in Chinese? Is this fixing that issue?

Sent from my FRD-L09 using Tapatalk

Both should be fixed. 1389 was personally tested, but no longer had APK from 885 (due to losing that HDD a couple months ago). Since the stack trace of 885 matched that of 1389, I closed them both as fixed with the changes in 2.2.2. Now 885 had additional problems, but the original report was about invalid tokens in XML files.

This whole problem is still the old bug with twframework-res. For a long time apktool can't use the resources from twframework-res correctly. We need to remove the spinner tag (reference) and then than the app will use Googles original time picker instead, which is not in twframework-res.....
I understood @iBotPeaches bought an S5 in order to fix this but as this was months ago it seems we are stuck with this problem. It's more then the time picker of course. I hope to hear some good news about this soon.

I did have an S5 for about 3 days. It arrived during busy business trips and I took it with me to hack on it in a hotel and it got stolen. Android Device Manager can never find the device so I assume who ever stole it knew exactly what to do so most of the Samsung issues being fixed are because of the similarity in fixes, nothing intentional.
 
Last edited:
Anyone report the round icon issue in manifest? Keeps triggering errors, also shortcuts in xml folder. The attributes aren't being pulled from framework.

Sorry i know I should search but I'm a little busy atm.

Apktool 2.2.2 and 7.1.1 framework fixed round Icon and shortcut issues. I was using 7.0 fw which only has shortcut attributes.
 
  • Like
Reactions: cerj and mikeymopar

DaOldMan

Senior Member
Oct 6, 2010
3,787
6,036
I did have an S5 for about 3 days. It arrived during busy business trips and I took it with me to hack on it in a hotel and it got stolen. Android Device Manager can never find the device so I assume who ever stole it knew exactly what to do so most of the Samsung issues being fixed are because of the similarity in fixes, nothing intentional.

Damn, does it mean we can forget about the problems with twframework be fixed ?
 
L

LastStandingDroid

Guest
@iBotPeaches i think you should add this batchapk tool is working for huawei files most of them at least

To op for people who still asks for how to decompile huawei files.

It can decompile framework and most apps except settings apk it framework apk might need some extra edit after compile since it seems to decompile and recompile except it looses some strings or values but most stuff seems to work anywam

Sent from my NATASHA using Tapatalk
 
Last edited:

moluntic

Senior Member
Feb 10, 2015
118
575
IRAN - JUYBAR
hey guys,i have problem with secsetting.
i fkash my rom without any modification of secsetting2.apk
i edit secsetting and add my rom info to it (tried with apktool v2.2.1)
i flashed just secsetting and works great
but
i used this new secsetting and included it to same rom zip
i flashed rom cleanly (wiped everything)
after booting setting receiver shows me FC and setting app wasnt there in app drawer
please help
 

edzamber

Senior Member
Feb 21, 2012
3,916
3,712
hey guys,i have problem with secsetting.
i fkash my rom without any modification of secsetting2.apk
i edit secsetting and add my rom info to it (tried with apktool v2.2.1)
i flashed just secsetting and works great
but
i used this new secsetting and included it to same rom zip
i flashed rom cleanly (wiped everything)
after booting setting receiver shows me FC and setting app wasnt there in app drawer
please help
Bad recompilation of your apk. Package error.

Try to install SecSettings as normal apk, you will see package error.

You need to recompil again or drag and drop all from recompiled SecSettings to original one (drag and drop all as ressources.arsc, classes.dex, res folder and Asset folder if exist, but not META-INF and androimanifest)
 

bailey2408

Senior Member
Aug 4, 2012
356
187
@iBotPeaches i think you should add this batchapk tool is working for huawei files most of them at least

To op for people who still asks for how to decompile huawei files.

It can decompile framework and most apps except settings apk it framework apk might need some extra edit after compile since it seems to decompile and recompile except it looses some strings or values but most stuff seems to work anywam

Sent from my NATASHA using Tapatalk
can you post tool? dying to try to mod a few things on my mate 8
 

Master_T

Senior Member
May 11, 2011
571
1,342
Hi everyone

I'm trying to use ApkTool to decompile the YouTube apk to do some simple color modding.

Being new to modding, the first thing I wanted to test is whether the tools are working correctly, before doing any modding. So I just decompiled, recompiled and resigned the apk, using the following commands:

Decompile:
Code:
apktool d yt.apk

Recompile:
Code:
apktool b yt -o yt_rebuilt.apk

Signing:
Code:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore mystore.keystore yt_rebuilt.apk myalias

The commands seem to complete without any errors.
However, when launching the rebuilt apk on the phone, it just crashes at the splash screen.
By checking adb logcat, I found out that the crashed is caused by this exception:

Code:
java.lang.SecurityException: Signature check failed for com.google.android.youtube
    at android.os.Parcel.readException(Parcel.java:1684)
    at android.os.Parcel.readException(Parcel.java:1637)
    at irb.a(Unknown Source)
    at ipo.a(Unknown Source)
    at jff.a(Unknown Source)
    at jfj.run(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    at jhe.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:761)

Is this a problem with the rebuild apk, or am I doing something wrong when signing?
I see several modded versions of YT here on XDA, so there must be a way to do this properly... what am I missing?
 

Train88

Inactive Recognized Themer
Oct 8, 2013
1,938
14,182
Greenville, SC
OnePlus 8
Hi everyone

I'm trying to use ApkTool to decompile the YouTube apk to do some simple color modding.

Being new to modding, the first thing I wanted to test is whether the tools are working correctly, before doing any modding. So I just decompiled, recompiled and resigned the apk, using the following commands:

Decompile:
Code:
apktool d yt.apk

Recompile:
Code:
apktool b yt -o yt_rebuilt.apk

Signing:
Code:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore mystore.keystore yt_rebuilt.apk myalias

The commands seem to complete without any errors.
However, when launching the rebuilt apk on the phone, it just crashes at the splash screen.
By checking adb logcat, I found out that the crashed is caused by this exception:

Code:
java.lang.SecurityException: Signature check failed for com.google.android.youtube
    at android.os.Parcel.readException(Parcel.java:1684)
    at android.os.Parcel.readException(Parcel.java:1637)
    at irb.a(Unknown Source)
    at ipo.a(Unknown Source)
    at jff.a(Unknown Source)
    at jfj.run(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    at jhe.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:761)

Is this a problem with the rebuild apk, or am I doing something wrong when signing?
I see several modded versions of YT here on XDA, so there must be a way to do this properly... what am I missing?
I do YouTube for TeamBlackOut... Your problem is that you tried to re-sign YouTube, but google has a signature verification built into java (smali) classes so it will not work without their signature. You must pull your edits into a stock apk with an archive tool like 7zip then you must flash it to system/app for it to work.

Sent from my Nexus 6P using Tapatalk
 

Master_T

Senior Member
May 11, 2011
571
1,342
I do YouTube for TeamBlackOut... Your problem is that you tried to re-sign YouTube, but google has a signature verification built into java (smali) classes so it will not work without their signature. You must pull your edits into a stock apk with an archive tool like 7zip then you must flash it to system/app for it to work.

Sent from my Nexus 6P using Tapatalk

Thanks, worked perfectly!:good:
 
  • Like
Reactions: Train88

Phone_Guru

Senior Member
Jul 11, 2010
1,281
653
Jerusalem
Worked for me too with Youtube, Gmail and play store. Tried the same with maps and got an error that something went wrong during installation, please install again. Any ideas what that could mean?

Sent from my GT-I9505 using Tapatalk
 

Phone_Guru

Senior Member
Jul 11, 2010
1,281
653
Jerusalem
I haven't had maps work in years, not sure you can use it after altering it.
I had it working until recently using a recompiled file flashed into data. That stopped working with nougat along with all of the other apps which I did the same way. However, as I said, I was able to get the others working again by bringing my changes into a stock apk using 7zip as recommended.
 

MaxlMuller

Member
Feb 18, 2016
12
3
Problem after recompiling without modifications

Hello

I'm trying to use ApkTool v2.2.2 to decompile a Minilyrics apk to do some simple color modding.

So I just decompiled, recompiled without any modifications and resigned the apk, using the following commands:

Decompile:
Code:
Code:
apktool d minilyrics.apk

Recompile:
Code:
Code:
apktool b minilyrics -o minilyrics_rebuilt.apk

And then I signed with apk-signer-1.4.2.jar like I did with the other versions.

The commands seem to complete without any errors.
However, when launching the rebuilt apk on the phone, it just crashes and shows: "Unfortunately, Minilyrics has stopped"
By checking adb logcat, I found out that the crashed is caused by this exception:

Code:
Code:
02-27 08:52:52.156 E/MiniLyrics( 6907): Failed to copy JNI assets
02-27 08:52:52.156 E/MiniLyrics( 6907): Failed to copy JNI assets
02-27 08:52:52.156 E/MiniLyrics( 6907): java.io.FileNotFoundException: jni
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at android.content.res.AssetManager.openAsset(Native Method)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at android.content.res.AssetManager.open(AssetManager.java:313)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at android.content.res.AssetManager.open(AssetManager.java:287)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at com.crintsoft.music.LyricsApplication.a(LyricsApplication.java:62)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at com.crintsoft.music.LyricsApplication.onCreate(LyricsApplication.java:36)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1036)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4728)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:334)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at android.app.ActivityThread.handleBindApplication(<Xposed>)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at android.app.ActivityThread.-wrap1(ActivityThread.java)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1415)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at android.os.Handler.dispatchMessage(Handler.java:102)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at android.os.Looper.loop(Looper.java:148)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at android.app.ActivityThread.main(ActivityThread.java:5443)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at java.lang.reflect.Method.invoke(Native Method)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
02-27 08:52:52.156 E/MiniLyrics( 6907): 	at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
02-27 08:52:52.162 D/AndroidRuntime( 6907): Shutting down VM
02-27 08:52:52.165 E/AndroidRuntime( 6907): FATAL EXCEPTION: main
02-27 08:52:52.165 E/AndroidRuntime( 6907): Process: com.crintsoft.zikiplayer, PID: 6907
02-27 08:52:52.165 E/AndroidRuntime( 6907): java.lang.RuntimeException: Unable to create application com.crintsoft.music.LyricsApplication: java.lang.ClassNotFoundException: Didn't find class "com.crintsoft.music.LyricsOnlineSearch" on path: DexPathList[[zip file "/data/app/com.crintsoft.zikiplayer-1/base.apk"],nativeLibraryDirectories=[/data/app/com.crintsoft.zikiplayer-1/lib/arm, /data/app/com.crintsoft.zikiplayer-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4731)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:334)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at android.app.ActivityThread.handleBindApplication(<Xposed>)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at android.app.ActivityThread.-wrap1(ActivityThread.java)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1415)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at android.os.Handler.dispatchMessage(Handler.java:102)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at android.os.Looper.loop(Looper.java:148)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at android.app.ActivityThread.main(ActivityThread.java:5443)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at java.lang.reflect.Method.invoke(Native Method)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
02-27 08:52:52.165 E/AndroidRuntime( 6907): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.crintsoft.music.LyricsOnlineSearch" on path: DexPathList[[zip file "/data/app/com.crintsoft.zikiplayer-1/base.apk"],nativeLibraryDirectories=[/data/app/com.crintsoft.zikiplayer-1/lib/arm, /data/app/com.crintsoft.zikiplayer-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at com.crintsoft.music.n.a.b(Native Method)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at com.crintsoft.music.n.b.a(NativeAPIs.java:21)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at com.crintsoft.music.LyricsApplication.onCreate(LyricsApplication.java:42)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1036)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4728)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	... 12 more
02-27 08:52:52.165 E/AndroidRuntime( 6907): 	Suppressed: java.lang.ClassNotFoundException: Didn't find class "com.crintsoft.music.LyricsOnlineSearch" on path: DexPathList[[dex file "/data/dalvik-cache/xposed_XResourcesSuperClass.dex"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
02-27 08:52:52.165 E/AndroidRuntime( 6907): 		at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 		at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 		at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 		... 18 more
02-27 08:52:52.165 E/AndroidRuntime( 6907): 		Suppressed: java.lang.ClassNotFoundException: com.crintsoft.music.LyricsOnlineSearch
02-27 08:52:52.165 E/AndroidRuntime( 6907): 			at java.lang.Class.classForName(Native Method)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 			at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 			at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 			at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
02-27 08:52:52.165 E/AndroidRuntime( 6907): 			... 19 more
02-27 08:52:52.165 E/AndroidRuntime( 6907): 		Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
02-27 08:52:52.176 E/DropBoxManagerService( 2198): Can't write: data_app_crash
02-27 08:52:52.176 E/DropBoxManagerService( 2198): java.io.IOException: Can't list files: /data/system/dropbox
02-27 08:52:52.176 E/DropBoxManagerService( 2198): 	at com.android.server.DropBoxManagerService.init(DropBoxManagerService.java:605)
02-27 08:52:52.176 E/DropBoxManagerService( 2198): 	at com.android.server.DropBoxManagerService.add(DropBoxManagerService.java:186)
02-27 08:52:52.176 E/DropBoxManagerService( 2198): 	at android.os.DropBoxManager.addText(DropBoxManager.java:270)
02-27 08:52:52.176 E/DropBoxManagerService( 2198): 	at com.android.server.am.ActivityManagerService$19.run(ActivityManagerService.java:12807)
02-27 08:52:52.179 W/ActivityManager( 2198):   Force finishing activity com.crintsoft.zikiplayer/com.crintsoft.music.MediaPlaybackActivity

Is this a problem with the rebuild apk, or am I doing something wrong when signing?
I've modded older versions of Minilyrics successfully, but not version 1.0.18.
So there must be a way to do this properly... what am I missing?
 

Top Liked Posts