Change unknown caller picture - HTC Startrek

When a call comes in which is from an unknown nuumber or a contat that doesn't have a picture assigned to it you get a blue outline of a person, with a question mark in the middle by default. Is there way of changing this default image to something more interesting? Any ideas?
Thanks

Not too hard to do
I know its been awhile since you asked, but since I haven't found an answer anywhere else...
You need to open the (ROM).zip that you are using and edit an .apk and then use ADB to push it back to the phone.
I'm using Virtuous Unity 1.3.1. I've done it successfully on a few other ROMs too.
You'll need a graphics editor (I used MS Paint), Android SDK with adb, 7-Zip.
Here's how I did it...
As always, MAKE A BACKUP! Its not my fault if something goes wrong.
1 - Open the .zip copy of the ROM that you're using
2 - Extract a copy of /system/app/Phone.apk
3 - Open Phone.apk using 7-zip and copy the following files to your desktop (don't close the 7-Zip window):
-phone_default_270.png
-phone_default_300.png
-phone_default_incall_270.png
-phone_default_incall_300.png
4 - Find a picture that you want to use and resize it to 300x300 and 270x270. Save it as the above file names.
5 - Copy the 4 files back into the Phone.apk archive and exit 7-Zip
6 - Copy the new Phone.apk file into your adb directory (Android SDK, usually in the platform-tools folder)
7 - Connect your phone to your computer and ensure its in charge-only mode with USB debugging enabled
8 - Open a command prompt window, change to your adb directory, and run the following commands:
adb devices {to make sure the device is connected}
adb remount {sets it to read/write}
adb push Phone.apk /system/app/Phone.apk {replaces the Phone.apk file}
9 - Disconnect your device and reboot
10 - Enjoy!
-Kyle

Related

Mikudroid Bootanimation

i was bored so i ported the mikudroid bootanimation.
here is a video of the original [click]
hope u will enjoy.
- howto install -
0. install the android sdk
1. connect the legend to your pc
2. copy the bootanimation.zip into the tools folder of the sdk (rename the .zip file)
3. start cmd (windows) or the terminal (osx/linux) and browse into the [android-sdk]\tools directory
4. type "adb push bootanimation.zip /data/local/
5. reboot your device to ensure that everything went right
you should backup your original bootanimation.zip befor!
if you want other bootanimations ported, just ad a request
(original is for desire and n1)

[Q] Change Lock Screen Timeout

I have CM7 installed... I know there are settings for screen timeout under display, and CM7 settings allow you to specify the delay for the screen to actually lock. But what about when the screen is locked, you turn it on to check the time and it shuts off after 5 secs. Can this be changed?
Edit: Here's a list of important posts so people don't have to read the entire thread...
Background Info
Step-by-step guide for windows
Allow .jar files to be seen in APK Manager
How-to deODEX android.policy.jar for ODEXed ROMs
How-to for linux/mac(will make a better guide once I finish porting the APK Manager tool from Windows)
Old Stuff:There's not a setting to change the lock screen timeout but I got to looking around and think I found where it can be changed. The stuff I found pointed to android.policy.jar which is located in /system/framework so I adb pulled it and then decoded it using apktool. Some smali files contain hex values of 0x1388 equals 5000 in decimal where 5000ms = 5s. So one of those should be what we want to change. I'm going to try figuring out which one to change, set it to 10s = 10000ms = 0x2710. If it works for me, I can describe how to do it yourself in better detail and/or post a modified android.policy.jar with the timeout you would like.
Edit: I started a thread about this in the Eris dev forum and removed the attached files from here. PM me or post in one of these two threads if you have questions or would like me to modify and send you a custom android.policy.jar
http://forum.xda-developers.com/showthread.php?t=1079844
I successfully increased the default 5s timeout when you wake the phone but don't unlock. If you want to test it out, download one of the attached zip files corresponding to the timeout you would like to have(10s or 30s). Extract android.policy.jar from the zip file and follow either the ADB or Root Explorer or Terminal Emulator instructions below.
If using ADB:
Code:
adb remount
adb shell
cd /system/framework
mv android.policy.jar android.policy.jar.bak
exit
adb push android.policy.jar /system/framework
adb shell
cd /system/framework
chown 0:0 android.policy.jar
chmod 644 android.policy.jar
#reboot to recovery#
#wipe both cache and dalvik-cache#
#reboot#
If using Root Explorer on phone:
mount system as r/w
rename original android.policy.jar in /system/framework to android.policy.jar.bak
move modified android.policy.jar to /system/framework
change owner: owner = 0 - root & group = 0 - root
change permissions: rw-r--r--
#reboot to recovery#
#wipe both cache and dalvik-cache#
#reboot#
Click to expand...
Click to collapse
If using Terminal Emulator on phone:
Code:
mount -o remount,rw /dev/block/mtdblock3 /system
mv /system/framework/android.policy.jar /system/framework/android.policy.jar.bak
mv /PATH/TO/NEW/android.policy.jar /system/framework
cd /system/framework
chown 0:0 android.policy.jar
chmod 644 android.policy.jar
#reboot to recovery#
#wipe both cache and dalvik-cache#
#reboot#
Later tonight or tomorrow I will post a how-to so anyone can make the necessary modifications themselves. That should allow for other devices/ROMs to modify theirs as well since it will be customized to their phone.
I've only tested this on my Eris running GSB v3.1 - Gingerbread 2.3.4 - CM 7.1.0 RC0. Be sure to make a NAND backup and a backup of android.policy.jar as I can't guarantee this will work for you. If you have problems or just want to switch back to the original 5s timeout, replace the modified android.policy.jar with the android.policy.jar backup, wipe cache & dalvik-cache, and reboot or restore from the NAND backup you created.
I'm really surprised no one has brought this idea up before..well glad I had a chance to give you something to dig into and explore some more. I haven't done any editing to system files like this before so I might be posting back with some questions. Thanks for the info..I'll let you know how it goes!
When I plug my phone in it doesnt seem to be going into debugging mode. I have that option checked for it to enable when USB is plugged in but the only icon showing is the USB icon.
I say this because when I run adb devices its not listing my device..also running adb shell it says error: device not found
I havent tried running the adb shell since I flashed to CM7..is there something I need to do differently with this ROM?
thetornado said:
When I plug my phone in it doesnt seem to be going into debugging mode. I have that option checked for it to enable when USB is plugged in but the only icon showing is the USB icon.
I say this because when I run adb devices its not listing my device..also running adb shell it says error: device not found
I havent tried running the adb shell since I flashed to CM7..is there something I need to do differently with this ROM?
Click to expand...
Click to collapse
The debugging notification will only show up if the option for "USB debugging notify" is also checked in Settings->Applications->Development. Not sure why it wouldn't be able to find your phone especially since it sounds like you had it working fine before. What version of adb do you have? I'm using v1.0.26 and never had any problem. You can check the version with the command "adb version". You could also try using adbWireless which would allow you to not have it hooked to your computer with the USB cable.
Scratch that last post..I got it working in ADB Shell
I downloaded the APK tool and moved the files to C:\Windows
Ran this successful: adb pull /system/framework/android.policy.jar
Problem with: apktool d android.policy.jar out - error saying it couldn't find apktool. I went to restart my phone to see if that was an issue and now its hung on the white android screen and wont boot up
Thoughts?
You didn't actually modify anything on the phone right? And didn't push anything to it either? If not, nothing would have changed and it shouldn't be having a problem booting. Try "adb reboot recovery", wipe cache & dalvik-cache then reboot. If you can't run adb commands...pull the battery, put it back in, power it on and hold volume up + power to get into recovery. If something was modified, use adb to revert the modded files back to the originals or restore with a NAND backup if you made one.
Edit: As for apktool not being found, it sounds like apktool is not in your PATH. The Windows folder should be part of your PATH by default. You could check your PATH variable by following these instructions and modify it if needed or you try moving the unpacked apktool files to the same location as the adb command which is most likely /PATH/TO/ANDROID_SDK/platform-tools OR /PATH/TO/ANDROID_SDK/tools
Sorry for the delay..got back to trying this mod. I got an error..
C:\Users\ME\apktool d android.policy.jar out
Unable to access jarfile C:\Windows\\apktool.jar
Did I put these 3 files in the wrong location?
I just saw your comment about putting these files into where adb.exe is located. I moved these files there..also checked my path and its set up for:
Variable: path
Value: C:\android-sdk\platform-tools
The error I got now is: Unable to access jarfile C:\android-sdk\platform-tools\\apktool.jar
I'm not all that familiar with how Windows handles things but something it should be able to find apktool.jar if it's the same directory as apktool.bat. What is the contents of apktool.bat? A workaround would be manually doing the .bat file's job and run "apktool" using this command instead:
Code:
"java -jar /LOCATION/OF/apktool.jar"
Typing that in a cmd window should give you the usage output for apktool. If that works, you could then use that format to decode and build apk/jar files.
I have everything in the folder: C:\android-sdk\platform-tools
Contents of 'apktool.bat':
@echo off
java -jar "%~dp0\apktool.jar" %1 %2 %3 %4 %5 %6 %7 %8 %9
I am getting this error:
C:\Users\ME>java -jar C:\android-sdk\platform-tools\apktool.jar
Unable to access jarfile C:\android-sdk\platform-tools\apktool.jar
Ok...two more things to try.
Add the location of the java commands to the PATH variable. Probably somewhere like C:\jdk1.6.0_##\bin OR C:\Program Files\Java\jdk1.6.0_##\bin. The PATH variable as a whole would now be something like this: C:\LOCATION\OF\jdk1.6.0_##\bin;C:\WINDOWS\system32;C:\WINDOWS
If that doesn't help: change directory(cd) to C:\android-sdk\platform-tools in the cmd prompt, then run "java -jar apktool.jar"
Sorry it's being such a PITA to just get apktool to run.
1. The location of my Java program is: C:\Program Files\Java - There are 3 folders in there: jdk1.6.0_25, jre1.6.0_22, jre6 - I currently have a user variable 'path' with the value 'C:\android-sdk\platform-tools' - should it be added after this? ..if so, could you explain from what I gave about java what I need to add?
2. Tried cd - same thing..Unable to access jarfile
What does the following command give as output?
Code:
echo %PATH%
I'd set your system environment variable PATH like so:
right-click my computer -> properties -> advanced system settings -> Environment Variables...
under system variables, select Path, and Edit...
add the following(without the quotes) to the end of what's already there: ";C:\Program Files\Java\jdk1.6.0_25\bin;C:\android-sdk\platform-tools;C:\android-sdk\tools"
Also, since you are running Windows...it might make things easier on you to use APK Manager. Here's the thread for it: http://forum.xda-developers.com/showthread.php?t=695701
Here is what I have from the echo %PATH%
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I installed the APK manager..I have it up and running. So I pulled the 'android.policy.jar' - Now what do I do to edit this file?
With all the storms, a power outage, and being busy I'm just now able to get back to you. I'm going to try going through the process using APK Manager on a Windows desktop I have access to. Step-by-step instructions will be in the post below.
Step-by-Step for Windows
You will need the java jdk installed and ADB set up for this to work.
download APK Manager and extract it to you preferred location
this guide will use C:\apk_manager_4.9
run C:\apk_manager_4.9\Script.bat
select option 0 to adb pull
where = /system/framework/android.policy.jar
stored name = android.policy.jar
current project = y
select option 9 to decompile
minimize Script.bat window
use Notepad++(or your preferred editor) to open:
Code:
C:\apk_manager_4.9\projects\android.policy.jar\smali\com\android\internal\policy\KeyguardViewMediator.smali
find ".method public pokeWakelock()V" NOT ".method public pokeWakelock(I)V"
inside the method, find the two lines starting with "const/16 v#" followed by a hex value(0x####)
the second(0x1388=5000ms=5s) is the default timeout unless a hardware keyboard is open, in which case the first(0x2710=10000ms=10s) is used
the values are 16-bit signed integers so the highest either can be set is 0x7FFF=32767ms=32.767s (Your screen will not wake up if set higher)
use this dec->hex convertor to determine the hex equivalent of your desired ms timeout
modify the hex values to your liking, save the file, and close Notepad++
return to the Script.bat window
select option 11 to compile
system apk = y
additional files = n
select option 8 to adb push
where&name = /system/framework/android.policy.jar
select option 24 to quit
open a command prompt to run these commands:
Code:
adb shell chmod 644 /system/framework/android.policy.jar
adb reboot recovery
in recovery,wipe dalvik-cache & cache, then reboot
Done!
All GOOD! Thanks for your hard work on figuring all this out for windows..it really wasn't hard at all once I had the right set of instructions haha
The only thing I've noticed is that the "screen off animation" does not work now - I have checked and unchecked it and its still not working..its really no biggie but just thought I'd say in case you want to play around with this mod more.
thetornado said:
All GOOD! Thanks for your hard work on figuring all this out for windows..it really wasn't hard at all once I had the right set of instructions haha
The only thing I've noticed is that the "screen off animation" does not work now - I have checked and unchecked it and its still not working..its really no biggie but just thought I'd say in case you want to play around with this mod more.
Click to expand...
Click to collapse
I'm glad we finally got it figured out for you. I have the screen animation turned off on my Eris so I didn't notice this broke it. I'll look into it and see if I can figure anything out. The first thing that comes to mind is that the screen off animation could somehow be dependent on the AWAKE_INTERVAL_DEFAULT_MS variable. As I found when first looking at this mod, changing the variable won't actually affect the value wherever it is used since the package is already compiled. So if the animation does use that variable in some way, we'll need to find where that happens and change the value there.

[Q] Some General Questions Regarding the editing of android.policy.jar

hello everyone
I have updated to kennethpenn's 4.5.91 Gingerbread Beta 4 (must say, it is truly a phenomally put together build !)
I have also noticed that many of the mods that i had applied to 1.8.3 have not been updated for 4.5.91, so i decided to make the changes myself.
Now, I have a pretty decent knowledge of Unix-based operating systems ( I have used Red Hat Linux, Ubuntu, SUSe Linux, OpenBSD, FreeBSD, Solaris, and now OS X) however, I would like to expand my knowledge to include Android.
The first one I attempted to do myself was the Wake on Volume Keys mod.
This is a very simple change to the android.policy.jar file, as you all well know.
For this, I used Windows XP, simply for the fact that I have 7zip and PeaZip installed on it. However, I can do all of this on OS X as well. The file archiver applications I have on OS X are:
1. The Unarchiver
2. Keka
I am going to list my method of applying this edit, and i would ask that someone with solid knowledge on this subject give me their feedback and guidance.
---------------------------------------------------------
My Method of editing android.policy.jar
---------------------------------------------------------
1. Using Root Explorer, I made a copy of /system/framework on my External SD Card
2. Mounting the Phone for USB Mass Storage on Windows XP that I have running in VirtualBox on my Macbook Pro, I moved the copy of the /system/framework directory to my Desktop
3. I downloaded smali-1.2.6.jar and baksmali-1.2.6.jar from code.google.com/p/smali/
4. I placed both of these .jar files in the copy of the framework-edited directory that I created on my Desktop
5. I renamed smali-1.2.6.jar to smali.jar and baksmali-1.2.6.jar to baksmali.jar for simplicity's sake
6. I moved the android.policy.jar file to /framework-edited directory on my Desktop
7. Using 7zip (I also have PeaZip, but for this, I used 7zip, if you think I should use PeaZip, please tell me) I extracted the files from android.policy.jar to end up with classes.dex and META-INF. I then moved classes.dex to /framework-edited so it is in the same directory as smali.jar and baksmali.jar
8. In Command Prompt, I entered:
Code:
cd C:\Documents and Settings\Owner\Desktop\framework-edited
in order to be working from the proper location where my files are located
9. Now, having Command Prompt working in the proper location, I entered the following commands:
Code:
java -jar baksmali.jar -o classout/ classes.dex
to create a new directory within /framework-edited called /framework-edited/classout
10. I then opened the /classout directory, and navigated to /classout/com/android/internal/policy/impl/ and opened the file KeyguardViewMediator.smali with Notepad
11. I used [Ctrl] + [F] to locate the line:
private isWakeKeyWhenKeyguardShowing(I)Zā€‹
12. I then looked at the lines DIRECTLY below the above line, and following the Original Post on how to manually apply this modification, I removed lines:
0x18
0x19ā€‹
13. Upon removing these lines, I simply did a File -> Save As -> KeyguardViewMediator.smali and saved the file to my desktop
14. I [Cut] + [Pasted] the edited KeyguardViewMediator.smali file back to /classout/com/android/internal/policy/impl/ and replaced the original KeyguardViewMediator.smali file
15. With the edited KeyguardViewMediator.smali file in place, I went back to Command Prompt and entered the following commands:
Code:
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
To create a new file called new-classes.dex
16. Changing the name of new-classes.dex to classes.dex, I took the original META-INF file, and my newly created classes.dex files, and, using 7zip, created a new android.policy.zip archive
17. I renamed my newly created android.policy.zip to android.policy.jar, and transferred it to my External SD Card
18. Using Root Explorer, I navigated to /system/framework on my phone, and renamed android.policy.jar to 1122android.policy.jar.bac and [Copy] + [Pasted] my edited android.policy.jar to /system/framework
19. I then immediately powered off my phone, and rebooted into CWM Recovery, and cleared my Dalvik Cache, then rebooted the phone normally through CWM Recovery.
At this point, to my knowledge, I had successfully edited my android.policy.jar file and had manually added the Wake on Volume Keys modification, however, once the phone was fully booted and showing my lockscreen, I unlocked the phone as normal by sliding the slider to the right. As soon as the phone unlocked, I saw pop-ups for processes that had failed and were terminated. I'm not sure what the exact message the pop-ups had, but it was the normal pop-up message you get when a process force-closes. My only option was to click "Ok" so I clicked it, only to have another force-close pop-up.
Apparently, every single process on the phone had force-closed, BUT, the phone was waking when I press a volume key while the screen was off. I had no choice but to pull the battery out.
I decided to reboot into CWM Recovery and "install .zip from SD Card", Nottach's 1% Battery Mod / No Carrier Mod Uninstall Script
I installed Nottach's uninstall script because I hoped that it had an unmodified copy of android.policy.zip in it.
After installing the uninstall script, and rebooting the phone once again, I got to the lock screen, unlocked the phone, and found everything to be in perfect working order, just as before I edited anything,
But the Wake on Volume Keys mod was still applied!
So now, my questions / requests to all of you are:
1. Explain to me what I missed or did wrong that resulted in the force-closure of every single process on the phone prior to installing Nottach's Uninstall script
and
2. Educate me on the proper process that you developers use to apply small modifications such as this one to the android.policy.jar file, or any other related file on the phone for that matter.
My plan is now to change the color of the text on my lock screen (Clock, Date, and possibly Carrier) following this [Guide]
Any and all feedback is welcomed and greatly appreciated, as you will be helping me learn the beginnings of modding and developing
bump . . . . .
Perhaps this may help
http://forum.xda-developers.com/showthread.php?p=18226553

[Q] Android Stock 2.3.3 with CRT animation enabled

Can anyone guide me how to enable CRT animation for stock android 2.3.3 on galaxy ace?
codestudent said:
Can anyone guide me how to enable CRT animation for stock android 2.3.3 on galaxy ace?
Click to expand...
Click to collapse
I think you should have posted this in themes and apps section but nevertheless this is your answer-
You will need-
a)APK Manager from here http://forum.xda-developers.com/showthread.php?t=695701
b) .zip manager (I suggest 7-zip or winrar for windows and archive manager for linux)
c) text editor ( Notepad++ in windows or gedit/write in linux )
d) framework-res.apk from /system/framework that you want to modify and build.prop from /system.
e)Root explorer/Fileexpert or adb to pull framework-res.apk and build.prop
First thing using root explorer or adb pull the above files to your computer.Then do the following..
1) Once you extract APKManager you should have a folder called "APKManager," somewhere.
2) Within that folder there's another folder called "place-apk-here-for-modding". Place you desired framework-res.apk into that folder.
3) Navigate back to the root of "APKManager", and double-click "Script.bat"in windows or "Script.sh" in linux
4) Press option 9 to decompile the apk. (It may take some time)
5) Once finished, navigate to "APKManager\projects\framework-res.apk\res\values".
6) Inside look for a file called "bool.xml". Open it using your notepad++ or gedit
and find and change the
"<bool name="config_animateScreenLights">true</bool>" to "<bool name="config_animateScreenLights">false</bool>"
7) Remember to save! Not "save as," but save.
8) Doubl-click "Script.bat" or "Script.sh"again, and choose option 11 to sign the apk
9) Say "y" to first option.
10) When that is done, a new folder called "keep" will be created. Open that folder, and delete resource.arsc.
11) Say "y" to the last option.
12) It will ask you to press any key, do that, and it will finish.
13) Navigate to the "place-apk-here-for-modding" folder, and you'll see a new file called, "unsignedframework-res.apk" open it with a .zip manager, and take the resource.arsc file from it, and transfer it to your original framework-res.apk (Which should be in the same folder)
14) Now push the modified original framework-res.apk(with new resource.arsc) onto your phone /system/framework using adb or copy by root explorer/fileexpert, and set permissions using root explorer to -rw -r -r or use chmod 644 framework-res.apk using adb. There wil be force-closes using root explorer when copying..just ignore that and set permissions and reboot.
15) Now pull build.prop from /system to your computer
16) Open build.prop and modify the line.
'debug.sf.hw=1' is the line in the file. Replace it by '#debug.sf.hw=1'. Indirectly you are just changing the line into a comment by adding a #
17) Now take this file and replace your original build.prop. You can do this by using adb or root explorer and set permssions similarly as in above.
18)Reboot and go to settings>>display>>animations and choose all animations. Enjoy your crt screenoff animation.
Added the guide in themes section http://forum.xda-developers.com/showthread.php?p=15976400
did as told but no luck. I'm using S5830XEKPH 2.3.4 firmware (Booted)
I have just noted that root explorer is not replacing framework file with the new one.

