yashsingh1/xdaforums huggingface dataset:
[One (M8) Themes and Apps] Raymond Ebertt:
Well, that's a tricky edit for the ContactsDialer.apk. Basically, it's using framework Theme.Holo.Light.Dialog theme. There are a couple of ways to redirect this. One would be to change the Holo.Light Theme in the styles of that particular apk to Holo. However, in the case of ContactsDialer.apk, there isn't one. You would need to search the smali's for some instance of AlertDialogBuilder and try to track down where Theme.Holo.Light.Dialog is being pulled.

Another way is to change the framework Theme.Holo.Light.Dialog in styles. Basically, if I want to change this, I do it with dark themes. I remove the Theme.Holo.Light.Dialog from the line ....

<style name="Theme.Holo.Light.Dialog" parent="@style/Theme.Holo">

This will redirect all the holo.light dialogs to the holo theme. (If you want to change them all)
[One (M8) Themes and Apps] Basil3:
I thought the framework2 edit I did took care of all complete action pop ups?
[One (M8) Themes and Apps] Raymond Ebertt:
3 ways. LOL

But I don't think that works for the preference themes in styles.
[One (M8) Themes and Apps] virago21788:
Anyone know where the white text is under answer and decline buttons and also the white text under clock? This is incoming call while on lockscreen. The text under clock is green while on normal lockscreen but changes white with incoming call. Thanks
[One (M8) Themes and Apps] raj_ch2002:
I'm trying to remove the bottom margin of the lockscreen buttons so that the buttons align to the bottom, i've tried all the dimens from HTClockscreen.apk, but cannot remove that bottom margin. Can you please help?
[One (M8) Themes and Apps] Jm@n:
I've seen a few people ask about where the app drawer play store shortcut icon is, and while playing around with smali in prism apk I found a way to use the play store icon within prism, instead of from the play store. Nothing to crazy but it does remove the need of play store apk if you're changing or theming. Now all 3 app drawer action bar buttons are right in prism.

Find this method and just copy what I did. Then color or change icon_button_play_store_dark to whatever you want. Imo it looks better too, not grayish looking like the other

com/htc/launcher/masthead/AllAppsActionBar.smali

