Installing APKs and Odex files - myTouch 3G, Magic Android Development

A friendly forum member provided me with some files to install for applications included in most roms available... voicedialer and footprints.
I succesfully installed VoiceDialer.apk by following these commands..
1. adb push VoiceDialer.apk /data/local/tmp
2. adb shell pm install /data/local/tmp/VoiceDialer.apk
3. adb shell rm /data/local/tmp/VoiceDialer.apk
Tried it right away, and it indeed worked. I usually just install apps from the downloaded file manager but figured I'd expand my horizons and try it this way. I don't recognize this way of doing it, I thought it was basically adb push /system/apps_s (or something like that), but this is all I could find quickly on how to do it.
None the less, I tried the same thing with Footprints, and was given this error via adb..
"Failure [INSTALL_FAILED_DEXOPT]"
Google result..
"Installation return code: this is passed to the IPackageInstallObserver by installPackage(android.net.Uri, IPackageInstallObserver, int) if the new package failed while optimizing and validating its dex files, either because there was not enough storage or the validation failed."
All chinese to me
So I tried installing Footprints via linda file manager.. and get the genreal "footprints could not be installed on this phone"
I also have .odex files for both the footprints app, and the footprints widget app.. i don't know if odex files are necessary though, as the system might create them on their own
Can anyone help me with how to install Footprints? I Don't understand why Voice Dialer installed but Footprints is no go..
Thank you.
edit: forgot to mention.. voicedialer does not seem to work quite right. I tell it exactly what to do.. "call joe blow on mobile" and it still pops open an option screen for joe blow, and if i click on one of the options it force closes. But saying "open calendar" seems to work. Just not phone numbers i guess?

Any ideas anyone?

Try
adb remount
adb push Footprints.apk /system/app/Footprints.apk
adb push Footprints.odex /system/app/Footprints.odex

What'st he difference between system/app and system/app_s? Is app_s just a different link to the app directory or is it something different?

giberish
isnt footprints a thing from hero? it might be the fact you are using a non hero rom? alot of hero apps seem to be closely tied in with hero overlay making it unusable for a non hero rom. which rom are you using?

redmdc said:
isnt footprints a thing from hero? it might be the fact you are using a non hero rom? alot of hero apps seem to be closely tied in with hero overlay making it unusable for a non hero rom. which rom are you using?
Click to expand...
Click to collapse
Yes forgot to mention.. I am using a hero rom.. jacxheroski 1.4 32a with new kernel

bonesy said:
Try
adb remount
adb push Footprints.apk /system/app/Footprints.apk
adb push Footprints.odex /system/app/Footprints.odex
Click to expand...
Click to collapse
This worked, thanks. Pushing to app_s seems to cause error, no errors with doing it this way.

Can you tell me if your phone started crashing when doing this??

If you miss the framework, then yes it will crash.

bunny0007 said:
If you miss the framework, then yes it will crash.
Click to expand...
Click to collapse
what's the framework? Pardon for my noobness. =p

briggs81 said:
What'st he difference between system/app and system/app_s? Is app_s just a different link to the app directory or is it something different?
Click to expand...
Click to collapse
Hey glad it worked, just for future purposes....theres no such thing as /system/app_s/....it doesnt exist....its either :
/system/app/
or
/data/app_s/

i accidently deleated com.htcworld clock. I have both the apk and odex files but have no idea how to get them back on my phone. i dont have any of the sdk files from when i rooted either. anyone know how to get that file back on my phone?

Related

Replace default applications?

