Tweak theme without computer

Search This thread

levone1

Senior Member
Dec 28, 2014
3,827
1,478
I don't spend lots of time at the computer, so I like to find ways to do as much as possible on the phone. One thing I've found is that every theme I try has at least one element I wish I could change, as much as I like it overall. I don't know enough to make my own theme, but I found a way to change elements of the theme without using a computer. I'm sure this is not news to many of you, but I figured there might be other non-experts like me out there who might appreciate it.

1. Download Apktool apk file below, install it, open it, {it will automatically update on the first use for some reason}, go to settings and check 'device has root', {leave other settings alone}, then close the app, reopen and grant su access.
2. Make a directory in storage somewhere called 'apktool', {or something}, and copy the following to it: /system/framework/framework-res.apk, /system/framework/SemcGenericUxpRes/SemcGenericUxpRes.apk, and whatever themes you want to mix and match.
3. Open apktool app, navigate to apktool directory, and import the framework files by tapping on each one and selecting 'import as framework'. When done, you can then tap on the theme apk files and select 'decompile all', and they will be decompiled into folders called {appname}-src. Go into the folders with a root explorer and change what you want, then go back to apktool, and tap on the folder you want and choose 'recompile'. When recompile is done you end up with an apk called '{appname}-src.apk'. Tap on that and choose 'sign'. When done you will get an apk called '{appname}-src-sign.apk, which you can install normally.

-Notes, questions-
- I'm currently using Z1c stock .236 deodexed rom. This app should work on other phones, roms, versions, etc, but I can't say for sure. What I know is that there are at least 5 versions of the app out there, {Google search for 'apktool 4.4' or '5.2', etc}, and it seems like each one works better on certain versions of Android. There are also configurable settings. If you have a different phone or rom, etc, you just have to mess around with it.
- This app should work as normal apktool for modding systemUI and framework, but I can't get it to recompile on LP, but only on Kk. Decompile works fine, but on recompile it complains about lacking resources. I don't know what file it wants. If someone can figure it out that would be great.
-If you don't know what files to change, all I can say is that I didn't either. Start with the obvious stuff, like navbar keys, and see how brave you get. Just make sure your file names are changed, since every app doesn't use the same names for the same files. As long as you work with copied files you have nothing to lose. If something is wrong with your modifications, then it won't recompile correctly, and you'll just get an error message, so you can't really install something that's going to mess up your phone.
- This also works for changing appearance of other apps, not just themes. See my recent posts in the Naked Browser thread for examples. However, sometimes it won't be able to decompile an app, and there's probably nothing you can do. I think the way apktool works is based on how the app was created. If something is not compatible, it just won't work.
- You don't have to decompile just to pull files out of an apk, but you do need an app that can do it. I use Rom Toolbox Pro. There may be free ones, {maybe Mixplorer}. I think you can just change the extension to zip and extract normally. However, some files and folders are not the same zipped in the apk as they are when decompiled.

File link - https://drive.google.com/file/d/0B5E7sFT1phjoS003R0tkM21qUlk/view?usp=docslist_api
 
Last edited:

p@to

Senior Member
Dec 29, 2014
488
82
Thank you very much!


Sent from my D5503 using XDA Free mobile app
 

levone1

Senior Member
Dec 28, 2014
3,827
1,478
Since sharing themes with others' work is not kosher, (http://xdaforums.com/crossdevice-dev/sony/share-frankentheme-t3282360), I figured I'd add a little more here for anyone's personal use. In general, here's what I've found with these themes:
- Within each apk there is an 'assets' folder, which contains zip files. Each zip file mods a certain aspect of the ui. For example, there will be one for settings, which contains the little pictures next to each settings option, (personalization, with the little rainbow, etc). You can experiment with simply swapping these around with different themes. However, if you want to add a settings zip, for example, to a theme base that does not already have a settings zip in it, you have to mod the main android manifest file in the top level of the apk. If you want to see how it needs to be modded, look at one that has it already. It's pretty obvious, since it's the same entry for each zip, but with the corresponding zip name. You can also extract these zips and replace files in them and rezip. Keep in mind, though, that there are some things that aren't that simple and just won't work.
- There are some things that are coded in, and can't be changed, (as far as I can figure out), like accent color. It seems like accent color just comes with the 'android' zip, and there's nothing you can do about it. As a workaround, you can find an 'android' zip with a color you like, and change out the other files from the zip you wish you could change the accent on. Again, sometimes it just won't work and you won't know why.
- Some themes don't follow this pattern at all. I haven't learned much about them yet.

Screenshots show examples I've used...
 