.method*private*setMarketEnable(Landroid/content/Context?V

****.locals*3

****.param*p1,*"context"****# Landroid/content/Context;

****.prologue

****sget*v0,*Lcom/htc/launcher/R$drawable;->icon_btn_play_store_dark:I

****

****invoke-virtual*{p1},*Landroid/content/Context;->getResources()Landroid/content/res/Resources;

****move-result-object*v1

****sget*v2,*Lcom/htc/launcher/R$string;->market:I

****

****invoke-virtual*{v1,*v2},*Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

****move-result-object*v1

****const/4*v2,*0x2

****invoke-virtual*{p0,*p1,*v0,*v1,*v2},*Lcom/htc/launcher/masthead/AllAppsActionBar;->addActionButton(Landroid/content/Context;ILjava/lang/String;I)Lcom/htc/lib1/cc/widget/ActionBarItemView;

****

****return-void

.end method
[One (M8) Themes and Apps] rayjr13:
Where in the smali folder is this?
[One (M8) Themes and Apps] Jm@n:
Oh sorry about that, I'll update my post too with the exact location. com/htc/launcher/masthead/AllAppsActionBar.smali

Sent from my ???_???_???
[One (M8) Themes and Apps] rayjr13:
Ahhh thx I was close...but close in smali is like lightyears sometimes

That worked well thank you.

Sent from my Electric Boogalocked Turbo
[One (M8) Themes and Apps] Jm@n:
Haha yea. No problem
[One (M8) Themes and Apps] rayjr13:
[MENTION=704359]fisha21[/MENTION] in reference to post #3..

I'm working on weather and clock ported for non sense roms. The apps are without HTC resources or HTC framework. I believe the links to themes are broken so shouldn't they default? The headers in both apps are green but no matter what category color or overlay color I edit the value of I can't get the green to change. I also can't find any references to a category 0 or category Zero like you mentioned. Am I misinterpreting or any suggestions?

Sent from my Electric Boogalocked Turbo
[One (M8) Themes and Apps] ineedone:
default theme colors come from color.xml , if you didn't notice already
[One (M8) Themes and Apps] Raymond Ebertt:
So, you're using the weather clock widget like on AOSP or GPE I assume as those would be non Sense ROMs.

The apk has its own specific resources as it is intended to be made available in the Playstore. By default, it will use the green theme (theme 0) as the HTC resources apk isn't directing it to match the selected theme.

It would seem that you may need to edit the color.XML to achieve what you want.
[One (M8) Themes and Apps] rayjr13:
Not using the widget but [MENTION=3245392]gakugaku[/MENTION] port of BlinkFeed weather and clock. The weather and clock apps when I change hex color on category color in the color.xml doesn't change the actionbar header background. Confused as to why. It seems to have no effect. Tried multiply color as well.

I used resflux xposed module on another device to guess and check with the color references. Like vts you can visually see the hex color next to each code in color.xml and edit the results near real time on device. Anyway I changed every greenish colored color to magenta or cyan and it still showed up green.

Thoughts ? Or care to take a peek at the apks to see if I'm missing something?

Sent from my Electric Boogalocked Turbo
[One (M8) Themes and Apps] Raymond Ebertt:
I'd like to have a look through those apks to get a better understanding. Send me both your modded stock apks by PM and I'll have a look at them in a couple of hours if you want.
[One (M8) Themes and Apps] Raymond Ebertt:
After a quick look and a test color, the header (action_bar I guess) for the default theme (0), is being drawn from the following in the styles.xml

<style name="ThemeThree" parent="@style/HtcDeviceDefault">
<item name="android:textColorHighlight">#ff6ed294</item>
<item name="android:textColorHighlightInverse">#ff6ed294</item>
<item name="text_selection_opacity_color">#686ed294</item>
<item name="text_selection_color">#ff6ed294</item>
<item name="multiply_color">#ff252525</item>
[COLOR="Red"][B][U] <item name="category_color">#ff0000ff</item>[/U][/B][/COLOR]
<item name="light_category_color">#ff6ed294</item>
<item name="dark_category_color">#ff212121</item>
<item name="overlay_color">#ff6ed294</item>
<item name="standard_color">#ff141414</item>
<item name="htcProgressBarStyle">@style/HTCProgressBarStyle.ThemeThree</item>
<item name="htcProgressBarStyleHorizontalFull">@style/HTCProgressBarStyle.Full.ThemeThree</item>
<item name="htcSeekBarStyle">@style/HTCSeekBarStyle.ThemeThree</item>
</style>

I believe if you edit the category_color you should be able to get your theme working. This is what I found to work unless someone else knows something different.
[One (M8) Themes and Apps] rayjr13:
Is that theme three? And the category color is defined directly in styles and not in colors.xml? Just trying to comprehend what and why I overlooked to learn for next time.

Sent from my Electric Boogalocked Turbo
[One (M8) Themes and Apps] Raymond Ebertt:
Well, from experience, trying to comprehend HTC's way of thinking is like running in a round room looking for a corner to stand it. Good luck...
[One (M8) Themes and Apps] Neo:
Default Live Wallpaper

Hey guy. Do any of you know how to preset a live wallpaper (instead of an image) for a Sense 6 rom? I may have been naive to think it was simply a matter of dropping the apk into system and directing the build.prop entry to the file name...

Neo

Forum Moderator
[One (M8) Themes and Apps] Raymond Ebertt:
I haven't really looked through that but I'll take a look tonight for you.
[One (M8) Themes and Apps] Mr Hofs:
hi fellas,

There is one thing in this article that caught my attention and that's the colour inversion. Maybe a good addition to make inverted themes a bit easier.

http://llabtoofer.com/2014/12/21/exclusive-htc-one-m8-android-5-0-1-sense-6-0-screenshots-video/
[One (M8) Themes and Apps] 2WildFirE:
Yep I read it to, seems it will go a bit better, to make inverted themes. :good::good:
[One (M8) Themes and Apps] Mr Hofs:
not too sure yet, but i hope its in our favour :)
[One (M8) Themes and Apps] Raymond Ebertt:
The GPE for Android 5 has that inverting option and I frankly don't like it at all as it makes everything difficult to see
[One (M8) Themes and Apps] Mr Hofs:
oke
[One (M8) Themes and Apps] maurydes:
also I have seen this article, but frankly I do not remember that HTC tries to help the theming .... every update there are changes that add difficulty, we'll see:rolleyes:
[One (M8) Themes and Apps] 2WildFirE:
That's true bro

