[TOOL] Remote Theme Injector - theme your favorite paid apk

Search This thread

mathrania

Senior Member
Dec 5, 2009
2,344
648
Toronto
Getting this error:

Whats the solution..:(
 

Attachments

  • xda.jpg
    xda.jpg
    28 KB · Views: 391

creeve4

Senior Member
Jan 5, 2011
2,871
596
Bountiful
Unable to recompile Swiftkey 3 after applying a theme. I get the following error:

Code:
I: Building resources...
D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res\layout\keyboard_layout_phone.xml:5: error: No resource identifier found for attribute 'alwaysPresent' in package 'com.touchtype'
D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res\layout\keyboard_layout_phone.xml:13: error: No resource identifier found for attribute 'alwaysPresent' in package 'com.touchtype'
D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res\layout\keyboard_layout_phone.xml:21: error: No resource identifier found for attribute 'alwaysPresent' in package 'com.touchtype'
D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res\layout\keyboard_layout_phone.xml:29: error: No resource identifier found for attribute 'alwaysPresent' in package 'com.touchtype'
D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res\layout-land\keyboard_layout_phone.xml:37: error: No resource identifier found for attribute 'arrowsMode' in package 'com.touchtype'
D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res\layout-land\keyboard_layout_phone.xml:45: error: No resource identifier found for attribute 'arrowsMode' in package 'com.touchtype'
D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res\layout-land\keyboard_layout_phone.xml:53: error: No resource identifier found for attribute 'arrowsMode' in package 'com.touchtype'

etc....for about 6000 more lines

Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\CHRIST~1\AppData\Local\Temp\APKTOOL9101265755476850406.tmp, -I, C:\Users\Christopher\apktool\framework\1.apk, -S, D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res, -M, D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\AndroidManifest.xml]
	at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
	at brut.androlib.Androlib.buildResourcesFull(Androlib.java:302)
	at brut.androlib.Androlib.buildResources(Androlib.java:249)
	at brut.androlib.Androlib.build(Androlib.java:172)
	at brut.androlib.Androlib.build(Androlib.java:155)
	at brut.apktool.Main.cmdBuild(Main.java:182)
	at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\CHRIST~1\AppData\Local\Temp\APKTOOL9101265755476850406.tmp, -I, C:\Users\Christopher\apktool\framework\1.apk, -S, D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res, -M, D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\AndroidManifest.xml]
	at brut.util.OS.exec(OS.java:83)
	at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
	... 6 more

The apk seems to decompile fine.
 

Diamondback

Retired Dev Committee Lead / Retired Senior Mod
Jan 17, 2010
4,476
6,631
virtuous-ten-studio.com
Unable to recompile Swiftkey 3 after applying a theme. I get the following error:

Code:
I: Building resources...
D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res\layout\keyboard_layout_phone.xml:5: error: No resource identifier found for attribute 'alwaysPresent' in package 'com.touchtype'
D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res\layout\keyboard_layout_phone.xml:13: error: No resource identifier found for attribute 'alwaysPresent' in package 'com.touchtype'
D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res\layout\keyboard_layout_phone.xml:21: error: No resource identifier found for attribute 'alwaysPresent' in package 'com.touchtype'
D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res\layout\keyboard_layout_phone.xml:29: error: No resource identifier found for attribute 'alwaysPresent' in package 'com.touchtype'
D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res\layout-land\keyboard_layout_phone.xml:37: error: No resource identifier found for attribute 'arrowsMode' in package 'com.touchtype'
D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res\layout-land\keyboard_layout_phone.xml:45: error: No resource identifier found for attribute 'arrowsMode' in package 'com.touchtype'
D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res\layout-land\keyboard_layout_phone.xml:53: error: No resource identifier found for attribute 'arrowsMode' in package 'com.touchtype'