I was wondering if its possible to replace the default applications?
Specifically, I'd like to replace the built-in "Alarm clock" app with Koush's excellent "Klaxon" app.
Anybody know how to do this? Can it be done with ADB push/pull?
I'm running JF's rooted RC30, 1.2, with the engineering booloader.
cheers, and happy new year!
-- michael
adb remount
adb shell rm /system/app/AlarmClock.apk
adb shell rm /system/app/AlarmClock.odex
adb push Klaxon.apk /system/app
That's one way to do it. Klaxon will then survive hard resets.
The recommended way to do it is to extract the system directory to your computer. Change the files around in the same manner as above, and use "mkyaffs2image -f directory image" to create a new image. Then use fastboot to flash that image. That's a bit more complicated though.
Koush said:
adb remount
adb shell rm /system/app/AlarmClock.apk
adb shell rm /system/app/AlarmClock.odex
adb push Klaxon.apk /system/app
That's one way to do it. Klaxon will then survive hard resets.
The recommended way to do it is to extract the system directory to your computer. Change the files around in the same manner as above, and use "mkyaffs2image -f directory image" to create a new image. Then use fastboot to flash that image. That's a bit more complicated though.
Click to expand...
Click to collapse
koush, thats a good idea! i want to try that. hey question, did you get the wireless in cupcake to work?
korndub said:
koush, thats a good idea! i want to try that. hey question, did you get the wireless in cupcake to work?
Click to expand...
Click to collapse
Nah, I didn't play around with it for that long.
Koush said:
Nah, I didn't play around with it for that long.
Click to expand...
Click to collapse
me either. too bad that its not complete. would be nice to have the native keyboard...
Koush said:
adb remount
adb shell rm /system/app/AlarmClock.apk
adb shell rm /system/app/AlarmClock.odex
adb push Klaxon.apk /system/app
That's one way to do it. Klaxon will then survive hard resets.
The recommended way to do it is to extract the system directory to your computer. Change the files around in the same manner as above, and use "mkyaffs2image -f directory image" to create a new image. Then use fastboot to flash that image. That's a bit more complicated though.
Click to expand...
Click to collapse
Would it be possible to do this all through cygwin, or would I need a full linux VM?
s0niqu3 said:
Would it be possible to do this all through cygwin, or would I need a full linux VM?
Click to expand...
Click to collapse
Those commands would work in Windows or Linux.
Koush said:
Those commands would work in Windows or Linux.
Click to expand...
Click to collapse
Hi,
I know the adb commands will work, I apologize for not being more specific, I was wondering if it would be possible to extract the system image, and build a new one without a linux vm.
s0niqu3 said:
Hi,
I know the adb commands will work, I apologize for not being more specific, I was wondering if it would be possible to extract the system image, and build a new one without a linux vm.
Click to expand...
Click to collapse
Yes, the mkyaffs2image tool is available as a Windows binary. I've seen it floating around this forum somewhere. Or you can ask JesusFreke to build you the executable; he has Cygwin set up properly.
Ok, time for another question that's semi-related.
Can anyone think of any reason why removing the "email" program can't be removed?
I only use the gmail app, and can't foresee needing the regular email app as gmail can check any other accounts I ever setup.
I tried push some app to system/app and I find that all app add to system/app will be alway active (as running app or service)
s0niqu3 said:
Ok, time for another question that's semi-related.
Can anyone think of any reason why removing the "email" program can't be removed?
I only use the gmail app, and can't foresee needing the regular email app as gmail can check any other accounts I ever setup.
Click to expand...
Click to collapse
I second the question. I'd like to remove the stock Email and replace it with K-9.
danguyf said:
I second the question. I'd like to remove the stock Email and replace it with K-9.
Click to expand...
Click to collapse
So far I have removed:
Alarm Clock
Voice Dialer
Email
IM
Talk
com.amazon.mp3
Sound Recorder
Camera
The stock Browser with the auto-rotating one
Stay away from sync/service packages (Im*, calendar, gmail, gtalkservices, etc) as you will find yourself with some interesting errors and malfunctioning apps. Leave MyFaves be as well (documented elsewhere in the forum); if you want it gone, install ADP1.

How to Change Music Widget in any Cupcake Build

