yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Ibuprophen:
I've got a question for my fellow "Geek's" here... LMAO! :)

This was something that a friend of mine asked me last night at my house and I wasn't sure about the correct answer. I don't like (and will always admit to it) to provide an answer I'm not sure about or just don't know about.

If there's a discontinued/abandoned app that was developed... say 2-3+ years ago... that someone wanted to use Apktool to try to do some magic (and attempt to revive it). Is it better to use the Apktool version that was released around that time?

Here's a question from that question (something like that. LOL!)... Is there enough of a difference (in the results) when Decompiling an older app between an older version of the Apktool and the most recent version?

I hope I had worded the above questions okay via text... :D

Thank you very much for your time 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] iBotPeaches:
You want to decode with the latest Apktool version available. This will contain importance fixes when decoding. Rebuilding an application that old may be difficult with a more restrictive binary but that's the price you pay for losing the source code of an old application. Take your time, decode with latest and fix the issues that crop up. You can't last forever building a production application in smali and disassembled resources, you will simply go crazy.
[Android Software Development] Ticklefish:
This isn't completely related but..I always have a copy of apktool_1.5.2.jar hanging around. There are a few mods in the xda archives that I like to use which have old smali files. These files won't work with the newer versions of apktool so I use 1.5.2 and a small dummy APK to convert them.

Just thought it might be worth mentioning.. :)
[Android Software Development] Ibuprophen:
Ahhh! :D

I didn't think of this one phrase till I had read your response (please correct me if I'm wrong)...

"Backwards/Reverse Compatibility"

I knew that this might have been the case but, your response turned on my brains vacuum cleaner (to remove a little of the cobwebs).

I can just consider the latest version as a kind of...

"The same great function as the previous versions but, fixed & patched with additional added compatibility, function and features."

I know that there's more to it but, am I correct in this form of "wrapped up description" as I had stated above?

I appreciate your taking the time for responding to my post. You've always made the effort for being available to others for support and i do thank you for this [MENTION=3924617]iBotPeaches[/MENTION]!!! :)

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

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] CokDan:
finally working fine, just need to disable signature to modding systemui on android 8.1 oreo.. If not will getting bootloop :)
[Android Software Development] sharkie405:
Can you explain what you mean exactly by "disable signature to modding systemui?"
[Android Software Development] CokDan:
as my knowledge, it means any original signature will disabled and open for other signatures apk, so make a sign-apk can running as well.. called it as SUPERUSER MOD.

EDITED: just for showing my modify status_bar on Oreo custom rom
[Android Software Development] ANDROIDXFOREVER:
https://xdaforums.com/showpost.php?p=76226193&postcount=31 ;)
[Android Software Development] [] AL []:
Q: why is it that once re-compiled, some files' original compression level are not respected in the partial apk in the /dist folder?!?

These days, many apps have a res/raw folder in which audio files or others NEED a "STORE" compression level to avoid bugs. Well, in the specific app I was messing with, all the files in that dist folder / res / raw folder show as "deflate". So it's pretty obvious to me that using this (after signing it) will not work.

I usually don't bother with the /dist folder app and just move stuff from the /build folder over an untouched apk, but since I spent a good part of the afternoon yesterday just trying to install an untouched (but obviously decompiled and recompiled) BBC News apk (https://www.apkmirror.com/apk/bbc-w...e/bbc-news-4-9-0-85-gnl-android-apk-download/) without success, I did try that way too.

No error what so ever, but always gives me parsing error when trying to install.

So if anyone feels like trying this and finds a way to make it work, I'm all ears!

Windows 8 / apktool v2.3.2 and a ~ 6 months old framework-res.apk
[Android Software Development] iBotPeaches:
This was a regression in latest release. I'm debating whether to cut another patch release this week (2.3.3) to handle this issue, as we had no test coverage for this. It is already fixed in master.
[Android Software Development] bovirus:
[MENTION=5802519]brok85[/MENTION]

I believe that your request here is OT (Off Topics).

This thread in ONLY about use apktool. Nothing else.

