yashsingh1/xdaforums huggingface dataset:
[Android Software Development] iBotPeaches:
Does the original application if you view it before unzipping have both files in different casing? Or is this a situation where you know the application has `Foo` and Apktool creates `Foo` and `foo`.
[Android Software Development] hieu291:
I hope so .. Let's wait for the decisions of google in this August.
[Android Software Development] pakfixrom:
can little explain because i checked thats android 11 still not working
[Android Software Development] Raiz:
Can you describe in what ways apktool isn't working on A11 ?
[Android Software Development] pakfixrom:
all android 11 apk decompile and recompile ok but when i replace system back its show crashed apk.i need full info if someone can explain how can i solved it.
[Android Software Development] Raiz:
Did you keep the original signature of the apk when recompiling ?
[Android Software Development] pakfixrom:
i am asking how keep signature orignal singed?
[Android Software Development] Raiz:
This may work:

When recompiling, use the usual command with -c

apktool b [yourapkfolder] -c
[Android Software Development] josephpatrick:
When i try to re-compile a apk (with or without changes), it is unable to complete due to warnings of references to styles in framework-res.apk.

Though i have tagged and saved the framework-res.apk, and still use it using -apktool -t <tagname>, it still fails to find these references.

When I manually decompile and check the framework-res.apk, these styles do exist.

is there any reason why it is failing and is there any way to fix it.

am i doing something wrong?

Error retrieving parent for item: No resource found that matches the given name '@android:style/TextAppearance.DeviceDefault.Dialog.Button'.

Error retrieving parent for item: No resource found that matches the given name '@android:style/PreferenceHeaderList'.

and many more

apktool if framework-res.apk -t <tagname>

apktool d file.apk

apktool b file -t <tagname>

Update: it worked when i used apktool d file.apk -t <tagname>
[Android Software Development] gcrutchr:
There are separate files: Flash_off and flash_off. They access different resources
[Android Software Development] iBotPeaches:
A new version has been released!

v2.6.0 (Released September 2nd, 2021)

Apktool 2.6.0

md5 4161cdad59718f81740d0727c9683819

sha256 f750a3cd2c1f942f27f5f7fd5d17eada3bdaff0a6643f49db847e842579fdda5

Details of Release: https://connortumbleson.com/2021/09/02/apktool-v2-6-0-released/
[Android Software Development] porkyhontas:
As usual, thanks for all of the hard work! Google and Samsung is making modding, let's say, not pleasurable at times.
[Android Software Development] hieu291:
Hello sir , have you found a way to use aapt2 to convert from apk to aab?
[Android Software Development] iBotPeaches:
That seems a weird direction to go, bundletool helps produce aab - however they don't start from apk. I think what you are asking if Apktool can produce files in a format that bundletool can use to produce an aab and the answer is not at this time.
[Android Software Development] a9381:
Thank you for ApkTool!

But, I can't re-compile any APK...

For example, I attach APK here (I managed to do decompile),

framework-res.apk

and log.txt

ApkTool version:2.6.0

OS: Windows
[Android Software Development] starbucks2010:
Your windows username has special characters which might prevent apktool to work correctly.
[Android Software Development] a9381:
thanks, but it's not a problem.

I test on other user-his name is "apktool"
[Android Software Development] Thebear j koss:
You need a different framework. Resources in app are not in the framework you used. All your errors in log are errors in styles from framework.
[Android Software Development] a9381:
thank you...

but this is my device...

you can upload me other framework?
[Android Software Development] a9381:
how sigen my recompile APKs?
[Android Software Development] Thebear j koss:
how to sign apk using apktool - Google Search

www.google.com
[Android Software Development] a9381:
yes,

i'm know how to search in google :)

but, this need a file - signapk.jar, that i cna't find....

thank!
[Android Software Development] Thebear j koss:
GitHub - techexpertize/SignApk: SignApk is used to sign the apk file after repack. The easiest way ever.

SignApk is used to sign the apk file after repack. The easiest way ever. - techexpertize/SignApk

github.com
[Android Software Development] todarkness:
I decompiled a gcam port APK with APKTool 2.6.0. No Errors.

disabled signature check in the smali file to make it not crash on start.

Recompiled the APP and signed it. Again No Errors.

the app launches and i can give permissions in android, but directly after the permissions are granted, the app crashes and the viewfinder doesn't display an image either.