Powered by SkyDragon ROM
[One (M8) Themes and Apps] fisha21:
Did anyone manage to remove the On/Off labels from toggles (ones in screenshot). I've tried various edits in com.htc.resources....xmls in color folder, styles edits, strings edits...but nothing seems to have an effect

In older builds it used to be a case of removing the On/Off from strings, but the latest version doesn't even seem to have toggle labels in strings.xml
[One (M8) Themes and Apps] Basil3:
By latest version, which version do you mean? :D
[One (M8) Themes and Apps] fisha21:
Hey mate, been a while!

Haha, good question [emoji1] Last time I messed with the toggles was the 1.54 base. By latest version I meant the 3.28 base
[One (M8) Themes and Apps] Basil3:
Sure has!

I used to be able to remove them in the past with an edit to an xml in the colors or drawables folder in resources (memory bad), but that hasn't worked for quite some time. Only solution that has worked for me recently is to just make on and off a blank string in strings.xml, but you're saying this doesn't work?
[One (M8) Themes and Apps] fisha21:
Yeah, I could only find one "On" in strings.xml (st_on, or something like that) but making it blank didn't work. I also edited the text colours in toggle_primary and toggle_b_primary in res/colors folder, and added a text colour to the section of styles.xml that calls for the toggle image array...but none of those had an effect either. I almost started questioning if the apk built/pushed properly, but some image edits I did at the same time showed up as expected
[One (M8) Themes and Apps] Basil3:
In my resources there is htctoggle_on and htctoggle_off strings. Making each of these blank will remove the text.
[One (M8) Themes and Apps] ineedone:
I have an issue with HtcFMRadiowidget

i need to make an edit in a xml from the layout folder, I can decompile it but i get this error when compiling: No resource found that matches the given name.. i know the references are in styles.xml of com.htc.resources.. The output below is what i get, trying to compile without a single edit made.

15:31:16.324: [Error] - ApkTool.CompileApk: 'ApkTool: I: Using Apktool 2.0.0-RC2 on F49F38'
15:31:16.324: [Error] - ApkTool.CompileApk: 'ApkTool: I: Copying C:\Users\udr013\AppData\Local\Temp\F49F38 classes.dex file...'
15:31:16.324: [Error] - ApkTool.CompileApk: 'ApkTool: I: Checking whether resources has changed...'
15:31:16.324: [Error] - ApkTool.CompileApk: 'ApkTool: I: Building resources...'
15:31:16.324: [Error] - ApkTool.CompileApk: 'ApkTool: C:\Users\udr013\AppData\Local\Temp\F49F38\res\layout\specific_main41.xml:15: error: Error: No resource found that matches the given name (at 'style' with value '@com.htc:style/fixed_list_primary_s').'
15:31:16.324: [Error] - ApkTool.CompileApk: 'ApkTool: C:\Users\udr013\AppData\Local\Temp\F49F38\res\layout-land\specific_main41.xml:22: error: Error: No resource found that matches the given name (at 'style' with value '@com.htc:style/fixed_list_primary_s').'
15