Always perform a nandroid backup before attempting any mods.
This is a tutorial on how to change the music widget to the one of your liking. It doesn't matter if you have the Dude build and want the G build widget or have the G build and want the 1.5Hr1 widget. This will work for any cupcake (Android 1.5) user who is not happy with their current music widget. I use a windows PC and I am not a Linux guru so I'm not going to attempt to tweak my tutorial for Linux users. Hopefully it's not to hard for them to figure it out from this. (I think it's just file path differences, maybe?)
First step is to have ADB commands working on your computer. Follow this link if you don't know how to do this.
http://forum.xda-developers.com/showthread.php?t=502010
Now that you have ADB, you have to download the appropriate music player/widget that you prefer.
This one is for installing the dark blue music widget with the off-center play/pause button and the transparent record and needle logo. My personal favorite for looks, but has a play/pause with a easy to miss touch area.
http://rapidshare.com/files/227653807/Music_fancy_widget_G_build.apk
This one is for installing the plain white and pale blue music widget with rectangular shape and the large play/pause button with it's large touch area.
http://rapidshare.com/files/227653907/Music_standard_build.apk
This third option is for future development. You can "harvest" a third music widget/player from a third source that doesn't yet exist using the ADB pull command. Lets say your using build X, but build Y has a theme available and you love the themed music widget on themed build Y. What you do is perform a nandroid backup of your current build so you can return to it later and install build Y and then theme it. (Don't waist your time setting up your settings because you won't be on this build for long. Just make sure USB debugging is enabled in settings > Applications > Development so you can use ADB.) You can skip this step if you have access to a friends phone who's already running the music player/widget you want. Connect the USB cable to the phone and go into where you run your ADB commands in Command Prompt on your PC. Type in this command.
adb pull system/app/Music.apk c:\your_path_here
Click to expand...
Click to collapse
The "system/app/Music.apk" part of the command is case sensitive. This will create the Music.apk with the widget you want at the path you specify. Next you can use Fastboot to restore your nandroid backup of build X. (Nandroid saves everything. It's as if you never left.)
Next step is to rename the downloaded file "Music.apk". It's case sensitive and take note of the folder path it's in.
Next, enter the following ADB commands from the appropriate place in Command Prompt. (Start > Run > type "cmd")
adb remount
adb shell rm -r system/app/Music.apk
adb push c:\your_path_here\Music.apk system/app
Click to expand...
Click to collapse
"system/app/Music.apk" and "system/app" parts are both case sensitive.
saying no such directory, would apps to sd card cause that, and ifso what would i instead need to put in?
i never knew there was a difference between the music widgets...
whats different about them?
the gui??
pgiuoco said:
saying no such directory, would apps to sd card cause that, and ifso what would i instead need to put in?
Click to expand...
Click to collapse
On the last step, adb push, dont just put your directory, put in the file name also, Music.apk. For example, i put the file on my C directory to make it easy, so I typed "adb push c:\Music.apk system/app" without the "".
FYI - I have Apps2SD and I used the above command. Guess that doesn't make a difference, assuming because the symlinks say so? I'm such a Linux noob!!!!
bigballa said:
i never knew there was a difference between the music widgets...
whats different about them?
the gui??
Click to expand...
Click to collapse
Yes, different looking gui, the Dark Blue is very nice!
P.S. Nice write up!
setzer715 said:
On the last step, adb push, dont just put your directory, put in the file name also, Music.apk. For example, i put the file on my C directory to make it easy, so I typed "adb push c:\Music.apk system/app" without the "".
Click to expand...
Click to collapse
Wow, that was a BIG OOPS! Thanks for catching that. I fixed the original post.
Has anyone found a way to do this via Terminal Emulator? I'm at work so I wanna do this now instead of waiting till I get home.
djdeviance said:
Has anyone found a way to do this via Terminal Emulator? I'm at work so I wanna do this now instead of waiting till I get home.
Click to expand...
Click to collapse
I'm not a frequent Linux user, but I know a couple of commands. You could download the apk file to your sdcard and try this. This method is not recommended!
su
rm -r system/app/Music.apk
Click to expand...
Click to collapse
This will delete your old music player. Next, you can just install the new music player apk through Apps Installer or whatever you use in it's place. This will allow you to use the new music player as if it was any other 3rd party app. However, I recommend uninstalling it and doing it through the ADB push when you get home.
yeah the app installer method didn't work for me
pgiuoco said:
yeah the app installer method didn't work for me
Click to expand...
Click to collapse
Did you delete the original Music.apk first? Do you have cupcake, or are you using JF RC33 like it says in your sig? This music player has a widget embedded and needs cupcake. If neither of these is the problem, then just use the adb push commands in the first post. I don't recommend using apk installer. I just posted that to help out someone who was too impatient to get home to his pc.
testing567 said:
Did you delete the original Music.apk first? Do you have cupcake, or are you using JF RC33 like it says in your sig? This music player has a widget embedded and needs cupcake. If neither of these is the problem, then just use the adb push commands in the first post. I don't recommend using apk installer. I just posted that to help out someone who was too impatient to get home to his pc.
Click to expand...
Click to collapse
Haha ended up doing it at home anyways. =D Yeah i was kinda doing nothing at work. So as usual I started fidgeting with my phone.
the steps given in the first post work perfectly...!!!
i am on ADP1.5H A2SD...Gud Work...THNX..!!
If someone could post screenshots of the different UIs, that'd be great.
For some reason, when I pushed the Music.apk it worked fine, but when I tried to do the same thing with the CalendarProvider.apk, it didn't....
This method works for me as well. How do you take screenshots with the new builds?
CalendarProvider.apk... Just do a normal .apk installation.
Does this only work for Rooted phones as when I try it I get permission denied
Code:
C:\android\tools>adb shell rm -r system/app/Music.apk
rm failed for system/app/Music.apk, Read-only file system
C:\android\tools>adb shell
$ su
su
su: permission denied
$
jayaustn said:
If someone could post screenshots of the different UIs, that'd be great.
Click to expand...
Click to collapse
i second this idea
moosefist said:
i second this idea
Click to expand...
Click to collapse
I third it
music.apk
can someone post some different download links for the two different music.apk builds? rapidshare has always hated me and will still not let me download either of them saying that my ip address is already downloading something. thanks.
Can someone post pics of all the music widgets in order to compare them?

2.1 HTC.IME stock keyboard

Does anyone have a link to this if there is one floating around I cant seem to find it. Any help would be great I cant stand the lag in the xda mod kb
here you go. I also like the stock keyboard better. View attachment HTC_IME.apk
Stock HTC Keyboard
Here you go.
EDIT: Someone beat me to it.
Thanks guys
Thank you very much!
alexthearmo said:
here you go. I also like the stock keyboard better. View attachment 322118
Click to expand...
Click to collapse
This is also the mod!
I tried to install this onto my phone by opening it with the File Explorer, but it won't install... what am I doing wrong?
The stock HTC one must not be an installable apk. You probably need to adb push to /system/app
c00ller said:
The stock HTC one must not be an installable apk. You probably need to adb push to /system/app
Click to expand...
Click to collapse
I was afraid that would be the case. In fact, I never really became familiar with how to "adb push" apps and was never able to really find clear instructions. Is it just an alternative method of installing apps? Can they be removed by settings > applications > manage applications > uninstall?
dvdqnoc said:
I was afraid that would be the case. In fact, I never really became familiar with how to "adb push" apps and was never able to really find clear instructions. Is it just an alternative method of installing apps? Can they be removed by settings > applications > manage applications > uninstall?
Click to expand...
Click to collapse
adb push is just a way to literally shove files onto your phone. Think of it as just copy from your desktop to paste into internal memory, no interface involved. I guess that's why it's called "push," there are no questions asked, the job is done instantly.
To do it, first place the apk file in your sdk tools folder. Make sure USB debugging is on (Settings > Applications > Development) and connect phone to PC
1) Start > Run > cmd
2) In the terminal type "adb devices"
3) You should see your device serial no listed there. If not, don't proceed.
4) Type "adb remount". It should say remount succeeded
5) Type "adb push HTC_IME.apk /system/app" (capitalization matters, I believe)
That should be it. If you don't see the new keyboard in Location and text settings, just restart your phone and it should be there.
And as these are system files, they can't be uninstalled the way you mentioned. But removing them is very simple. Repeat steps 1-4 above, but then to remove a file type "adb shell rm /system/app/xxxx.apk" where xxxx.apk is whaver apk you want to remove. This is how you remove stock programs like Sprint Nascar, Stocks, and all that other junk.
I used eoe appinstaller no problem. Did you unzip the file? You gave to install the clucker apk and thw keyboard. The black mod is good!!
Sent from my HERO200 using XDA App
Edit: Wrong forum...

