[Q] Modifying smilies in LatinImeGoogle.apk - Android Q&A, Help & Troubleshooting

I've seen previously that you can modify 'more_keys_for_smiley' in LatinIME.apk to modify the predefined smilies in the keyboard ( http://forum.xda-developers.com/showthread.php?p=23362533 ).
I'm trying to do this for LatinImeGoogle.apk.
I've got it decompiled with apktool, but I can't seem to find where 'more_keys_for_smiley' is defined to change it. The only reference to it inside of that apk is in key_styles_common.xml where it has:
<key-style latin:moreKeys="!text/more_keys_for_smiley" latin:backgroundType="functional" latin:keyOutputText=" " latin:keyLabel="" latin:keyLabelFlags="hasPopupHint" latin:styleName="enterKeyStyle" />
Can anyone help me locate more_keys_for_smiley so I can modify it? Does the "!text" refer to a different package?
Thanks in advance for any help.

Ok, thanks to someone's help I was able to figure out that the string is now located in the odex file for the keyboard. I was able to deodex LatinImeGoogle.odex using baksmali and edited the file com/android/inputmethod/keyboard/internal/KeyboardTextsSet.smali. I then used smali to recreate the odex file, but pushing it to my device and rebooting causes the keyboard to not load. Do I need to do anything special with this new odex file?

