[Shell Extension] Right-click adb install (v1.0) - G1 Android Development

I'm sure people have done this already but I just added the registry key to make my life easier and didn't see one posted here so I figured I'd make it available. A very simple shell extension to allow right-click->Install of .apk files.
It assumes the adb.exe binary to be located in the default location at c:\android-sdk-windows\tools\adb.exe so modify the .reg file as needed if you've installed to a different location or are still using an older version of the SDK. The install is always done with the -r flag, so it will work on first installs as well as on "update" installs.
Will release another version with uninstall capability as well when I get time, but that will probably require an additional .dll file to be included since it'll need to read the package name from inside the apkfile. (If anyone would like to take a crack at that in the meantime feel free!)
For what it's worth, enjoy
EDIT: If it's the only registered action it will also be the default action, so you can just double-click too.

Yeahh Thx a lot
Benn looking for something like this for a long time.

Very handy - thanks!

Sweet, thanks.

Thanks, works perfectly !

Related

Disabling Access To Games

Hi - is there any way on PocketPC 2003 to disable access to Solitaire and Jawbreaker. I'm pretty sure I can't remove them all together as they're in the ROM - but some registry hack to prevent access to them would be sufficient.
Try this...
You don't list what device or WM versions you are using, but here are two possible solutions you could try:
1) Read through the forums specific to your device, and learn how to cook your own ROM, removing the offending software.
2) Any file in your ROM can be "overwritten" by syncing to your pc and draggin a file with the same name to the folder containing the file you wish to replace. IE. I have a small, written for the pda application, which when run, displays a pop-up saying "This software has been removed because I do not wish for anyone using this device to have fun doing so!" or similar. I then name it solitare.exe and drag it into the Windows directory from my PC. It asks me am I sure I wish to overwrite the file, I click yes and bam! the file is "replaced". (I believe what actually happens is the OS delinks the file and places the new file in the old ones placeholder on the filesystem, it is still in the ROM as that is unwritable unless flashing, but it is no longer accessable, which is what you want to happen.
tried & failed...
I've created a solitare.exe as you suggested and placed it in the Windows directory - it doesn't seem to get run when executed however - The original game still gets run - I fear I may be doing something stupid.
Re: tried & failed...
gremlin said:
I've created a solitare.exe as you suggested and placed it in the Windows directory - it doesn't seem to get run when executed however - The original game still gets run - I fear I may be doing something stupid.
Click to expand...
Click to collapse
Why do you want to block them?
Re: Try this...
pneuma said:
You don't list what device or WM versions you are using, but here are two possible solutions you could try:
1) Read through the forums specific to your device, and learn how to cook your own ROM, removing the offending software.
2) Any file in your ROM can be "overwritten" by syncing to your pc and draggin a file with the same name to the folder containing the file you wish to replace. IE. I have a small, written for the pda application, which when run, displays a pop-up saying "This software has been removed because I do not wish for anyone using this device to have fun doing so!" or similar. I then name it solitare.exe and drag it into the Windows directory from my PC. It asks me am I sure I wish to overwrite the file, I click yes and bam! the file is "replaced". (I believe what actually happens is the OS delinks the file and places the new file in the old ones placeholder on the filesystem, it is still in the ROM as that is unwritable unless flashing, but it is no longer accessable, which is what you want to happen.
Click to expand...
Click to collapse
Hey pneuma.
2) Isn't working for me either. I thought gremlin was doing something wrong, but I just tried it myself, and, although my "fake" solitaire.exe (a renamed app) file is there, so is the original solitaire.exe. Tapping on the Solitaire icon under games runs the game as if nothing happened, although just opening the Games folder would tell you that it didn't work (the Solitaire icon is still the cards)
What did you do that we didn't? I'm using a Universal.
Peculiar...
Personally I haven't tried this specific to the games, but there was a nasty spash screen in the new WM5 for my Himalaya that I replaced in the method detailed above. It would appear however that solitaire might be a system program, as the following files:
\windows\solitaire.lnk
\windows\start menu\solitaire.lnk
have the following Target: ":MSSOLITAIRE"
but don't despair!
If you have resco explorer or some similar mobile based explorer replacement, try edit the links to point to the replacement exe, or even delete the links altogether, as well as the Games directory under "\windows\start menu\" (might not work deleting them though).
If the deletion or edits don't work you may well have to do the same trick, replacing these .lnk files with something else.
--Marc
Thanks to pneuma I think I've got a workable solution without having to hack into the ROM!
I've created two programs (using PocketBuilder) called Solitare.exe and Jawbreaker.exe which just pop up a response window saying "This Application Has Been Disabled"
I've also created two .lnk files - solitare.lnk and jawbreaker.lnk which contain:
22#"\Windows\Solitare.exe"
and
23#"\Windows\Jawbreaker.exe"
respectively
In my boot process I copy the executables and .lnk files to the \Windows directory and also copy the .lnk files to the
\Windows\Start Menu\Program\Games\
directory.
I don't think our users (sorry to diss them) are bright enough to figure out they have to remove all of these files to get the games working again.
Thanks for all your help.
Gremlin.
gremlin said:
(sorry to diss them)
Click to expand...
Click to collapse
But you're dissing them all the way by treating them like this.
Why shouldn't they be able to play Solitair or JawBreaker every now and then during a coffee of lunch break. A bit of light releif never did anyone any harm.
I'm glad I don't work with you. (Bah Humbug)
I have no say in how the users are treated - I am merely a developer - I get told what needs to be done and I do it. I can offer my suggestions at design time but ultimately it is not my decision how the users are treated on the shop floor.
If I was in management it would be a different story.
I'm lovely to work with - I make the tea and everything
gremlin said:
If I was in management it would be a different story.
Click to expand...
Click to collapse
Point taken. :wink:
I would argue that it's hardly worth the effort just to piss people off.
I'll have my tea with milk and no sugar.

