yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Adizzzle:
I can gladly upload them if someone else wants to see what's going on, to be honest this is my first time having issues decompiling and recompiling. It has always gone smooth as butter in the past, and I made sure to install framework-res.apk, and twframework-res.apk before decompiling..

The only modifications I made to the framework-res.apk were changing the default wallpaper, and deodexing with SVA Deodexer. That was it.
[Android Software Development] :
Well the deodex shouldn't have made it broken. Since what it basically does is for you already known. But did you change wallpaper then deodexed? But that shouldn't cause the issue. because it is framework-res that's keeps failing right. You can pm the files ill take a look. But I doubt it has anything to do with your deodexing ;)
[Android Software Development] Adizzzle:
Yeah, changed the wallpaper before deodexing, and I doubt it is the wallpaper, considering my errors keep pointing to those .PNG's. (They are just Knox badges / icons) Thank you very much man, I uploaded them to Mega. PM sent.
[Android Software Development] fhem:
apktool b - c app name. - c flag copies old sigs to new build
[Android Software Development] :
Well copying them from drawables-xxhdpi and replacing them fixes that issue. But for me (apktool on phone) gives other issues after fixing that issue.

But you can try with just copying over the knox badges icons and see if it will fix the issue for you

And I think the issue is in apktool you should open a bug issue on github about that
[Android Software Development] Adizzzle:
Yeah something fishy is going on here, tried replacing them from the drawable-xxxhdpi-v4 folder, but still got some knox-badge.PNG errors sadly.

C:\APKTOOL>apktool d framework-res.apk
I: Using Apktool 2.0.1 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...

C:\APKTOOL>apktool b framework-res
I: Using Apktool 2.0.1
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
C:\APKTOOL\framework-res\res\drawable-sw360dp-xxxhdpi-v13\ic_knox_badge.PNG: err
or: File is case-insensitive equivalent to: C:\APKTOOL\framework-res\res\drawabl
e-xxxhdpi-v4\ic_knox_badge.png
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [C:\Users\Adrian
\AppData\Local\Temp\brut_util_Jar_7692942607251826695.tmp, p, --forced-package-i
d, 1, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --ver
sion-name, 5.0.2-G925W8VLU1AOE1, -F, C:\Users\Adrian\AppData\Local\Temp\APKTOOL6
966400267314121140.tmp, -x, -0, arsc, -S, C:\APKTOOL\framework-res\res, -M, C:\A
PKTOOL\framework-res\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:459)
at brut.androlib.Androlib.buildResources(Androlib.java:397)
at brut.androlib.Androlib.build(Androlib.java:285)
at brut.androlib.Androlib.build(Androlib.java:256)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [C:\Users\Adrian\AppData\Local\Temp\brut_util_Jar_769294260725182
6695.tmp, p, --forced-package-id, 1, --min-sdk-version, 21, --target-sdk-version
, 21, --version-code, 21, --version-name, 5.0.2-G925W8VLU1AOE1, -F, C:\Users\Adr
ian\AppData\Local\Temp\APKTOOL6966400267314121140.tmp, -x, -0, arsc, -S, C:\APKT
OOL\framework-res\res, -M, C:\APKTOOL\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:419)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:445)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Adrian\A
ppData\Local\Temp\brut_util_Jar_7692942607251826695.tmp, p, --forced-package-id,
1, --min-sdk-version, 21, --target-sdk-version, 21, --version-code, 21, --versi
on-name, 5.0.2-G925W8VLU1AOE1, -F, C:\Users\Adrian\AppData\Local\Temp\APKTOOL696
6400267314121140.tmp, -x, -0, arsc, -S, C:\APKTOOL\framework-res\res, -M, C:\APK
TOOL\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:413)
... 6 more
[Android Software Development] :
Try removing the loaded framework in apktool then reload them and try again. else you could try 2.0.0 snapshot version which worked on Samsung lollipop
[Android Software Development] Adizzzle:
I tried both, 2.0.0 gives me the same errors, that's why I moved to 2.0.1, in hopes that it was apktool.

I'm gonna try and track down the first revision of my ROM and pull out the completely stock framework-res.apk and try that too.
[Android Software Development] Thebear j koss:
Try deleting 1 of those pngs too. Having 2 of the same png might be throwing apktool into a loop.
[Android Software Development] Adizzzle:
Seems legit. I'll give that a shot after work and edit this post with the result.

