yashsingh1/xdaforums huggingface dataset:
[Android Software Development] iBotPeaches:
Thank you. Maybe hash code generation has changed. Been awhile since I checked that.

Sent from my SGS3 AT&T Variant
[Android Software Development] raziel23x:
The public.xml can be safely deleted because when you recompile a new one is generated
[Android Software Development] michfood:
so - You advise us to delete it every time we recompile apks?
[Android Software Development] kasi5471:
All your changes does not match with the resources. Look for the right way..
[Android Software Development] Locke706:
PS C:\Users\JS\Downloads\apktool> java -jar apktool.jar b SystemUI.apk -c

I: Using Apktool 2.2.4

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml

at brut.androlib.Androlib.readMetaFile(Androlib.java:262)

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

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

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

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

Caused by: brut.directory.PathNotExist: apktool.yml

at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:106)

at brut.androlib.Androlib.readMetaFile(Androlib.java:258)

... 4 more

PS C:\Users\JS\Downloads\apktool>

I started from scratch and still get an error
[Android Software Development] kasi5471:
Look for the right Java and apktool path in your System environment variable. There are many guides on Google
[Android Software Development] Locke706:
I didn't change anything, one moment I'm using is then it just stopped working
[Android Software Development] Ticklefish:
Apktool can't find apktool.yml. That's generated when an APK is fully decompiled. So I would guess that there was an issue decompiling your file.
[Android Software Development] laura almeida:
Apktool can't find apktool.yml because he is pointing apktool to the SystemUI.apk instead of the decompiled directory.
[Android Software Development] :
Thus are just warnings try the compiled apk

the warnings are just about translation. It won't do much anyway apk should work anyway

You can read more about what it means here

https://stackoverflow.com/questions/34874637/has-no-default-translation-and-r-is-not-being-generated

Though this is when building from source. Basically it is the strings it tells about says that the strings aren't translated (existing) in every strings.xml so the specific string might not be available in all languages

---------- Post added at 03:35 PM ---------- Previous post was at 03:33 PM ----------

This means you ported over half of the needed resources you're missing elements that's relying on the navbar or you simply copied to much code which isn't relevant.
[Android Software Development] Ticklefish:
You're missing resources. That normally happens when you haven't installed the right framework files before decompiling.
[Android Software Development] tomurbanowicz:
How to know what framework was used to compile apk?
[Android Software Development] :
Depends on where the file came from
[Android Software Development] rizki_Alkaf:
Hi,

I use APKTool 2.2.4 for editing OREO's framework-res. It successfully decompiled, edited, and recompiled.

But when i use the edited one on my OS, it gives me a bootloop.

Is this because of the APKTool that not yet compatible with OREO? Should i just wait for the next version?
[Android Software Development] Phone_Guru:
You should put your changes into the original file and flash that.
[Android Software Development] tpuserhp:
I am using apktool 2.2.4 to decompile and recompile an apk.

One error during recompile is on an attribute in androidmanifest file.

The line contains:

<receiver name="com.bangcle.everisk.stub.AlarmReceiver"/>

The Android prefix is missing in the name.

I don't understand the reason why the apk was created OK before. This issue is not related to apktool. Sorry if my question does not belong here. Thanks.
[Android Software Development] rizki_Alkaf:
I can't. Changes are in "values" folder. I cannot see it without decompiling apk
[Android Software Development] Thebear j koss:
Resources.arc is what you want.
[Android Software Development] rizki_Alkaf:
Ahh.. i see.

I'll try it later. Thanks

Edit:

Not working, i've replace resources.arc with the edited one from the edited, re-compiled apk.

Tried to boot with it and it actually boots normally, but without any mod changes.

Then i tried to decompile it, and it turns out all the values are back to default
[Android Software Development] tpuserhp:
I think one way to do this is you modify the androidmanifest file after the apk was created and then update the apk using a zip utility. I did a test to show that this can be done. But the app does not work properly. Well, a good learning exercise for me.
[Android Software Development] Thebear j koss:
Delete that line in manifest and build. After recompile, pull original manifest into new apk using 7 zip or winrar. Install into system partition.
[Android Software Development] tpuserhp:
Thanks. I used the similar approach as yours. I added android prefix instead of deleting the line. I think the developer of that app wants to make it difficult to reverse engineering the app. So it seems at run time , the android prefix is not required/checked for the attribute att all. But I believe the app also makes other checking as well as it is not working right now even I did not make any changes to the app.
[Android Software Development] rizki_Alkaf:
Any help for this?
[Android Software Development] ingbrzy:
Keep safe on Florida [MENTION=3924617]iBotPeaches[/MENTION] !

