yashsingh1/xdaforums huggingface dataset:
[Samsung Epic 4G Touch] 12MaNy:
Keep getting this when I try to recompile. The part in bold is what is confusing considering all files are edited correctly (I triple checked):

I: Copying classes.dex file...

I: Building resources...

C:\Users\Jason\Desktop\Android Files\AutoAPKTool2.0.4\_INPUT_APK\com.redsynergy.themechooser.theme\res\values\public.xml:3087: error: Public symbol style/RedSynergy declared here is not defined

Here is the line I added to res/values/public.xml:

<public type="style" name="RedSynergy" id="0x02080000" />

Here's my AndroidManifest file (relevant line in bold)...

<?xml version="1.0" encoding="utf-8"?>

<manifest android:hasCode="false" android:versionCode="1" android:versionName="1.0" android:installLocation="internalOnly" package="com.redsynergy.themechooser.theme"

xmlns:android="http://schemas.android.com/apk/res/android" xmlns: pluto="http://www.w3.org/2001/pluto.html">

<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="15" />

<application android:label="@string/theme_name" android:icon="@drawable/icon">

<activity android:label="@string/theme_name" android:name="com.tmobile.theme.Foo" />

</application>

<theme pluto:themeId="RedSynergy" pluto:styleId="@style/RedSynergy" pluto:name="@string/theme_name" pluto: preview="@drawable/preview" pluto:author="@string/author" pluto:copyright="@string/copyright" pluto:wallpaperImage="@drawable/wallpaper" pluto:styleName="@string/style_appearance_name" />

</manifest>

As you can see, everything is edited correctly and is defined correctly but that error persists. I'm about ready to punch my goddamn monitor. :mad:
[Samsung Epic 4G Touch] agat63:
Are there any icons or png's associated with this?

Is that line you posted line 3087 from your public.xml?
[Samsung Epic 4G Touch] 12MaNy:
Nevermind....I figured it out. I guess I forgot to edit "styles.xml" in res\values. I could've sworn I edited it already.

Thanks for the quick reply though. :cool:
[Samsung Epic 4G Touch] agat63:
I'm glad you didn't slam your screen. :D
[Samsung Epic 4G Touch] 12MaNy:
Lol...me too
[Samsung Epic 4G Touch] tdunham:
Anyone know how to get the notification bar transparent in a stock ics based rom? I've been fighting with it for far too long and there isn't a lot of info yet for ics mods around. So far, tried editing drawables.xml and changing several .png files but no luck.
[Samsung Epic 4G Touch] agat63:
What file are you modding?

It's done in SystemUI.apk to best of my knowledge.
[Samsung Epic 4G Touch] tdunham:
Hey Agat. Yes, I'm working in systemui.

Briefly, I tried editing colors in the drawables.xml:

\res\values\drawables.xml

change

"status_bar_background"

and

"notification_header_bg"

from #ff000000 to #00000000

Changing several of the status bar .png files in the drawable-hdpi folder.

Heck, I even tried editing a smali file in classes.dex.

All my files recompile and run just fine but no change to the status bar. I know it's something simple but things have changed a bit with ICS. :rolleyes:
[Samsung Epic 4G Touch] sleshepic:
the XML that gives you all the info on the status bar that you would need is tw_status_bar.XML in systemui/Res/layout. It shows what image is being used for the status bar, you can edit the existing one(image will be found in drawable-hdpi), or even create what you want and rename it there.
[Samsung Epic 4G Touch] tdunham:
Everything points to status_bar_background.png which is in frameworks btw and doesn't exist in systemui. Already tried that and I even changed the file in both framework files. I even added it to systemui just to give that a shot even though it didn't exist originally.

I am running calk's 1.6 btw. I decompiled and checked the stock FE22 systemui and didn't see any difference. Next I think I'll try editing and flashing the stock systemui and frameworks... maybe I missed something.

Edit: Ok FE22 stock files with the new status_bar_background files didn't do the trick either.

FYI, I downloaded the status_bar_backround.png and status_bar_background.9.png files that were supposed to have been modified from another thread. I've tried a couple different sets.
[Samsung Epic 4G Touch] sleshepic:
dont know how else to help. I've changed the image/image name several times and the image is always put in systemui/drawable-hdpi after editing XML. Always worked just fine for me, not sure what your prob is then.
[Samsung Epic 4G Touch] tdunham:
No, that's fine. I'm running out of things to try. :rolleyes:
[Samsung Epic 4G Touch] sleshepic:
in case(for some reason or another) your doing something wrong with autoapktool, have you tried just using apktool? If your editing the file that the layout is referring to and it still doesn't work, well...I'd be frustrated too! Lol. Hope you figure it out, sorry I couldn't help out more.
[Samsung Epic 4G Touch] tdunham:
Ok, I admit I'm using APK Manager 5.0.2 with an update aapt.exe. ;)