Attachments

  • Screenshot_2016-01-06-21-37-27.jpg
    Screenshot_2016-01-06-21-37-27.jpg
    41.7 KB · Views: 221
  • Screenshot_2016-01-06-21-37-53.png
    Screenshot_2016-01-06-21-37-53.png
    200.8 KB · Views: 220
  • Screenshot_2016-01-06-21-39-36.png
    Screenshot_2016-01-06-21-39-36.png
    149.5 KB · Views: 218
  • Screenshot_2016-01-06-21-38-00.png
    Screenshot_2016-01-06-21-38-00.png
    168.6 KB · Views: 219
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    I don't spend lots of time at the computer, so I like to find ways to do as much as possible on the phone. One thing I've found is that every theme I try has at least one element I wish I could change, as much as I like it overall. I don't know enough to make my own theme, but I found a way to change elements of the theme without using a computer. I'm sure this is not news to many of you, but I figured there might be other non-experts like me out there who might appreciate it.

    1. Download Apktool apk file below, install it, open it, {it will automatically update on the first use for some reason}, go to settings and check 'device has root', {leave other settings alone}, then close the app, reopen and grant su access.
    2. Make a directory in storage somewhere called 'apktool', {or something}, and copy the following to it: /system/framework/framework-res.apk, /system/framework/SemcGenericUxpRes/SemcGenericUxpRes.apk, and whatever themes you want to mix and match.
    3. Open apktool app, navigate to apktool directory, and import the framework files by tapping on each one and selecting 'import as framework'. When done, you can then tap on the theme apk files and select 'decompile all', and they will be decompiled into folders called {appname}-src. Go into the folders with a root explorer and change what you want, then go back to apktool, and tap on the folder you want and choose 'recompile'. When recompile is done you end up with an apk called '{appname}-src.apk'. Tap on that and choose 'sign'. When done you will get an apk called '{appname}-src-sign.apk, which you can install normally.

    -Notes, questions-
    - I'm currently using Z1c stock .236 deodexed rom. This app should work on other phones, roms, versions, etc, but I can't say for sure. What I know is that there are at least 5 versions of the app out there, {Google search for 'apktool 4.4' or '5.2', etc}, and it seems like each one works better on certain versions of Android. There are also configurable settings. If you have a different phone or rom, etc, you just have to mess around with it.
    - This app should work as normal apktool for modding systemUI and framework, but I can't get it to recompile on LP, but only on Kk. Decompile works fine, but on recompile it complains about lacking resources. I don't know what file it wants. If someone can figure it out that would be great.
    -If you don't know what files to change, all I can say is that I didn't either. Start with the obvious stuff, like navbar keys, and see how brave you get. Just make sure your file names are changed, since every app doesn't use the same names for the same files. As long as you work with copied files you have nothing to lose. If something is wrong with your modifications, then it won't recompile correctly, and you'll just get an error message, so you can't really install something that's going to mess up your phone.
    - This also works for changing appearance of other apps, not just themes. See my recent posts in the Naked Browser thread for examples. However, sometimes it won't be able to decompile an app, and there's probably nothing you can do. I think the way apktool works is based on how the app was created. If something is not compatible, it just won't work.
    - You don't have to decompile just to pull files out of an apk, but you do need an app that can do it. I use Rom Toolbox Pro. There may be free ones, {maybe Mixplorer}. I think you can just change the extension to zip and extract normally. However, some files and folders are not the same zipped in the apk as they are when decompiled.

    File link - https://drive.google.com/file/d/0B5E7sFT1phjoS003R0tkM21qUlk/view?usp=docslist_api
    2
    Since sharing themes with others' work is not kosher, (http://xdaforums.com/crossdevice-dev/sony/share-frankentheme-t3282360), I figured I'd add a little more here for anyone's personal use. In general, here's what I've found with these themes:
    - Within each apk there is an 'assets' folder, which contains zip files. Each zip file mods a certain aspect of the ui. For example, there will be one for settings, which contains the little pictures next to each settings option, (personalization, with the little rainbow, etc). You can experiment with simply swapping these around with different themes. However, if you want to add a settings zip, for example, to a theme base that does not already have a settings zip in it, you have to mod the main android manifest file in the top level of the apk. If you want to see how it needs to be modded, look at one that has it already. It's pretty obvious, since it's the same entry for each zip, but with the corresponding zip name. You can also extract these zips and replace files in them and rezip. Keep in mind, though, that there are some things that aren't that simple and just won't work.
    - There are some things that are coded in, and can't be changed, (as far as I can figure out), like accent color. It seems like accent color just comes with the 'android' zip, and there's nothing you can do about it. As a workaround, you can find an 'android' zip with a color you like, and change out the other files from the zip you wish you could change the accent on. Again, sometimes it just won't work and you won't know why.
    - Some themes don't follow this pattern at all. I haven't learned much about them yet.

    Screenshots show examples I've used...