[MOD][XPOSED](v.1.14)SwiftkeyXthemes - Use Swiftkey themes from /sdcard

Search This thread

nijel8

Senior Member
Dec 24, 2011
2,423
5,656
All over US
Google Pixel 5a
This is my first module which lets you use Swiftkey keyboard with themes from external storage folder of your choice. You can resize key text labels too to get bigger letters on the keys.
No more need to decompile/recompile Swiftkey just to add your favorite themes after every update... Now you can make and test new themes on the fly too. No need to reboot, just reapply theme to see changes immediately.
Install it, enable the module, in module settings set your themelist.json and enable key label resize if you wish, restart android and your themes will be listed in Swiftkey themes setting just like any build-in theme... Apply it, done...

Took me some deep digging in the obscure code but I think I finally got it working the way I wanted.

NOTE: If you are using downloaded themes from Swiftkey store, you have to redownload them... well... not really... they are still on your /sdcard. Swiftkey will just unzip them again but this time they will be placed side by side with your custom themes in the custom folder you set in the module settings.
The module should work with Swiftkey beta too.

Download and source code links located in Xposed Module Repository.

Attachment 2: Module settings;

Attachment 1: How Swiftkey themes settings looks like with module running, Google Material Light is my theme on /sdcard;

Attachment 3: My /sdcard themes folder with additional theme downloaded from Swiftkey store;

Attachment 4: Choose your themelist.json dialog...

Current version:. v.1.14
Change log:
v. 1.14 Fix for latest Swiftkey update.

v. 1.13: Fixed bug - failed to apply downloaded themes from Swiftkey store.

v. 1.12: Fix for recent Swiftkey Beta update, Now module keeps logging to "/sdcard/Xswiftkey.logcat" if debugging and export is enabled and theme is applied in Swiftkey theme settings saving any errors might occur.

v. 1.11: Added logic for dynamically locating the classes needed. At boot time module scans the Swiftkey package and grabs the names of those classes based on search criteria which are less likely to change over time. This way module is less likely to brake(I hope...) after Swiftkey update. Thanks to JesusFreke for his smali/dexlib2 library.
Fixed force close bug when browsing for themelist after clean install.

v. 1.1: Module updated for recent Swiftkey Beta update which moved some classes around. Now module needs to know which Swiftkey package to handle so new CheckBox preference is added - check if using Swiftkey Beta, reboot.

v. 1.09: Added check at module startup for critical hooks - if for example after Swifkey update module can not hook essential methods, it should exit and let Swifkey work with stock themes... Otherwise Swiftkey might delete all our custom themes.
Added new preference to enable exporting filtered logcat to "/sdcard/Xswiftkey.logcat" at boot time. Provide it to get better support.

v. 1.08: Removed save theme service required permission for better compatibility. New option to override Swiftkey theme preferences title with your themes location, app icon refresh.

v.1.07: Fixed bug: unable to browse folders if already selected theme folder path was changed(folder renamed, old path not exists). Added some user useful logging in logcat: now if you enable debug, restart android and read logcat, module will detect if there is inconsistencies in your themes and themelist - existing theme folders but missing in themelist(warning message in blue) and themes listed in themelist but missing in your theme folder(error message in red)... if any. These inconsistencies will not cause any problems(module takes care of that) but is good to keep themes folder clean...

v.1.06: Throwing the theme if is in themelist but do not exist in theme folder so Swiftkey wont crash.

v.1.05: Improved themes type handling, improved save current theme handling, some user experience improvements in Choose themelist dialog.

v. 1.04: For Android 6.0 now module should ask for read /sdcard permission if can't read it. Improved logic for how Swiftkey should add themes, added option in Module settings to enable debugging in logcat.

v. 1.03: Rebuild module with Android 6.0 SDK to see if will help with some users not seeing themes in Swiftkey Beta.

v. 1.02: Fixed force close if "assets" themes have same ID as my themes, like if you use "assets" SuperSwiftkey themes folder.

v. 1.01: Fixed bug with selecting themelist from theme folder with too many subfolders, like the one from SuperSwiftkey themes.

v. 1.0: Initial release.

If asking for help please provide logcat:
Enable debug and logcat export in module settings, reboot phone... Post "/sdcard/Xswiftkey.logcat" file.
 

