yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Thebear j koss:
That thread is outdated. Look here https://github.com/JesusFreke/smali and google how to use smali tools.

=============================================

The stupid leading the dumb.
[Android Software Development] deadlock9x:
Thank you for your help, I will try more :D
[Android Software Development] bovirus:
[MENTION=3924617]iBotPeaches[/MENTION]

In the latest beta build during compilation there are several NO SOURCE message like

:compileJava NO-SOURCE

:processResources NO-SOURCE

:compileTestJava NO-SOURCE

:processTestResources NO-SOURCE

:test NO-SOURCE

:brut.apktool:compileJava NO-SOURCE

:brut.apktool:processResources NO-SOURCE

:brut.apktool:compileTestJava NO-SOURCE

:brut.apktool:processTestResources NO-SOURCE

:brut.apktool:test NO-SOURCE

:brut.j.common:processResources NO-SOURCE

:brut.j.common:compileTestJava NO-SOURCE

:brut.j.common:processTestResources NO-SOURCE

:brut.j.common:test NO-SOURCE

:brut.j.util:compileJava

Note: D:\GIT\Apktool\brut.j.util\src\main\java\brut\util\Duo.java uses unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

:brut.j.util:processResources NO-SOURCE

:brut.j.dir:processResources NO-SOURCE

:brut.j.dir:compileTestJava NO-SOURCE

:brut.j.dir:processTestResources NO-SOURCE

:brut.j.dir:test NO-SOURCE

:brut.j.util:compileTestJava NO-SOURCE

:brut.j.util:processTestResources NO-SOURCE

:brut.j.util:test NO-SOURCE

:brut.apktool:apktool-lib:compileJava

warning: C:\Users\Roberto\.gradle\caches\modules-2\files-2.1\com.beust\jcommander\1.64\456a985ac9b12d34820e4d5de063b2c2fc43ed5a\jcommander-1.64.jar(com/beust/jcommander/Parameter.class): major version

52 is newer than 51, the highest major version supported by this compiler.

It is recommended that the compiler be upgraded.

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

1 warning

:brut.apktool:apktool-cli:compileJava

Note: D:\GIT\Apktool\brut.apktool\apktool-cli\src\main\java\brut\apktool\Main.java uses or overrides a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

:brut.apktool:apktool-cli:processResources NO-SOURCE

:brut.apktool:apktool-cli:compileTestJava NO-SOURCE

:brut.apktool:apktool-cli:processTestResources NO-SOURCE

:brut.apktool:apktool-cli:test NO-SOURCE

is it normal? What's happen?
[Android Software Development] michfood:
cowsquad

Yes,I did
[Android Software Development] iBotPeaches:
Maybe there is a problem in this apktool related to some strange resource. It seems aapt is crashing/seg faulting with random APKs. Which doesn't aid me in fixing AT ALL, since I have no error message to go on. Literally a needle in a haystack.

Guess send me that APK and I'll begin debuggin again :/

As for the --verbose flag. I thought I included it, but its not working. You just do apktool --verbose COMMANDS and it should work, but aapt output isn't working, so I messed something up.
[Android Software Development] michfood:
Thanks for attention!

It would be great to fix it.

And also would be great to have a wide log of "doing" :)

java -Xmx1024m -jar apktool.jar b --verbose -d >>log.txt

- do not work, or I do not understand where to look - no --verbose, neither -d :(
[Android Software Development] rtfpessoa:
I think framework-res.apk doesn't depend on other frameworks.
[Android Software Development] michfood:
that`s true. the problem is in res folder I guess
[Android Software Development] surdu_petru:
Hi !

Here is txt msg when aapt.exe has stopped working !

View problem details :

...may be can help to find a solution ! :good:
[Android Software Development] Megalith27:
Is there a solution for this issue? I am having exact same problem, tried both Windows and Linux, can not resolve it...

Any ideas?
[Android Software Development] michfood:
well, for aapt developers - maybe... but I don`t see any important fact in it - usual crash of win_app

bat thanks anyway:good:
[Android Software Development] Megalith27:
Anyone? Been searching all around the web...don't really know where to look

parviz@parviz-MM061:~/ICSAPKTOOL$ java -jar apktool.jar b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL7968329941810492468.tmp, -x, -S, /home/parviz/ICSAPKTOOL/framework-res/res, -M, /home/parviz/ICSAPKTOOL/framework-res/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:255)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:324)
at brut.androlib.Androlib.buildResources(Androlib.java:269)
at brut.androlib.Androlib.build(Androlib.java:192)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL7968329941810492468.tmp, -x, -S, /home/parviz/ICSAPKTOOL/framework-res/res, -M, /home/parviz/ICSAPKTOOL/framework-res/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:87)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:253)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
at java.lang.Runtime.exec(Runtime.java:615)
at java.lang.Runtime.exec(Runtime.java:483)
at brut.util.OS.exec(OS.java:78)
... 7 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1021)
... 10 more
[Android Software Development] iBotPeaches:
You could look in the error message.....