I have tried several versions from apktool, and tried to using framework from an old sense 5 rom, but no luck..

Does anyone know a solution for this, or how i can compile just a single xml?

Thanks
[One (M8) Themes and Apps] Basil3:
Just delete the part of the xml that refers to the style., on line 22 or whatever it says
[One (M8) Themes and Apps] ineedone:
Yep, I could do that. If it wasn't so that I want to replace an [MENTION=3944923]drawab[/MENTION]le/blabla_panel with a reference also to com.htc styles :(

I replaced the images of several widgets with category_color like calenderwidget and musicwidget so they take the selected theme color. That's what I'm after..
[One (M8) Themes and Apps] Basil3:
But the styles causing the errors are nothing to do with your custom edits?

Are you talking about two separate issues?
[One (M8) Themes and Apps] ineedone:
Didn't make any edits to test, those errors are just from decompile/compile, adding my edits gave me just a same extra error.

Maybe it's not possible, but because the reference to resources in the original apk makes me wonder why/ how they get there in the first place
[One (M8) Themes and Apps] Basil3:
OK, have tested, and i have no problems with that using the latest apktool. I'll link the one I have here, it might be a modded one that I got from [MENTION=4380624]Raymond Ebertt[/MENTION].

Also, in order to make it look for resources when compiling, go into apktool.yml and change it so that it reads:

usesFramework:

ids:

- 1

- 2

Then it uses com.htc.resources.apk also.

Link to apktool: https://www.dropbox.com/s/2pj3py2tn3soh9f/apktool_2.0.0_rc3.jar?dl=0
[One (M8) Themes and Apps] ineedone:
Nice, that might work, will try later tonight and report, thanks!
[One (M8) Themes and Apps] ineedone:
The apktool.yml edit did the job! Didn't know about this. So this way I also can use references to com.HTC.resources even in apps that never used resources before, like third party apps, that would be very interesting ?
[One (M8) Themes and Apps] Basil3:
Yes, my themes are all set up so that they feed back off a few custom colours in resources, so a couple of edits there will change all apks throughout theme.

Thanks to [MENTION=3334128]Kiray1982[/MENTION] who originally shared this apktool.yml edit with me
[One (M8) Themes and Apps] ineedone:
So you removed all themes from like gallery and directed them to resources?
[One (M8) Themes and Apps] Basil3:
The styles are still there, but an example of how I have changed them (I just copy and paste over the styles if updating the apk to latest version):

<style name="ThemeFour.CategoryFour" parent="@style/HtcDeviceDefault.CategoryFour">
<item name="android:textColorHighlight">@com.htc:color/theme_four_primary_color</item>
<item name="android:textColorHighlightInverse">@com.htc:color/theme_four_primary_color</item>
<item name="text_selection_opacity_color">@com.htc:color/theme_four_secondary_color</item>
<item name="text_selection_color">@com.htc:color/theme_four_primary_color</item>
<item name="multiply_color">@com.htc:color/theme_four_header_color</item>
<item name="category_color">@com.htc:color/theme_four_primary_color</item>
<item name="light_category_color">@com.htc:color/theme_four_primary_color</item>
<item name="dark_category_color">@com.htc:color/theme_four_primary_color</item>
<item name="overlay_color">@com.htc:color/theme_four_primary_color</item>
<item name="standard_color">@com.htc:color/theme_four_primary_color</item>
<item name="htcProgressBarStyle">@style/HTCProgressBarStyle.ThemeFour.CategoryTwo</item>
<item name="htcProgressBarStyleHorizontalFull">@style/HTCProgressBarStyle.Full.ThemeFour.CategoryFour</item>
<item name="htcSeekBarStyle">@style/HTCSeekBarStyle.ThemeFour.CategoryTwo</item>
</style>
[One (M8) Themes and Apps] ineedone:
Couldn't you do with just one theme and directing it like ?com.htc:category_color so it gets the themecolor from whatever theme is selected . I do that with apps that don't have themes themselves and they adapt perfectly to whatever theme is selected..
[One (M8) Themes and Apps] Kiray1982:
I did the same.