I tried following tutorials ( http://forum.xda-developers.com/showthread.php?t=1208320 ) and using automatic batch scripts ( http://forum.xda-developers.com/showthread.php?p=31360029 ) for recreating the new odex file and copying the signature from the old one, but I could not get it to work. At best I got the keyboard to load and instantly crash, at worst it wouldn't even load the keyboard upon boot.
Anyone want to offer some advice or take a stab at this?

Seems like your doing exactly what i'm trying to accomplish, and had success, so i'm gonna ask a couple questions, but first some background info.
I'm using a (Verizon) Galaxy Nexus, CM10.1 Clockwork Recovery, GAPPS. (no custom Kernels, etc)
I'm a windows guy, definitely a noob to linux, i'm comfortable following the more complicated instructionals, but traveling off the beaten path is difficult for me.
I was able to use apktool tool to decompile Latinime.apk, and i found KeyboardTextsSet.smali, and the smileys i want modified.
Is it as simple as recompiling and installing it? (remove/uninstall keyboard via TitaniumBackup first?)
You refer to a LatinImeGoogle.odex, is this only relevant to someone using an odexed rom?
I appreciate greatly any assistance you are able to provide!:good:

PrettyPistol555 said:
Seems like your doing exactly what i'm trying to accomplish, and had success, so i'm gonna ask a couple questions, but first some background info.
I'm using a (Verizon) Galaxy Nexus, CM10.1 Clockwork Recovery, GAPPS. (no custom Kernels, etc)
I'm a windows guy, definitely a noob to linux, i'm comfortable following the more complicated instructionals, but traveling off the beaten path is difficult for me.
I was able to use apktool tool to decompile Latinime.apk, and i found KeyboardTextsSet.smali, and the smileys i want modified.
Is it as simple as recompiling and installing it? (remove/uninstall keyboard via TitaniumBackup first?)
You refer to a LatinImeGoogle.odex, is this only relevant to someone using an odexed rom?
I appreciate greatly any assistance you are able to provide!:good:
Click to expand...
Click to collapse
Yes, you should be able to modify KeyboardTextsSet.smali and then recompile and install the keyboard. I never achieved any success because I'm on an odexed ROM and couldn't get reodexing to work properly.

Tried but no joy, then realized it could be because the apk was from a previous nightly (couple days) than the one currently installed. Crossing my fingers that it's the reason it didn't work.
I'll try again.
sent from my vzw Galaxy Nexus / CM10.1 (nightlies)

Related

[Q] Signing Help ..

Hey all, Well i know we could not wait for a Honeycomb theme, i know i cannot, but heres my conundrum.
I have made a honeycomb keyboard, but cannot get it to install for the life of me, ive used the testkeys, shared, platform, etc (all using Signapktic from Stericson. Does anyone have any clue as to why it will not install?
A few questions that i know you might ask, answered ...
No, there is no other keyboard, other than swype, and samsung keypad..
I made it off of the GB keyboard...
Yes, I have made many of themes, many of changes to Frameworks, and have had sucess installing, and running my custom roms....
My question basically is this, IF POSSIBLE, CAN ANYONE SIGN THE FILES I HAVE TO MAKE THIS WORK? PM ME AND I SHALL SEND THE FILES. CREDIT WILL BE GIVIN, I AM ON THE OTHER HAND GOING TO NEED SOME SORT OF PROOF YOU KNOW WHAT YOUR DOING, I WORKED REAL HARD ON THIS, SO FOR RIGHT NOW ITS PRIVATE, HENSE THE PM.
THANKS AGAIN IN ADVANCE. REMEMBER .. LETS GET THIS HONEYTCOMB GOING
I know that most of the keyboards dont work simply by installing but rather need to be pushed to the data\app or data\app_s folder depending on which rom you are running. You can accomplish this using adb or using a file explorer like RootExplorer.
Thanks
Thank you man, this helps a whole lot. Now do i need to re-sign each apk inside the rom folder? or can i just re-sign the .zip?
georgegreco86 said:
Thank you man, this helps a whole lot. Now do i need to re-sign each apk inside the rom folder? or can i just re-sign the .zip?
Click to expand...
Click to collapse
I'm not sure what .zip you're refering to other than a CWM recovery flashable .zip for you keyboard. If this is what you mean, then use the same signiture (key) you'd find in any of the flashable .zips on the forums. In other words, just copy over the META-INF folder from some other .zip to yours. Of course, you'll want to make sure the update-script in this folder is pointing at the proper directories for installation.
For your apk, you should only need to sign it if you changed the AndroidManifest.xml. Otherwise, just keep the META-INF folder from them original apk.

[Q] Android Kitchen - by dsixda, HTC Amaze 4G

I want to use the android kitchen to turn our recently leaked ICS update into a rom. On Dsixda's thread, he states that we need to create a file in the kitchen's /tools/edify_defs folder with the properties of our phone, in the templates file, it is kind of unclear for me how to do this.
Can anyone help me create a file for the HTC Amaze 4G? Thanks
HuskyHamburger said:
I want to use the android kitchen to turn our recently leaked ICS update into a rom. On Dsixda's thread, he states that we need to create a file in the kitchen's /tools/edify_defs folder with the properties of our phone, in the templates file, it is kind of unclear for me how to do this.
Can anyone help me create a file for the HTC Amaze 4G? Thanks
Click to expand...
Click to collapse
Sorry if I am reviving a not quite old thread, but it came up when I was searching for the kitchen to download on my new windows install..
If you want to create a rom you don't really need the kitchen, it can do certain things to a rom- deodex, zipalign, install superuser and busybox, etc.. but within a few days of the leak all of that is available. You can pm a developer as I did and get permission to use their files rather than recreate the wheel.
First, just run the zip file thru the kitchen, don't do anything special with it- we have a superuser zip file you can/should just unpack into the final setup.
Find the updater-script and the binaries(in the same folder), this is what tells it what to install and where, fix permissions, install the files needed for SU(look in the superuser zip files updater script for details) etc..
If you want a deodexed rom you can ask to borrow the system/app directory from a rom that already has deodexed theirs. Literally, this is the best way to do it.
What the kitchen IS better for is pulling apart the kernel, putting it back together, unpacking apks.. it has built in scripts which can be a real time saver than typing in backsmali this, smali that-- simply put a file in a folder, type a number, and magically it all happens for you.. but you won't need ANY of that until you get into the advanced stuff.
I don't know if you were still trying to figure it out or not, but at the very least this may give someone who happened across this thread SOME sort of answer-- I get sick of finding more unanswered posts or posts where people reply with "you should search".. I've searched so much I my fingers should be bleeding.

[Q] Manually Deodex and Odex back -help needed

Love the write up here: http://forum.xda-developers.com/showthread.php?t=1208320
Trying to follow it and I keep getting the device to boot, however, the Settings icon (Settings.apk and Settings.odex) are what I modified on an Asus Transformer Prime. I do believe it has to do with signature check. I compared the HEX of the files using Beyond Compare and the signature, which I believe is in the first few lines, is completely different than original. Also, I had to add a few .jar's from the /system/framework of the Transformer Prime's system in order to get it to deodex and odex properly.
Am I missing something? Could the signature be copied via a hex editor instead of using the dd command. If so, which HEX is start and end position? Isn't there a trailer as well that needs removed??
Please help if you have any idea about ODEX vs DEODEX. I prefer ODEX which is why I am trying to modify manually and put back. Plus, I learn more this way, which is +1....even though, it's alot more work, I don't mind.
Has anyone ever used this method? I don't want a completely DEODEXED ROM, in fact, I would prefer if NONE of it was DEODEXED which is why I am doing it the hard way Any help is much appreciated.
bump....need an answer please guys...
older thread but I'm bumping this because I'm running into a similar issue. I prefer most of my rom to be odex apart from settings, systemui, framework-res, and my services.jar.

[Q] Removal of Verizon Backup Assistant Plus from Accounts Setting

Hello xda forum!
This is my first post, so please forgive me if I am doing anything wrong.
Probably like others who frequent this forum, the second I got my S4, I immediately rooted the phone and tried to delete all the Verizob/Samsung bloatware using Titanium Backup. This went without hitch, BUT there was one problem: Backup Assistant Plus.
I have completely uninstalled the Backup Assistant Plus app itself, but the uninstall did not get rid of the "Backup Assistant Plus" icon from the "Accounts" menu in the settings. Now the button just causes the settings to force close and annoys me to now end. I have attached a screenshot of my settings to be clear as to what I am talking about.
I have googled the problem, and see that the owners of the Galaxy S3 have solved the problem by modding the secsettings.apk on this thread
http://forum.xda-developers.com/showthread.php?t=1814099
However, the thread does not provide any explanation as to how the modder did it, so I was not able to reproduce it on the S4.
Can anyone help quell my ocd and give advice on getting rid of the menu?
Thanks in advanced!
It is indeed in secsettings. Do you know how to decompile and recompile apks?
sent from my Verizon Galaxy s4
Dubbsy said:
It is indeed in secsettings. Do you know how to decompile and recompile apks?
sent from my Verizon Galaxy s4
Click to expand...
Click to collapse
Hello, thanks for replying!
I have read about the process while scouring the forums, but have never actually had a reason to try it
I am a quick learner though and know how to program, so if it requires decompiling and recompiling, I think I'd be fine.
TheChoBro said:
Hello, thanks for replying!
I have read about the process while scouring the forums, but have never actually had a reason to try it
I am a quick learner though and know how to program, so if it requires decompiling and recompiling, I think I'd be fine.
Click to expand...
Click to collapse
Head over the android development section and download whichever apktool/apkeditor/decompile+recompile tool you want. I use Rujelus22's AIO Script personally but they all work.
You'll need SDK and JDK downloaded. You'll need 4.2.2's SDK branch downloaded. Installed and path setup correctly(you'll find that info while gathering the tools). Then you'll need 7zip and notepad++(a modified notepad++ is included in Ruj's AIO)
While at it decompile the framework-res.apk, systemui.apk, and settingsprovider.apk. You may want to dig in those as well to pick out lingering VZW services.
When you go to decompile make sure your AAPT in your SDK folder is in platform-tools folder. Make sure it's up to date. Make sure you are using whatever the latest apktool is. If using the Ruj AIO it will walk you through setup. But if you go about the more manual methods you will need to install your framework-res and tw-framework-res files so that it can decompile and recompile correctly.
Be careful what you delete and what you modify. Fair warning, you will likely boot loop the first few times. You also will probably find recompiling will error out often. That's because when it decompiles it sometimes drops neccesary symbols that need to be in the files in order to pack back up. For systemui specifically there was a missing + sign from a bunch of strings. When you run across these errors, read your log, and then google search... 9 times out of 10 you will find something of use to correct the issue.
:good:

[Q] How to disable Tethering on a S3

Hi
Please can anyone help me to DISABLE tethering on the S3. I want all types: USB, WiFi hotspot and Bluetooth Tethering disabled but for the mobile still to be able to use data for other apps like WhatsApp etc. Its to disable access to the internet for a minor (I have removed the browser applications already but there are computers in the house that can be connected via these other routes and the kids these days are sharp ).
Any help would be appreciated.
Thanks
Mark
Just go to the notification panel and disable them from there i know this is not that helpful but i tried to be
Sent from my GT-I9300 using XDA Premium 4 mobile app
With a rooted phone, you would have to decompile system/settings.apk using apktool or similar (in a pc with the android sdk installed).
Edit its xml to remove, just delete, the thetering and portable hotspot menu, and then put the modified settings.apk back into the phone.
That would make it so they cannot activate it via the settings menu, but the phone would still be able to by using 3rd party apps.
Look into decompiling and compiling system apps with framework and apktool. Its a lot to put in the post, but there are great tutorials in the xda community. It's time consuming, but once you get the hang of it, really easy.
Re. How to disable tethering
dxppxd said:
With a rooted phone, you would have to decompile system/settings.apk using apktool or similar (in a pc with the android sdk installed).
Edit its xml to remove, just delete, the thetering and portable hotspot menu, and then put the modified settings.apk back into the phone.
That would make it so they cannot activate it via the settings menu, but the phone would still be able to by using 3rd party apps.
Look into decompiling and compiling system apps with framework and apktool. Its a lot to put in the post, but there are great tutorials in the xda community. It's time consuming, but once you get the hang of it, really easy.
Click to expand...
Click to collapse
Thank you dxppxd, that's exactly what I wanted to know. I am familiar with the apktools method of modifying apk files and my phone is rooted. :good::laugh:
Any other suggestions are welcome too.
Blaauwberg said:
Thank you dxppxd, that's exactly what I wanted to know. I am familiar with the apktools method of modifying apk files and my phone is rooted. :good::laugh:
Any other suggestions are welcome too.
Click to expand...
Click to collapse
Hi dxppxd, there is no Settings.apk under /system. Any idea where else it could be. Also, is the xml file in the res directory and is it also called settings.xml?
The version of android is 4.1.2 and is stock.
Your help is appreciated.
R
Mark
Blaauwberg said:
Hi dxppxd, there is no Settings.apk under /system. Any idea where else it could be. Also, is the xml file in the res directory and is it also called settings.xml?
The version of android is 4.1.2 and is stock.
Your help is appreciated.
R
Mark
Click to expand...
Click to collapse
Edit: Ooops! It's system/app/settings.apk my bad!
Also, you probably have an odexed rom. I suggest installing a stock deodexed rom so you can decompile settings.apk
You can get one in the roms section, I remember 4.1.2 stock deodexed versions of wanamlite or archidroid roms.
I'll look into which xml to edit, don't really remember. It's usually one called layout or res_layout or something like that.
There was a tut for modding the settings layout, ill look for it when I get home and post the link, was very helpful a long time ago.
Edit2: this is the tutorial. It was made for moding android 2.3.6 settings. But a lot of things still apply. It gives a very good idea on what each section does, and how the layout is made and you're only removing stuff, not adding titles or sections:
http://forum.xda-developers.com/showthread.php?p=24317850
Good luck.

Categories

Resources