How To Change Notification Icons in individual Apps? (eg: K9, Twidroyd, etc)

Phixx

New Member
Joined
Jul 29, 2010
Messages
5
Reaction score
0
Location
Philadelphia PA
Hi All,

I was hoping somebody would be able to help me. I would like to edit the notification icons used by individual applications that appear in the task bar. These are not in the framework-res.apk files but in the individual apk located in data/app. I can extract the png file, place them back in after I edit them and I have then resigned the app, but when I try to install I get an error.

Is this due to the fact that the app is protected somehow and the resigning isn't cutting it? Or is there a workaround, like a way to adb push the individual notification icon png? I am on a rooted with s-off. Thanks so much for any ideas or pointers in the right direction!
 

cupfulloflol

Senior Member
Joined
Dec 5, 2009
Messages
1,893
Reaction score
22
You may not need to resign them if you never fully extracted the application to begin with. Meaning if you just opened it with your compressing/decompressing program then dropped the edited png into it, it should change and not alter the signed info.

I just edited K9, and didn't need to resign it using this process.
1. Pull the app
2. Using something like Winrar or 7zip to open the apk, don't decompress it and recompress it, just open it to explore the contents within 7zip (or something like it). Pull the stat_*.png file from /res/drawable/ (don't recall the name of the png) to your computer.
3. Edit that png with your image editing software
4. Once you are happy with your edited picture, throw it back into the opened Winrar program. Winrar asks if you want to edit the file, I assume others do too.
5. Push the edited file back to /data/app
6. You may need to change the permissions if they got messed up in transition.
Code:
adb shell
chmod 644 /data/app/com.fsck.k9-1.apk
Obviously things can go wrong in the process though, so resigning may indeed need to be done. Usually not though in my experience. If you are resigning how are you going about doing it?

Another alternative, is you can push the app to /system/app and it should work that way, since signatures don't matter in /system/app . Obviously /system space is at a premium with a lot of ROMs and themes, though so this isn't the ideal solution if you want to edit a lot of apps.
 
OP
Phixx

Phixx

New Member
Joined
Jul 29, 2010
Messages
5
Reaction score
0
Location
Philadelphia PA
Thank you so much!!!! worked like a charm, i was able to change the notification icon and push the package back to data/app without having to resign!
 
OP
Phixx

Phixx

New Member
Joined
Jul 29, 2010
Messages
5
Reaction score
0
Location
Philadelphia PA
So, everything worked fine until I rebooted, then the edited app is no longer is showing as installed. I have to go into the data/app folder to delete it and reinstall the original unedited app. Any ideas as to why the changes aren't "sticking" after a reboot?
 

kevdog

Member
Joined
Nov 14, 2009
Messages
722
Reaction score
0
Apps in the /data partition are signed by the original creator. This signature is recorded in android in a database (I forget the file name right now). After modifying the program, the hash value of the original apk and your newly modified apk no longer match.

Ways to get around this, are to push your modified app to the /system partition where hashes and signatures are not modified (ie /system/app), or totally uninstall the original apk along with references in the database as to the signature and then manually reinstall in the /data partition. Moving the app to the /system partition is by far the easiest thing to do.
 
OP
Phixx

Phixx

New Member
Joined
Jul 29, 2010
Messages
5
Reaction score
0
Location
Philadelphia PA
Apps in the /data partition are signed by the original creator. This signature is recorded in android in a database (I forget the file name right now). After modifying the program, the hash value of the original apk and your newly modified apk no longer match.
Thanks, that makes sense why just re-signing an app isn't enough.
Ways to get around this, are to push your modified app to the /system partition where hashes and signatures are not modified (ie /system/app)
This is where I'm still having some issues, could you help me with the sequence of events? My first step obviously is still to pull the apk from data/app and edit it. After this, do I uninstall the app from the phone using an uninstaller, adb remount and then push the app to system/app and reinstall? Or do I keep the app installed and delete the file from data/app after I push the edited apk to system/app? Also, do I need to use adb to install the edited app and if so how do I direct the install to the system/app? Thanks in advance, I apologize for all ???s!
 

kevdog

Member
Joined
Nov 14, 2009
Messages
722
Reaction score
0
From what Ive done in the past I didn't reinstall the app, I just copied or moved the app from /data/app to /system/app and rebooted. I didn't reinstall.
 

lmt1979

Member
Joined
Feb 18, 2010
Messages
80
Reaction score
0
Location
Greenville, NC
Theming

When I want to theme something (I just "upgraded" the icons in my Mms.apk yesterday) I use root explorer to copy it to the sdcard, mount the sdcard in Windows/Linux/OSX and then use 7zip to open "Drop" the edited pngs I want into the app to replace the ones I have. I Have NEVER had to use a signing tool or adb push/pull to accomplish what I want and I themed out a few roms quite a bit. I change them on the PC then move them back to the SD Card (OR and update.zip format for a fresh flash) and then move/copy/paste them to /system/app. I modified Quickboot, EStrongs file explorer among other things this way.

Basically just move the file to the /system/apps folder and reboot and it'll show up as a useable application. You can STILL definately break it if you do something wrong. (I've been working on the statusbar.xml in Pandora 1.5 to no avail, all it does is NOT show up in the statusbar)
 

kevdog

Member
Joined
Nov 14, 2009
Messages
722
Reaction score
0
If you are going to do any serious editing of xml files you need to decompile the app with a tool like apkmanager since the resources.arsc file needs to be rebuilt to reflect those changes. What you want to do is a whole different ball of wax compared to simple jpeg changes.
 

czerdrill

Silver Member
Joined
Jan 2, 2010
Messages
4,825
Reaction score
12
if we completely uninstall and reinstall to the /data partition after making changes we should get update notifications from the market rite?
 

kevdog

Member
Joined
Nov 14, 2009
Messages
722
Reaction score
0
yes -- moving reinstalling on data will give you the ability to market update.
 
Top