yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Puddies:
I installed the framework-res.apk from my /system/framework/

I got apktoolkit from here, it is v2.0.0:

http://ibotpeaches.github.io/Apktool/install/

There are only apktoool.bat and apktool.jar

It is a command line based tool. I used it like this:

install framework with 'apktool if <framework-res.apk>'

decompile with apktool d <my.apk>

compile with apktool b <thefolder>

My Android SDK is up to date, I installed it about 2 or 3 days ago.

My Java Version: 1.8.0_45

The "modified" apk has 20,2 MB and the original one has 25.3 MB. This is strange because there has nothing be changed in any xml file. Just taking the resources.asrc from recompiled apk.

Both files should have the same size, shouldnt they?
[Android Software Development] samep:
Is your resources.arsc compressed? Mine has no compression. Even with the lib folder removed, mine is 22.7MB.

I'm no expert but sludge through this apktool process. But someone once told me that if you modify resources.arsc, the finished apk should have this file decompressed.

Maybe this impacts Samsung or OEM products more so than stock Android or CM?

I think it has more to do with the compression. When you used the original decompile and recompile, was the final resources.arsc compressed also?

There's a command line using 7z to decompress while packing resources.arsc in apk. I prefer to use TickleMyAndroid to skip the guess work and decompress as needed. The auto build process it uses hasn't failed me yet.
[Android Software Development] Puddies:
You are right, winrar compressed the ressources.asrc. Now I set an option without compression and the modified file is only 26KB smaller than the original.