So there is a problem with the decompilation and recompilation. but i can't find the exact reason
[Android Software Development] Thebear j koss:
Need a log to see why it crashes.
[Android Software Development] EvanVanVan:
Hmm, when I've been using "apktool d -d targetapp.apk" with apktool_1.4.3, It hasn't been returning java files like it should only the normal .smali files. Is it possible this is because my 'targetapp.apk' has been created with a newer api that isn't fully compatible with the older apktool? I'm hoping this error with -d is finally 'bringing to light' some other underlining problem I haven't been able to figure out (not producing /src/.java (or /smali/.java) only /smali/.smali files)
[Android Software Development] iBotPeaches:
I'm confused a bit then what you think this program can do. Apktool can only take compiled Java APKs into their decompiled .smali form. There is no way for apktool to decompile to Java source again. Some other programs may be able to do that, but definitely not at the level to recompile, just maybe for looking at the source.
[Android Software Development] Ticklefish:
Well, I'm sure you'll get there eventually. Just as long as you're still sane afterwards.

Thanks for all your hard work!
[Android Software Development] EvanVanVan:
I'm looking to do the ApkTool - SmaliDebugging, http://code.google.com/p/android-apktool/wiki/SmaliDebugging. I thought apktool debugging mode (-d) should output .java files that contain classes, but instead of actual java code in the classes, there should be smali code instead. That would allow the debugger (netbeans) to set a breakpoint within the "classes" on the smali code, to be able to step through the smali code. Then Apktool couldn't "recompile" the java files, but the .smali files would be editable using the java debugging/step-through's as reference