Attachments

  • Screenshot_2016-02-15-09-35-37.png
    Screenshot_2016-02-15-09-35-37.png
    113.7 KB · Views: 7,723
  • Screenshot_2016-02-14-13-42-16.png
    Screenshot_2016-02-14-13-42-16.png
    50.6 KB · Views: 7,555
  • Screenshot_2016-02-15-09-38-20.png
    Screenshot_2016-02-15-09-38-20.png
    41.4 KB · Views: 7,508
  • Screenshot_2016-02-15-09-42-43.png
    Screenshot_2016-02-15-09-42-43.png
    42.9 KB · Views: 6,671
Last edited:

ogisha

Senior Member
May 24, 2012
493
308
Is it enough to unpack SuperSwiftkey apk to desired folder?

Does thus module work with SuperSwiftkey-beta?

Thank you.
 

nijel8

Senior Member
Dec 24, 2011
2,423
5,656
All over US
Google Pixel 5a
This sounds great. I assume themes from Super SwiftKey will work as well? Perhaps a quick tutorial will be helpful to the not so advanced users?

This module should work with beta too, I actually started developing it on Swiftkey beta and when I got the basics running I switch to regular Swiftkey. Haven't tested the final version on beta but please let me know if there is any problems.
Doesn't matter where the themes come from as long as they are confirmed working with Swiftkey.
Quick how to: Just copy your "themes" folder with your themes and "themelist.json" inside it from Swiftkey "assets" anywhere on /sdcard, choose your "themelist.json" in module settings, reboot and apply your themes from Swiftkey themes settings... Simple as that. The only requirement is your theme list to be named "themelist.json" and it's parent folder (your themes folder) named "themes". These names are hard coded in Swiftkey code so we don't want to brake something else...

And some more screenshots...

Attachment 1: how your "themelist.json" will look like after you download themes from Swiftkey store. Swiftkey will just add them to your themelist automatically and they will be available side by side with your themes;

Attachment 2 and 3: Key labels Swiftkey default size vs. resized to my liking, values in first post first screenshot.
 

Attachments

  • Screenshot_2016-02-15-09-40-39.png
    Screenshot_2016-02-15-09-40-39.png
    58.1 KB · Views: 1,896
  • Screenshot_2016-02-15-09-45-09.png
    Screenshot_2016-02-15-09-45-09.png
    22.7 KB · Views: 1,894
  • Screenshot_2016-02-15-09-46-58.png
    Screenshot_2016-02-15-09-46-58.png
    24.9 KB · Views: 2,386
Last edited:

nijel8

Senior Member
Dec 24, 2011
2,423
5,656
All over US
Google Pixel 5a
Is it enough to unpack SuperSwiftkey apk to desired folder?

Does thus module work with SuperSwiftkey-beta?

Thank you.

Super Swiftkey is just Swiftkey with added themes. What this module do is that you don't need Super Swiftkey... Just move Super Swiftkey "themes" folder from "assets" to your /sdcard, install normal Swiftkey or beta and it will be just like your Super Swiftkey.

Maybe something I should mention here. Due to the obscure code... and lot of it(over 3600 class files)... I expect things to brake after Swiftkey update, but it should be easy and quick fix. I will try to keep up with module updates. That's why I made the module source code available with comments in it what does what so if someone wants to help can easy make the changes needed. I will highly welcome any help with quick updates... even I wont look for any credits. Just post quck module updates....
 
  • Like
Reactions: ogisha

lietuvis1

Senior Member
Sep 14, 2013
52
7
I took themes folder from SuperSwiftkey. When I try to select themelist.json file your app crashes. What can I do to help?
 

Attachments

  • Screenshot_20160215-210829.jpg
    Screenshot_20160215-210829.jpg
    91.5 KB · Views: 1,014

nijel8

Senior Member
Dec 24, 2011
2,423
5,656
All over US
Google Pixel 5a
Can you provide logcat with the crash error? Can't really help without it.
What your folder structure looks like starting from /sdcard path? Any spaces or funny characters in the file path?

EDIT: Copying SuperSwiftkey themes now to see if I can reproduce the error... That thing is biiiig... My list adapter will struggle with those 296 items... We'll see...
 