..........................

............................................
.....................................
excellent work as always, thanks a lot!
Nice. Make as many options as there can be.
email settings
very nice, just installed so far so good. installed my cabs no problem, instruction to do this are pretty clear.
i have been reading about UC from slueth on how it install my setting for my email, not having much luck understanding, got it to install my cabs no problem. next i am trying to learn how to copy my email settings, i dont know if this can be done with this program? and if you can help me do this, its only 1 email account pop3 so not much info.
thanks
Lupe
Sounds cool, in fact, I liked it the first time, When it was UC. Just kidding I had to say it, just had to. I look forward to giving this a go when I have a moment.
JimmyMcGee said:
Sounds cool, in fact, I liked it the first time, When it was UC. Just kidding I had to say it, just had to. I look forward to giving this a go when I have a moment.
Click to expand...
Click to collapse
Thanks...I think
Let me take this opportunity however to say a couple of things about UC, and specifically how this tool is really for a different purpose.
First off, although UC is a nice standard, even Sleuth acknowledges that there is really nothing new in what he is doing with UC. He took some standard autorun.exe techniques and registry entries and bundled them to make a procedure that used to take 3 or 4 steps now take 2. UC adds nothing new, other than a standardized way to use autorun.
Also, UC mainly is meant for fully automated installs of a storage card. So, you pop your card in the slot, and sdautorun processes the sdconfig.txt automatically. UC can install CABs, provision XML and copy files (with limited success). However you must first set up your sdconfig.txt file and build your XML files manually or by exporting registry keys. You must set all this up beforehand in the sdconfig file.
SASHIMI takes a different approach in that you don't need to set up a config.txt file and it isn't bound to statically install the same things each time. In addition, since it can import reg keys natively (well, technically it calls another included app to do it, but it's all bundled in the installer) you don't need to go through the hassle of exporting reg keys, and then converting them to .XML (and optionally rolling them into a .CAB file).
Other advantages SASHIMI has:
In addition to running fully automated, you can choose to run only Manual, or Manual+Auto which will allow you each time to be prompted with a set of CABs and .REG files which you wish to install.
Customizing .CAB installs by tethering/binding .REG and .MSCR files so you can easily map additional configuration entries to a particular .CAB
Logging, so you can track what has been done
Transfer entire directory structure. If you have several folders with multiple subfolders you want transfered from storage you can do this easily.
Modular - the multiple directory structure allows for nice compartamentalization and organization of applications and configuration settings. Things aren't stored in static config.txt files or difficult XML. Simple .REG files, CABS, and optionally MortScript files if you want to use them.
All of these benefits come with only one drawback, which is inherent in this technique. That is it may not be fully automated. Of course this makes sense because if you want to be prompted about which CABs you want to set up or where you want to install them, you need to invest a little time answering prompts. I think the time to do this is considerably less than creating a config.txt file.
In addition, SASHIMI can be run using only Auto mode, in which case it is fully automated (and logged). In fact, it can even be configured to be run automatically when the SD card is put in if you so choose (I will be writing up instructions for that).
So, it really depends what you want to do. I honestly feel that SASHIMI can do everything autorun (and thus UC) can do and more. The exception is it can't import XML. I may update this by including autorun in the package and build this feature in as well. Personally, I think it's easier to work with .REG than .XML. UC however, has a slightly simpler structure which of course why it isn't as feature rich. I think it lends itself more to it's main purpose...which is to be cooked into ROMs and do a fully automated install at boot.
However, as the name implies, SASHIMI is a RAW installer and is meant more for users who want full control of what is getting installed (generally users who use lighter, uncooked ROMs and want to install more apps, etc.
Although, as I said everyone can use it. I think you really need to download it and run through the tutorial to see the power it has.
thx!
Awesome!!!!!! Been following your dev work on this and I should say this is a really great new level you've taken this package!!!!
Gonanaaa try this!
Thanks for this
Sashimi works great. You did a marvelous job of documenting it. Follow the directions and you have an easy solution for us flashing junkies....Bravo!
parleyp said:
Sashimi works great. You did a marvelous job of documenting it. Follow the directions and you have an easy solution for us flashing junkies....Bravo!
Click to expand...
Click to collapse
Thanks for your support.
Please feel free to make suggestions/bug reports/feature enhancements.
I couldn't think of anything else it needed at the time, but I'm sure it's not perfect.
On my list so far is:
Add support to use XML provisioning files (in addition to REG). - Not sure if I will put this in both Manual AND Auto modes...thinking maybe just Auto.
Writeup instructions, and maybe a little update that shows/updates the program to run in UC/Autorun mode. - This will allow it to run in auto mode as soon as the SD card is placed in the device (or a new device is started for the first time with the SD in the slot).
Integrate a config.txt / sdconfig.txt file so those of you who run UC can easily move/switch between both apps. Basically the idea is SASHIMI will process the config.txt file in addition to what it already does. It is kind of repetitive, since then you would be able to either import an XML through my methods, or just put your XML/CPY/EXEC commands in the config.txt file. Obviously if you ONLY use config/sdconfig.txt then there really isn't a need to use SASHIMI too, but if you want the extra options while still maintaining any work you did with UC then it's a go!
I would like to try to keep the app aroung it's central purpose, which is as an installer automater/helper app...so try to keep suggestions/recommendations around that.
thanks
better than uc, imho
thanks for you help bengalih, from your other thread, got my emails set up,
i used tiermanns Personal OEMizer to create my provisioning XML.
i then used the task manager you provided and bam, it worked.
this is why i believe SASHIMI is the best choice. i flash many roms, not all roms have the same programs installed, when i use uc i have to change my config.txt or i might install something that is already in the rom or i might miss something that is not in the rom. yea yea i know, cry me a river
heres what i like, i put my stuff in auto file, like my spb mobile, spb weather and a few others that no one installs because they must be purchased, then all my others in the "manual file" stuff like pcm keyboard, rss hub, htc end key, etc and google search which makes you stop and accept user agreement, if i have something in the manual file thats already installed in the rom you just flashed, just click no when it gets to it and on to the next cab.
i believe with sleuths uc if a cab requires a reboot it cant be used, for example i can put spb phone suite in manual and once completed it ask if i want to reboot, i select no and now it goes to the next cab, once im done with the cabs i want to install then i reboot very very nice
thanks
Lupe
overhaulengines said:
thanks for you help bengalih, from your other thread, got my emails set up,
i used tiermanns Personal OEMizer to create my provisioning XML.
i then used the task manager you provided and bam, it worked.
this is why i believe SASHIMI is the best choice. ...
Click to expand...
Click to collapse
Thanks Lupe...glad you got it worked out.
I am finishing up the next version, which will incorporate UC as well, so if users have an sdconfig.txt file they want to use it can also be used by SASHIMI (in reality I am calling UC's SDAutorun.exe to do it). So, it will be like a combined installer.
There still isn't a substitute for UC in terms of cooking it into a ROM to run automatically on first boot, but with my next version you will be able to use the sdconfig.txt and you will also be able to initiaze SASHIMI when the storage card is inserted. This makes it ideal if you need to provision alot of phones and each one is slightly different.
It sounds like you are taking advantage of the manual+auto install...great. FYI if a .CAB is already unstalled, then the following will happen:
1) If in Manual mode, it will ask you to remove the old CAB first and then it will ask you the location to install the new one. Of course you can always skip the CAB in manual mode if you don't want to reinstall.
2) If in Auto mode it will automatically remove the CAB and install it again.
Ah, one last thing...the Task Manager is DotFred's task manager, I can't take the credit for that application, and I will be sure to credit him in the next release notes.
Version 3.0 coming soon.
I'm finishing up version 3.0 to be release by end of week.
Here are the following updates:
v.3.0
- XML integration added! Use XMLs with/instead of .REG files to provision your device.
- UC integration and the ability to use sdconfig.txt files.
- Option to auto-launch when Storage Card is inserted.
- Better Log handling and INTEGRATED log viewer.
- Additional menus for less clutter and more choices!
- More status dialogs to let you know what's happening when.
- Ability to create/restore Program Menu shortcuts to any location.
- \Scripts and \Root directories available in both Auto and Manual modes for more control!
- Moved tandem/bundled .REG processing before .CAB installation for the ability to import registry entries prior to application install. .MSCR and .XML tandem files process after .CAB installation.
- Optimized code formatting
Let me know if there are additional options you would like to see.
Does the SDConfig.txt file use eliminate the ability to use the programs default folder based way of separating and installing? The program is excellent as is. But if I were shooting for the moon I would suggest adding ability to export personal information to .XML or .REG from current device for use after flash...
aadadams said:
Does the SDConfig.txt file use eliminate the ability to use the programs default folder based way of separating and installing? The program is excellent as is. But if I were shooting for the moon I would suggest adding ability to export personal information to .XML or .REG from current device for use after flash...
Click to expand...
Click to collapse
I completely agree with this. If you were able to have the tool create the .xml and/or .reg files from your currently installed ROM, it would make an excellent tool a killer app.
Thanks for the work!
aadadams said:
Does the SDConfig.txt file use eliminate the ability to use the programs default folder based way of separating and installing? The program is excellent as is. But if I were shooting for the moon I would suggest adding ability to export personal information to .XML or .REG from current device for use after flash...
Click to expand...
Click to collapse
No, the SDConfig.txt file is an ADDITIONAL step in the Auto phase.
So, after running either the Auto, or Manual+Auto modes the last step will be to process an SDConfig.txt file if it exists AND the option to use UC is enabled within SASHIMI.
I think that answers your question.
I did also add the option to do a backup of the entire registry to a file. But, your suggestion gives me an idea....
I can't really provide an interface with MortScript to do a selective backup of the registry, but what I may be able to do is read another configuration file. So, the user would create a file with the following format:
HKCU\Settings\Phone Settings\
HKLM\Control Panel\Sounds\
HKLM\Software\Application1\
Click to expand...
Click to collapse
Whatever keys are listed in the entries will be written out to a .REG file in the Manual\Reg directory and can then be imported if desired or moved to Auto\Reg.
Would that suffice for what you are asking?
That, my friend, would be EXCELLENT! This is an awesome application! Keep up the good work!
Thanks for everything, sir. I cannot wait to try this out.
Ok, I have implemented all the above features.
I just need to do a bit more testing and then repackage the .CAB and update the documentation.
Unless i get anymore feature requests/bug reports I will be upping this probably by Friday.
If any new feature requests are too complex (but worth doing) they may wait until next version.

[Q] How to overwrite Htchomesetting.xml

I have an edited htchomesettings.xml that i want to put on my jade.
Everytime i try to drag 'n drop this file into my windows folder, i get the 'acced denied, be sure the file isn't read-only, in use or that you have enough space left'-error.
When looking at the file's properties (with Resco or total commander) it seems to be fixed in the Rom and i think that's the reason i can't overwrite it.
I already googled it and found some topics concerning this problem, and generally they all give the same advice:
http://forum.xda-developers.com/showpost.php?p=2736263&postcount=500
the problem is, i already used both programs, and apparently it does not seem to work, or i'm doing it wrong or i'm overlooking something...
So, can anyony tell me how to overwrite this file with total commander or resco, if this is possible.
Many thanks, and sorry if this is a stupid question, i searched the web for about 3 hours before asking you guys .
It's a little easier than that. The only thing you need to do is make sure that the plugin is not running. In other words, deactivate the plugin in the Settings menu. Then, do a soft reset, just to make sure that the system has stopped using it. Then you can copy and paste with any program that you like. I have found that using a PC (via ActiveSync) works best. Good luck!!
Thanks for the quick reply thunder.
Unfortunately, it did not work out. I deactivated TouchFlo already (and did the reset). And still it gives me the same error.
"Cannot copy HtcHomeSettings. Make sure your device has sufficient memory, that the file is not set as read-only, and that you have permission to copy this file type"
This time I simply used Active sync as you told me.
Again, does it have something to do with the fact that this file is hardcoded on the rom?
rubain013 said:
Thanks for the quick reply thunder.
Unfortunately, it did not work out. I deactivated TouchFlo already (and did the reset). And still it gives me the same error.
"Cannot copy HtcHomeSettings. Make sure your device has sufficient memory, that the file is not set as read-only, and that you have permission to copy this file type"
This time I simply used Active sync as you told me.
Again, does it have something to do with the fact that this file is hardcoded on the rom?
Click to expand...
Click to collapse
Unfortunately, if it is built into the rom, you will probably have a hard time copying over it. Have you tried to edit the file directly on the phone? I believe that there are a few xml editors for ppc floating out there, you could try that. Also, is there anything in particular that you want to do that requires you to modify the xml? Reason I am asking is because you could use M2D Customizer if you are only looking into modifying some settings. Hope this helps...
Allright, found out how to overwrite it!
Made a .m2dct file containing my preferred theme and settings, then i edited the included HtcHomeSettings.xml file.
Then i used the M2D customizer to load the .2mdct file, and that worked perfectly.
Thanks for the hint, Thunder!

APK Batch Rename Tool (for Windows and Linux)

Hi guys!
This is a quick tool I jotted together for myself in the past couple days and found it very useful. So I decided to clean it up and share it. Hope you will like it! Do comment and ask!
APK Batch Rename Tool
* for Windows and Linux for now.
APK Batch Rename Tool recursively crawls input folder and all of its subfolders looking for Android Package files (.apk's). It reads Label and Version info from apk's found and creates a copy for each apk under the output folder but using the Label and Version info acquired.
For example a com.example.hw.apk will make Hello World! 1.21.apk provided that the label inside the package was set to Hello World! and version is 1.21.
The old and the new apk files are 100% the same in terms of content and are unchanged. Only the new copies are given new filenames. Input files are left completely intact.
Why?
Have you ever wondered what are your 1500+ apk files with wierd names nested to different wierd folders on your harddrive? Have you ever wanted to find an app but you were unable to because it had some undescriptive javaish name that made no sense reflected no version and your apps were swept across a hundred junk folders anyway? Then APK Batch Rename is the tool for you! And me!
APK Batch Rename will set a human readable name for all your Android apps, and drop such a copy into a folder. You will finally be able to browse them, sort them alphabetically and be able to pick from versions available.
How?
1. Copy all your apk files (or folders with apk files in them) into the input folder. You may copy folders of any depth. APK Batch Rename Tool will recurse all subfolders of the input folder anyway.
2. Hit or click ApkBatchRename.bat . (For Linux users it's: apkbatchrename, or on a terminal enter: ./apkbatchrename ) Wait until it finishes the job.
3. Find your freshly named files in the output folder.
Simple as that!
Have fun! & Comment!
phsorx
great work, just like reading mp3 tag then rename to "song - artist.mp3"
thanks!
Cool. I use to do it manually. Time saver app.
Thanks.
This is awesome! Thank you very much, situation you described in first post is just like mine, I find your tool very useful!
Folks,
Let me join you crediting phsorx's job, that app is just great!
Thanks and congrats!
Very cool, Works well. Always wanted to do this but was too lazy to try aapt.
I just checked:
aapt said:
badging Print the label and icon for the app declared in APK.
Click to expand...
Click to collapse
Code:
> aapt d badging Talk.apk
[B]package: name='com.google.android.talk' [/B]versionCode='130' [B]versionName[/B]='1.3'
sdkVersion:'8'
targetSdkVersion:'8'
uses-permission: **truncated***
application: [B]label='Talk'[/B] icon='res/drawable-hdpi/ic_launcher_google_talk.png'
uses-feature:'android.hardware.touchscreen'
main
other-activities
search
other-receivers
supports-screens: 'small' 'normal' 'large'
locales: '--_--' 'es' 'es_US'
densities: '160' '240'
I'll definitely use your script but with a small change to show the package name as well as its valuable for when you need to uninstall the package.
i.e label_packagename(version).apk -> Talk_com.google.android.talk(1.3).apk
Attached a slightly modified batch file and screenshot
For single file one-off renames (right-click->open with->rename single) you can use the script here.
De jo! Honfitars. Hajra Magyarok!
Customizable naming planned in future version
britoso said:
Very cool, Works well. Always wanted to do this but was too lazy to try appt.
i.e label_packagename(version).apk -> Talk_com.google.android.talk(1.3).apk
Click to expand...
Click to collapse
Hi Britoso,
Yeah! That's a neat way to do it too!
Eventually I want to make naming and spacing fully customizable! Including what attributes to pick (name, label, versionName) to constitute the filename, and what separators (_,-,(,),space) should go where.
In the howto.txt I have a little road-map for the project. Will add customizable naming too.
Will keep you guys posted.
EOF
phsorx
Ps: Anyone who has another naming suggestion drop a post! I'd be interested.
great job...bravo..
thanks
Very nice tool, thanks for sharing this .
Using it with britoso's edited script.
Edit: I would appreciate it if a log of the conversion would be saved in a \logs\ subfolder, so I can check which files were not converted properly and see if I have to do those manually.
Handy ! Thanks...
deleted
For one-off renames you can use the below batch file.
1) create the below batch file in the same folder as apkrename.bat (its attached too)
Name: rename-single.bat (change this if you want)
content:
Code:
cd "C:\change_me\ApkRename\"
apkrename.bat %1 %~dp1
Change the path(change_me) as needed.
2)Associate it with apks by right clicking on the apk and choosing "choose default program", browse and select the batch file "rename-single.bat".
Uncheck "make this the default operation"
Screenshot and batch file attached. Enjoy.
update:
-12/8 uploaded a new version that fixed a bug involving long path names with spaces.
Also added a check for success and then delete the original apk. (backup your apks just in case).
Remember to set the path to the ApkRename folder in rename_single.bat once before using it.
Really gd job )
APK Batch Rename Tool for Linux is on the way
luvgirl12345 said:
would like a linux version...
Click to expand...
Click to collapse
Hi luvgirl12345,
The Linux port is on the way & will be posted here soon!
Actually, the Windows release is running on win32 ports of a few common Linux tools. And that's so, because I am lazy. Having Linux's much better support for shell scripting plus the same tool set always at hand, porting is a breeze.
Ciao,
phsorx
Sounds very useful, thank you!
Looks nice for massive apk renaming.
Found a similar tool called APKInfo some month ago which i am using for single apk files for a while now.
But finally something for batch renaming.
Thanks
your the man!, works like a charm. Thanks!
Any plans for making an Android version of this to run on our devices?
Future plans for an on-phone version of the APK Rename Tool
del4 said:
Any plans for making an Android version of this to run on our devices?
Click to expand...
Click to collapse
Yes! Certainly. Its in the plans.
But firstly there are a few things to be fixed on the desktop version first. See road map section of the howto.txt file in the archive. The most burning issue is the so called overwrite issue that I want to be sorted out next. Say you have two copies of the same app (same name, label, versionName) but one of them has a patch against it (because its been modded by a reverser) than one of the copies will overwrite the other (ApkRename 1.10).
Secondly on a mobile device's SD card there is usually less space than on a desktop's hard drive. This implies that APK Renamer will actually have to rename the files in place instead of creating a copy of each in a separate folder. Or at least it will need to figure out the empty space left on the device, and if its not enough to hold the copies, it should offer in-place renaming instead. Not a lot of logic to add but still...
Having all the outstanding questions be figured out on the desktop still, will allow me to implement a more established version for the phone right from start. But hold still its not going to take very long
Bests,
phsorx