Java classes with smali code like so (cropped screnshot from Brut.all's youtube video):

And I (think) I've put all that together between this old tutorial: http://xdaforums.com/showthread.php?t=725870

The youtube video on the ApkTool - SmaliDebugging site by Brut.all: http://www.youtube.com/watch?v=P_Zyf7jFbx4

and the description from the ApkTool - SmaliDebugging site:

Am I mistaken on any of that?
[Android Software Development] EvanVanVan:
Good, was worried I was missing something, since it wasn't working with 1.4.3 either...

Anyway, had every intention of throwing you $5 when I got back home here, but I only have $2.83 in my account lol...so it'll have to wait. But I'll get you money for a beer soon. If you get a chance to look at debugging, that'd be great.

Thanks
[Android Software Development] bobukcat:
I'm a complete noob at this stuff so I apologize if this is something I should be able to easily figure out but...

I'm trying to get the nexusq.apk working on ICS. I decompiled the apk with no errors using 1.4.7 and the latest aapt from the sdk but I always get errors when recompiling. With older versions of the tool I kept getting the "Invalid Resource" errors but now I'm getting two warning errors:

I:Building resources...

aapt: warning: string 'btn_add_another' has no default translation in D:\apktools\qtest147\res; found; af am ar be bg ca cs da de el en_GB es es_US, (about four more lines of the same thing omitted)

aapt: warning: string 'places' has no default translation in D:\apktools\qtest147\res; found; af am ar bg ca cs da de el en_GB....etc.

Is this the language translation issue I've seen mentioned and is it a serious problem or something I can just ignore? I'm getting this message when just building the apk with no changes.

Thanks!
[Android Software Development] iBotPeaches:
Those are warnings, nothing more. It means that those translations exist in all those lang files, but not in the default folder of (values). So it throws that warning.
[Android Software Development] bobukcat:
Thanks for the response! Unfortunately the apk still doesn't install for some reason. It at least tries to now that I have modified the manifest to SDK=15 but just gives me an "Unsuccessful" message. Do I have to somehow re-sign the new apk? I don't see an MHT-INF folder in the original.
[Android Software Development] iBotPeaches:
apktool doesn't resign. Re-inject the classes.dex file or resources.arsc (depending what you changed) into the apk. If you modified the manifest you will have to resign using the same key it was signed with prior to editing.
[Android Software Development] Ticklefish:
I remember you saying on your op something about introducing the reinjection of these files in a later update. I know you're busy now but I thought I'd just say that that's something I'd really like to see one day.
[Android Software Development] raziel23x:
You can use my tool at http://apkmultitool.com which automates the process and is built around apktool.jar it its a multi functiona tool which uses apktool to decompile and recompile apk files. It also has a signing script to sign apk files after recompiling but uses a test key for now so you are unable to publish to Google play but it will allow you to install the modified apk file but you will have to uninstall the original first. You can also do system file and it will push them back to your phone as well.

The latest version is apk multi-tools version 1.0.5

It is a self installer and Is needs to be installed in the root of the android sdk to work

Ie the script.bat needs to be in the same folder as the sdk manager exe file is.
[Android Software Development] djdarkknight96:
I use this everyday...I've always wanted to say thank you so Thank you!

Sent from my DarkICE Skanky CM9 Gnex using the app!
[Android Software Development] raziel23x:
I have APK Multi-Tools2 in the works it is a complete rewrite of the tool fixing many features as well as adding even more tools i am no where near having it functional right now as i am completely rewriting the menu and options so i have not started to migrate the core files from the script.bat. It is a slow process but i have yet to be satisfied with the layout before merging everything together.
[Android Software Development] djdarkknight96:
I just saved your site to my bookmarks so I'll keep an eye out for it. Thanks again!

Sent from my DarkICE Skanky CM9 Gnex using the app!
[Android Software Development] bobukcat:
In my circumstance, where I have decompiled a signed apk from someone else (Google) and modified the androidmanifest.xml file and rebuilt the apk will this re-sign it with the same "key" or whatever it is called so it would install. The only change I made was the SDK version in the manifest to try to get it to work on older builds. Again, sorry if these are ridiculous questions but I am completely new to modifying apks. Thanks!
[Android Software Development] iBotPeaches:
Thats difficult, as modifying the manifest is what changes the key signature (you could say). You can change resources and the actual java code and rebuild that into the APK and keep the same signature, but re-injecting a modified manifest in the same signed APK seems to not work on ICS and later. However, it does work for some. So I really haven't figured out the cause for this.
[Android Software Development] raziel23x:
Like I said my tool will sign the apk files if they need to be but it will not be the original so you will have to uninstall the original before you can install your modified version.
[Android Software Development] Pneuma1985:
Hopefully 1.4.8 will cut out the huge gaps and get more of the new sense decompiled... Apparently others have gotten the dialer decompiled and a ton of people cant get it decompiled and have the same error i do... Either way thanks for all your hard work ibotpeaches... We all appreciate it...
[Android Software Development] Skwurlsoft:
Has anyone had any success rebuilding framework-res.apk files?

I'm trying to do a battery mod on the one for the VM Cruz Reader and either during decompiling or recompiling it loses almost a third of the resources.arsc data. The old resources.arsc file is 2.6 Mb, the recompiled one - with added information, I might add - is, consistently, 1.9 Mb.

if anyone can offer some insight, I'd be grateful.
[Android Software Development] cowsquad:
Already did but since I was compiling from his source I thought he had it another aapt lol

tapatalked² from cowsquadGnex®
[Android Software Development] iBotPeaches:
Had to do with that other guy who quoted the entire OP, not you.

Sent from MIUIAndroid Phone.
[Android Software Development] cowsquad:
Well I didn't take it towards me lol. Apktool is working flawlessly man. Thank you

tapatalked² from cowsquadGnex®
[Android Software Development] gcrutchr:
@iBotPeaches

The command: git clone git@github.com:iBotPeaches/Apktool.git

gives me a public key error.

But...the command: git clone https://github.com/iBotPeaches/Apktool.git

works.
[Android Software Development] iBotPeaches:
Ahh kudos. Copied the wrong url. Will fix the documents.

Sent from MIUIAndroid Phone.
[Android Software Development] gcrutchr:
@iBotPeaches

Tried to make source and got the following error:

Execution failed for task ':brut.apktool.smali:smali:generateAntlrSource'.

See attached logfile.
[Android Software Development] iBotPeaches:
I have pushed bugfix here: https://github.com/iBotPeaches/Apktool/commit/c75ae8f82b7faa38f332d79278e8fc97efb7c5d6

Forces Java 6. If that doesn't work. Then I don't know. I'm not really going to focus on build issues on other users. No offense. As long as it builds on my two systems thats all I have the time to worry about.

If you find anyway to fix it, your welcome to submit patches. I have fixed what I think is the problem otherwise I don't know.
[Android Software Development] gcrutchr:
Ok. Thanks. Will give it a try.
[Android Software Development] Pneuma1985:
? @ibot or anyone who can answer this... Has anyone gotten chrome to compile? This is my current error. Wondering why it wasnt carrying the manifest resources? And I tried to use google services framework and a number of the other things as a resource but nothing worked. Was wondering if someone can lend some help on getting it recompiled? I've tried all the apktools and different aapt's
[Android Software Development] v1r0x:
I think you have missed to update the md5 in OP.

Mine is: 13a19b712c7967f1b67638f75d8b9f85
[Android Software Development] Pneuma1985:
Tried with many aapt's and the newest one also... Same error on all aapt's and apktool.jar's.

Only reason Is I've had luck doing that before with google apps.
[Android Software Development] iBotPeaches:
Don't know what your referring to as you mis-quoted the post.
[Android Software Development] iBotPeaches:
I see apktool 1.5.1 in your name. Please don't use it yet. After the move to gradle there are some serious build/decompile errors I have to fix. As for the error, Its trying to read the Manifest and associate it, which it can't find.
[Android Software Development] Pneuma1985:
Yeah that's actually just the initial folder I had chrome in I tried 1.4.7 all the way through 1.5.10 with all the appt's as well and I still get the same error, I've tried adding framework-res.apk and com.htc.resources and googleservicesframework as 123... I tried every combo I could think of and I still get the same error... Haven't had any luck with any of the apktool.jar's or aapt.exe's... Wondering if you wanted to give it a shot and see if stock chrome will recompile for you? Oh yeah and I decompiled with all dif versions as well..
[Android Software Development] iBotPeaches:
Sure. Send me any APK in the /framework folder, and that APK.

ibotpeaches (at) gmail (dot) com.

Upload it to like mediafire/dropbox.
[Android Software Development] Pneuma1985:
yup realized after trying to add both as attachments that chrome is very large lol thanks for the help man appreciate it..
[Android Software Development] ionutz1708:
deleted
[Android Software Development] wanam:
Great work iBotPeaches, i don't know how i missed your thread all this time :D, i tried to fix some string formatting in Apktool but with no luck.

Keep up the good work.
[Android Software Development] djmatt604:
What type of error message are you getting

Sent from my SonySung XPalaxy2
[Android Software Development] dovedescent7:
Hello, i noticed your warning in the OP.

I'm new to playing around with decompiling apks and dont know much about piracy.

Were you warning about piracy because someone has the ability to remove google/ads from an Apk and recompile with this tool?

If i were just wanting to test this software to see if i could remove google ads from an apk, ONLY for testing, could this tool do that? Remove ads by decompile and change ID (i forget which) then recompile?
[Android Software Development] MartK87:
Any idea how to sort this one out?

Compiling APK file... (Press ESC to cancel)

Executing command: java.exe -jar "C:\APK Easy Tool v1.59.2 Portable\Apktool\apktool_2.5.0.jar" b -f -o "C:\Users\Tim\OneDrive\Documents\APK Easy Tool\2-Recompiled APKs\Dialer.apk" "C:\Users\Tim\OneDrive\Documents\APK Easy Tool\1-Decompiled APKs\Dialer"

I: Using Apktool 2.5.0

I: Smaling smali folder into classes.dex...

I: Building resources...

W: C:\Users\Tim\OneDrive\Documents\APK Easy Tool\1-Decompiled APKs\Dialer\res\values\styles.xml:25: error: Resource entry AlertDialogTheme already has bag item android:textColorPrimary.

W: C:\Users\Tim\OneDrive\Documents\APK Easy Tool\1-Decompiled APKs\Dialer\res\values\styles.xml:24: Originally defined here.

W:

brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\Tim\AppData\Local\Temp\brut_util_Jar_44856206474251459993286310092082849034.tmp, p, --forced-package-id, 127, --min-sdk-version, 30, --target-sdk-version, 30, --version-code, 2900000, --version-name, 23.0, --no-version-vectors, -F, C:\Users\Tim\AppData\Local\Temp\APKTOOL4078868964259643472.tmp, -e, C:\Users\Tim\AppData\Local\Temp\APKTOOL4556495980648401949.tmp, -0, arsc, -I, C:\Users\Tim\AppData\Local\apktool\framework\1.apk, -S, C:\Users\Tim\OneDrive\Documents\APK Easy Tool\1-Decompiled APKs\Dialer\res, -M, C:\Users\Tim\OneDrive\Documents\APK Easy Tool\1-Decompiled APKs\Dialer\AndroidManifest.xml]