Only default theme of all apps is redirected to com.htc. And default theme in com.htc colors.xml is modified per aroma.

- gesendet mit meinem HTC One M8 -
[One (M8) Themes and Apps] Basil3:
I don't think it would be that simple, and although it seems a simple solution, modifying each apk to make this work would end up being more work than just straight copy and past over the styles.

Also, you can't modify colors.xml entries to use ?com.htc:category_color (i think), so you wouldn't be able to use the same edits that need to be done there.
[One (M8) Themes and Apps] ineedone:
I think it would be possible, tho with all themes already in place copy and paste would do as well , but when starting a theme from scratch it would be easier, especially when you only have to edit your colors in resources and not having to worry about the other apks. And your right can't use the ? In color.xml but I only need color.xml for some basic white or black as a placeholder with mostly white as a placeholder to make the other themes work, all other themes use styles and I think those will adapt perfectly. I'm sure gonna try, when the new sense comes around.
[One (M8) Themes and Apps] fisha21:
Amazing....I searched strings.xml for On, ON, on and _on, got several hits but not the toggle ones. Clearly I've been away from this for far too long! I ended up having to manually scroll through til I found them. Thanks for confirming they were there to find!
[One (M8) Themes and Apps] Basil3:
I think [MENTION=4904866]ineedone[/MENTION] shared the original edit....Maybe you will find it in the OP? :D
[One (M8) Themes and Apps] ineedone:
Yeah, this [MENTION=704359]fisha21[/MENTION] guy did a great job on collecting all those different edits in the OP for easy reference, very useful ???
[One (M8) Themes and Apps] Neo:
I have a dilemma closely related to what you guys have been talking about.

Using the previously provided apktool_2.0.0_rc3.jar and adding all of the device Sense 6 framework apks from the rom, I am able to decompile com.htc.resources.apk with no issue. Everything I need for /res is there. However, prior to making any changes, I decided to recompile com.htc.resources and was met with the following output message: W: could not find sources

Seeing some of you getting past this through modifying apktool.yml, I did so and added the second ID for com.htc.resources.apk (ID 2)

I am still met with the same error. So then I added the other 3 IDs (0, 3, and 127) and still have the error followed by a giant log of everything that wouldn't compile due to "error: Error declaring public resource"

Any thoughts or ideas on how to get past this?

Neo
[One (M8) Themes and Apps] Basil3:
you should be fine using rc2 with sense 6 kitkat.

in any case, could you please post the full log? resources only needs to have -1 in apktool.yml, as it would only use resources from f-res.
[One (M8) Themes and Apps] Kiray1982:
Can you compile your com.htc without changes? Did you have already errors?

What changes do you did? Added colors? Redirected something?

Normally, in apktool.yml are the right frameworks written. Changes are only needed, if you add or change something to another framework.

Example : you add com.htc:color/multiply to framework-res.apk, then you have to add the com.htc framework ID 2 to the apktool.yml of framework-res.apk.

- gesendet mit meinem HTC One M8 -
[One (M8) Themes and Apps] erislav:
Is sombody else stuck at decompiling the 5.0.1 sense apps?
[One (M8) Themes and Apps] Kiray1982:
didnt tried myself. i didnt have any sense lollipop rom yet for testing.

maybe you should use latest apktool rc3 with light lollipop support?

but [MENTION=918378]Basil3[/MENTION] will tell you / us a solution if there is something "new" :)
[One (M8) Themes and Apps] Basil3:
Should be fine with apktool_2.0rc3. Haven't had any problems so far, although having VTS issues which are unrelated.
[One (M8) Themes and Apps] erislav:
how i can change the used framework ?