I decompile using framework as a dependency, edit my xml(s), recompile with the Y to use the keep folder where I delete resources.arsc so it can generate a new one, rip the resources.arsc out of the unsignedSystemUI.apk and insert it into the original and flash it back in recovery.

Correct me if I'm wrong because it's always seemed to work for me, but the resources.arsc is the only thing that contains the recompiled xml code correct?

I don't bother decompiling an apk just to replace a .png file, I use winrar.
[Samsung Epic 4G Touch] agat63:
If you edit any xml in /res/values folder the only place those edits exist after recompile is resources.arsc. If you use resources from your source apk you loose all edits you make.
[Samsung Epic 4G Touch] sleshepic:
not neccesarily, if you edit an xml in Layout, it is not bundled in resources after compile. You need to transfer that as well. I must add though, Apk's always work best kept as a whole. Especially since Apk manager will automatically modify the public.xml for you. if your adding and changing images you might as well keep the thing complete.
[Samsung Epic 4G Touch] agat63:
Sorry I can't offer more help here.

I'm not that good at themeing. I did modify the tool to work with ICS apps, jars and dex files but can't help you with what going in decompiled apps.

I did a lot of themeing in Eclair, Froyo and GB but ICS is completely different story.

Didn't master it yet.
[Samsung Epic 4G Touch] BigE-evo:
Couple of noob questions if any one has time to help me with.

I understand I can not use the AutoApkTool to decompile a modded .apk otherwise I will get errors.

I would like to use a modded SystemUI (ICS) and change the dropdown background. The pulldown is already modded and all I want to do is change to background. I would like to add a picture instead of a solid color.

1. I have to still decompile right? How do I do this or is this way to advanced for a noob?

2. After decompiling. If I drag and drop my new mods, won't it overwrite the current mods?

3. Is there any other way to do this?

I have been reading what feels like every thread regarding theming, my head is spinning. I think many of the TUTs are based on GB not ICS and I am getting lost. Is there a huge difference between modding the two different ROMs?

This themeing thing is very complicated, big props to all that do it for us. Thank you.
[Samsung Epic 4G Touch] agat63:
Let me simplify it as much as I can.

1. You don't have to decompile apk if all you want is change few png's

2. You would need to decompile apk if you planning to edit xml files

3. To swap couple of images all you need is 7z or a similar archive manager.

If no xml editing is planned just open apk with 7z for view and drug drawable-hdpi folder out of it.

Now you can see all images (png's and 9.png's).

If you know what image you want to swap just assign same name to your png and drug'n'drop it into that drawable-hdpi folder.

Just make sure if that's a 9.png it's properly compiled and has all patches correct.

Once images are replaced just drug'n'drop drawable-hdpi folder back into /res/ folder using 7z and close it. Move app to rom you planning to flash or push it to your /system/app folder using adb or root explorer.
[Samsung Epic 4G Touch] tdunham:
That was simple? ;)

My weapon of choice for adding/removing files in APK's is Winrar. It's as easy as file browsing. I'm sure 7zip is the same way, just not as familiar with it.

BTW Agat, got the transparent notification bar finally figured out. It was a drawables.xml and classes.dex edit but the kicker was that I'm using Go Launcher and it wouldn't show unless you enable HQ drawing (in Go). :rolleyes:
[Samsung Epic 4G Touch] BigE-evo:
Thanks agat. IF I needed to edit xml on a modded all, what is the best way?
[Samsung Epic 4G Touch] phxsports:
Sorry for the noob question; but how do I get drag-n-drop to work? When I try to drag-n-drop I just get a "crossed out" symbol. TIA.
[Samsung Epic 4G Touch] rujelus22:
Don't do this. It will work but it messes with the alignment of the apk. Take the 3 secs and decompile it
[Samsung Epic 4G Touch] tdunham:
Not sure what you mean. My intent was winrar/7zip meant for strictly replacing simple .png files. I always decompile to do xml/smali editing.

---------- Post added at 10:17 PM ---------- Previous post was at 10:14 PM ----------

