Replace default applications? - G1 Android Development

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.

Related

Replace the AlarmClock?

I was just wondering if I could put Koushik's klaxon alarm clock app over the alarmclock app built into the phone?
If I could, would a simple adb push do the job?
<-- Linux Noob.
why not just use both? You can delete the alarm clock app as far as I know... just adb pull it for backup first.
It's a bit more reasonable to have one.
So I am going to adb pull the original alarm clock and push the better one. Hopefully it would work.
adb pull the original and then just delete it off the phone (adb shell rm /system/app/alarmclock.apk
then just use klaxon instead
Lets say I put klaxon in place of the standard alarm clock in the system/app folder & he releases an update, would downloading the update cause me to have to instances of klaxon on my phone? Or would the update overwrite the system/app version?
I assume 2 instances but if you just install his like normal you wouldn't have that problem.
neoobs said:
I assume 2 instances but if you just install his like normal you wouldn't have that problem.
Click to expand...
Click to collapse
Thats what I figured. I was just thinking if i put his in system/app, I wouldnt have to reinstall it if i have to do a wipe. And if its in there, it wouldnt take space from the rest of my apps correct?
negative to both questions
just because it is in system/app doesn't mean it will be there after a wipe... and it takes the same memory.
neoobs said:
negative to both questions
just because it is in system/app doesn't mean it will be there after a wipe... and it takes the same memory.
Click to expand...
Click to collapse
/system is not cleared if you do a data only wipe. However, if you do a update.zip or DREAIMG.nbh, you will lose your /system directory.
Koush said:
/system is not cleared if you do a data only wipe. However, if you do a update.zip or DREAIMG.nbh, you will lose your /system directory.
Click to expand...
Click to collapse
So if I do a factory reset, klaxon will survive the wipe?
Beast84 said:
So if I do a factory reset, klaxon will survive the wipe?
Click to expand...
Click to collapse
Correct, a factory reset does not wipe the /system partition.
Koush said:
Correct, a factory reset does not wipe the /system partition.
Click to expand...
Click to collapse
Sweet that was the main part I was looking at. I don't wanna have to reinstall it if I ever have to reset. Next question, what would the commands be to yank the original & put klaxon in its place?
adb shell rm /system/app/AlarmClock.apk
adb shell rm /system/app/AlarmClock.odex
adb push klaxon.apk /system/app/klaxon.apk
neoobs said:
adb shell rm /system/app/alarmclock.apk
adb push klaxon.apk /system/app/klaxon.apk
Click to expand...
Click to collapse
does the odex file have to be removed as well?
doesn't need to be but I guess since it isn't being used you can adb shell rm /system/app/AlarmClock.odex as well
neoobs said:
adb shell rm /system/app/alarmclock.apk
adb push klaxon.apk /system/app/klaxon.apk
Click to expand...
Click to collapse
For me alarmclock had to be AlarmClock.apk for it to work
Caps make a difference?
oops sorry yes it is case sensitive and since I didn't have my phone readily available I miss quoted... changing it now
If Koush updates Klaxon, would it still be updateable on the System partition?
neoobs said:
adb shell rm /system/app/AlarmClock.apk
adb shell rm /system/app/AlarmClock.odex
adb push klaxon.apk /system/app/klaxon.apk
Click to expand...
Click to collapse
This is done through the computer right? Does the Klaxon.apk have to be in the tools folder of the SDK? And speaking of case sensitive, would it be Klaxon.apk?
Off topic, just out of curiosity, what is an odex file? What are they used for?
yes on the computer, and klaxon would just be the name of the apk... I am not sure what it is named for you I just used it as an example.
You will also need the sdk to do this. There are instructions with the sdk that tell you about the adb
And it should but I am not sure. all new stuff but I assume it would update where the file is since that is where the system sees it.

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?

HTC Footprints In Espresso

question to those with a little more knowledge than I.
Running Kings Espresso 1.3 with 160mb swap (this motha flies off teh chain..had to treat myself for a first degree burn on my thumb) on my MT3G and i was wanting to add HTC Footprints back into the build. He had it in V0.1 and then removed it. How would I put it back into the build using adb? would i have to include the odex file along with the apks for footprints and the footprints widget?
just looking to learn a little more
i would say...adb push it? lol but i never use it or need it so i wouldnt know...
the1gladiator said:
question to those with a little more knowledge than I.
Running Kings Espresso 1.3 with 160mb swap (this motha flies off teh chain..had to treat myself for a first degree burn on my thumb) on my MT3G and i was wanting to add HTC Footprints back into the build. He had it in V0.1 and then removed it. How would I put it back into the build using adb? would i have to include the odex file along with the apks for footprints and the footprints widget?
just looking to learn a little more
Click to expand...
Click to collapse
Maybe ask in the appropriate thread instead of starting a new development thread for a question about a rom.
bkmo said:
Maybe ask in the appropriate thread instead of starting a new development thread for a question about a rom.
Click to expand...
Click to collapse
if you can't answer the question how about just remaining quiet?
the1gladiator said:
if you can't answer the question how about just remaining quiet?
Click to expand...
Click to collapse
I see what you did thar.
the1gladiator said:
if you can't answer the question how about just remaining quiet?
Click to expand...
Click to collapse
I believe you can take the apk for v0.1 and copy it into your tools folder open either cmd if on windows or terminal if on linux and for windows type adb install filename.apk and for linux ./adb install filename.apk
ps: forgot remember to cd to your tools folder in your sdk also I haven't done mac because I haven't used adb and mac XD However I bleieve mac and linux commands for adb may be similar or the same 0o
xillius200 said:
I believe you can take the apk for v0.1 and copy it into your tools folder open either cmd if on windows or terminal if on linux and for windows type adb install filename.apk and for linux ./adb install filename.apk
ps: forgot remember to cd to your tools folder in your sdk also I haven't done mac because I haven't used adb and mac XD
Click to expand...
Click to collapse
i thank you my friend. i think that would be it...i did adb push and just pushed it there and OOPSIE, it went bye bye so i had to reflash mi rom.
let me ask this, so my syntax would be....
adb remount
adb install filename.apk
is that it or do i need to give it a destination?
i'm just now relearning some of this stuff...i'm an older school programmer so i'm just now familiarizing myself with linux and source codes / packages for this type of development
the1gladiator said:
i thank you my friend. i think that would be it...i did adb push and just pushed it there and OOPSIE, it went bye bye so i had to reflash mi rom.
let me ask this, so my syntax would be....
adb remount
adb install filename.apk
is that it or do i need to give it a destination?
i'm just now relearning some of this stuff...i'm an older school programmer so i'm just now familiarizing myself with linux and source codes / packages for this type of development
Click to expand...
Click to collapse
Nope just adb install filename.apk you shouldn't even need to adb remount as it does not mess with /system files also you don't need to give it a directory
XD don't worry I understand you lol Im still learning
xillius200 said:
Nope just adb install filename.apk you shouldn't even need to adb remount as it does not mess with /system files also you don't need to give it a directory
XD don't worry I understand you lol Im still learning
Click to expand...
Click to collapse
now that leads me to ask the age old question...can one use the Package Manager to do this as well? just curious, although i prefer adb just for sheer intellectual purposes
the1gladiator said:
now that leads me to ask the age old question...can one use the Package Manager to do this as well? just curious, although i prefer adb just for sheer intellectual purposes
Click to expand...
Click to collapse
Yep package manager should be ok never used it guessing it is a file manager for android lol also if you use file managers I suggest androzip people suggest others like astro manager but what they don't relise is that androzip supports .rar files etc. unlike others
ps: Don't tell me you are talking about synaptic package manager on ubuntu please no 0o lol if thats the case no but im guessing it isnt
xillius200 said:
Yep package manager should be ok never used it guessing it is a file manager for android lol also if you use file managers I suggest androzip people suggest others like astro manager but what they don't relise is that androzip supports .rar files etc. unlike others
ps: Don't tell me you are talking about synaptic package manager on ubuntu please no 0o lol if thats the case no but im guessing it isnt
Click to expand...
Click to collapse
Nah meant to say Package Installer native to android or Astro. Thanks for the heads up, was thinking too far ahead with the adb commands. Ripped them and looks like they are loaded and working...appreciate your input
the1gladiator said:
Nah meant to say Package Installer native to android or Astro. Thanks for the heads up, was thinking too far ahead with the adb commands. Ripped them and looks like they are loaded and working...appreciate your input
Click to expand...
Click to collapse
No Problem just glad I could help

updae script to remove apks

im getting tired of having to pull apks every time i flash a new rom. i found a thread that said that you can add a few lines to the update script to remove the apks prior to boot. how do you do that? when i added the lines in the thread i got a wrong digest meta-inf/comgoogle/android/update-script verification failed instillation aborted
i think my issue is i unpacked my signed zip modded the updatescript and rezipped it.
anyone have a better way to remove those apk, not one by one!
please if you could detailed instructions
recognize_atm said:
anyone have a better way to remove those apk, not one by one!
Click to expand...
Click to collapse
Why would you need to modify the ROM? You *do* realize that if you were going to go to the trouble of modifying the ROM to add removing things via the update script, you could just remove what you wanted removed in the first place?
No, of course you don't.
please if you could detailed instructions
Click to expand...
Click to collapse
Gods, that's what adb and a batch file (or a shell script, if you think you should be using Linux) are for.
you can create a .bat file to run and remove all the apks you dont want. here is mine
RemoveApp.bat said:
cd C:\android-sdk-windows\tools
adb remount
adb shell rm system/app/Facebook.apk
adb shell rm system/app/Gallery3DMT.apk
adb shell rm system/app/GenieWidget.apk
adb shell rm system/app/HtcFacebook.apk
adb shell rm system/app/HtcTwitter.apk
adb shell rm system/app/SocialNetworkProvider.apk
adb shell rm system/app/Sprint_TVWidget.apk
adb shell rm system/app/Sprint_TV.apk
adb shell rm system/app/Sprint_Nscar.apk
adb shell rm system/app/Sprint_NFL.apk
adb shell rm system/app/Stock.apk
adb shell rm system/app/com.htc.TwitterWidget.apk
adb shell rm system/app/Flickr.apk
adb shell rm system/app/FriendStream.apk
adb shell rm system/app/com.htc.FriendStreamWidget.apk
Click to expand...
Click to collapse
posguy99 said:
Why would you need to modify the ROM? You *do* realize that if you were going to go to the trouble of modifying the ROM to add removing things via the update script, you could just remove what you wanted removed in the first place?
No, of course you don't.
God, that's what adb and a batch file (or a shell script, if you think you should be using Linux) are for.
Click to expand...
Click to collapse
your username suits you well... minus the 99.
don't be mean like that man.
I figured it out thanxs
Yea its best to make a seperate update.zip with an edited script that you can flash any time with any rom. So if you flash a new rom, you can then flash the update.zip. Mine would remove a bunch of apps and install a theme and a bootscreen after installing a new rom.
I also see that you got it, but yea you have to resign the zip after you change something in it.
And to the posguy.. If you are NO where near a computer, you can always run the .zip file with the edited script. Comes in handy if you download a rom from your phone, like a rom from DamageControls Updater or just on the web.
Yes i know you can do a terminal, but thats just long and dumb. Make a update script.
Jus10o said:
Make a update script.
Click to expand...
Click to collapse
Yes, that's a good idea. Of course, that's not what the OP thought he should do, he thought he should modify the script in the original ZIP file.
Jus10o said:
And to the posguy.. If you are NO where near a computer, you can always run the .zip file with the edited script. Yes i know you can do a terminal, but thats just long and dumb. Make a update script.
Click to expand...
Click to collapse
my point! thats why i wanted to edit the script. i know how to do it with the terminal/ .bat file. but i cant figure out how to get the zip to work
recognize_atm said:
my point! thats why i wanted to edit the script. i know how to do it with the terminal/ .bat file. but i cant figure out how to get the zip to work
Click to expand...
Click to collapse
Here is a update zip that removes some apps already.. Its my old one.
If you edit any of the lines then you must re-sign the .zip.
If you cant figure it out, or just want someone to sign it really quick. Post your .zip here and I will sign it for you so it will be flashable.
View attachment update.zip
hey thanks... i normailly sign zips using the old fresh kitchen but it doesnt seem to sign roms and im guessing zips that have meta-inf already in them cant get signed thru kitchen. i think i might be wrong, but ho do you sign your zips?
recognize_atm said:
hey thanks... i normailly sign zips using the old fresh kitchen but it doesnt seem to sign roms and im guessing zips that have meta-inf already in them cant get signed thru kitchen. i think i might be wrong, but ho do you sign your zips?
Click to expand...
Click to collapse
http://androidforums.com/developer-101/8665-how-signing-roms.html

[Q] ADB android to android?

Hi I was wondering if it were possible to run adb on my infinity so I can hook my phone up to it.
I'm getting real tired of firing my old laptop to use adb for my phone.
shaggydiamond said:
Hi I was wondering if it were possible to run adb on my infinity so I can hook my phone up to it.
I'm getting real tired of firing my old laptop to use adb for my phone.
Click to expand...
Click to collapse
I found this a while ago, but never tried it:
http://forum.xda-developers.com/showthread.php?t=2033722
_that said:
I found this a while ago, but never tried it:
http://forum.xda-developers.com/showthread.php?t=2033722
Click to expand...
Click to collapse
Thanks, but this won't work for me, it's a flashable zip and I don't want to unlock my bootloader(yet)
shaggydiamond said:
Thanks, but this won't work for me, it's a flashable zip and I don't want to unlock my bootloader(yet)
Click to expand...
Click to collapse
Shouldn't need to flash anything. Just download the zip file, extract the contents, copy the `kadb' file to /system/bin (or /system/xbin), and finally set permissions (chmod 0755 /system/bin/kadb). To use, just open a terminal emulator and run the binary.
Haven't tried it myself, but it looks like what you're looking for.
becomingx said:
Shouldn't need to flash anything. Just download the zip file, extract the contents, copy the `kadb' file to /system/bin (or /system/xbin), and finally set permissions (chmod 0755 /system/bin/kadb). To use, just open a terminal emulator and run the binary.
Haven't tried it myself, but it looks like what you're looking for.
Click to expand...
Click to collapse
Oh i might have misread it then. i'll give it a go this weekend

Categories

Resources