etc....for about 6000 more lines

Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\CHRIST~1\AppData\Local\Temp\APKTOOL9101265755476850406.tmp, -I, C:\Users\Christopher\apktool\framework\1.apk, -S, D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res, -M, D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\AndroidManifest.xml]
	at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
	at brut.androlib.Androlib.buildResourcesFull(Androlib.java:302)
	at brut.androlib.Androlib.buildResources(Androlib.java:249)
	at brut.androlib.Androlib.build(Androlib.java:172)
	at brut.androlib.Androlib.build(Androlib.java:155)
	at brut.apktool.Main.cmdBuild(Main.java:182)
	at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\CHRIST~1\AppData\Local\Temp\APKTOOL9101265755476850406.tmp, -I, C:\Users\Christopher\apktool\framework\1.apk, -S, D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\res, -M, D:\Cell Phone\Android\1 Tools\1 Apk Multi-Tool\other\..\projects\com.touchtype.swiftkey-1.apk\AndroidManifest.xml]
	at brut.util.OS.exec(OS.java:83)
	at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
	... 6 more

The apk seems to decompile fine.

Did you chose the correct apktool? Does this apk REcompile fine on YOUR pc without RTI?
 

devrruti

Senior Member
Jan 23, 2011
681
198
Do you think is possible to get this working on linux? Even a dirty way would suffice with wine, play-on-linux, or mono
 

tjbiker031

Senior Member
Apr 16, 2012
259
61
Bradenton, FL
I'll post this here too, please excuse this clone post from the xda theme forum. I was having a java signing error MSVCR100.dll error. kept reinstalling java and different versions....kept getting the same error. And you know i did something some people think is weird....i searched, and searched......gave up for a few minutes and searched again and finally found it. Here is the link.. I am on Windows 7 64x and it works great now.
 

invasion2

Senior Member
Oct 3, 2011
3,103
1,243
Space, the ONLY Frontier
I'll post this here too, please excuse this clone post from the xda theme forum. I was having a java signing error MSVCR100.dll error. kept reinstalling java and different versions....kept getting the same error. And you know i did something some people think is weird....i searched, and searched......gave up for a few minutes and searched again and finally found it. Here is the link.. I am on Windows 7 64x and it works great now.