Last edited:

lietuvis1

Senior Member
Sep 14, 2013
52
7
Can you provide logcat with the crash error? Can't really help without it.
What your folder structure looks like starting from /sdcard path? Any spaces or funny characters in the file path?

themes are stored in /sdcard/Swiftkey/themes/

I'm not sure if I'm doing a logcat correctly but it shows nothing when the app crashes.
 

nijel8

Senior Member
Dec 24, 2011
2,423
5,656
All over US
Google Pixel 5a
That's strange... Should show something. I might have an idea what might be wrong. I am saving the scroll position so when you rotate the screen you don't have to scroll all over again, which maybe causing that crash with so many items in the list. Let me test it and will be back.
 

lietuvis1

Senior Member
Sep 14, 2013
52
7
Problem fixed and update uploaded in Xposed Module Repository. Let me know how it works and are you notified for modules updates.

Now I can select themelist.json file. However, when I reboot Swiftkey Beta crashes. I installed non beta Swiftkey but custom themes aren't showing up.

EDIT: I cleaned SwiftkeyXthemes app's data and cache, now Swiftkey Beta works but custom themes aren't showing up.
 
Last edited:

bugggmenot

Senior Member
Feb 24, 2014
187
36
Tehran
I took themes folder from SuperSwiftkey. When I try to select themelist.json file your app crashes. What can I do to help?
Same here.
Logcat attached.

EDIT: new update fixed issue selecting json file. but module not working, im using SwiftKey 5.4.0.66
 

Attachments

  • logcat.zip
    119.3 KB · Views: 22
Last edited:

pirasalbe