Compile failed
[Android Software Development] Spannaa:
You should ask in the APK Easy Tool thread since that's what you're using.
[Android Software Development] Raiz:
And I think you should take a look a this particular line:

W: C:\Users\Tim\OneDrive\Documents\APK Easy Tool\1-Decompiled APKs\Dialer\res\values\styles.xml:25: error: Resource entry AlertDialogTheme already has bag item android:textColorPrimary.

Did you modified that styles.xml? If yes you must have done something wrong with the AlertDialogTheme, and it broke the compiling process.
[Android Software Development] backslashV:
Hi,

I have followed the below instructions for the latest version of the Google Recorder app, i.,e., v3.0.405367176, and when I try to install the recompiled APK, I get "There was a problem parsing the package.". Any ideas?

apktool decode $APK_FILE \
--match-original \
-api 29 \
-o $APK_OUT_DIR

FILE_TO_PATCH_0="$APK_OUT_DIR/smali/com/google/android/apps/recorder/ui/application/RecorderApplication.smali"
STR1="com.google.android.feature.PIXEL_2017_EXPERIENCE"
STR2="android.hardware.microphone"
sed -i "s/$STR1/$STR2/" $FILE_TO_PATCH_0

apktool build $APK_OUT_DIR \
-api 29 \
-o $DIST_APK_FILE