If you want to develop/add code you have to search in right threads (not here).
[Android Software Development] brok85:
Well I posted here because I thought the question was about how to use apktool for a specific task, i.e., add a new class to a decompiled app. If not here, where should I post this question? Any suggestion?

Thanks!
[Android Software Development] bovirus:
[MENTION=5802519]brok85[/MENTION]

apktool can compile/decompile an app.

I think that how to add something to the source code of app is not related to apktool and this thread.

[MENTION=3924617]iBotPeaches[/MENTION]

Did you fix code for Windows compilation?

With latest source code update I could compile the source code Windows without errors.
[Android Software Development] zeroyjk:
Hello, how to download the apk file on google play store? or need to download at phone 1st ?
[Android Software Development] kapil_dheer:
Try out apkmirror.
[Android Software Development] bovirus:
@ zeroyjk

Please check always first post.

Is not app. Is not available on Play Store.

[MENTION=4243329]kapil_dheer[/MENTION]

Try what on apk mirror? Is not an apk.
[Android Software Development] kapil_dheer:
Thought he's asking for source of some apk file. You read his mind well:confused:
[Android Software Development] djdarkknight96:
Download on phone then you can use an app to backup on sd if no root. Here https://market.android.com/details?id=com.naveenrao.simpleapkbackup

If rooted just copy it from data/app

Or

Apk mirror like suggested
[Android Software Development] iBotPeaches:
A new version has been released!

v2.3.3 (Released April 26, 2018)

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

md5 - a15507953bd9b89c2d6570f46fb1f774

sha256 - 0e543660bf2d16fe7c543d4034ef505a6ddccb883416c8aa68d1a1d779b057f2

Details of Release: https://connortumbleson.com/2018/04/29/apktool-v2-3-3-released/
[Android Software Development] ambasadii:
[MENTION=3924617]iBotPeaches[/MENTION]

take a look on this this please

its compare of res folder after decompiled SecSettings2.apk (oreo 8.0.0 S8+) by apktool v2.3.2

I compared with orginal res folder in orginal apk

many missings folders or bad names after decompile :rolleyes:

edit:

i see that even some files are diffrent in each folders after decompile
[Android Software Development] djdarkknight96:
Been reported
[Android Software Development] iBotPeaches:
Are these failures in logcat directly because of the loss of implicit version qualifiers? This ticket (long response) has the details: https://github.com/iBotPeaches/Apktool/issues/1761
[Android Software Development] iBotPeaches:
The public.xml is just a list of all the resources in that APK, so actually if you just add anything the public.xml will update so you don't need to add anything to the public.xml.
[Android Software Development] gcrutchr:
Thanks! Makes my development life so much easier.
[Android Software Development] Dunc001:
This is OK in theory, but what happens if the IDs are referenced directly in smali rather than the resources being called in xml? Does autogenerating a new public.xml after deleting/adding resources preserve the same IDs for the remaining original resources so that smali is still calling the correct one? Also, if you need to add a new resource and use the ID for said resource in smali then if you are relying on autogeneration on compile you would need to add resources, compile, decompile again, check new public.xml for new IDs and then edit the smali?
[Android Software Development] surdu_petru:
Hi!

My problem with SystemUI.apk seems to persist !

It was ok after delete public.xml , I compiled SystemUI successfuly , tested in my ROM it's OK ! ....

Than I tried to add some resource id , of course without add in public.xml ( public.xml need to be deleted for recompile without error !) , so after added resource id ( png..) ..also compiled was ok ! ...but my new SystemUI.apk stop working in my ROM ! ...also I can not decompile the new SystemUI.apk without error !

( lookingn into the new SystemUI/..res//value/public.xml - I can see that resource id was successfully added ! ...)

Does anyone have any idea ? THANKS !!! :good:
[Android Software Development] iBotPeaches:
kk. I'm just going to instate some rules now.

If you have problems as in the following

1) An APK fails to decompile, and you have IFed the frameworks. Then please post and ask for help.