But the error is still the same. ;(

P.S.: The ressources.arsc from recompiled apk is 5 KB smaller than the original.
[Android Software Development] dafunk2:
My modded apk always resulted smaller than the original. Never been the same size of the original.

And I always used apktool and winrar with no issues. Strange....
[Android Software Development] samep:
Have you tried the generic framework to compile with? It seems that's where TickleMyAndroid and standard apktool are polar opposites. For me, TickleMyAndroid with my ROM's framework-res.apk installed will compile and work but the opposite is true for apktool.

---------- Post added at 04:47 PM ---------- Previous post was at 04:30 PM ----------

Here's a question for anyone in the know from experience to answer:

Does java 1.8 work with apktool? The instructions still mention java 6 and 7.

My PC went and auto applied the update but my path still points to java 1.7 which is still there. I think the antivirus installed it that way but my TickleMyAndroid mod tool is still working. Ideally I would have confirmed the update works and uninstalled the old and corrected the path.

But my question applies to apktool 2.0 and up.
[Android Software Development] PhilDX:
hey [MENTION=6783020]Puddies[/MENTION] - once when I missed a step and my install failed like yours (with force close) , I had to boot into recovery and wipe both cache and davlik cache. no amount of fiddling worked until I did that but afterwards the install worked just fine. you might want to give it a try. just Google your phone + how to boot into recovery and wipe cache.

also make sure you delete all the old swype files from /data/app, /system/app and /system/lib first.
[Android Software Development] samep:
I checked the link you provided and iBotPeaches still references jdk 1.7 for building apktool from source and in his change logs.

And then there's this quote...

http://xdaforums.com/showpost.php?p=56313244&postcount=2478

I didn't thoroughly check the thread but thought I should point this out.

I do believe I read Android Studio and SDK are compatible with 1.8 but think apktool still is not compatible. Errors are being reported. Any confirmation on that guys?

Edit: and then there's this post suggesting to use the latest stable version for java 8.

http://xdaforums.com/showpost.php?p=61203311&postcount=3322

So which version are you using?
[Android Software Development] samep:
Bump. Are you guys using jdk 1.7 or jdk 1.8?

Apktool 2.0 RC(x) or latest stable release 2.0? iBotPeaches release?

It may help [MENTION=6783020]Puddies[/MENTION] to know

I'm still using TickleMyAndroid and jdk 1.7 (as far as my environmental variables path is concerned) on Windows 8.1

TIA!
[Android Software Development] PhilDX:
i use apktool 2.0 stable with jdk 1.7 on Windows 7
[Android Software Development] Puddies:
I have also tried jdk7 now, but I still get the same error.

There is one thing I have noticed during decompiling: I have installed framework-res.apk and twframework-res.apk because both apks are in my /system/framework. But when I decompile the swype apk, then only the first framework-res.apk seems to be loaded, the 2nd apk is not loaded here (see screenshot).

Should it normally load both apks or is this usual?
[Android Software Development] samep:
From experience I know framework-res.apk is only required. There's a small file (yml.xml) in the decompile folder that tells you the necessary resource files. Must likely only the one.

Have you tried jdk 1.7 without the installed framework-res.apk or twframework-res.apk? When I used the lower numbered apktool, I wasn't installing framework but removing it from the installed location. It's TickleMyAndroid that requires framework-res.apk install.

Your environmental variables path is pointing to jdk 1.7, right. You've checked the log output for errors, right? If no errors, this may be the issue. Delete installed framework 1 and 2 and try again, checking log for errors.

Just one thing I'm not getting from one reply here in this thread. Does the generic framework require install after custom framework is removed? I just manually removed my custom framework from the directory location as needed.
[Android Software Development] Puddies:
I tried jdk1.7 after removing the framework apks and I decompiled swype without installing any framework-apk. There were no log errors.

But the problem is still the same. :(
[Android Software Development] samep:
Running out of ideas fast. Here's my exhaustive ordered suggestion checklist.

Check java and apktool installation

http://ibotpeaches.github.io/Apktool/install/

Check dimensions or xmls for errors.

Try TickleMyAndroid?

You want to try my template?

Anyone else have a suggestion? Please do.
[Android Software Development] Puddies:
This cannot be the problem, because i did not change anything in the xmls or in the other files. Just recompiled the original swype apk and used the original swype apk with the ressources.apk of the recompiled version. :/

I do not have a custom recovery, because i dont want to trigger my knox counter, to keep the device warranty.

But the creator says without custom recovery TickeMyAndroid doesnt work, does it? I tried to connect my phone with pc via USB but TickleMyAndroid were not able to find my device.

Sure, it would be nice if you want to share. If I finally get this stuff here running for my, I would likely try some different templates. :)
[Android Software Development] samep:
Didn't notice that about TMA; right plus latest is now using java 8.

Before I upgrade java, I'm going to check out apktool 2.0.0 stable.

I'll test and get back to you. Did you try the other template or just stop when the resources.arsc didn't seem to compile and install correctly?
[Android Software Development] Puddies:
Which other template do you mean? I only replaced the ressources.arsc with the recompiled one.

And the compiling works without any errors, and I can install it to my device. But when i want to start the app, the message "Swype + Dragons was stopped" appears.
[Android Software Development] samep:
Edit: For MM, make sure apktool, java and Android SDK Manager are updated. Use the command lines to de-compile and compile. Using a template to replace the files (oddly, I had to delete first, then paste in Windows 10). Refer to post 254 for install on MM. Install differs from other Android builds.

Right; I was able to duplicate your problem. In my case, I'd think it was the smali but you were only replacing the resources.arsc and I was trying to get apktool 2.0.0 stable to work on my Windows 8.1 machine with jdk 1.7 on the whole mod.

I used the extra commands to tell the tool to ignore the smali and rebuild with original with exception of res and resources using these commands:

apktool d -s Swype.apk

apktool b -c Swype

This builds an apk that doesn't need the manual repacking; resources.arsc doesn't get compressed either. Also, I noticed that when I wasn't using those, as soon as I pushed the apk to system, the logo switched to an unknown (green droid). Pushing the one with original files with exception of just the ones modified as above yielded a logo we can recognize in the Swype folder. Witnessed this with a root browser in real time so I had an idea the boot would install it and it did. No unfortunate pop-ups.

Nothing really special was done to install, just permissions. I left the lib folder in the apk this time and the lib so files are still in system/lib. (I tried all kinds of different ways to install and clear and even boot without Swype installed after removal and cache wipe and it was failing despite those efforts.)

Try the command lines above and see if that helps any. Hope so.

---------- Post added at 05:33 AM ---------- Previous post was at 05:19 AM ----------

And you are rebooting after install, right?

Prior to boot, you can remove the /data/data/com.nuance... and /data/dalvik-cache/system/app/Swype... prior to reboot. (If it's there; others may find it at /data/app/com.nuance... /data/data/com.nuance... and /data/dalvik-cache/data/app/com.nuance... doing the mod the first time.
[Android Software Development] Puddies:
Omg, IT IS FINALLY WORKING!!

Thank you very much for your help and your patience! :) :) :)