We need to know what you're trying to do in detail (step by step) first to get to that point and what you're working on also.
[Samsung Epic 4G Touch] phxsports:
Trying to decompile SystemUI.apk, but when I choose option 14 and try to drag it to the cmd screen, it does not work.
[Samsung Epic 4G Touch] tdunham:
Figures you'd pick the toughest one to edit. ;)

You have to put framework-res.apk along with systemui.apk in the _INPUT_APK folder first. Then select option 1 before option 14.

Systemui and framework-res.apk are dependent upon each other. You can decompile framework by itself by you cannot decompile systemui without establishing the dependency (with framework) first.

Edit: A window will pop up during the decompile phase. If there are ANY errors, you may not be able to properly recompile the systemui.
[Samsung Epic 4G Touch] phxsports:
Yeah, I have framework-res in there and did select option 1 first and it worked fine, but when trying option 14, you need to drag the apk into the cmd window, it wont let me drag it, the file turns into a crossed out circle as soon as I drag it to the cmd window.
[Samsung Epic 4G Touch] tdunham:
I'm not sure why it wouldn't work. I overlay the dos window over the windows explorer screen and just drag and drop (while holding the mouse button down) systemui.apk in there.

Edit: The screencap is a little cut off btw.
[Samsung Epic 4G Touch] phxsports:
Yeah, I don't know what the heck is going on...but it is driving me nuts!
[Samsung Epic 4G Touch] tdunham:
You're not running the tool as admin are you?
[Samsung Epic 4G Touch] phxsports:
I figured it out...it's because I'm currently on a piece of crap Vista computer. Yeah, I know! Thanks for your help though! I found a workaround for it...
[Samsung Epic 4G Touch] jrod091:
I'm getting a weird error:

[*] C:\Users\Owner\Downloads\Android\AutoAPKTool2.0.4a\AutoAPKTool2.0.4\_INPUT_APK\Mms.apk
decompiling C:\Users\Owner\Downloads\Android\AutoAPKTool2.0.4a\AutoAPKTool2.0.4\_INPUT_APK\Mms.apk...
I: Baksmaling...
Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78 0a 30 33 36 00
at org.jf.dexlib.DexFile.<init>(DexFile.java:377)
at org.jf.dexlib.DexFile.<init>(DexFile.java:274)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:44)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)