Rooted, trying to reinstall deleted Stock.apk

I had a questions about restoring the deleted Stocks app. I rooted with the new unrevoked last night and then installed Titanium to remove apps. I prematurely removed the Stocks app and I have been trying to get it back since.
I've tried multiple routes, from this Wildefire thread http://forum.xda-developers.com/showthread.php?t=738147 I tried the apk via adb and Root Explorer. Neither worked.
Then I downloaded the stock odexed EVO rom from this thread http://forum.xda-developers.com/showthread.php?t=874251, grabbd the stock.apk and moved it to my \system\apps folder with Root Explorer. I've restarted, tried clearing the Dalvik Cache, pushing it via adb, none have worked.
Right now it's still sitting in the \system\app folder.
I wanted to see if there was anything else I can try to get it back? Or am I doing something wrong?
Thanks in advance.
I take it you are running stock Rom. I think the best way is to make a nandroid of the stock Rom that you are running, with ClockworkMod. Once done download Myn's Rom or sprint lovers. Both of this Rom's have the stock Sprint apps. When flashing the Roms, please, make sure to use Rom Manager and flash ClockworkMod, than flash Amo-ra; is located at the buttom as an alternate recovery. Than once you flash the Rom, let it load, than flash clockworkMod again, than go into recovery, than restore,advance restore, select the newest nandroid, and just restore data. This will give you all the stock apps. OR just try this.
http://forum.xda-developers.com/showthread.php?t=832388
Here are some more apk's.
http://forum.xda-developers.com/showthread.php?t=901393
grab the apk out of the stock rom you have, then in adb do this
adb remount
adb push Stock.apk /system/app
if you need to push the odex do this also
adb push Stock.odex /system/app
the important thing is the remount to make the system/app read write
you can go to the rom file open the file then open system then open app and add the apk you want and reload the rom into the phone that sit more simple
ifly4vamerica said:
grab the apk out of the stock rom you have, then in adb do this
adb remount
adb push Stock.apk /system/app
if you need to push the odex do this also
adb push Stock.odex /system/app
the important thing is the remount to make the system/app read write
Click to expand...
Click to collapse
I did the above while booted in recovery mode with the system mounted. It successfully went in the system/app folder. I see it in Root Explorer, although it still doesn't show up in the apps menu. Oh well.
baker2gs said:
I did the above while booted in recovery mode with the system mounted. It successfully went in the system/app folder. I see it in Root Explorer, although it still doesn't show up in the apps menu. Oh well.
Click to expand...
Click to collapse
Yeah it doesn't work right if you are in recovery because it messes with permissions I heard. Just do it with phone plugged in to computer and on. If that doesn't work you can try deleting the apk and then using
Adb remount
Adb install stock.apk
Don't know if these will work but worth a try. Last resort is find a flashable zip that writes something to system/app and drop the apk in there.
Evo Sent
ifly4vamerica said:
Yeah it doesn't work right if you are in recovery because it messes with permissions I heard. Just do it with phone plugged in to computer and on. If that doesn't work you can try deleting the apk and then using
Adb remount
Adb install stock.apk
Don't know if these will work but worth a try. Last resort is find a flashable zip that writes something to system/app and drop the apk in there.
Evo Sent
Click to expand...
Click to collapse
When I run that command with the phone on charge mode with debugging on plugged into the computer I get a "remount failed: Operation not permitted".
I installed the Sync drivers and tried it with that but it didn't work either.
Any suggestions? Thanks for your help by the way.
baker2gs said:
When I run that command with the phone on charge mode with debugging on plugged into the computer I get a "remount failed: Operation not permitted".
I installed the Sync drivers and tried it with that but it didn't work either.
Any suggestions? Thanks for your help by the way.
Click to expand...
Click to collapse
I can't help with that, never ran in to that problem before, are you nand unlocked and s-off?
ifly4vamerica said:
I can't help with that, never ran in to that problem before, are you nand unlocked and s-off?
Click to expand...
Click to collapse
Yes to both, I have been trying to do research on it. It may be the stock rom...
I tried some workarounds but they didn't work. Thanks for your help.
baker2gs said:
Yes to both, I have been trying to do research on it. It may be the stock rom...
I tried some workarounds but they didn't work. Thanks for your help.
Click to expand...
Click to collapse
No problem, sorry I couldn't help.
Evo Sent
Just an update, I tried the .zip route you suggested. I created a Titanium back up and threw the Stock.apk in the zip. I ran the update.zip in recovery. It placed Stock.apk in the system/app folder but the app still does not appear in the apps menu. Thanks again.