But there was one thing which did not work: When I typed

apktool d -a Swype.apk

it said

Input file <d> was not found or was not readable.

So I had to decompile it without the option -a. But recompiling with -c was working. Then I just used the decompiled apk and it worked. :))

Then there was finally the real logo of swype in my apps (Previously I had the same problem you mentioned, with the green android logo instead of the swype logo).

And I could use my own xmls now and have a modded swype. :)

Edit: Can you post your xml templates for me, please?
[Android Software Development] samep:
Oops that must have been the autocorrect

It's: "apktool d -s Swype.apk" (it was the autocorrect; I'll edit the post you quoted!) Odd that it worked, skipping the first suggested command and only compiling as suggested. My theory is somewhat de-bunked by that. Thanks for sharing the steps.

samep-Swype1.9.1.1090100.37195_template.zip *requires editing /res/values/strings each new release going forward- use a compare module in hex editor like the ones mentioned recently in this thread*

Note: If you find you are splitting off the last letter of a word and pushing it in front of cursor, it's because you tapped cursor "arrow left" instead of "a" and swyped next word. (An example of an error I originally thought was apk error. Gets better with practice and familiarity- if not, move your arrow placement in the mod).
[Android Software Development] megamanfre:
I dont have anything located in my MNT/asec folder. Ive looked with ES File Explorer as well as Root Explorer. Is there a reason why this folder would be empty?
[Android Software Development] samep:
Use the apk in /data/app/com.nuance.swype.dtc locale. The lib files you may need are either with it or inside the apk.

Once you modify, you can simply name it Swype.apk If you're using Lollipop, use a folder named Swype in /system/app. The apk and sub folders /lib/arm/ with the .so files inside.
[Android Software Development] samep:
I noticed a few changes in Swype2.0.0.2000050.38944 so here's an updated template
[Android Software Development] PhilDX:
have you noticed if auto correct for tap typing is any better? i'm still on 1.87
[Android Software Development] samep:
Do you mean where you try to select the correct word and the auto correct list just scrolls instead of getting selected?

I'm not sure if that's what was meant by the fix but it still tends to do that of you try to fool it. Maybe slight improvement; I see now.

What's really still a bug is the dictionary sync. I think I may have told it to sync/backup an empty dictionary. They say they're improving this but how do you know you're not doing that when there's not a dedicated restore button or backup button? I go back in there to sync and I see it just went to synced 0 minutes ago; check dictionary and it's empty. Last time I sent an email asking for a sync and got it in minutes. Any ideas for a true and reliable third party app or method to sync this stync?

I'll clear data, reboot and try again.

Edit: After Swype data wipe and reboot, got a partial dictionary restored; freezes at theme menu while updating. It's never a true sync for me. Always adding some words back in; the same words, mostly recent ones. Started a ticket again.
[Android Software Development] PhilDX:
I dunno about sync, I dont actually use that, sorry.

I meant the accuracy of autocorrect when you make mistakes typing by tapping keys instead of swyping. ive always found tap typing performance to be poor when compared to swiftkey (swyping is better though).

thanks
[Android Software Development] samep:
Now I see what you mean. If I get the spacing right and don't end up with a

lot of words ran together or improperly spaced, it seems to get it accurately. It will suggest two where they're ran together but didn't auto correct them as you type. Run three words together and it's not suggesting anything further.

The keypad is sensitive to tapping and can jumble things up. I mostly sweep and tap words that are wrong. Do a lot of highlighting and re-sweeping to get it right.

Some things that are improving lately are the compound word correction but I still see things like "some of" get input as "done if" or "fine it" or "done it". "fit" or "fur" instead of "for". "it", "or", and "out" must be my fault but it seems to try to revert to last word swept.