is it not baksmaling correctly?
[Samsung Epic 4G Touch] tdunham:
I see you're doing mms.apk. What is it you're doing to generate the error?
[Samsung Epic 4G Touch] jrod091:
Just decompiled it, using option 14. I used option 1 for the framework-res and option 81 for twframework-res. (It's from a Samsung based rom)

My aokp mms.apk works fine when decompiling, so idk what's wrong
[Samsung Epic 4G Touch] tdunham:
So this is when you're compiling it correct? That window that pops up when you decompile, it says everything is perfect right?

Also, have to tried to compile right away after decompile without making any changes first? Post your mms.apk so I can try it too when you have time. I don't feel up to downloadling the entire rom. :)
[Samsung Epic 4G Touch] agat63:
I see you trying to backsmali apk.

If you wanna edit apk you have to decompile it. Backsmali option is for dex and jar files only and not apk's.

If you need to edit smali files just drag classes.dex out of apk file and backsmali it. Backsmali option doesn't work on apk files.
[Samsung Epic 4G Touch] lorjay589:
I'm having trouble to, because i when i decompile my framework i get its fine, i edit the values, color.xml to get rid of the black on black and when I'm done it compiles it but it doesn't add the new files its like its only making a copy of the original framework.res
[Samsung Epic 4G Touch] agat63:
recompiled app is in your app/dist folder. It's unsigned. You should drag modified/edited files from that recompiled app into original app and push original app to /system/framework or use a root explorer to replaced app in /system/framework folder or include new app in rom/theme you're about to flash. Your modifications are not included in original app automatically.
[Samsung Epic 4G Touch] tdunham:
The reason I asked the previous user if he was able to recompile his file without making any changes is because I've been seeing an amount of bad files when decompiling that need to be dealt with first, especially in framework or systemui, or it will never recompile correctly.

---------- Post added at 03:12 AM ---------- Previous post was at 02:56 AM ----------

Agat, isn't the output folder for the recompiled app: _OUT_APK

for this tool?

Edit: Lorjay, also like I told the previous user, pay attention to the log window that pops up when decompiling. All it takes is one bad .9.png file and the file won't recompile correctly. I found this out the hard way.
[Samsung Epic 4G Touch] jrod091:
No this is during decompile :-\ I've used this tool endless times for many different apks, I have no idea why this error is during decompile

Option 14 is for decompiling, isn't it? U always extract my classes.dex file to do smali edits, I have no idea why this error is occurring
[Samsung Epic 4G Touch] jrod091:
@tdunham, I'm on my phone right now, the rom is on my computer, I'll post it sometime tomorrow, I'm going to bed, lol

Thanks for trying to help though!
[Samsung Epic 4G Touch] lorjay589:
See i know all of that, i know its not going to be in the original. But its not even showing up in the the frameworks and also. I cant drag what i cant see lol. The values folder is hidden
[Samsung Epic 4G Touch] sleshepic:
Values folder gets bundled into the resources file once compiled. That is what needs to be dragged over
[Samsung Epic 4G Touch] lorjay589:
lol ok one more time, so everyone can get it. I know that to, but its not recompiling the resource with the new edits its making an exact copy of the original in the out folder and its no use to dragging any of the stuff over because its still the same
[Samsung Epic 4G Touch] tdunham:
Maybe you can post your original framework so we can take a look at it?
[Samsung Epic 4G Touch] jrod091:
This is my mms.apk and my twframework-res.apk, they are ICS 4.0.3 apks
[Samsung Epic 4G Touch] tdunham:
Ok, I only loaded your twframework with option 81 since it is the only framework you sent us. It decompiled fine. It appeared to recompile fine also except for this:

[*] G:\Sync\Android\AutoAPKTool2.0.4\_INPUT_APK\Mms

recompiling G:\Sync\Android\AutoAPKTool2.0.4\_INPUT_APK\Mms...

I: Copying classes.dex file...

I: Building resources...

aapt: warning: string 'cc_address_label' has no default translation in G:\Sync\Android\AutoAPKTool2.0.4\_INPUT_APK\Mms\res; found: de fr it ko

I: Building apk file...

I don't know what the cc_address_label is but anyway it compiled fine for me otherwise.

Then I used Apk Manager 5.02 with pretty much the exact same results, the log reflects the same string problem but still compiles fine.

Edit: I don't use the AutoAPKtool for everything so I don't know if it tells you or not but some apk files work with the twframework file but not the framework-res file so maybe that is the only problem. Don't use the framework-res (option 1), just the other (option 81) and try it again.

With APK Manager if I use the wrong framework, APK Manager will tell me if it is the wrong dependency so then I have to try the other framework file (in this case twframework).
[Samsung Epic 4G Touch] sleshepic:
Yeah don't worry about that translation issue, looks like it compiled fine
[Samsung Epic 4G Touch] agat63:
You can disregard that translation warning since the aapt.exe did find them in de (german) fr (french) it (italian) ko (korean).

In general if there are real errors you won't see the last line:

I. Building apk.

If the line is there apk is compiled correctly.

As for framework files.

I always have both installed. framework-res.apk with option 1 and twframework-res.apk with option 81.

This way any app can use dependency it needs and I don't have to worry about it.
[Samsung Epic 4G Touch] jrod091:
Interesting, thanks for all your help, I'll try just the twframework

Only apks I got to decompile correctly so far were both the framework-res apks, weird, lol
[Samsung Epic 4G Touch] sleshepic:
If that's the case it sounds like your having issues with the classes.dex? Try pulling out that before you decompile and see what happens. Are you getting errors relating to bad magic values? The reason I say this is because the frameworks don't have a classes.dex file....
[Samsung Epic 4G Touch] jrod091:
Grr...

that didn't help either. I tried twframework-res.apk and framework-res.apk again, and they both decompile and recompile fine, but any other apk I try from this ROM give me the same exact error when I decompile it with option 14...

when I try to decompile an apk from my AOKP ROM, they all decompile fine and recompile fine

In conclusion, I'm utterly lost, lol

---------- Post added at 07:38 PM ---------- Previous post was at 07:35 PM ----------

that's what I'm about to try, I remember reading something about that before

Thank you sir! that worked!! :victory:
[Samsung Epic 4G Touch] sleshepic:
Or if you know how to use apk manager this one is modded for ics and works on most

http://xdaforums.com/showpost.php?p=23935070&postcount=14
[Samsung Epic 4G Touch] jrod091:
Thanks! I've been looking for an ICS mod to apk manager!
[Samsung Epic 4G Touch] 12MaNy:
Just an FYI....this doesn't work with ICS Touchwiz framework-res.apk

Throws res/values/public errors for no apparent reason.
[Samsung Epic 4G Touch] agat63:
I used this tool to decompile and recompile framework-res.apk for every single ICS leak I made rom for.

All it takes is fixing 1 line in /res/values/public.xml for couple of languages.

Line 79 if memory serves.

It reads something like this

<%d..........%d> and you need to change it to

<%1$d........%2$d>

It's been a wile since last leak so I'm not absolutely positive about syntax.

But you have few /res/values/public.xml files for different languages.

Take a look at line 79 of xml file not listed in error message you will see what i'm talking about.
[Samsung Epic 4G Touch] 12MaNy:
I think you meant res\values\plurals.xml............not res\values\public.xml. Lol

I'm trying to decompile/recompile SGSIII apks, so the plurals.xml error you're talking about isn't present. Thanks though.
[Samsung Epic 4G Touch] sleshepic:
I've used apktool 1.4.2 to decompile and apktool 1.4.3 to recompile with success where all other methods gave errors. In case it helps.
[Samsung Epic 4G Touch] 12MaNy:
Yeah, tried that and still get public.xml errors. I think maybe I might have some corrupted .9's. I'm going to re-download the ROM and start from scratch. God I f****ng miss theming GB. So much easier.
[Samsung Epic 4G Touch] sleshepic:
that's one thing I do love about this tool though, when you do get errors its absolutely the easiest to track em down with the generated text doc. Kinda annoying sometimes just from a cmd prompt. And yeah...miss gb for some things for sure.
[Samsung Epic 4G Touch] rujelus22:
You use a different version to decompile and compile? I use 1.4.3 for both with no issues.
[Samsung Epic 4G Touch] sleshepic:
Only when there's certain issues with the framework-res plurals xml
[Samsung Epic 4G Touch] 12MaNy:
Ok.....I'm good now. Deleted all versions of apktool from my computer, then re-downloaded latest aapt and apktool.jar 1.4.2 & 1.4.3. Now I have no problem recompiling as long as I decompile with 1.4.2 then recompile with 1.4.3.

Must've had some corrupted files. :eek:

No go for me on framework-res and SystemUI. I have to use 1.4.2 and 1.4.3
[Samsung Epic 4G Touch] sleshepic:
Good, glad you got it working.
[Samsung Epic 4G Touch] 12MaNy:
Well.......using 1.4.2 to decompile, then 1.4.3 to recompile works if I don't mod anything.

I got my framework-res.apk fully themed and went to recompile and got all types of res\values\public.xml errors on files that weren't even touched (including some XML's). None of the errors were from files that I modded. Everything in public.xml looks ok too. Wtf.....