black gtalk

hello, I'm using this forum for some time, I even rooted my htc desire with instructions on this forum, so I'm very grateful for all...
I have CM7, on my htc desire, and a little problem! I hope you can help me!
I tryed to install black gtalk, and I uninstalled ordinary gtalk, without backup(yea,I know..)... Now I get only FC (process com.google.android.talk)
I tryed fixing this using:
1. root explorer (puting talk--taken from this forum,from several places into system/app from data/app, even tryed to fix permissions to rw-r--r-- and then put it to system/app)
2. terminal emulator (fix_permissions)
3. titanium backup (tryed to uninstall talk, reboot, and install...)
4. manage app/all/talk--> clear data
in one moment when I FC google services framework Talk opened and started ...Singing in........and it never signed but it's a progress
I didn't try with adb push!
Can you explain how? And where my app should be (in what folder so I can push it...)
And can I flash ordinary .apk file (just put it in .rar or?)
Can someone write step-by-step what to do, maybe I didn't do something that's very important?
This is the link I tryed gtalk:
http://forum.xda-developers.com/showthread.php?t=1195982
Hope this isn't a hassle.... thanx in advance!
/system/app
munchy_cool said:
/system/app
Click to expand...
Click to collapse
have you read what I just wrote?
http://forum.xda-developers.com/showthread.php?t=1185421
THIS GUY is GENIUS!!!
has great app's, and simple instructions that worked!
rujelus22 I love you

Categories

Resources