?
[Android Software Development] Thebear j koss:
Couldn't hurt. Be sure to double check your public xml for those pngs. If they are in there deleting 1 won't do anything but cause more errors if they are in your public xml.
[Android Software Development] Adizzzle:
Man, nothing.

This framework must have been messed up after I changed the wallpaper, or deodexing. Not sure how that's possible, but I suppose I'll just sit tight for that 5.1 update in September. Start fresh, and make sure to use apktool before doing anything other changes.

Thanks for your help!
[Android Software Development] :
Well since its a framework-res file you're trying to edit its not deodex issue. something else. did you try on a clean framework-res?
[Android Software Development] Adizzzle:
No I must have deleted my revisions on Windows, so the wait begins, or I may just try and redo the ROM from scratch on a day off, if I ever get one.
[Android Software Development] :
Well nope. Depends on what Rom you use just ask for someone that has a untouched version ;)
[Android Software Development] Adizzzle:
I made it myself, and the last file I have of it is on AndroidFileHost, it's not deodexed and has the wallpaper changed -- the very first attempt I had, so I'm gonna just download that again, and try that framework-res.apk and see what happens..
[Android Software Development] :
Have you loaded the framework-res and your required oem framework
[Android Software Development] maksnogin:
SMALI : smali-2.0.7.jar

APKTOOL : apktool_2.0.1_a19.jar

--------------------------------------------------

[*] Установка фреймворка framework-res.apk

I: Framework installed to: bin\framework\1.apk

[*] Установка фреймворка mediatek-res.apk

I: Framework installed to: bin\framework\2.apk

[*] Установка фреймворка oppo-framework-res.apk

I: Framework installed to: bin\framework\12.apk

[*] Recompile SystemUI

I: Using Apktool 2.0.1

W: Could not find sources

I: Checking whether resources has changed...

I: Building resources...

C:\BatchApkTool\bin\..\_INPUT_APK\SystemUI\res\values\public.xml:414: error: Error declaring public resource drawable/oppo_notification_template_icon_bg for included package oppo

C:\BatchApkTool\bin\..\_INPUT_APK\SystemUI\res\values\public.xml:932: error: Error declaring public resource id/icon for included package oppo

C:\BatchApkTool\bin\..\_INPUT_APK\SystemUI\res\values\public.xml:938: error: Error declaring public resource id/status_bar_latest_event_content for included package oppo

C:\BatchApkTool\bin\..\_INPUT_APK\SystemUI\res\values\public.xml:939: error: Error declaring public resource id/notification_sim_indicator for included package oppo

C:\BatchApkTool\bin\..\_INPUT_APK\SystemUI\res\values\public.xml:940: error: Error declaring public

------------------

How fix?
[Android Software Development] popo72:
Just find the PNG file and rename with small letter extension png
[Android Software Development] Adizzzle:
Already tried that. No dice.
[Android Software Development] popo72:
Issue in compiling flyme-res.apk and mediatek-res.apk Android 5.1

Hi all, I need help in compiling these 2 apk:

flyme-res.apk and mediatek-res.apk

no way to succesfully compile them, with following error (apktool is complaining about resources not found but actually all present!)

--------------------------------------------------
Batch ApkTool : 3.3.1
SMALI : smali-2.0.7.jar
API level : 22
APKTOOL : apktool_2.0.1.jar
build in EXPERT mode : NO
Sign output APKs : NO
--------------------------------------------------

[*] Installing framework flyme-res.apk
I: Framework installed to: bin\framework\10.apk
[*] Installing framework framework-res.apk
I: Framework installed to: bin\framework\1.apk
[*] Installing framework mediatek-res.apk
I: Framework installed to: bin\framework\8.apk

[*] Recompiling flyme-res
I: Using Apktool 2.0.1
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
R:\SMARTPHONES\00-BATCH_APKTOOL\BatchApkTool331s\bin\..\_INPUT_APK\flyme-res\res\layout\airplane_notify_dialog_view.xml:4: error: Error: No resource found that matches the given name (at 'id' with value '@id/message').

R:\SMARTPHONES\00-BATCH_APKTOOL\BatchApkTool331s\bin\..\_INPUT_APK\flyme-res\res\layout\airplane_notify_dialog_view.xml:4: error: Error: No resource found that matches the given name (at 'text' with value '@string/enable_airplane_notify').

R:\SMARTPHONES\00-BATCH_APKTOOL\BatchApkTool331s\bin\..\_INPUT_APK\flyme-res\res\layout\airplane_notify_dialog_view.xml:5: error: Error: No resource found that matches the given name (at 'id' with value '@id/reminder').