Caused by: java.io.IOException: Cannot run program "aapt": error=2, No such file or directory

If you can't run "aapt" at the command line. Then something is wrong. Install aapt. Its in the Android SDK and get it in your $PATH variable.
[Android Software Development] djmatt604:
Edit: Nevermind. :)
[Android Software Development] iBotPeaches:
The 2 last errors are simply warnings because those xml strings are in values-xx folders but not in values. Doesn't mean anything bad. Whoever built the apk originally was aware of it. It's a warning. Not an error :p

As for that smali error. I'll try using raw smali/baksmali and if the error occurs then ill pass on to JF, otherwise it's an apktool bug.

Sent from my SGS3 AT&T Variant
[Android Software Development] rtfpessoa:
@iBotPeaches this apktool is suposed to work with MIUI ICS right?
[Android Software Development] espaciosalter20:
With the patched aapt...

Enviado desde mi MB525 usando Tapatalk 2
[Android Software Development] iBotPeaches:
I will not support decompiling that APK. You have no need to be looking at the source of that. I can understand the resources for translations, but you don't need the smali of it.

baksmali 1.3.4 fixes this. (The change occurred about 4 days ago). Next release v1.5.1, I will re-merge updated baksmali & smali in to fix this, but I don't support whatever your doing.
[Android Software Development] Megalith27:
Wouldn't i have gotten the same error during decompiling?

Sent from my A953
[Android Software Development] iBotPeaches:
aapt = Android Asset Package Tool

Only needed in building source back to apk. Not needed in decompile.
[Android Software Development] Megalith27:
I tried it on Windows and I am not getting any errors but nothing happens I can't get compiled framework-res.apk

Edit: I realized that there is a new folder in framework-res folder called "build" and "apk" folder in it, but that apk folder is empty
[Android Software Development] rtfpessoa:
With the aapt the is in the first page right?
[Android Software Development] iBotPeaches:
bovirus, it's obvious from every time a commit is pushed you are building a snapshot release. Every single time, warning or not, you are posting a stack trace without using codeblocks in this thread. Let me just explain this problem and then every future one.

We updated Gradle to 3.5, as you could probably see from the commit history. We jumped a lot of gradle versions so gained a ton of features. Gradle is letting us know there is no source for that step of the process. Which is 100% correct and not a problem. Do we have tests for the CLI or test resources for the CLI? Not at all, those are packed into the Library portion of Apktool therefore not needed. Likewise for the submodule brut.j.common, there is no test java or resources and so on for the other projects.

As for the next "problem", trust me in that it probably is not a problem. The stability of the master branch has gotten very good over the years. Master used to be broken and only releases would stabilize it, now master is always working and releases are just sliced from that. Experimental work and other changes are left in branches. Just trust me here, I'm building versions non-stop and if a new error was in the build log, I would investigate it and probably fix it.
[Android Software Development] leors:
[MENTION=3924617]iBotPeaches[/MENTION] can you help me out?

Xperia XZs
[Android Software Development] iBotPeaches:
Still looking into this one - https://github.com/iBotPeaches/Apktool/issues/1456, give that a star/follow for instant notifications.
[Android Software Development] stang5litre:
Has anyone ever ran into this? This only happens with 3rd party apks. I can modify my system apks fine. Checked my java , made sure they were set to x , at a loss. My friend uses same tool and he can compile this same apk with no error. Any Help would be greatly appreciated. Love this tool by the way. Keep up the good work

Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_1523863987572321477.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 25, --version-code, 999999999, --version-name, 12.10.60-3.1U, --no-version-vectors, -F, /tmp/APKTOOL4468617774840879271.tmp, -0, arsc, -0, webp, -0, arsc, -I, /home/stang5litre/.local/share/apktool/framework/1.apk, -S, /home/stang5litre/Projects/NOUGAT_MODS/OGYouTubev3.1Clear/res, -M, /home/stang5litre/Projects/NOUGAT_MODS/OGYouTubev3.1Clear/AndroidManifest.xml]

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:477)