jarsigner -verbose \
-sigalg SHA1withRSA -digestalg SHA1 \
-keystore $KEYSTORE_FILE \
$DIST_APK_FILE \
$KEYSTORE_ALIAS

Source

Can someone try on their side and see if they can get it to install?
[Android Software Development] iBotPeaches:
A new version has been released!

v2.6.1 (Released February 26th, 2022)

Apktool 2.6.1

md5 361f0c97e34aa93c7c1d8aa3e4828f69

sha256 bc2b9a87ac5a86905b6ca343c21a0db3bc37bdd51154bc9cdf65523d95895d34

Details of Release: https://connortumbleson.com/2022/02/26/apktool-v2-6-1-released/
[Android Software Development] starbucks2010:
Hello,

I noticed that the new version of apktool v2.6.1 is adding a * after every @ in all xml files of the decompiled app. This was not the case with v2.6.0. Is it normal?

v2.6.0: android:fontFamily="@android:string/config_.....

v2.6.1: android:fontFamily="@*android:string/config_.....

Thank you.
[Android Software Development] iBotPeaches:
It shouldn't be all XML files. It was designed as private resources are being blocked at build time in aapt2 now. So an application disassembled cannot be re-assembled which is a bit stressful since its just tougher aapt2 requirements than the original application had to deal with.

It was patched here and I confirmed it - https://github.com/iBotPeaches/Apktool/pull/2650/files, so if you are seeing all files. That is either an application of all private resources or a bug. I'd need more details and a sample to be sure.
[Android Software Development] starbucks2010:
Here I attach the same example file from S21 device latest Android 12 BVB1 FW decompiled with 2.6.0 and 2.6.1.

I used smali/backsmali v2.5.2 and tried with 2 tools (batchapktool and TickleMyAndroid) and got the same result.

I'm using Windows 11 it this matters.

Please let me know if you need more details or any other files.

Thank you.
[Android Software Development] iBotPeaches:
I'll need the source apk, since I need to see what the resources are being typed as prior to disassembly. Open a bug with the apk if you don't mind just referencing #2650 on GitHub - https://github.com/iBotPeaches/Apktool/issues
[Android Software Development] starbucks2010:
Request #2771 is opened.

Thank you.
[Android Software Development] haze_1986:
Hi I'm intending to edit a system TVsettings.apk. I was trying to decompile and recompile the apk as a first try. Works without errors but the new apk is smaller, even after signing. 11mb vs 18mb. I uploaded it to the device and it softbricked it and had to reflash the fw.

Anyone knows if what's wrong? How do I ensure the files are exactly the format to be read by the device?
[Android Software Development] Thebear j koss:
Use 7zip to examine the apk to ensure everything is the same. You said it is a system apk? If so only replace change files in original apk, don't use new apk. Using 7zip open both apks and drag changed files from rebuilt apk into original overwriting the original files. Example if you changed something in colors.xml, take resources.arc from new apk and overwrite resources.arc in original apk. Flash the original apk with the new resources.arc to the path in system using recovery, or push using adb making sure permissions are given. Always make a backup before making any changes, especially to system.
[Android Software Development] haze_1986:
Hi thanks for your reply. Yes it is TVSettings.apk on an android tv that I wish to mod.

I do not quite understand what is meant be only replace change files in original apk and not use the new apk.

I have checked them using 7z and there are indeed differences. For one, the classes 1-4 .dex files are slightly smaller in the new apk
[Android Software Development] Thebear j koss:
What did you change?
[Android Software Development] haze_1986:
Do you mean changing any code? None. As a first try I wanted to make sure decompilation, building and signing will give me back the original apk. Or at least in terms of functionality