#irmagoeswild
[Android Software Development] Phone_Guru:
Try again. You may have made a mistake along the way. Values don't change back by themselves
[Android Software Development] :
Ah you might need a newer aapt ? can't tell for sure
[Android Software Development] Spannaa:
Samsung stock has two frameworks - did you install twframework-res.apk too?

Does it work if you dump Apktool X and just use apktool_2.2.4.jar on a PC?

Have you tried building a snapshot apktool_2.2.5.jar to see if that works?

There are lots of invalid filenames which include capital letters - is this stock Samsung SystemUI.apk?
[Android Software Development] Spannaa:
So, if compiling on a PC works, it's an Apktool X issue then?

This thread is just for pure apktool.jar

Not sure why/how Samsung are using invalid file names though:

File-based resource names must contain only lowercase a-z, 0-9, or underscore characters and the first character must be a letter.
[Android Software Development] ChanceGPM:
Hey everyone!

I am new to Apktool and I am trying to make some modifications in Facebook Messenger. Even if I don't change anything and just decompile and compile back it won't work.

I have added a picture of me ONLY decompiling and compiling so you can see the error.

How do I fix this?

Thanks a lot, hope you can help me. I really appreciate any help!
[Android Software Development] Ticklefish:
Have a look at line 312 of plurals.xml. There's something about it that apktool doesn't like.
[Android Software Development] ChanceGPM:
I don't know what though xD It looks like this
[Android Software Development] iBotPeaches:
You have capitalized letters in those files. The aapt contained inside Apktool removed this limitation here, which has been in releases since 2.1.x. This makes me think you are using your own custom aapt binary, which would have these limitations in place.
[Android Software Development] iBotPeaches:
The problem is you have 3 positional attributes and one non-positional. Apktool does not know, or by definition aapt where these injected values belong. I would make the 4th resource positional which apktool should have done automatically for you. This was recently reported bug 11 days ago - https://github.com/iBotPeaches/Apktool/issues/1611, which I went ahead and fixed now. It will be in the next release.
[Android Software Development] BiduBR:
Hi ppl.

Someone knows about this ?

I: Using Apktool 2.2.4 on com.whatsapp.apk

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: java.util.zip.ZipException: error in opening zip file

at brut.androlib.ApkDecoder.hasResources(ApkDecoder.java:286)

at brut.androlib.ApkDecoder.decode(ApkDecoder.java:103)

at brut.apktool.Main.cmdDecode(Main.java:166)

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

Caused by: brut.directory.DirectoryException: java.util.zip.ZipException: error in opening zip file

at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:55)

at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:38)

at brut.directory.ExtFile.getDirectory(ExtFile.java:52)

at brut.androlib.ApkDecoder.hasResources(ApkDecoder.java:284)

... 3 more

Caused by: java.util.zip.ZipException: error in opening zip file

at java.util.zip.ZipFile.open(Native Method)

at java.util.zip.ZipFile.<init>(Unknown Source)

at java.util.zip.ZipFile.<init>(Unknown Source)

at java.util.zip.ZipFile.<init>(Unknown Source)

at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:53)

... 6 more

Tks
[Android Software Development] iBotPeaches:
This looks like Apktool could not open/extract the apk, which is actually just a ZIP. Please ensure you can view the contents of this apk with a regular zip viewer or (unzip -l -v). If that does not work, I would double check the application you have is valid and can be installed on the device. If the application can be installed and you still experience this problem, please report a bug.
[Android Software Development] BiduBR:
Hi iBotPeaches!

Tks for fast reply

This apk was generated by Samsung Smart Switch backup and regular zip apps failed to read it. Do you know something about this process?

tks
[Android Software Development] iBotPeaches:
Sounds like an encrypted backup to me then. That is of course strictly a guess without any tangible evidence, but a "smart" backup seems like it would build in some security features like encryption into the mix.
[Android Software Development] koko115:
Can You tell me where i find aapt binary without this limitations ?
[Android Software Development] iBotPeaches:
It is already provided internally by Apktool as I mentioned since the 2.1.x release.
[Android Software Development] koko115:
After decompile with 2.1.1

WARNING: linker: Warning: unable to normalize ""
Exception in thread "main" brut.androlib.AndrolibException: Multiple res specs: drawable/APKTOOL_DUMMY_75d
at brut.androlib.res.data.ResTypeSpec.addResSpec(ResTypeSpec.java:78)
at brut.androlib.res.decoder.ARSCDecoder.addMissingResSpecs(ARSCDecoder.java:451)
at brut.androlib.res.decoder.ARSCDecoder.readTableTypeSpec(ARSCDecoder.java:156)
at brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:115)
at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:77)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:555)
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:64)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:193)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:102)
at brut.apktool.Main.cmdDecode(Main.java:163)
at brut.apktool.Main.main(Main.java:81)
I: Using Apktool 2.1.1 on SystemUI.apk
I: Loading resource table...
[Android Software Development] SXUsr:
The thread title is 2.2.3 and 2.2.4 is in the OP so update and try again.
[Android Software Development] TorqueWrench001:
Hello, I am trying to decompile one of the third party apps I pulled from my phone (OnePlus One 7.1.2 Resurrection Remix) to change some theme elements.. I am getting this error. I am able to decompile/compile other apps so I believe my setup is good. I tried earlier versions of Apktool back to 2.0.0 to no avail. At this point I don't know what to try next. Any recommendations? Thanks for looking.