[Q] Apktool problem

I want to decompile some system apps and I can't even get apktool to work. I installed java jre and jdk both and I get the following error in cmd:
Java is not recognized as an internal or external command
So I set my environmental system variables for Java on my windows xp computer as shown below:
View attachment 2825945
But I still get the same error as before! I need someone to please help me figure this out before I get even more frustrated!
Make sure you have installed apktool correctly
Windows:
Download The Following From Here
apktool1.5.2.tar.bz2
apktool-install-windows-r05-ibot.tar.bz2
Unzip both files with winrar and put the contents (there should be 3 files) in C:\Windows
if you have java jdk installed you should be able to type apktool and hit enter at the command prompt and if installed it will give you all the options for apkool
Linux:
Download apktool-install-linux-* file
Download apktool-* file
Unpack both to /usr/local/bin directory (you must have root permissions)
Mac OS X:
Download apktool-install-macos-* file
Download apktool-* file
Unpack both to /usr/local/bin directory (you must have root permissions)
did everything still not working
I Followed this guide here which is very similiar: http://androidforums.com/esteem-all-things-root/520917-guide-how-properly-decompile-recompile-apks-apktool.html
I stopped at installing framework because CMD would not let me be able to do so!
Any other advice?
I really need to get this working!
Thanks for your help!
JT1510365 said:
I Followed this guide here which is very similiar: http://androidforums.com/esteem-all-things-root/520917-guide-how-properly-decompile-recompile-apks-apktool.html
I stopped at installing framework because CMD would not let me be able to do so!
Any other advice?
I really need to get this working!
Thanks for your help!
Click to expand...
Click to collapse
what version of apktool are you using? maybe the apktool doesn't support it.. download de jar and the appt http://forum.xda-developers.com/showthread.php?t=1755243 , open the cmd window holding shift+ right button where the apktool is placed

Categories

Resources