apktool always use framework 1.apk

then get errors... could not decode attr values

the comand i used was apktool d -t m8 systemui.apk

while m8 is the tag for 4 apks stored in Framework

i used com.htc.resources.apk htc.videowidget.res.apk framework-res-htc.apk and android.home.apk

I dont know what im doing wrong:confused:
[One (M8) Themes and Apps] Neo:
He said 5.0.1 Sense 6 apps (Sense 6 lollipop). I'm assuming he's referring specifically to com.htc.resources.apk (Since that's what this chat is about really).
[One (M8) Themes and Apps] Basil3:
To be honest guys, I've found lollipop to be a mess. I have 4 different versions of apktool_2.0rc3, and i've lost sight of which works with which apk. I can say that this one has just worked for me with resources from sense lollipop though.

https://www.dropbox.com/s/kzfjd0y7v44wxjh/apktool_lollipop_edit.jar?dl=0

According to the apktool thread, there will be rc4 released soon. Hopefully that helps with a lot of the issues.
[One (M8) Themes and Apps] erislav:
its very strange i changed in vts the apktool and it decompile the prism.apk but gave errors while trying to decompile systemui.apk:confused:

try now with the lollipop edit.
[One (M8) Themes and Apps] Basil3:
Actually, while I'm on this thread, might as well share the new edit for sense 6 lollipop for the 'Open With'/'Complete Action Using' pop-up at the bottom of the screen. On previous base, it was a framework2 edit, and now all edits can be done in the following layout xmls in framework- res.

Thanks [MENTION=4380624]Raymond Ebertt[/MENTION] for helping troubleshoot
[One (M8) Themes and Apps] Basil3:
hopefully it works, i do have one apktool that works with systemui. it was shared in the apktool thread near the end.
[One (M8) Themes and Apps] Mr Hofs:
Can anybody share a hint on how you guys push the com.htc.resources.apk. I am now able to decompile and recompile it without errors but when i push it it gives an error within VTS and when i copy it via es file explorer and full reboot i get errors that NFC and contacts has stopped ?

Thanks in advance :)
[One (M8) Themes and Apps] Basil3:
What about adb push com.HTC.resources.apk /system/framework/com.htc.resources/ ?
[One (M8) Themes and Apps] Neo:
It depends on the changes you made. If you did it at a resource only level, usually you'd just copy the res folder and resources.arsc from the newly compiled version and drop into the original apk. Push that, fix perms, and should be good to go.
[One (M8) Themes and Apps] Mr Hofs:
Yeah edited that line within VTS which seemed obvious to me but gives a push error, i will investigate the logs again tomorrow.

Indeed that should work, i only tried to push the complete new compiled apk and it reboots with it but then NFC and contacts FC's

maybe somebody else encountered this issue hence the question, maybe i should try to vr theme it and flash it via the installer within the recovery.

It's just that i can't pinpoint the error exactly as the given error is not that specific. Will try more tomorrow and update here if i find something

Thanks guys, the help is very appreciated !
[One (M8) Themes and Apps] erislav:
Now im able to decompile systemui.apk but recompile fails even if I dont change anything.

it gives me xml errors that blablabla is not found .

What version of apktool you guys using ?

Im using thomas-apktool
[One (M8) Themes and Apps] Neo:
Try the one Basil3 linked a few posts back if you're getting a W: Cannot find sources error.
[One (M8) Themes and Apps] alexdiaz:
Anyone tried adding Ambient Display? It was added on GPE and works fine.

http://xdaforums.com/google-nexus-5/themes-apps/how-to-add-ambient-display-settings-t2942838

I've tried but the system won't boot after pushing framework-res and SystemUI
[One (M8) Themes and Apps] Basil3:
OK I made the edits and it does work, but only for incoming notifications. Doesn't seem to work when the device is picked up.