I: Using Apktool 2.2.4 on base.apk

I: Loading resource table...

Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:

spec=0x7f070000 string/APKTOOL_DUMMYVAL_0x7f070000, config=-sr

at brut.androlib.res.data.ResType.addResource(ResType.java:66)

at brut.androlib.res.data.ResType.addResource(ResType.java:55)

at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:276)

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)

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:80)

D:\Android\!OnePlus\Tools\APKTOOL\apktool_2.2.4>

Edit: I just tried the newly released 2.3.0 version and the result is the same.
[Android Software Development] iBotPeaches:
A new version has been released!

v2.3.0 (Released September 21, 2017)

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

md5 - 356d4e2061e611ec681e25b39c6b007b

sha256 - b724c158ec99dbad723024e259fd73e5135c40d652a3c599cec6ade9264a568e

Details of Release: https://connortumbleson.com/2017/09/21/apktool-v2-3-0-released/
[Android Software Development] gerard_f:
The "Android Oreo Support"in the changelog isn't completely true. If you decompile and recompile the framework-res you will have a bootloop. I think is better to inform this in the changelog to avoid misunderstandings.

Thank you for your awesome work.
[Android Software Development] iBotPeaches:
Sounds like a mistake on your part then. No bootloops here when tested with my Oreo device.

Edit: I didn't test framework-res though. Instead of blanket tossing out the entire Oreo Support line, I would report a bug for that specific circumstance.
[Android Software Development] gerard_f:
Thanks for your answer.

I tried the framework-res.apk on windows and linux with java 8. (Wich java version are you using?).

7.1 -> Works perfect

8.0 -> Bootloop

Can be my fault. I will wait to someone to confirm this behaviour.

Thank you again. :good:
[Android Software Development] Ibuprophen:
I had just responded to this post on, the more appropriate location, within the other thread.

Thank you!

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Software Development] djdarkknight96:
Are you dropping compilled edited files to untouched framework apk? I didn't have any issues modifying O framework. It didn't loop and was still odexed.
[Android Software Development] zelendel:
Ok So fix the xml line that is messed up and the .9 image that is messed up and you should be fine. Not exactly sure what you need help with.
[Android Software Development] inimaitimepass:
I've just decompiled apk's and tried build them back without making any changes.
[Android Software Development] zelendel:
It happens. Google breaks things all the time. Just fix the issues that are there and it should recompile.
[Android Software Development] toknitup420:
Do you know how to fix these issues? The way you say just fix em implies that they are easy errors to fix. Are they in fact easy to fix and I'll just overlooking something? I haven't been able to get it figured out for a while now.
[Android Software Development] djdarkknight96:
That image in the log is missing a black patch line. If you edit the image to have that patch line it will build. There's a nine patch editor in the sdk
[Android Software Development] sharkie405:
In case anyone else goes looking for it... I couldn't find a 9 patch editor in the latest platform tools package. After Google searching, I discovered it is now part of Android Studio. It's fairly easy to use. There are lots of instructions on how to use it out there as well.

I had the same issue with the lines on a 9.img in the Pixel XL Android 8.0 SystemUIGoogle.apk being messed up "out of the box." Once I found the editor, it was an easy fix, and I was able to recompile the apk without issue.
[Android Software Development] inimaitimepass:
Can you pls elaborate more about the fix?
[Android Software Development] toknitup420:
I'm on pixel XL as well. Have you been able to do anything with framework-res.apk. I tested it out just decompiling and recompiling with no changes. But it ended me with a boot loop.
[Android Software Development] sharkie405:
No, I haven't. I don't get a bootloop though, it just says on the white screen with the Google G indefinitely.
[Android Software Development] djdarkknight96:
Guys if you can get it just to build there's a way to get it working. You'll make your edit then drop then compiled areas to an untouched framework then place it on your system. For example if you change a color or style or anythingin a values folder only move resources.arsc to the untouched framework apk. Works for me but I'm on a N6p
[Android Software Development] inimaitimepass:
framework apk can be compiled without any issues, though I haven't tested it coz I rolled back from O to Carbon N.