Thanks mate, tried this and it worked! Much appreciated!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 117
    Themers on XDA face a huge problem when it comes to paid apks. They can't theme apks and distribute their work since that would be considered warez.

    Since we - the moderators - spend a lot of time closing threads where someone accidentially published such a theme, Forum Moderator Whiskey103 came up with an idea.
    What if the themer doesn't distribute the entire apk, but only his themed parts? This would be totally allowed on XDA.

    So Whiskey asked me if I can come up with a solution to this problem. And today we announce RTI - The remote theme injector!

    Note: while this project is intended for paid apks, it still works with free apks too of course. This app might help you migrating themes to a new version of the apks too.


    RTI basically consists of two parts:
    • The patcher (or themer)
    • And the editor which is needed to create themes


    Patcher

    This is a little windows app which takes the target apk and a theme file (more on that later) and automatically injects the theme into the desired apk.
    Todo this, the apk gets decompiled, patched, recompiled, signed and zipaligned. All this happens automatically and requires no input from the user (which is in this case the user who wants to USE the theme)
    The user has to provide the target apk on his own, this ensures no apks are distributed as part of the theme.
    It can be pulled via ADB or Rootexplorer from the phone for example.



    Editor

    The first app was for applying a theme, the editor is for creating such themes.
    It's a simple wizard style app which guides the themer through the required steps to create a theme file.
    Each theme file contains not only the actually themed files but also its own version of apktool to ensure maximum compatibility and a set of settings specifically for the target apk
    The settings include:
    • Package name of the target apk
    • Version number of the target apk
    • Which sign method to use (keep old signature, sign with a default key, sign with own key)
    • Whether the apk gets zipaligned or not


    The workflow for the user is very easy:
    • Download theme (it contains the patcher and the theme file (or even multiple themes)
    • Fetch target apk from phone and copy it in the same directory as the patcher
    • Start patcher and wait until it's done
    • Install themed apk on device


    The workflow for the themer isn't much harder:
    • Theme your apk just as you are used to it
    • provide TWO folders to the Editor, both folders need to contain the decompiled output of apktool
    • The first folder contains the unthemed, decompiled apk, the second one contains the themed and decompiled apk
    • Set the required settings in the editor and wait until generating the theme is done
    • Provide the user a download which contains the patcher and your created theme file


    Screenshots:

    Editor:
    RTI_E_1.PNG

    RTI_E_2.PNG

    Patcher:
    RTI_1.png



    Changelog

    2.12.1.5665
    • Added support for smali modification for advanced themes
    • Some bug fixes and UI improvements

    1.9.5.191
    • Important: This version brings some breaking changes, so please do not mix an old rti file with the new patcher. It won't work. You have to recreate your theme files if you want to use the new patcher.
    • Changed signing options. Removed java jarsign and added signapk.jar instead. This has a far better compatibility and doesn't require an installed Visual C++ runtime.
    • Possible signing options now:
      • Use 'test keys': Use a pre defined set of keys from me to sign the apk
      • Use 'own keys': you have to provide your own set of keys (key.pk8 and certificate.pem) to sign the apk
      • Keep old signature: NOT recommend, this has a few use cases, but usually won't work. Use one of the other two options if you are not sure.
    • Improved error detection on the folder selection page. It can tell you some common errors now if you make them.

    1.7.6.113
    • Initial release



    Example themes

    Tapatalk Pro/Free by Whiskey103
    XDA Premium Red and Blue by Whiskey103



    Requirements (this is both for Editor and Patcher)
    • Windows XP SP3 or newer (excluding all Windows 8 versions)
    • Microsoft .NET framework 4.0 FULL
    • Oracle JRE (Java) (Always try to use the latest Java version)


    Download

    RTI 2.12.1.5665

    Old versions:
    RTI 1.9.5.191
    RTI 1.7.6.113




    Credits
    • Whiskey103 for the excellent idea
    • brut.all for apktool
    • Google for Android
    • My girlfriend for tolerating my work on XDA :D
    • My dog for keeping me happy :p
    45
    I will write a guide here, for now just screenshots and a little explanation on how to use the "Patcher"
    We will do our best to answer the questions about how to use and all that ;)

    Basically i came up with the idea because of the fact we have to delete a lot of themed paid apps.
    Thats not nice since i know there is much time spend on it.
    So now we have a solution for all the themed Swype apk,s etc etc ;)

    I really felt sorry sometimes after i had to remove some masterpiece because it was "warez"
    If we start to use this, its all fine ;)

    BIG Thanks to Diamond who really liked the project from the beginning, without him this wasn't even possible.
    He really was enthusiast from the moment i contacted him till where we are now.
    Once again, thanks Diamond ;)



    The patcher:

    You have to download a patcher theme (XDA Premium App example) my thread for screenshots
    Extract that folder and grab the installed apk from your phone with Rootexplorer or ES File Explorer.
    Place that apk in the extracted theme folder and run the RemoteThemeInjector.exe
    In this case the RTI (Remote Theme Injector) will give you a list since i placed two themes in one folder. Just make your choice.
    The patcher will do his job and spit out a Themed APK.
    Copy that Themed APK to your phone (SD-Card) and install it after you removed your previous installed version of the App.
    Once the apk is installed , goto menu / more / settings / Display Style / and select XDA Free.

    PatcherFolder.png


    ThemeSelector.png


    RTI_in_%20action.png


    RTI_Done.png



    The Editor

    Editer1.png


    Editer2.png


    Editer3.png


    Editer4.png


    Editer5.png


    Editer6.png
    4
    I just bought the xda app and it tells me version does not match is there a new theme version ???

    As stated in my theme thread, xda premium app is totally rebased on the new Tapatalk 4 hence it will take some time to re-theme all elements.
    Iam on it though ;)

    Sent from my HTC One using xda premium
    4
    Okay guys, I made a new version with a few but significant changes.
    Most notable is the new signing system, you won't get these weird dll errors anymore now (I am using signapk.jar instead of that crappy java tool now).

    You can find the details in the OP. Enjoy :)
    3
    I'll post this here too, please excuse this clone post from the xda theme forum. I was having a java signing error MSVCR100.dll error. kept reinstalling java and different versions....kept getting the same error. And you know i did something some people think is weird....i searched, and searched......gave up for a few minutes and searched again and finally found it. Here is the link.. I am on Windows 7 64x and it works great now.