I've been trying to fully theme ICS for months now with 0 results. About to give up on this ****.
[Samsung Epic 4G Touch] sleshepic:
you sure the first errors were of untouched images? Damn we need to start using pastebin or something with the way ICS is throwing us issues. You remember to add any images you added to public.xml? Apktool doesn't do it for you like others.

If it helps I'm off at 5 today, gonna be working on some stuff. Could try helpin out if its worth it any. Shootin you a pm.
[Samsung Epic 4G Touch] 12MaNy:
Ok...I finally got it figured out! :good:

I had to decompile with 1.4.2 and do all of my XML edits (a **** ton of them to say the least), then recompile with 1.4.3. Then, decompile again with 1.4.2 and do my edits to res\drawable-hdpi, then recompile with 1.4.3. Then decompile with 1.4.3 and do all of my edits to res\drawable-xhdpi.....res\midmap-hdpi...and res\midmap-xhdpi. Then recompile with 1.4.3

Galaxy S 3 theming is crazy **** man....
[Samsung Epic 4G Touch] timmetal6669:
I have been having mass issues recompiling. Is anyone can tell me how to get it working, please pm me with instructions.. Lol.
[Samsung Epic 4G Touch] tdunham:
What are the errors you are getting?

Sent from my SPH-D710
[Samsung Epic 4G Touch] timmetal6669:
A better question would be what errors I'm not getting lol. Every png i edit, Every xml i edit it changes back to the stock framework res i used as the dependancy, and then makes a 1 kb framework res... Lol. I'm gonna do like slesh did and re download everything then delete everything else and start over. Pm me with how you use it please so i can check what I'm doing wrong.
[Samsung Epic 4G Touch] sleshepic:
If your using this autoapktool it generates a text doc with your errors. Save and post link, or copy and paste the errors. Its almost always that first error that causes all the rest. We'll check it out
[Samsung Epic 4G Touch] tdunham:
We need decompile log too. If it won't decompile clean... well, you know the rest. Also, if the decompile is clean, will it also recompile cleanly before any changes have been made?