at brut.androlib.Androlib.buildResources(Androlib.java:411)

at brut.androlib.Androlib.build(Androlib.java:310)

at brut.androlib.Androlib.build(Androlib.java:263)

at brut.apktool.Main.cmdBuild(Main.java:227)

at brut.apktool.Main.main(Main.java:84)

Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_1523863987572321477.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 25, --version-code, 999999999, --version-name, 12.10.60-3.1U, --no-version-vectors, -F, /tmp/APKTOOL4468617774840879271.tmp, -0, arsc, -0, webp, -0, arsc, -I, /home/stang5litre/.local/share/apktool/framework/1.apk, -S, /home/stang5litre/Projects/NOUGAT_MODS/OGYouTubev3.1Clear/res, -M, /home/stang5litre/Projects/NOUGAT_MODS/OGYouTubev3.1Clear/AndroidManifest.xml]

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:440)

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:463)

... 5 more

Caused by: brut.common.BrutException: could not exec (exit code = 1): [/tmp/brut_util_Jar_1523863987572321477.tmp, p, --forced-package-id, 127, --min-sdk-version, 16, --target-sdk-version, 25, --version-code, 999999999, --version-name, 12.10.60-3.1U, --no-version-vectors, -F, /tmp/APKTOOL4468617774840879271.tmp, -0, arsc, -0, webp, -0, arsc, -I, /home/stang5litre/.local/share/apktool/framework/1.apk, -S, /home/stang5litre/Projects/NOUGAT_MODS/OGYouTubev3.1Clear/res, -M, /home/stang5litre/Projects/NOUGAT_MODS/OGYouTubev3.1Clear/AndroidManifest.xml]

at brut.util.OS.exec(OS.java:95)

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:434)

... 6 more

stang5litre@stang5litre:~/Projects/NOUGAT_MODS$
[Android Software Development] iBotPeaches:
Theres nothing in that stacktrace to explain the true error. What you've posted is the failure, but the true cause are the errors before that. The command passed to aapt looks fine from a visual inspection.
[Android Software Development] stang5litre:
I'll post the whole log in a few sorry. It comes up with like 4 or 5 errors but only on my computer. Same apk on my friends computer same tool as well and no errors. That's why I so confused. Thanks :svetius:
[Android Software Development] zelendel:
Sounds like you are either missing or have outdated framework files.
[Android Software Development] gcrutchr:
[MENTION=3924617]iBotPeaches[/MENTION]

How do I change the baksmali/smali version with apktool.jar?

info says apktool.jar is using 2.1.3 for both, but a new version 2.2.0 is available?
[Android Software Development] iBotPeaches:
Usually just change the build.gradle file pointing to the new smali version, then rebuild. However, 2.2 wasn't backward compatible so changes needed to be made. You can see from the SNAPSHOT 2.2.3 (Apktool) version we already have 2.2.0 included - https://github.com/iBotPeaches/Apktool/commit/74f76ae71d67342749b8dafa771384992d1c6086

I only have one fix remaining (Android O Dev Preview) then 2.2.3 will be released.
[Android Software Development] xehed:
Anyone could help/guide for using Apktool v8.0.2 for android?? Any help will be appreciated ?
[Android Software Development] Ticklefish:
That's the app, right? This thread is really for the "pure" JAR file itself. [MENTION=3924617]iBotPeaches[/MENTION] has said in the past that he can't help with issues relating to programs that use apktool..in fact he has said that apktool won't really work on Android.

I think you're better off talking to the app's developer.
[Android Software Development] gcrutchr:
Thank you for your reply....will wait for 2.2.3
[Android Software Development] iBotPeaches:
This is a duplicate of this bug - https://github.com/iBotPeaches/Apktool/issues/1349, which in short is Android 7.1 resources. This was fixed in 2.2.2 release, so you can run `apktool empty-framework-dir --force` to force clean all frameworks from your system. This means the next time you run apktool, it will use its internal framework (which as of 2.2.2 - is Android 7.1) and (as of 2.2.3 - Android O Dev Preview) and that should resolve that.
[Android Software Development] stang5litre:
Thanks so much man!!! That makes sense about to try. :good:. Was confused why it was only me but worked on all my other apps lol.
[Android Software Development] rushi.ranpise16:
Please Help!