Disable smileys/emoticons on HTC One X?

Okay, well today, I picked up a new HTC One X. First impressions were pretty good, and I have to say that as of yet, it's looking like it's a pretty good handset.
However; there's one thing about it that really bugs me. SMS messages apparently force you to use these utterly horrific smileys. I was never a fan of the old android icons that occasionally popped up, but these icons are just plain god-awful. Is there any way of disabling them?
(To be honest, I'd much prefer just to have your standard ASCII faces... Not to mention, if you happen to need to send a message that just happens to have the characters in that order, I'd rather not have badly made face icons appearing in the middle of it..)
bump. I can't believe htc require you to install a 3rd-party sms app in order to be able to get rid of emoticons. I'm a 40-yr old man, I don't want to see a crappy cartoon face in my text messages...
thanks for this nice q
3lliot said:
bump. I can't believe htc require you to install a 3rd-party sms app in order to be able to get rid of emoticons. I'm a 40-yr old man, I don't want to see a crappy cartoon face in my text messages...
Click to expand...
Click to collapse
My thoughts exactly... Not to mention, they're so badly designed that I spend more time working out what emotion they're actually supposed to convey, rather than reading the actual message...
Seems slightly out of place, too. The rest of the UI is nice and clean, fairly sleek looking - then you have these ridiculous cartoon faces slapped accross all of your texts..
I'm going to go ahead and bring this thread back from the dead.
Last time I tired to fix this by modifying my framework files and ended up soft-bricking my phone.
There's got to be a better way.
bump?
Untested Solution
EDIT: I looked more into it, and it gets pretty complicated. According to a StackExchange post I found (link in the attached .txt file), you can go through a process to retrieve the source code from the original .apk file BUT it requires the classes.dex file to be intact. That means you have to de-odex the Message+Nonprime.odex file, "re-dex" it into classes.dex, and add it to the Message+Nonprime.apk archive (can simply change the extension to .zip and add the file before continuing the linked steps).
After following all of those steps, I ended up with the source code and readable XML files. Unfortunately, trying to open them in Eclipse does not work, as I'm apparently missing key HTC resources (or I just don't know where the resources files should be pointing). I was hoping for the ability to just change the name across any necessary files, then repackage, but it doesn't seem to work like this.
I've also tried taking the original APK, adding the .dex file (created from the .odex -> files/folders -> dex process) inside, and signing the package (after deleting the META-INF folder containing HTC's signed information). I was hoping that signing the package after renaming it to Message2.0.apk would allow me to install it as a user application (I don't have root or the ability to change the bootloader to overwrite system applications, due to the 4.2.2 update) but the install always fails since "the application is already installed." If I knew how to modify the files within classes.dex properly, I'm sure I could rename the entire package and create a "New" application, but for now I've hit a brick wall. Hopefully if anyone reads this they can build on my failed attempts.
======================================================
======================================================
I stumbled on this (admittedly old) thread, and I don't know if anyone cares, but I've figured out what seems to be key in disabling smiley images from appearing. Below is the information of the phone I'm working with:
Phone Model Number: HTC One X
Android Version: 4.2.2
HTC Sense Version: 5.0
Software number: 5.18.502.1
HTC SDK API level: 5.41
Android uses "SmileyParser" to watch for certain key combinations and replace them with preset images. The theory is that by changing the strings SmilelyParser checks, it won't ever find a match, and they won't be replaced.
I found the Message application under /system/app/Message+Nonprime.apk. HTC's Message application utilizes Android's android.com.mms but has custom functionality/themes (I'm assuming)
Using ADB (Android SDK tool to browse filestructure), I used "adb pull [source] [local]" to copy the .apk and .odex files
I used "smali-#-#-#.jar" and "baksmali-#-#-#.jar" to convert the .odex file
The output of the tool gives a file structure with editable files. I navigated to com/android/mms/util/
In this folder, there are two key files: SmileyParser.smali, and SmileyParserOne.smali. I believe the "One" version may be modified to work with HTC One phones, but I'm not 100% sure (content looks similar)
I opened each file with Notepad++ and found "const string" references with the text version of an emoticon. The code seems to match those with "aput objects" but I don't know 100%
I modified each string (within the quotes) by just adding an 'x' to hopefully thwart the string match. Basically, the phone should wait until x or x is fully matched before replacing the smiley
I'll note again, I did the EXACT same process in both .smali files I mentioned, and I touched ABSOLUTELY NOTHING ELSE. There's no telling what you'll break if those don't compile correctly (which is why I also avoided adding a longer string, in case memory allocation issues cropped up)
I then repackaged the entire output I created into a new .odex file
Now, here's where things get tricky. I don't have a rooted phone, so I can't actually replace the .odex inside of the /system/app folder. I may work on testing on my phone (but I don't get a lot of time and really would not like to brick it), but I'm worried since I'm running a very recently updated Sense version (and there may not be reliable root processes, I have no idea).
If anyone has a rooted HTC One X (check above for the exact software version I have) that would like to try out the modified .odex file (apk is mostly UI/theme, .odex contains the actual programming logic) I am providing the .zip containing the apk and odex files. I've also tried installing the apk+odex with "adb install X/X.apk" but the application has a name buried in the structure (probably everywhere) and I have no idea how to rename it everywhere that's required.
If someone knows how to take a package and re-compile it with a new name, I could potentially re-install "Message 2.0" as a user app without any root privileges required. That's another option I'm looking into (since I'd really rather not root and potentially lose my stored data).
The same problem is still occurring in 2018. I would try your solution, but it's outdated. I'll have to dive in and edit the files myself if a solution isn't found. Although, in that case, I would probably match something further from the x, preferably with 2 bytes because as you said, memory issues might pop up and I'm not sure just how far they went with this.

Categories

Resources