How can I replace standard applications? - G1 Android Development

I am working on a modification of JF 1.5.
Is there a way within I can replace standardapplications like moving contacts to acontacts or something like this?

Just delete whatever you don't want from /system/app Make sure what you're deleting isn't critical for the phone to operate though. (e.g. pbb dont want to delete Settings). Also, you'll need to resign the zip after you're done.

...and just rename the "new" apk to oldname.apk?

Related

[Q] free space question?

Why is that if I install an application, but then decided I do not like it a small portion of my space is gone even after the uninstall and a run through with a registry clean-up software. Any way to get this fixed?
Well the best way to get this done would be to use an application that thoroughly cleans out all traces of any installed application from your device. Shortcuts, folders, customizations, Registry entries, skins, upgrades etc. Most uninstallers aren't able to get all that done. I use SK Tools and it works pretty effectively. Gives me all my space back
the main problem is that it doesn't delete some of the files from the /windows folder.
registry keys aren't space consuming (relatively speaking of course).
usually uninstalling an application DOES delete the created folder from /program files/ or wherever.. unless you've put your own files inside the folder and then you need to delete them, and the folder, by yourself.
yeah i deleted the files there too and even used sktools and such but the more space than before is taken.
well, some files are replaced in the windows folder which are necessary to other applications. since the uninstallation of an app can't bring back the old files, it won't delete the necessary files and if they're larger than the old ones.. it'll take some space.
so i guess there is nothing I could do then?
bugtoday said:
so i guess there is nothing I could do then?
Click to expand...
Click to collapse
Well! you could do it the hard way. Hard reset the device which will wipe out everything you loaded and install by hand (i.e. not restore from a backup) all the applications you like and want one by one. Obviously not something one would want to do after every trial install and de-install. But after some number of different apps have been tried out and rejected perhaps it is worth the pain.

Why aren't default apps replaceable?

As some of you know, I've been trying to replace the default apps with betters ones in the market.
There's chomp over messaging, steel over browser, etc.
The thing is though, I pushed all of those apks over the default apps with the same names as the default.
What happened then, the apps simply didn't exist anymore. Restarted the phone and browser, messaging, etc. Weren't listed anymore in the applications list. I had a couple shortcuts to them, but it says that this app isn't installed. These apps, some of them at least, are able to run independently of the default system apps.
Any thoughts on this, i'd like to get it done.
Did you delete both the .apk and the .odex before adding the replaced app's?
deleting the apk is unnecessary, since it overwrites the default apk with the new one.
the odex doesnt have to be deleted as with jf's modded browser. when he first made it, it could be pushed without deleting the odex and it would still function just fine.
ill just try removing both though when i get home. I'll post back.
I dont understand this either
I love to replace Phonebook, with the system log,dialer,favs,etc
there are more things than that one this is just the latest in a long line, android was supposed to be this framework that any system app could be easily replaced
bhang

Help required for Renaming Apps

I have an Unlocked Samsung Focus(thanks to windowsbreak). I have deployed HTC apps on my phone but currently these HTC apps are spread across since they start with different names
I wanted to know whether I can somehow rename all the HTC apps to start with HTC and then the app name so that all HTC apps will be grouped together
Example: Notes to renamed to HTC Notes, so it will appear along with HTC Hub itself.
Waiting to hear back from you guys
I suppose you could edit the individual xap manifest files but you might be better off just installing the folders application.
I didnt want to go the folder way since even if I go the folder way still in the main App Menu still the apps would be located at different locations. So just wanted to sort out the Apps.
Just trying to making the App Menu look good with everything arranged properly
MJCS said:
I suppose you could edit the individual xap manifest files but you might be better off just installing the folders application.
Click to expand...
Click to collapse
How do I go about changing the manifest files? I didnt find an entry for the name of the app in WMAppManifest.xml or AppManifest.xaml
EDIT: Got it. Edited the title in WMAppManifest.xml and it worked. Thanks
renaming apps and changing icons
try this new app called app swap to rename apps and change icons.

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.

|ROOT/ADB?| Fully stopping Instant Apps from installing ever again

Hey guys, this is my first thread, and I'm a bit confused on the app. Today I'll tell how did I stop the freaking google 'malware' from installing and updating every single day. This would work on any rooted device that has access to the data partition, maybe it could be reproduced via adb without root.
First off, I searched everywhere looking on how to disable, uninstall, break, or do anything to this forced battery hog. The best answers were using 'pm hide' on the package but this caused a very high battery usage, due to the file dependencies. So I searched where it was installed. Luckily enough, it is an user app, so it means I would find it on /data/app and /data/data. I will use solid explorer, but any file manager with root access and chmod to change permissions should do just fine.
Once we locate the folder (/data/app/com.google.android.instantapps.supervisor-1 in my case) we delete it. Utterly. After that, we will create a file, and name it exactly the same as the folder did. This is a dummy file that the system will believe it is a folder, and will try to install the application inside it. We fill that file with enough random characters for making the system think it can't just delete it (sometimes cleaners point empty files as worthless and wipe them out)
Now we need to make the dummy file unremovable for anyone but us, by using chmod. Solid explorer has a nice interface for that. We long press the file, enter to properties and set the permission to 0 0 0 (attributes tab). This makes play store unable to delete the file to recover the old folder, and when it tries to download the package, it will fail because it won't have a respective folder to be sent to.
After this, we reboot the phone and see that google play services for instant apps has lost roughly 90% of it's size, and when we enter settings>google>google play instant it'll ask for installation. I was bold enough to accept, just for getting an error dialogue when it tried to install itself.
Known issue: The app reinstalls once again after reboot. The cause is that, when android can't install the app in the first folder (the one that ends with a -1), it can create a second one (ending with a -2 instead), like an alternative. This is solved by just doing the same procedure above on the second folder, and you will end up having two dummy files instead of one. A third folder cannot show up, or at least it didn't in my phone.
Notes: You can repeat this with the folder in /data/data and any other data partition level instant app folder, but I wouldn't do it because I already broke all functionality since I deleted the base apk, and the app size is less than 300KB now so I don't think the trouble is worth it.
You must whitelist these files from any memory cleaner, i.e SD maid corpse finder will delete it thinking it's a leftover of an old app
WARNING; I'M NOT RESPONSIBLE FOR ANY MISLEADS, WRONGS, OR PLUTONIUM-UNSTABLE ROMS THAT MAY EXPLODE IN ANY WAY. YOU ARE THE RESPONSIBLE FOR YOUR DEVICE'S SAFETY AS THIS ISN'T EVEN FULLY TESTED IN MY PHONE AND I DON'T KNOW THE ULTIMATE CONSEQUENCES OF DOING THIS. YOU ARE WARNED.
PD: Please make some suggestions about how I made the thread, I did what I think it's my best

Categories

Resources