Android m

Getting this error

>

F:\apktool>apktool if F:\apktool\framework-res.apk

I: Framework installed to: C:\Users\Rushi\AppData\Local\apktool\framework\1.apk

F:\apktool>apktool d F:\apktool\framework-res.apk

I: Using Apktool 2.2.2 on framework-res.apk

I: Loading resource table...

I: Decoding AndroidManifest.xml with resources...

I: Regular manifest package...

I: Decoding file-resources...

I: Decoding values */* XMLs...

I: Copying assets and libs...

I: Copying unknown files...

I: Copying original files...

F:\apktool>apktool b F:\apktool\framework-res

I: Using Apktool 2.2.2

W: Could not find sources

I: Checking whether resources has changed...

I: Building resources...

I: Building apk file...

I: Copying unknown files/dir...

F:\apktool>
[Android Software Development] Ticklefish:
I don't see an error. Only a warning which you can safely ignore.
[Android Software Development] stang5litre:
Worked like a charm thanks bud!!! :D:svetius:

Awesome tool
[Android Software Development] AL_IRAQI:
Hi [MENTION=3924617]iBotPeaches[/MENTION]

in the recent updates for gapps kinda most of them throw errors when i, or other themers try to decompile them, the same errors happens with N or O framework installed, ill post examples of these errors

Hangouts completely stop at the beginning of the decompile

a d com.google.android.talk_20.0.156452184-24141588.apk
I: Using Apktool 2.2.3-5ec25c-SNAPSHOT on com.google.android.talk_20.0.156452184-24141588.apk
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:52)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:562)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:72)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:64)
at brut.androlib.Androlib.getResTable(Androlib.java:68)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:207)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:109)
at brut.apktool.Main.cmdDecode(Main.java:166)
at brut.apktool.Main.main(Main.java:81)
Caused by: java.io.IOException: Expected: 0x00000008, got: 0x00000202
at brut.util.ExtDataInput.skipCheckShort(ExtDataInput.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readValue(ARSCDecoder.java:309)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:241)
at brut.androlib.res.decoder.ARSCDecoder.readTableType(ARSCDecoder.java:226)
at brut.androlib.res.decoder.ARSCDecoder.readTableTypeSpec(ARSCDecoder.java:156)
at brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:118)
at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:80)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
... 8 more

Google play services throws bunch of errors, then the decompiled files only contain strings & public files

long log here

Maps the same things throws bunch of errors, then the decompiled files only contain strings & public files

long log here

Gboard decompile fine but there is new hardcoded files .binarypb added in /assets, apparently most keybaord themes are in there, which render gboard completely untheme-able, and we also get many dummy values (APKTOOL_DUMMY) in /res/values, i attached .binarypb files i hope that you can take a look at them or if anyone can help with them

i was testing with latest apktool built from master brunch with android O framework installed

Thanks for your continuous hardwork on the apktool :D

Cheers
[Android Software Development] :
About the binarypb they seem to be somewhat obfuscated text files.

color_header·îÜù

color_base€€€ø$

color_state_action_pressedšÍšù

color_state_actionÄ—ƒü2

(color_keyboard_editing_button_backgroundÄ—ƒü

color_action_defaultÄ—ƒü4

*color_expand_access_points_hint_backgroundÄ—ƒÌ

color_notice_textÄ—ƒü

Maybe try hexview it
[Android Software Development] iBotPeaches:
Apktool has gotten its first sponsor!

Pretty excited for this as the long standing bug tracker and request for features should get some much needed care. More details here - https://connortumbleson.com/2017/06/07/apktool-sourcetoad-to-sponsor-development/

The next releases of Apktool should have more bug fixes and more feature enhancements.
[Android Software Development] edzamber:
Waouu, congrats [emoji2]
[Android Software Development] AL_IRAQI:
Awesome news buddy, Congrats!! :D
[Android Software Development] Ticklefish:
Very exciting news! :laugh:

Thank you for all your hard work on apktool, it is very much appreciated!
[Android Software Development] zelendel:
Congrats man. I look forward to seeing if you will hold true or if you will end up selling out like other devs of big projects.
[Android Software Development] sac23:
cangrats bro :)
[Android Software Development] DaOldMan:
Best news I heard this week. I am very happy for you sir !
[Android Software Development] Ticklefish:
Make sure you install your framework files before you try decompiling.
[Android Software Development] s5s2:
Thank you so much
[Android Software Development] iBotPeaches:
A new version has been released!

v2.2.3 (Released June 13, 2017)

Download: https://bitbucket.org/iBotPeaches/apktool/downloads/apktool_2.2.3.jar

Details of Release: https://connortumbleson.com/2017/06/13/apktool-v2-2-3-released/
[Android Software Development] sharkie405:
Forgive me if this has been asked already. I did a relatively quick search in this thread and didn't see it specifically talked about...

I've been able to successfully decompile and then recompile Android O DP3 framework-res.apk with version 2.2.3 without issue or any error messages; however, my phone boot loops after installing/flashing it. I assume it's a signature issue. I've tried -c and also copying over META-INF and AndroidManifest.xml files after the fact, but those don't seem to work anymore. Based on an issue thread on github>Apktool here: https://github.com/iBotPeaches/Apktool/issues/1519 it seems as though unless you sign all of your system apps with the same signature or disable signature checking, you're S.O.L. as far as system apps go. Am I understanding that correctly?
[Android Software Development] toknitup420:
im having some issues getting SystemUIGoogle and SettingsGoogle to compile. framework seems to compile fine.

im on Marlin O dp3 .
[Android Software Development] djdarkknight96:
Try this

Take untouched framework apk and drop in the files with 7zip you edited but from build folder. Do not drop entire res to it. Just the files inside you know you changed. Then just push it to system.
[Android Software Development] sharkie405:
The files I've modified are the styles.xml and the dimens.xml from the values folder which isn't available when using 7-zip as archive or in the build folder on my PC. :(
[Android Software Development] djdarkknight96:
Yes they are in resources.arsc just drop that in
[Android Software Development] sharkie405:
I had tried that already. I tried it again just to be sure, but the phone just gets stuck on the boot animation screen indefinitely.
[Android Software Development] djdarkknight96:
You must have a bad edit if you dropped it in untouched framework apk. Do with no edits to test.
[Android Software Development] zelendel:
https://www.xda-developers.com/chainfire-turns-your-bootanimation-into-a-logging-center/

I use this to help find the issue.
[Android Software Development] [] AL []:
Try this: highlight the build folder's resources.arsc file, right click and choose: 7-zip/Add to archive... then select your destination path and make sure that the "Compression level" dropbox is set at "Store".
[Android Software Development] iBotPeaches:
I'm tracking this currently here - https://github.com/iBotPeaches/Apktool/issues/1520

You are spot on with the reasoning. I've only experienced the issue with Kotlin applications, but the generation of `public.xml` is not right and short of automatically remapping the smali resource IDs, it has to be fixed at the generation of public.xml file. Give that bug report a star/follow for updates.
[Android Software Development] vjb10:
Hi everyone, i'm new to this apktool stuff. Where can i find some help for beginners? I really don't know anything about this yet. I've downloaded apktool from github but i've got no idea of how to use it. Can anyone give me some tips of where do i find such info? Thanks!
[Android Software Development] Thebear j koss:
http://lmgtfy.com/?q=Apktool+for+dummies
[Android Software Development] anuraganasane:
I'm getting an error while recompiling systemUI.apk on Windows. How/where should I submit the logs or bugs?
[Android Software Development] Phone_Guru:
Post it here. If anyone has an answer they'll tell you. If not, you have to open a bug report on Github
[Android Software Development] Spannaa:
Did you install your framework(s) before decompiling/compiling?

The missing resources suggest not.
[Android Software Development] anuraganasane:
Nope, I didn't. From where shall I install framework?

While compiling framework-res.apk it doesn't give any error.
[Android Software Development] Spannaa:
Read the documentation ;)

Install your framework (and install any other frameworks in the same way)

$ apktool if framework-res.apk

Then decompile SystemUI.apk

$ apktool d SystemUI.apk

Make your edits and then recompile