There was once a method of using the dictionary to prioritize words like suggesting "for" instead of "fur". Kind of stupid to have to remove "fur" and "done" out of the dictionary.
[Android Software Development] PhilDX:
^^^ if I had a dollar for every time one of these happened :)
[Android Software Development] samep:
LOL. I'd settle for a nickel.
[Android Software Development] Puddies:
Since the new Swype version is up, my modifications do not work anymore. I cannot compile with these xml files. I used those from this post http://xdaforums.com/showpost.php?p=58687241&postcount=70

Does anyone have a working number row with arrows for the new swype version and can post the files, which have to be changed?

Thank you very much!
[Android Software Development] TONY6669:
Worked for me

Sent From Gurple Tapatalk
[Android Software Development] Puddies:
Can you please post your changed files here or send them to me by private message? That would be very nice.
[Android Software Development] TONY6669:
check post 203 files are there that you need to change
[Android Software Development] jlc403:
Can someone spoon feed me where to put the apk and the lib files for 4.4.2 with latest version? I'm comfortable with the mods and actually helped figure some stuff out with the earliest version of this mod last year. I tried placing modified apk in several different places and sub folders, etc...am wondering if someone can confirm 4.4.2 file spots for me please!!!

Then, if it doesn't work, I can know with certainty that it's the mod process I am somehow screwing up.

Thanks!

Josh
[Android Software Development] samep:
apk->/system/app as: Swype.apk

lib->/system/lib/(replace the old ones with new ones, if present)

Uninstall existing Swype applications and remove the /data/data & /data/dalvik-cache files that begin with com.nuance.xx if left and not deleted and reboot.

Install modified Swype application as above in directories and reboot to complete install process. If you have issues, remove the lib folder from apk in /system/app/Swype.apk

There's some suggested apktool commands and suggested revs posted recently; i.e., apktool 2.0 and jdk 1.8 latest update @ post 198. Apktool has since been updated but I haven't tested it. Post 203 has some template files to exchange with decompile files prior to compile.
[Android Software Development] jlc403:
Thanks. I used WinRAR to move files in and out of zip files and add in using "store" setting to avoid any compression. Can't sort out the xml-land to move from mod to original...in latest versions, I only see the xml folder. Going to copy all the xml's in the hope that the modded landscape version shows up there.
[Android Software Development] samep:
It's /res/values-land.

Post 198 outlines an easier way to build the apk in one step without compressing images using "apktool b -c Swype" to compile, the final apk is in the dist folder. No worries; it's just right. No image compression and installable with original signing; ready to install in system.

The template is xml to xml swap based on the folders I've placed them in.

I've basically did the harder work to make the task easier for you, complete with apktool commands. No problem with you doing it the harder way but it can be done the easy way. And the use of proper application name: Swype.apk, works as well. Work smarter, not harder; LOL. I think the OP method and using Winrar introduces extra steps that have simplified since.

I've only tested this on a phablet at stock 640 dpi. Let me know if it doesn't work on a tablet. Those files weren't edited or tested; sorry, but I could try or someone else could post some edited files for tablet, if needed. Mine is un-rooted, primarily used by my daughter and the Samsung keyboard works enough to satisfy the little needs I have for it. Lack of internal memory and lack of ability to fully utilize the micro sdcard will eventually make root necessary to add more applications.
[Android Software Development] jlc403:
Worked great. On my system, the only apktool I could get to work easily was androidmultitool. I used the apktool folder within there and everything worked great.

Thanks for spoon feeding it.. For those struggling still, it's as simple as decompiling from instructions in post 198, inserting the files from 203 in the respective spots, and recompiling from 198. now that I have this sorted out, will take 5 minutes tops for future updates. (assuming someone is willing to keep posting the appropriate xmls!)

Thanks a million. had switched to swiftkey temporarily and really missed my swipe! Not sure how much it is now, but I paid for it when it was 0.99 and it's been great!
[Android Software Development] gscollier:
I finally got things to work as well. I initially had success adding a number row then after trying to add arrows things got very ugly. After an unnecessary amount of time wasted trying to replace the base.apk in data/app (worked first time) I bit the bullet and went the system/app route. TickleMyAndroid does not produce an installable apk so was kinda forced into it. Did not put libs in system, just left in the Swype folder. Important to note that permissions need to be set for EACH folder or fc's happen. Also permissions for libs and apk of course.