Senior Member
Jan 9, 2013
215
40
I've downloaded SuperSwiftKey, extracted theme folder and copied in my device, then I opened the module, browse through the folders, entered theme folder and selected the file themelist.json and rebooted
I cannot see any other theme (I'm on SwiftKey Beta 6.2.3.60), have I done something wrong???

Sent from my Nexus 6 using Tapatalk
 

nijel8

Senior Member
Dec 24, 2011
2,423
5,656
All over US
Google Pixel 5a
Okey everyone... new update posted at repository, fixes the crash for SuperSwiftkey "assets" folder. Was crashing b/c we have same themes already in regular Swiftkey "assets". Now module just discards themes from Swiftkey "assets" if we already have same themes in our themes folder.

Keep feedback coming so I can fix all bugs, please... Thanks
 
Last edited:

nijel8

Senior Member
Dec 24, 2011
2,423
5,656
All over US
Google Pixel 5a
I've downloaded SuperSwiftKey, extracted theme folder and copied in my device, then I opened the module, browse through the folders, entered theme folder and selected the file themelist.json and rebooted
I cannot see any other theme (I'm on SwiftKey Beta 6.2.3.60), have I done something wrong???

Sent from my Nexus 6 using Tapatalk

Now I can select themelist.json file. However, when I reboot Swiftkey Beta crashes. I installed non beta Swiftkey but custom themes aren't showing up.

EDIT: I cleaned SwiftkeyXthemes app's data and cache, now Swiftkey Beta works but custom themes aren't showing up.

Looks like Swiftkey beta do things differently with themes... I will take a look and see for a fix.

EDIT: So installed latest Swiftkey beta 6.2.3.60 and everything works right out of the box not even reboot was needed.
What android are you running? I will rebuild the module with Marshmallow support and see if that helps. Right now I'm targeting Lollipop.
 
Last edited:
  • Like
Reactions: pirasalbe

lietuvis1

Senior Member
Sep 14, 2013
52
7
Okey everyone... new update posted at repository, fixes the crash for SuperSwiftkey "assets" folder. Was crashing b/c we have same themes already in regular Swiftkey "assets". Now module just discards themes from Swiftkey "assets" if we already have same themes in our themes folder.

Keep feedback coming so I can fix all bugs, please... Thanks

At least for me 1.02 version force close Swiftkey Beta and non Beta.
 

ogisha

Senior Member
May 24, 2012
493
308
Where could I download versions 1.01 and 1.02 from?

There is version 1.00 in xposed repository only.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    This is my first module which lets you use Swiftkey keyboard with themes from external storage folder of your choice. You can resize key text labels too to get bigger letters on the keys.
    No more need to decompile/recompile Swiftkey just to add your favorite themes after every update... Now you can make and test new themes on the fly too. No need to reboot, just reapply theme to see changes immediately.
    Install it, enable the module, in module settings set your themelist.json and enable key label resize if you wish, restart android and your themes will be listed in Swiftkey themes setting just like any build-in theme... Apply it, done...

    Took me some deep digging in the obscure code but I think I finally got it working the way I wanted.

    NOTE: If you are using downloaded themes from Swiftkey store, you have to redownload them... well... not really... they are still on your /sdcard. Swiftkey will just unzip them again but this time they will be placed side by side with your custom themes in the custom folder you set in the module settings.
    The module should work with Swiftkey beta too.

    Download and source code links located in Xposed Module Repository.

    Attachment 2: Module settings;

    Attachment 1: How Swiftkey themes settings looks like with module running, Google Material Light is my theme on /sdcard;

    Attachment 3: My /sdcard themes folder with additional theme downloaded from Swiftkey store;

    Attachment 4: Choose your themelist.json dialog...

    Current version:. v.1.14
    Change log:
    v. 1.14 Fix for latest Swiftkey update.

    v. 1.13: Fixed bug - failed to apply downloaded themes from Swiftkey store.

    v. 1.12: Fix for recent Swiftkey Beta update, Now module keeps logging to "/sdcard/Xswiftkey.logcat" if debugging and export is enabled and theme is applied in Swiftkey theme settings saving any errors might occur.

    v. 1.11: Added logic for dynamically locating the classes needed. At boot time module scans the Swiftkey package and grabs the names of those classes based on search criteria which are less likely to change over time. This way module is less likely to brake(I hope...) after Swiftkey update. Thanks to JesusFreke for his smali/dexlib2 library.
    Fixed force close bug when browsing for themelist after clean install.

    v. 1.1: Module updated for recent Swiftkey Beta update which moved some classes around. Now module needs to know which Swiftkey package to handle so new CheckBox preference is added - check if using Swiftkey Beta, reboot.

    v. 1.09: Added check at module startup for critical hooks - if for example after Swifkey update module can not hook essential methods, it should exit and let Swifkey work with stock themes... Otherwise Swiftkey might delete all our custom themes.
    Added new preference to enable exporting filtered logcat to "/sdcard/Xswiftkey.logcat" at boot time. Provide it to get better support.

    v. 1.08: Removed save theme service required permission for better compatibility. New option to override Swiftkey theme preferences title with your themes location, app icon refresh.

    v.1.07: Fixed bug: unable to browse folders if already selected theme folder path was changed(folder renamed, old path not exists). Added some user useful logging in logcat: now if you enable debug, restart android and read logcat, module will detect if there is inconsistencies in your themes and themelist - existing theme folders but missing in themelist(warning message in blue) and themes listed in themelist but missing in your theme folder(error message in red)... if any. These inconsistencies will not cause any problems(module takes care of that) but is good to keep themes folder clean...

    v.1.06: Throwing the theme if is in themelist but do not exist in theme folder so Swiftkey wont crash.

    v.1.05: Improved themes type handling, improved save current theme handling, some user experience improvements in Choose themelist dialog.

    v. 1.04: For Android 6.0 now module should ask for read /sdcard permission if can't read it. Improved logic for how Swiftkey should add themes, added option in Module settings to enable debugging in logcat.

    v. 1.03: Rebuild module with Android 6.0 SDK to see if will help with some users not seeing themes in Swiftkey Beta.

    v. 1.02: Fixed force close if "assets" themes have same ID as my themes, like if you use "assets" SuperSwiftkey themes folder.

    v. 1.01: Fixed bug with selecting themelist from theme folder with too many subfolders, like the one from SuperSwiftkey themes.

    v. 1.0: Initial release.

    If asking for help please provide logcat:
    Enable debug and logcat export in module settings, reboot phone... Post "/sdcard/Xswiftkey.logcat" file.
    7
    Hi guys, any one to spare a few minutes to help noobs?

    I have installed super swiftkey, so it is possible to get those themes and then apply it to the original swiftkey app? if so, how?

    Thanks in advance

    SURE : I am assuming you have a pc.
    first thing first just download this tool A useful tool called - formatter to edit/repack APK FILES by our xda member @despotovski01 ,
    then convert apk to RAR
    FormatterScreenshot2.png

    Go to the folder where your .apk file was. You should see a .rar archive, named by the name you entered in Formatter. Extract it with your archive manager.
    now open that in my case i named it UNPACKED .
    2lwlyis.png

    then open folder ---> assets -->themes
    2dsfxv6.png

    now in themes delete the swiftkey themes you don`t want [or just remember the one`s you want and delete all others]
    now at the end of the theme list you will notice a JSON file :themelist:
    you can open it and edit use NOTEPAD++ for this
    30mxszr.png

    now find and delete the same themes the one`s you deleted from the folder , be cautious while doing this as to not alter the file format.
    66yphv.png


    NOW AFTER ALL THAT JUST REMEMBER THAT THE END COMMAND STRUCTURE DOES NOT END WITH A COMMA<
    2wqs86r.png


    after all this just save this JSON file ,
    and move the themes folder to your ext.sd card ,
    download swiftkey from the playstore ,
    activate/open the module , it will ask for json directory , direct it to the themes folder you moved to your ext. sd card .
    that is it .
    you are done. THANKS nijel8 for this module . :good: :cool:
    HOPE IT WILL HELP
    ..
    3

    SURE : I am assuming you have a pc.
    first thing first just download this tool A useful tool called - formatter to edit/repack APK FILES by our xda member @despotovski01 ,
    then convert apk to RAR
    FormatterScreenshot2.png

    Go to the folder where your .apk file was. You should see a .rar archive, named by the name you entered in Formatter. Extract it with your archive manager.
    now open that in my case i named it UNPACKED .
    2lwlyis.png

    then open folder ---> assets -->themes
    2dsfxv6.png

    now in themes delete the swiftkey themes you don`t want [or just remember the one`s you want and delete all others]
    now at the end of the theme list you will notice a JSON file :themelist:
    you can open it and edit use NOTEPAD++ for this
    30mxszr.png

    now find and delete the same themes the one`s you deleted from the folder , be cautious while doing this as to not alter the file format.
    66yphv.png


    NOW AFTER ALL THAT JUST REMEMBER THAT THE END COMMAND STRUCTURE DOES NOT END WITH A COMMA<
    2wqs86r.png


    after all this just save this JSON file ,
    and move the themes folder to your ext.sd card ,
    download swiftkey from the playstore ,
    activate/open the module , it will ask for json directory , direct it to the themes folder you moved to your ext. sd card .
    that is it .
    you are done. THANKS nijel8 for this module . :good: :cool:
    HOPE IT WILL HELP
    ..
    I love you haha great guide
    to make it easier it is possible to extract the apk using 7-zip, no need for the tool to convert it to rar. :)
    2
    This sounds great. I assume themes from Super SwiftKey will work as well? Perhaps a quick tutorial will be helpful to the not so advanced users?
    2
    This sounds great. I assume themes from Super SwiftKey will work as well? Perhaps a quick tutorial will be helpful to the not so advanced users?

    This module should work with beta too, I actually started developing it on Swiftkey beta and when I got the basics running I switch to regular Swiftkey. Haven't tested the final version on beta but please let me know if there is any problems.
    Doesn't matter where the themes come from as long as they are confirmed working with Swiftkey.
    Quick how to: Just copy your "themes" folder with your themes and "themelist.json" inside it from Swiftkey "assets" anywhere on /sdcard, choose your "themelist.json" in module settings, reboot and apply your themes from Swiftkey themes settings... Simple as that. The only requirement is your theme list to be named "themelist.json" and it's parent folder (your themes folder) named "themes". These names are hard coded in Swiftkey code so we don't want to brake something else...

    And some more screenshots...

    Attachment 1: how your "themelist.json" will look like after you download themes from Swiftkey store. Swiftkey will just add them to your themelist automatically and they will be available side by side with your themes;

    Attachment 2 and 3: Key labels Swiftkey default size vs. resized to my liking, values in first post first screenshot.