....................................................

detailed logs here

flyme-res log

mediatek-res log

here the single files and framework

flyme-res.apk

mediatek-res.apk

framework-res.apk

really thank you very much in advance!:good::good:
[Android Software Development] Thebear j koss:
Just fix those 2 errors you posted. 1 in the xml in layouts and the other in strings. What are these apps and what framework are you using?
[Android Software Development] popo72:
If you open the detailed logs there are many of those errors... how can I fix all of them? The framework I'm using are the 3 posted....the only ones available into framework directory...
[Android Software Development] zelendel:
Simple. You go line by line fixing each error. But that might not always be an option with those apks. Flyme and Media tech are known to add a ton of different veribles that apktool doesnt support.
[Android Software Development] popo72:
Thanks for the suggestion, but assuming I have to fix this line

R:\SMARTPHONES\00-BATCH_APKTOOL\BatchApkTool331s\bin\..\_INPUT_APK\flyme-res\res\layout\airplane_notify_dialog_view.xml:4: error: Error: No resource found that matches the given name (at 'id' with value '@id/message').

what can I do considering that the resource is actually present into the res apk? and the same for all the others lines?
[Android Software Development] Vivek_Neel:
Adding plus symbol (+) before the I'd text should fix it.

Like @+id
[Android Software Development] popo72:
Thanks but desn't work :crying:. Fro example for the first error on flyme-res.apk I get:

before

R:\SMARTPHONES\00-BATCH_APKTOOL\BatchApkTool331s\bin\..\_INPUT_APK\flyme-res\res\layout\airplane_notify_dialog_view.xml:4: error: Error: No resource found that matches the given name (at 'id' with value '@id/message').

after

R:\SMARTPHONES\00-BATCH_APKTOOL\BatchApkTool331s\bin\..\_INPUT_APK\flyme-res\res\layout\airplane_notify_dialog_view.xml:4: error: Error: No resource found that matches the given name (at 'id' with value '@+id/message').
[Android Software Development] zelendel:
It is most likely a corruption in the apk. This os is known for causing huge issues with apktool. Many of the China based roms have the same issue to the point that the dev gave up trying to support them.
[Android Software Development] popo72:
Indeed, absolutely right!...all the China phone have problems with propietary frameworks....also lenovo-res.apk is basically impossible to re-compile.

But this since Android 5.1 because with 5.0 it was possible to compile them! Really big limitation.....:crying::crying:
[Android Software Development] Vivek_Neel:
Then I could guess. Missing the installation of framework.

Make sure you installed all the fws :)
[Android Software Development] popo72:
I'm sure I have installed all the needed framework....I have also tried adding SystemUI as well and others apk but still same error.....I'm really lost!....
[Android Software Development] :
What does the log tells you.? When trying recompile?
[Android Software Development] popo72:
Hi... Thanks for the support....

You can find everything (framework, apk and full log) on my previous post

http://xdaforums.com/showpost.php?p=62184791&postcount=3538
[Android Software Development] :
Well it doesn't decompile the resources fully you should add the Ids that its crying about. Because they "don't exist"

Another thing is to try bdfreaks tool and replace the old apktool with the latest one. And see if it Will help
[Android Software Development] popo72:
Thanks....I will check with bdfreaks....

About id's where should I add them?
[Android Software Development] :
Res/values/ids.xml
[Android Software Development] Vivek_Neel:
Oh wait. Then what did you mean by the below:

what can I do considering that the resource is actually present into the res apk? and the same for all the others lines?

I thought those ids are already present. But still you are facing the errors.

To fix those errors:

Add ids in ids.xml /res/values/

<item type="id" name="message" />
[Android Software Development] popo72:
Point is that Ids of resources apktool is complaining about are already all declared into ids.xml.....that's the biggest mistery...
[Android Software Development] PerfectSlayer:
Apktool v2.0.2 is comiiing! :cool:

https://plus.google.com/+ConnorTumbleson/posts/4LkLcrA9Qdr
[Android Software Development] Adizzzle:
Right on! Gonna take another shot at my framework!
[Android Software Development] :
Then remove them then

---------- Post added at 08:46 PM ---------- Previous post was at 08:45 PM ----------

Hmm must be related to what (broken app)
[Android Software Development] popo72:
First of all thanks to all of you for supporting on this issue.....I just noticed one detail that mabe can be useful to better understand....