I expect that going forward it will simply be a matter of replacing the apk, set permissions and reboot.

The one thing left at them moment is to find a way of having a hotkey insert a string. Any ideas?
[Android Software Development] samep:
Latest template to share once again.

samep_Swype2.0.1.2000100.39621-template.zip

Rev 1.1 Thanks to [MENTION=6783020]Puddies[/MENTION] for the theme suggestions!

Changes to /res/values/strings and styles (less transparent alt. symbols)

Note: according to Play notes, you should not lose your opt-in dictionary ever again. IDK, maybe this is the update that Nuance referred me to but they say look for an upcoming update to fix the partial or no words being synced.

Refer to post 198 for quick apktool codes used to compile with template files exchanged manually.

Feedback welcomed; let's get those alternate texts right in styles with some collaboration. I do believe High Contrast and Holo themes need improvement, if used by preference.
[Android Software Development] Puddies:
This is a very nice template, thank you for that!

But I have one question: My Theme is Material Light, so all letters and numbers are dark. But the arrows are white.

How can I change the color of the arrows? I want them to be black, too.
[Android Software Development] samep:
Thanks.

I'll look into making the arrows match the arrows match its selected theme rather than white for all themes (as free time permits). Good point. If anyone knows, please share. My goal is to roll the recommended changes into this so whoever makes the changes to share can save time for the rest.

Questions: are the alternate characters a bit light or do you prefer it as displayed? (you made them black? Black would be fine with me but I think the original color is dark gray; I missed the matching shade on the alternate symbols.) I agree that theme needs some work... my first swing at making the alternate characters visible.
[Android Software Development] Puddies:
Imho, the alternate characters should be much darker.

But for me it doesnt matter, because I use Swype Tweaks to change alternate characters manually. I use #FC575757 for them, so its almost as dark as the main characters.

But this is matter of taste.

Can you tell me the variable I have to change to make the arrows dark in my own version? I would change it just as a work around until we have a smarter way to change it.
[Android Software Development] Black Plague:
Its easy just look into xml files, copy the numer rows paste into the ones that didn't have
[Android Software Development] samep:
I could use those values for the characters since the existing ones are too light. Thanks for the hex color code.

The arrows are added to kbd_qwerty_panlatin.xml, second row, left and right (at top and bottom of that section of xml). I'm not sure if that xml points you where to edit or if you'll have to change the color all themes. I would start there or look in the /values/styles for that theme. Sorry but that's only an idea of starting points. I'll take a look at it soon if someone doesn't get to it first.
[Android Software Development] samep:
I found it and made changes on a few light themes. Uploaded version 1.1

Updating post #220 to point to revision 1.1

Edit: [MENTION=6783020]Puddies[/MENTION] to make sure the Material Light theme compiled correctly, I borrowed 4 lines of code from Arctic theme in /res/values/styles (black arrows). There was also a change of code that I missed in /res/xml/kbd_edit.xml I copied the left and right arrow lines and added the left and right positioning at ends (correctly this time) at /res/xml/kbd_qwerty_panlatin row 2.

Maybe this helps you theme more to your liking.
[Android Software Development] samep:
Swype update!

new samep_Swype2.0.2.2000200.39828-template.zip for apk compile

Changes:

carried over theme changes from previous template 1.1 rev on last Swype update- thanks to [MENTION=6783020]Puddies[/MENTION]

added cents symbol as #2 alt. symbol

added ^ as #6 alt. symbol

Swype stability update- whatever that is

extra Halloween Themes were already in the Theme store prior to update?

Note: refer to post 198 for quick reference.
[Android Software Development] Atlos:
I have a problem and I d'nt know how to solve this.

And this is my xml https://dl.dropboxusercontent.com/u/11602465/kbd_spanish_qwerty_national.xml

Thanks
[Android Software Development] Puddies:
I think that your bug is in this line:

<Key ns:popupCharacters="@string/alternates_for_spanish_qwerty_national_z" ns:keyLabel="z" ns:altKeyLabel=""/>

Try ns:altKeyLabel=" " instead of ns:altKeyLabel=""

An empty string as altKeyLabel causes such errors.
[Android Software Development] Atlos:
Thanks, it's works!!!