2) You have an error that you know is an Apktool bug. I've been building APKs for now 2 years, so I know most of you out there can spot an apktool bug VS a mistake on your part.

3) Want to post in a development related idea or thank me.

Please don't post unless its those 3. To surdu_petru, in all honesty. What do you expect me to do? You know what my first question is going to be.

1) Did you resign that APK using the same signature, and drop the resources.arsc along with injecting the drawables back into the APK?

2) Did you even get the FC via logcat? You need to post stack traces, logcats, error outputs, and APKs. Anytime you expect me to help.

With that. Please lets just keep this thread on apktool development / 3 things above. I understand Apktool might be hard for some people to comprehend in the beginning. I will be writing documentation soon.

Join Freenode #apktool if you just need help and wanna chat. To the random ircwebusers who join, ask a question and leave 5 minute later. Thats not how IRC works. Install an IRC Client (google it), and actually idle and sit in the chatroom if you want help.

I had to disable instant notifications for this thread, since I was getting 20-30 emails a day.
[Android Software Development] silverxbv2:
Yes to both parts. The public.xml will not change except for what you are adding or deleting. It does not completely rewrite every id.

As to the second part, that is what I have always done. With quick settings as an example, I add in the icons to drawable/xxx folder, recompile, decompile the new one with the new pngs, add in the smali "stuff" and use the new decompiled public.xml for the reference IDs to the pngs I just added
[Android Software Development] kong:
Hi,

I cannot recompile the latest MiuiSystemUI.apk. It says

invalid resource directory name: MY_WORKING_DIR/MiuiSystemUI/res/values-hugeui
invalid resource directory name: MY_WORKING_DIR/MiuiSystemUI/res/values-largeui
invalid resource directory name: MY_WORKING_DIR/MiuiSystemUI/res/values-zh-rCN-hugeui
invalid resource directory name: MY_WORKING_DIR/MiuiSystemUI/res/values-zh-rCN-largeui