if we focus on first error I get by re-compiling flyme-res.apk:

R:\SMARTPHONES\00-BATCH_APKTOOL\BatchApkTool331s\bin\..\_INPUT_APK\flyme-res\res\layout\airplane_notify_dialog_view.xml:4: error: Error: No resource found that matches the given name (at 'id' with value '@id/message').

the correspondent line into ids.xml is:

<item type="id" name="message">false</item>

that false statement seems to indicate that something went wrong during the decompiling phase, is it correct? But I have no clue!
[Android Software Development] :
Nope that issue when it can't decompile sources correct it calls it apktool dummy ?

Well did you add that line remember it has to be correct info in ids not sure exactly what it is because some ids can be different I (hard to explain when I don't have any reliable preview here)

But try copy a "working" line and paste it then rename the value like message_indicates to message it might just be that its missing a ids that isn't fully declared.
[Android Software Development] Morningstar:
Nope. The 'false' values in ids.xml are perfectly normal. It sounds like something's going wrong when it's rebuilding resources.arsc...
[Android Software Development] popo72:
Sorry but I didn't understand your suggestion :confused:
[Android Software Development] Thebear j koss:
There is something else going on, where are these apps from? Device/android build/Rom/where these apps are from(system/data). Apktool does not work on every apk. Some apps, especially proprietary apps from certain manufacturers will not work. Also make sure there are no other framework files needed. More and more devices that are not running pure android have more than 1 framework file that needs to be loaded.
[Android Software Development] zelendel:
It's from the flyme os from China and we all know the issues with decompiled their system apks.
[Android Software Development] popo72:
Indeed....problem occur with 2 apk which are basically framework into framework directory....I tried to also load overall system/app and system/priv-app along with framework with apktool if command but no luck...
[Android Software Development] Thebear j koss:
So the past 2 pages are complete wastes? Lol. Is anyone going to tell him this or let him continue posting about his 2 apps that won't recompile?
[Android Software Development] Morningstar:
Zel's already mentioned it 3 times...

[emoji57]
[Android Software Development] Thebear j koss:
Lmao. Ok, sorry i read back thru all the posts. I just kinda quickly glanced it late last night. I guess some others need to do a little back reading too.
[Android Software Development] shyvam:
Please help me devs if u can please

HEY GUYS I HAVE AN PROBLEM WITH INSTALLING SENSE 4.1 FRAMEWORKS >>>>>>[com.htc.resources.apk] WHEN I TRY TO INSTALL COM.HTC.RESOURCES.APK IN APKTOOL I ALSO INSTTALED FRAMEWORK-RES.APK FIRST BUTI USED LATEST APKTOOL 2.0.1,,AAPT.EXE AND APKTOOL BATCH FILE BUT I DIDN'T SOLVE MY PROBLEM AND I ALSO TRIED ALL VERSIONS OF APKTOOL I POSTING THIS POST BECAUSE OTHER DEVS ARE SUCCESFULLY DECOMPILED APKS OF MY DEVICE [HTC DESIRE X] ROM APKS AND DEVS ALREADY MADE MANY COOL MODS I ALSO PM THOSE BUT THOSE DIDNT REPLIED ME SO I POSTED THIS POST ITS NOT IMPOSSIBE OF MY DEVICE THOSE SUCCESFULLY DECOMPILED SO GUS IF U WIIL SOLVE MY PROBLEM I LL REALLY APPRICIATE AND I LL GIVE CREADITS IN MY ROM THREAD THOSE DEVS HAS MADE MODS SO PLEASE ITS NOT IMPOSSIBLE I GET THIS ERRORS U CAN SEE DOWN

C:\Users\DRAX\apktool>apktool if com.htc.resources.apk

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

spec=0x02050077 dimen/title_primary_xs, config=-mdpi-v4

at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:63)

at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:56)

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

at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:191

)

at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:159)

at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:11

6)

at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:78)

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:39)

at brut.androlib.res.AndrolibResources.installFramework(AndrolibResource

s.java:593)

at brut.androlib.res.AndrolibResources.installFramework(AndrolibResource

s.java:575)

at brut.androlib.Androlib.installFramework(Androlib.java:670)

at brut.apktool.Main.cmdInstallFramework(Main.java:240)

at brut.apktool.Main.main(Main.java:87)
[Android Software Development] zelendel:
First take the caps lock off.

Second the new apktool has a built in aapt so there is no need for it. Also dont bother with batch files type the commands out.
[Android Software Development] shyvam:
can u help me in this
[Android Software Development] Morningstar:
Help you with what? Typing the commands?