It's just the systemUI apk that has become a headache. I tried to change the navbar icons to that of pixel ones (just the icons, not the animations), tried to add brightness slider toggle and 7 columns tiles in the quick settings drawer, and to enable navbar tuner. But that 9 patch thing is killing me.
[Android Software Development] ckpv5:
Had same bootloop issue on 8.0 after decompile/recompile framework-res.apk

I tried :

1. Single change to colors.xml - bootloop

2. Put the recompiled resources arsc in untouched framework-res.apk - bootloop

3. Decompile/recompile without any change - bootloop

As I need only to change one color, I hex edit the resources.arsc to change color, put the edited resources.arsc in untouched framework-res.apk - worked

Tested also decompile framework-res.apk, put the hex edited resources.arsc in build folder, recompiled - worked
[Android Software Development] sharkie405:
Using HxD Hex Editor, I compared my apktool-modified (only changed ONE color) Pixel XL Android 8.0 framework-res resources.arsc against the stock Pixel XL Android 8.0 framework-res resources.arsc, and there are probably thousands of differences. Each line has multiple differences. Why is that? Is apktool somehow changing it on decompile? If so, that would explain why trying to use a resource.arsc that's been touched by apktool in any way fails.
[Android Software Development] :
that actually sounds like resources fails to compile properly. Which is strange.

Does the stock arsc and recompiled has some huge diff in size?
[Android Software Development] ckpv5:
Just small difference. Recompiled one is 4kb smaller than stock
[Android Software Development] churchmice:
Still not able to decompile successfully:

1) apktool if framework-res.apk

2) apktool d SystemUIGoogle.apk

After that, I see no smali files inside the decompiled folder.

I have uploaded all the files, and I hope someone could take a look.

https://drive.google.com/file/d/0Bzu0Zqno-_D7allmMmM1YnAzUDA/view?usp=sharing
[Android Software Development] Spannaa:
It's an odexed rom, so the smali is in separate (odex/vdex) files ;)
[Android Software Development] churchmice:
But it is working in android nougat, the rom is also odexed ( official rom released by google ).
[Android Software Development] Spannaa:
Open the apk with z-zip and see if there's a classes.dex inside it. If there isn't, then it's odexed, and smali is external.
[Android Software Development] churchmice:
Thanks, you are correct.

The nougat rom has classes.dex inside the apk while the oreo rom does not.
[Android Software Development] shankar_vl:
I can decompile framework-res.spk of RR rom for redmi 3s . But recompiling is problematic. It is compiled with the following log

WARNING: linker: Warning: unable to normalize ""

W: Could not find sources

W: warning: string 'global_actions_screenshot_status' has no default translation.

W: warning: string 'reboot_confirm' has no default translation.

W: warning: string 'wfcSpnFormat' has no default translation.

I: Using Apktool 2.3.0

I: Building resources...

I: Building apk file...

I: Copying unknown files/dir...

Recompiled one is causing bootloop. I am taking care of replacing original META-INF and Android manifest file in the recompiled file before placing in /system/frameworkfolder.

I did not face problem in recompiling the same file from other roms. It is only in the case of nougat version of RR rom.

Anybody can help here, please.
[Android Software Development] Ibuprophen:
[MENTION=3924617]iBotPeaches[/MENTION], I, as well as many other members, are in need (very badly) of a clarification regarding the mixed message on your Apktool v2.3.0 release.

According to the v2.3.0 Changelog (taken from https://connortumbleson.com/2017/09/21/apktool-v2-3-0-released/), it does state "Dropped support for all 32 bit binaries, except Windows."

Your post (i had quoted above), that was made prior to the v2.3.0 release, states something that reads much broader and a bit contradictory from what's reflected on the Changelog.

Separately, I understand them both completely but, together, I really could use more clarification.

I use Windows 8.1 Professional x64 (64-Bit) and I'm having some "Apktool Errors" with the v2.3.0 that I don't experience on the previous release. This error is being reflected on 3 different types of software that has been leading me to the Apktool itself but, I can't rule anything in or out as the culprit without additional information/clarification which will help point the way to one or the other or even both.

I'm still trying to figure this out in my PC. I'm thinking that I may have to create a directory in my "C:\Program Files" for the software since that's the typical installation directory used for the x64 (64-Bit) software.

In addition, I've seen this confusion posted on various threads with half the responses pointing to your post (above) and the other half pointing to your Changelog and, after so long, I wasn't sure which was which.

It would be GREAT if you could provide a bottom line clarification that would clear this whole (very crazy) ordeal up.

Thank you so much for your time, patience and understanding with this!

~~~~~~~~~~~~~~~

I DO NOT PROVIDE SUPPORT VIA PM UNLESS ASKED/REQUESTED BY MYSELF.

PLEASE KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE
[Android Software Development] Thebear j koss:
Take whatever you changed in rebuilt apk and move it to original apk using 7zip or winrar. Also, always flash framework files, never place in system overwriting original file.