I worked around it by removing those directories :silly:
[Android Software Development] Dunc001:
So are you saying if I delete a load of unneeded resources and delete public.xml then compile, the IDs for the remaining resources will be exactly the same when the public.xml is regenerated? I must have understood wrong therefore that the IDs must be sequential with no gaps then? Is it only that each ID must be unique, but sequence is irrelevant?
[Android Software Development] furniel:
I tested this on framework-res.apk and even if decompile, delete public.xml and compile - 70% of ids changed, as result we have apk that won`t work as it should(in this case even whole rom won`t work.). So i don`t think that regenerating of public.xml is a good idea.
[Android Software Development] surdu_petru:
Hi!

Thank you very much @iBotPeaches !!! :good:

- SystemUI is the same application that you have not managed to recompile :

...so I managed to compile after I deleted public.xml !

My problem is that : after add some drawable id I can not decompile the new SystemUI with the new id that I've added !

( I have no issue when I recompile SystemUI with add drawable id -> but result of the new SystemUI is broken !!! ) .

( I'll upload on pastebin my result when I try to decompile the new SystemUI with new resource id added of me ! )

THANKS !:good:
[Android Software Development] iBotPeaches:
You didn't use the right aapt included in OP.

Sent from my SGS3 AT&T Variant
[Android Software Development] IdeosDev:
Decompiled Miuihome.apk but then when i tried to recompile it

i get this :(

C:\ics>java -jar apktool.jar b miuihome

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN

otExist: apktool.yml

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

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

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

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

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

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

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

103)

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

... 4 more

C:\ics>
[Android Software Development] cowsquad:
On miui you have to install the framework-miui-res.apk and framework-res.apk have you installed those yet? Also you must have the appt on page 39. Do you have it?

Also make sure apktool.yml is in your decompiled apk.
[Android Software Development] IdeosDev:
well i

java -jar apktool.jar if framework-res.apk

java -jar apktool.jar if framework-miui-res.apk

then only java -jar apktool.jar d MiuiHome.apk

then i tried building back

java -jar apktool.jar b MiuiHome

it failed
[Android Software Development] iBotPeaches:
Read the error. Its telling you the problem. It couldn't find apktool.yml. Which should be in the directory miuihome. If its not, then you either deleted it or the script you might be using isn't handling that file correctly.

Post the apktool.yml.
[Android Software Development] ingbrzy:
use in cmd -- aapt.exe v

it should show

C:\Windows\System32>aapt.exe v

Android Asset Packaging Tool, viBotPeaches 0.3

if not, use search to find all aapt.exe in the C:/...
[Android Software Development] IdeosDev:
Is still there inside the folder

Here the apktool.yml http://www.mediafire.com/?ocfgygzf33zbpil
[Android Software Development] iBotPeaches:
Don't know what to tell you. Just used your apktool.yml in my miuihome and it worked fine. The miuihome directory should have these files

-build (if built)

-dist (if built)

-res (resources)

-AndroidManifest.xml

-apktool.yml (used for apktool to know how to rebuild)

-classes.dex (smali, java source).
[Android Software Development] iBotPeaches:
This not an apktool bug. I suggest you learn basic troubleshooting skills.

Your in directory c/ics. So make sure miuihome is in there, etc. It's apktool.yml not apktool.ym, and I hope there's a /res folder.

Sent from my SGS3 AT&T Variant
[Android Software Development] djdarkknight96:
I've been able to successfully build and use apk only if I do apktool b -c and use new app structure. The xml are still there just moved in regular layouts. I did this with Pandora...Not sure system apps will work as good though. And yes this bug affects more then just Samsung apps. I'm making a Substratum theme so I use the decompiled files but I keep apk structure instead there moving the layouts to correct folders. It works for me.
[Android Software Development] ambasadii:
sorry I miss that

---------- Post added at 20:29 ---------- Previous post was at 20:24 ----------

im using too this method b -c and then after recompiling I push org "res" "classes" and "resources" from org apk to new recompiled. this works fine for systemui (for example) but not for secsettings. In best option I have it worked but fingerprint is broken
[Android Software Development] djdarkknight96:
Yeah I had a feeling system apps would be a pain to fix.
[Android Software Development] AL_IRAQI:
Hi everyone, im trying to theme Tab S2 stock fw, settings & sysui, but i cant build apks back, especially fw doesnt even throw a read-able error

logs can be found here , apk will be posted later (edit: here)

Thanks
[Android Software Development] Ibuprophen:
I've never done this before myself but, you may be able to obtain some member guidance within one of the following threads that reflects this type of theming and the same/similar device too.

https://xdaforums.com/showthread.php?t=3595496

https://xdaforums.com/showthread.php?t=3512583

https://xdaforums.com/showthread.php?t=3100507

https://xdaforums.com/showthread.php?t=3394245

Just trying to help guide you to a place where you may be able to either locate a solution or receive some member guidance with a solution.

Good Luck!

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

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] techker:
i don't know what happend but the new version i can't compile..i always get the infamous error main.. or brut.common.BrutException: could not exec ...

increased my Heap changed to new apktools version and re installed JDk.....

can i get some help :(
[Android Software Development] djdarkknight96:
Go back to old version, does it build? If so come back with full log on new version build.
[Android Software Development] AL_IRAQI:
Thanks buddy, i already asked some of those people, didnt know that much about latest TW builds
[Android Software Development] z.BaBe:
How to Fix

W: Config flags size > 38. Exceeding bytes: 0x746E000000000000000000000000000000000000000000000000.

W: Invalid config flags detected. Dropping resources: string-sr-ERR0

Exception in thread "main" java.lang.ClassCastException: brut.androlib.res.data.value.ResStringValue cannot be cast to brut.androlib.res.data.value.ResAttr

at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:36)

at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:369)

at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)

at brut.androlib.res.decoder.XmlPullStreamDecoder$1.event(XmlPullStreamDecoder.java:83)

at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:141)

at brut.androlib.res.decoder.XmlPullStreamDecoder.decodeManifest(XmlPullStreamDecoder.java:153)

at brut.androlib.res.decoder.ResFileDecoder.decodeManifest(ResFileDecoder.java:134)

at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:296)

at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:131)

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

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

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

I: Using Apktool 2.0.0-5d73e2-SNAPSHOT on Zello [3.105].apk

I: Loading resource table...

I: Decoding AndroidManifest.xml with resources...

I: Loading resource table from file: /data/data/per.pqy.apktool/1.apk
[Android Software Development] Spannaa:
Just an error log with no explanation of what you're trying to achieve and what steps you took?

Is Apktool 2.0.0-5d73e2-SNAPSHOT an old, self-built apktool? If so, what happens if you use the latest official release?
[Android Software Development] Ibuprophen:
I remembered seeing the "Apktool 2.0.0-5d73e2-SNAPSHOT" somewhere before. So after I had done a little digging, and it took me only a few minutes but, I had found something that gave me an "A-HA" moment.

The "Apktool 2.0.0-5d73e2-SNAPSHOT" is a modified "Unofficial" version of the Apktool that was actually provided by someone from the 4pda website.

I'm not sure how/where you, [MENTION=7433644]z.BaBe[/MENTION], had received this Unofficial version of the Apktool but, I'm not an Administrator nor Moderator and it's my personal opinion (and belief) that it would be extremely hard/difficult to receive any assistance on the XDA Forum with this Unofficial Apktool (especially within this Official Apktool thread).

I'm not stating that you personally are bad or what you did was bad in ANY way!

It may have just been a bad suggestion or similar that led you to use this Unofficial Version of the Apktool.

I do wish you the best of luck and, you never know, maybe someone on the XDA Forum will help you out.

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

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] EMSpilot:
APKTOOL setup for 8.1

Could someone please share there APKTOOL setup for 8.1? I have tried 2.3.3 and I can't even use the if framework command without 100's of errors. I am working with the Honor View 10 Rom U.S.

Cheers
[Android Software Development] Ibuprophen:
Regarding what you need (aka Prerequisites)... this threads OP has the links/information for this.

If this is an issue that needs to be reported... the following Github link will take you to where you can report any specific issues.

https://github.com/iBotPeaches/Apktool/issues

You may be able to locate another issue within the above link that matches yours too.

Good Luck!

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

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] EMSpilot:
Yes I have searched high and low to no avail. Do me a favor and try and install this framework and let me know what happens. https://www.dropbox.com/s/lmcnpvfizuzzd59/framework.zip?dl=0

Cheers

EMS
[Android Software Development] Spannaa:
If apktool can't decompile apks from your Honor View 10 Rom with the framework(s) from the same rom installed, then it's probably an issue with the rom (or some of it's included apks).
[Android Software Development] EMSpilot:
I have tried another framework-res.apk straight from the phone and same issue. If you have time please give it a try. https://www.dropbox.com/s/juveyzm55ktagfs/framework-free.zip?dl=0

Cheers
[Android Software Development] Ibuprophen:
I had given it a try (using the first framework provided by [MENTION=4668174]EMSpilot[/MENTION]) and I do see what your referring to. I then had something more to go by and performed a little search regarding this.

Based upon the following results from Github, it looks as though the framework for Huawei (devices in general) hasn't been very successful. It just looks to me that this is especially regarding the Huawei devices beginning with Marshmallow+ Framework (though this is my opinion based upon my findings).

https://github.com/iBotPeaches/Apktool/issues/836

https://github.com/iBotPeaches/Apktool/issues/1445

https://github.com/iBotPeaches/Apktool/issues/1521

https://github.com/iBotPeaches/Apktool/issues/1682

I did, inadvertently, bump into the following thread that looks like it may be helpful/of interest to you as well.

[How-to] edit Huawei's apks by millo1978

I'm not extremely knowledgeable with Huawei devices in general but, I hope that this information is helpful to you in some way.

Maybe [MENTION=3924617]iBotPeaches[/MENTION] can chime in with some additional information regarding this topic of conversation.

I do wish you the best of luck! :)

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

I DO NOT provide support via PM unless asked/requested by myself. PLEASE keep it in the threads where everyone can share.