[emoji15]
[Android Software Development] shyvam:
no no not in command i m getting error in installing com.htc.resources.apk in apktool so i was asking about my prob
[Android Software Development] PerfectSlayer:
Nope, removing caps :p
[Android Software Development] shyvam:
I dont want to post 1 problem everytime i need help in installing com.htc.resoureces.apk of sense4.1 rom of desire x when i try to installing htc framework (com.htc.resources.apk) then i get error in apktool can u help me in this and this isn't impossible because other devs made mods for my device (htc desire x) but they dont help me and members comes in xda because they want to learn but some overated devs thinks this is noob and those dont help members (those devs dont think when he was also a junior when sign up on xda so i said that ) so please help me out guys

I m getting

This in command prompt

C:\Users\username\apktool>apktool if com.htc.resources.apk

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

spec=0x02050077 dimen/title_primary_xs, config=-mdpi-v4

at brut.androlib.res.data.ResConfig.addResource(ResCo nfig.java:63)

at brut.androlib.res.data.ResConfig.addResource(ResCo nfig.java:56)

at brut.androlib.res.decoder.ARSCDecoder.readEntry(AR SCDecoder.java:223)

at brut.androlib.res.decoder.ARSCDecoder.readConfig(A RSCDecoder.java:191

)

at brut.androlib.res.decoder.ARSCDecoder.readType(ARS CDecoder.java:159)

at brut.androlib.res.decoder.ARSCDecoder.readPackage( ARSCDecoder.java:11

6)

at brut.androlib.res.decoder.ARSCDecoder.readTable(AR SCDecoder.java:78)

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCD ecoder.java:47)

at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCD ecoder.java:39)

at brut.androlib.res.AndrolibResources.installFramewo rk(AndrolibResource

s.java:593)

at brut.androlib.res.AndrolibResources.installFramewo rk(AndrolibResource

s.java:575)

at brut.androlib.Androlib.installFramework(Androlib.j ava:670)

at brut.apktool.Main.cmdInstallFramework(Main.java:24 0)

at brut.apktool.Main.main(Main.java:87)
[Android Software Development] zelendel:
It has nothing to do with over rated devs. They do remember when they started. They got the same amount of help you did. This is not a support Forum. You have to pull your weight for devs to go out of their way to help you.

Now you gave the error but you didn't say what you tried to do to fix it. Trust you are not the first person to have such errors.

Did you do as I advised? Removed the appt file from the folder and type the command out? Did you re-download the apktool jar file just in case it was a bad jar? Did you look to see if your device needed a modded apktool jar? (rare but still possible) what version of sense is this for? Is this a stock apk or is it from a custom rom or even a mod? All these things matter and without knowing the answers there really is not much help anyone can give you.
[Android Software Development] shyvam:
thanks for reply i reposted because other menmbers was asking which problem do i reposted u can see earlierr posts those questions of members and i redownloaded apktool.jar and and removed aapt then i tried to installing i gets same problem which i got before my rom is deodexed by me and sense version is 4+ with android 4.1.1 and i also read some threads ---fixing and other things decompiling issues with sense 4 frameworks i followed those guides but i still getting error
[Android Software Development] Thebear j koss:
Try a different apktool. I used 1.52 on 4.1 roms mostly. Worth a shot...
[Android Software Development] MJPollard:
It's a good idea to keep a copy of 1.52 around regardless. Believe it or not, I still compile a few themes for CM7, and they simply will not compile properly with any version of apktool higher than 1.52.
[Android Software Development] Morningstar:
Lop yep.

Also, the beta9 version is the only one that will recompile twframework-res (unless that was fixed in 2.0.1; haven't tried).
[Android Software Development] :
It doesn't a user reported he couldn't and neither could I (even with latest apktool on phone) threw back a lot of compile errors ? one bug fixed 1 new bug to come. That's how it can be. I don't blame the developer because he's doing a good job. just tells how things can be. rather fun how a fixed code can become back. Usually if you squeeze a bug it is pretty much never coming back. but that's in reality not code unfortunately,
[Android Software Development] Morningstar:
I had a feeling it wouldn't, but like I said, I hadn't tried. Thanks for confirming. Having to switch to a different version to recompile one apk that I rarely mess with anyway isn't really a big deal lol.

As always, keep up the excellent work, ibotpeaches! [emoji106]
[Android Software Development] shyvam:
ok