First you need to search for some tutorials to use apktool to unpack, repack and sign apk file. Also your phone needs to be rooted.
The clock widget is under /system/app/YD_Clock. First copy the file to your computer and unpack it with apktool, go to folder YD_Clock/res/drawable-hdpi-v4/, you can see a lot of image files, and the analog clock images are clock_bg_new.png, minute_arrow_new.png, hour_arrow_new.png (EU_1.1.124b), or hours_arrow_new.png (HK_1.1.44). Then you can use an image editor like GIMP or PHOTOSHOP to modify these images as you like.
If you want to remove the digital clock inside it, go to folder YD_Clock/res/layout, and edit analog_l_clock_new_layout.xml (EU_1.1.124b), or bs_widget_new_layout.xml (HK_1.1.44), and delete the line
Code:
<TextView android:textSize="33.0dip" android:textColor="@android:color/white" android:id="@id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="33.0dip" android:layout_below="@id/day_of_week" android:layout_centerHorizontal="true" android:fontFamily="sans-serif" />
, the text may be a little different in other versions, just delete the whole block of codes that includes
Code:
android:id="@id/time"
. Later in order to show the AM/PM information, you need to go to Settings -> Date & Time, and uncheck 24 hour time format.
Then you can repack you apk with apktool and sign it. And finally, replace the original file using TWRP (go to "Mount" Section and mount system, then got to "Advance" -> File manager), and remember to change the file permisson (chmod) to 0644.
Wish the tutorial may be helpful to someone
Also here is a modified analog clock image from Blackberry Q10. The clock design copyright is reserved by RIM, but I guess a modified screenshot is OK
Screenshot and Modified Blackberry clock: http://imgur.com/a/wG1PI
Sorry as a newcomer I can't directly share image link.
Related
For those that have successfully created Widgets for WM 6.5, I need a little assistance.
I followed this guide (http://www.mobilitydigest.com/how-to-make-a-wm-65-widget/) and tried to create a couple of widgets. In fact, I first tried to just edit the config.xml and widget.htm files for a couple of the widgets already created to use different urls. In all cases I get an error in widget manifest. Installing the widgets they created works (I know I have widgets on my 6.5 ROM). I suspect that the issue is either saving the file in notepad (this seems unlikely) or the creation of the .wgt file. I tried zipping the files with both Windows Vista compression and 7 Zip. Neither allowed for the widget to install. I am not zipping with a folder in the compressed file, just the three files from the guide. Has anyone else had this problem? What am I missing?
did you compress the file, and change the extension from ".zip" to ".wgt"
?
me
I am also having problems i get an error message. http://www.fuzemobility.com/how-to-make-a-wm-65-widget/
post your files. it could be an error in the xml.
PearlMikeJam said:
For those that have successfully created Widgets for WM 6.5, I need a little assistance.
I followed this guide (http://www.mobilitydigest.com/how-to-make-a-wm-65-widget/) and tried to create a couple of widgets. In fact, I first tried to just edit the config.xml and widget.htm files for a couple of the widgets already created to use different urls. In all cases I get an error in widget manifest. Installing the widgets they created works (I know I have widgets on my 6.5 ROM). I suspect that the issue is either saving the file in notepad (this seems unlikely) or the creation of the .wgt file. I tried zipping the files with both Windows Vista compression and 7 Zip. Neither allowed for the widget to install. I am not zipping with a folder in the compressed file, just the three files from the guide. Has anyone else had this problem? What am I missing?
Click to expand...
Click to collapse
I am also having the same problem, xml below. If I rename-unzip-rezip-rename an existing widget it will install, the minute I try and make any changes to the config.xml or widget.htm it will not install returning the error "Sorry, this widget is not compatible with this device" I have tried editing the files with notepad and also VS2005, and have tried windows 7 zip, and winrar, any help would be appriciated.
XML from config.xml
<?xml version="1.0" encoding="utf-8" ?>
<widget version="1.0"
xmlns="http://www.w3.org/ns/widgets"
id="">
<name>Howell</name>
<content src="widget.htm" type="text/html" />
<access network="true" />
<icon src="icon.png"/>
<description>
Trial Widget test
http://howellassociates.co.uk
</description>
</widget>
Widget.htm
<html>
<head>
<title>howell</title>
</head>
<body bgcolor="#000000">
<iframe src="http://howellassociates.co.uk" width="100%" height="100%" style="background-color: white;">
<p>An error has occured.</p>
</iframe>
</body>
</html>
Here is an example of one of my widgets that do not work. I took the ESPN Widget from this link (http://www.fuzemobility.com/wm-65-widget-mania/) and just changed the url to be the iphone ESPN page since that is more finger friendly. It will not install, although the original ESPN widget would installed (I tried mine first, so I am sure there was not a conflict of having two of the same widgets).
I did all my editing in Notepad and compressed using the basic Vista compress/zip feature in explorer.
Thanks for the help.
The zip file has the xml, htm and png file, along with the wgt file I created that will not install
@pearlmikejam
ther error is in the xml, more specifically, the url to espn's site in the description.
Output:
"A semi colon character was expected. Error processing resource 'file:///C:/Users/hrhnick/Desktop/config.xml'. Line 12, Pos...
http://m.espn.go.com/wireless/?w=18iu5&e=AWA&iphone="
try removing the link, or shortening it to the the slash right after the wireless. and you should be good!
@avengerpenguin
hmmmmm... i couldnt find anything wrong. it may be the way your packaging and renaming. You did include an icon file too?
also, have you installed 3rd party widgets before? you may need to enable them on your phone with themuzz's cab.
hrhnick said:
@avengerpenguin
hmmmmm... i couldnt find anything wrong. it may be the way your packaging and renaming. You did include an icon file too?
also, have you installed 3rd party widgets before? you may need to enable them on your phone with themuzz's cab.
Click to expand...
Click to collapse
I have successfully installed widgets using themuzz's cab hence my confusion. I used the original icon from the widget I butchered to test this on, but left it as is to avoid changing to many things at once, I will have a look at how I re-pack the files, but this doesnt pose a problem unless I alter something within config.xml or widget.htm
I will continue my fault finding and try and report back later.
hrhnick said:
@pearlmikejam
ther error is in the xml, more specifically, the url to espn's site in the description.
Output:
"A semi colon character was expected. Error processing resource 'file:///C:/Users/hrhnick/Desktop/config.xml'. Line 12, Pos...
http://m.espn.go.com/wireless/?w=18iu5&e=AWA&iphone="
try removing the link, or shortening it to the the slash right after the wireless. and you should be good!
Click to expand...
Click to collapse
Thanks for the reply. I did some experimenting and was able to get this to install wihout a URL in the config.XML file. It does not seem to serve any purpose. Any idea what the parameters are for the urls? Is there a character limit for descriptions?
There's no character limit but some pages simply don't load right. It's a pain. Like FaceBook would not let use choose between the full version and mobile - regardless of the site it decided for us. To test widgets you can try this though: http://widgetemulator.codeplex.com/
PearlMikeJam said:
Thanks for the reply. I did some experimenting and was able to get this to install wihout a URL in the config.XML file. It does not seem to serve any purpose. Any idea what the parameters are for the urls? Is there a character limit for descriptions?
Click to expand...
Click to collapse
I think the url in the config file is purely for the description when installing, but I may be wrong I dont believe that it has any real purpose.
fixed, widget not intended for this device problem
On another note I have solved my problem with the widgets not installing and returning the error message about not being intended for this device.
I appeared to have been making a school boy error when packaging my config.xml,icon, and widget.htm files, I was foolishly "zipping" the folder containing my files rather than selecting the 3 files and sending them to a compressed folder.
For anyone else making this error unless you zip the files directly it causes the config.xml file to not be in the root folder.
Thanks to all those who tried to help.
Thanks AvengerPenguin, you identified the problem I was having, duhh!
Anyway, in celebration, here is my first widget - Ninjawords. It just hyperlinks to the ninjawords.com site for quick dictionary lookups, but a useful little widget for me, and non of that Apple Censorship fluff.
Oh yes, you'll have to download and unzip the wgt as xda-dev's won't let me post wgt files.
I need help with editing the AndroidManifest.xml in BlurPhone.apk and BlurDialer.apk... I have edited the .xml files in both of them to set screenOrientation to "sensor" instead of "nosensor" because I want the dialer and in call screen to show up in landscape without having to use the car dock or the desktop dock to achieve this. I have a universal mount that I use and I have applied the webtop hack and created shortcuts to the desktop and cardock activities. Every other program switches to landscape except for these two.
Here is what I have done with BlurDialer.apk...
I decompiled, edited the XML to "sensor" and recompiled BlurDialer.apk with no errors in apktool. I then copied the META-INF from the original file to the new one. I properly copied the file to /system/app using adb shell. When I reboot the dialer app is gone. I copied the old BlurDialer.apk back into place to see if it was the way I copied it to the system that caused the problem. When I did that everything returned back to normal so it has to be something in the way I am editing and recompiling the file.
Here is what I have done with BlurPhone.apk...
I decompiled with no errors, made the edit to "sensor" in the xml file, when I recompiled I received an error. Even when I make no edits if I recompile the file I still get an error.
Please show me what I need to do.
Thanks!!
Did you get your answer? I was having the same issue until someone at mydroidworld.com figured it out. Edit apktool.yml and put 1, 2 3 in numerical order.
I have changed the status bar icons for a few time, and just want to share it to people who wants to personalize it by themselves but don't know how with their own taste without asking the others to do it for them
What you need:
- WinRar
- Gimp 2 - http://www.gimp.org/downloads/
- ADB or something like RootExplorer, I prefer ADB
File to be modified:
SystemUI.apk - you can find it in system/apps/
First, you need to get the SystemUI.apk out of your favorite ROM, I use WinRar, and then you open the apk file also by Winrar. Extract the 'drawable-mdpi' folder in 'res' folder. You will see the icons for back, home, option, etc. in there.
Now, edit the default icon with Gimp 2, open the icon, click Del to remove the image but still keep the template for your new icon. Open the your favorite icon (with Gimp 2 of course), and resize it to the size of the ROM's icon (it's under the Image option), mostly choose Height 48pixel and Width will be set automatically, just remember to look at the size of the default icon. After you resized your favorite icon, just Ctrl + C on your icon and then Ctrl + V on the the template, it will put your new icon to the center of the template. Last step for this is to save it back to the 'drawable-mdpi' folder. I suggest you to use .png icons and save the templates for your future uses FYI, you should have a 'pressed' template.
Last, open the SystemUI.apk and "Added files to ..." to the .apk file, add the modified 'drawable-mdpi' folder to the .apk, then you are done with the SystemUI.apk. If you want to have a fresh ROM flash, then just put the modified SystemUI.apk back to the ROM and flash; or you can "adb push" it to your tablet or over-write it, then you restart your tablet to see the change
That's it, first time you try it, it's going to take sometimes, but after you have all the templates ready, it's gonna be so quick for you to make any changes.
Let me know if you have any question, I'm no expert in Graphic Designing or Programming but will try to answer your questions
Here are some examples which I'm currently using them, have fun:
I thonk its like that
http://forum.xda-developers.com/showthread.php?t=1301401
and
http://forum.xda-developers.com/showpost.php?p=16820709&postcount=9
didn't know there are...
Hello
I've recently buy a Toq Qualcomm SamrtWatch and, because the sdk does not permit a lot of things, I've started a little hacking
In this thread I would like to explain how i've beenableto create a custom watch face. This is a first try, I'll hope I will come later to explain more things.
And sorry for my english, I'm french. Ok let's start :
- First get the Toq Manager Android application because it contain some watch, if you own a Toq you must have install it via google play store. :
you can follow the tuto here http://forum.xda-developers.com/showthread.php?t=1755436 but it must be :
Code:
adb pull /data/app/com.qualcomm.toq-1.apk
- 2 extract the apk to find where the watch face are :
for this I will android-apktools, https://code.google.com/p/android-apktool.
SO basically in my folder I have :
Code:
apktool
apktool.jar
com.qualcomm.toq-1.apk
I extract the apk in a new directory, named "toq" with:
Code:
./apktool d com.qualcomm.toq-1.apk toq
- 3 find the watch face :
in the toq/Assets directory there is a file named "allclocks.json" wich contains the watch faces definitions :
Code:
{
"Clocks": [
[...]
{
"bundle": "degreesclock.zip",
"type": "dynamic"
},
{
"displayName": "Agenda",
"icon": "clock_agenda",
"type": "builtin"
}
]
}
so you can add a custom watch face by modifying this json and adding this lines for example
Code:
{
"bundle": "myclock.zip",
"type": "dynamic"
},
you can see that a "dynamic" watch face is defined by a zip file, wich is the assets folder too. you must add this zip file to create the watch
4: Create the watch face :
There is two zip file to create to add a custom watch face. the first will describe the watch face. It will be named xxxxx_app.zip, xxx is your watch face name, mycolock for example.
This zip file will contains two lua file :
- manifest.lua will describe the watch :
Code:
clock {
name = "MyClock",
entrypoints = "ClockEntries"
}
the second will be executed by the Toq to draw the watch face and will be named init.lua.
We can add image file that will be used by the init.lua script.
I started a project on github to convert png to qualcomm img format : https://github.com/marciallus/toq_imgTools
I attach the myclock_app.zip in this thread.
The second zip file will be name xxxxx.zip, myclock.zip for example. and will contain 3 files:
- The zip files create before will be add to in this zip, I dont see why.
- clock.json will describe the watch too
Code:
{
"Clock": [
{
"displayName": "My Clock",
"packageName": "com.qualcomm.qce.myclock",
"asset": "myclock_app.zip",
"icon": "my_clock.png",
"jsonName":"com.qualcomm.qce.myclock/MyClock"
}
]
}
- my_clock.png will be displayed in the Taq Manager Android Application to choose the custom watch
I've attached the myclock.zip in this thread too
5 : Repackaging
Now we have created the two needed files in assets folder we will recreate the apk to resintall this modified version on the phone :
-first use apktool to repackaging in com.qualcom.toq-modified.apk
Code:
./apktool b toq com.qualcom.toq-modified.apk
-we need to sign the apk :
Code:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore [your keystore] com.qualcom.toq-modified.apk [your key]
you can see how to create a keystore here : http://developer.android.com/tools/publishing/app-signing.html
- we can zip align the file, it's better :
Code:
zipalign -fv 4 com.qualcom.toq-modified.apk com.qualcom.toq-modified-aligned.apk
6 : Installing
We just have now to reinstall the modified apk :
Code:
adb install -r com.qualcom.toq-modified-aligned.apk
And if you go on your phone on Toq Manager -> Preferences -> Clock Style !! TADA !! your clock is here, you can select it to push it to your watch !!
that's all
feel free to comment, it's my first thread creation so I'm open for remarks
--
MarCo
I recently bought an Toq on eBay, I will try it as soon as it arrives. Do you know a way to transform from IMG to PNG?
Thanks for the hack!
alaintxu said:
I recently bought an Toq on eBay, I will try it as soon as it arrives. Do you know a way to transform from IMG to PNG?
Thanks for the hack!
Click to expand...
Click to collapse
The github i've started here : https://github.com/marciallus/toq_imgTools doas png to IMG but I will add the options to make inverse
--
MarCo
marciallus said:
The github i've started here : https://github.com/marciallus/toq_imgTools doas png to IMG but I will add the options to make inverse
--
MarCo
Click to expand...
Click to collapse
Thanks! No love here so far, but I've been looking for this for some time. Been waiting to get a new PC (old one died) before I explored this. Might still be a little while before I make an attempt though.
Flipclock
I've found that there is a clock that is not enabled called "flipclock".
Just editing allclocks.json and adding:
{
"bundle": "flipclock.zip",
"type": "dynamic"
},
You have a new clock! Now I'm trying to add 24h formats to some existing clocks (bold and facets). Do you have any clues to do that?
P.S.: Did you enable the possibility tor transform from img to png yet? I didn't see any changes in your github project.
24 Hours digital watchface
I created a simple watchface, showing 24h digital clock and the date, something like:
Jan, 07
13:00
Wednesday
Great
I've deposed one here two
https://github.com/marciallus/mytoqmanager/blob/master/toq/Data/assets/newclock_app.zip
alaintxu said:
I created a simple watchface, showing 24h digital clock and the date, something like:
Jan, 07
13:00
Wednesday
Click to expand...
Click to collapse
marciallus said:
Great
I've deposed one here two
Click to expand...
Click to collapse
I checked your code and i think you can much more easily get 24-hour clock by just changing timestyring format:
Code:
timeModel:getTimeString("%I")
change to:
Code:
timeModel:getTimeString("%H")
Since it's all lua script they should be using lua time format strings.
Pyblo said:
I checked your code and i think you can much more easily get 24-hour clock by just changing timestyring format:
Code:
timeModel:getTimeString("%I")
change to:
Code:
timeModel:getTimeString("%H")
Since it's all lua script they should be using lua time format strings.
Click to expand...
Click to collapse
Ah Yes thx a lot
I just discovered lua
I Will try that
bye
--
MarCo
About your image conversion...
I'm wondering how did you figured out how to open or modify those .img files? Honestly I have no idea what was going on or what was your reasoning in order to create your little program. Did you found something provided by Qualcomm or Mirasol?
marciallus said:
I started a project on github to convert png to qualcomm img format: github.com/marciallus/toq_imgTools
Click to expand...
Click to collapse
I have found a java class to convert .img to .png files:
gist.github.com/moneytoo/8446716
I would like rewrite your code to run it in java. I hope you can help me to understand how it works.
By the way, It is possible to create a watchface with a custom image background, like this example:
github.com/KhaosT/ToqImageGenerator
Thank you!
Hey Guys, Chahat here!
This time with a Tutorial on how to port and use ANY CyanogenMod Theme's Bootanimation for and on any Android device.
Well, the Detailed Video Tutorial is also available, and i guess it'll help you better
[url]http://forum.xda-developers.com/android/software/tutorial-t3438058/post68157966#post68157966[/URL]
We'll port BOTH THE TYPE of bootanimations supported by the CMTE (CyanogenMod Theme Engine)
The ones containing portrait type frames (or .png files), and
The ones containing Square or Landscape type frames.
TOOLS REQUIRED:
ES file explorer
Batch image converter
Easy unrar
APKs of some CM themes having Bootanimation (Obviously -_- )
Calculator
1. The Bootanimations containing portrait frames:
Extract the theme apk by renaming it to .zip
Go to assets/bootanimation/bootanimation.zip, extract it
Go to batch image converter, select part0 folder
Convert the images in .png format, your screen size and don't forget to tick "replace existing files".
Do the same for the rest following folders (part1 and/or part2)
Move to ES file explorer, open the desc.txt file
There you'll find some values, the first and second values represent the resolution of images
Change the first and second values according to your screen size, save the file
Go to easy unrar, find part0, part1 and desc.txt
Select all part folders and desc.txt file, compress them to "STORE" level, named bootanimation.
After compression, cut the bootanimation.zip from there, extract the CM porting zip, place the bootanimation.zip in system/media folder and repack the zip
Reboot to recovery and flash
DONE!!!
2. Bootanimations containing Landscape or Square Frames:
Follow Steps 1-3 same as previous one
In the batch image converter, select conversion in png format, tick "Replace existing files" and move to Calculator
Now here's the tricky part, Note down the resolution of any image in the bootanimation zip
Suppose the resolution of the images of the bootanimation is 1080x720
And your screen resolution is 480x800
Divide the first value of the resolution of the image of bootanimation with that of your screen
1080/480=2.25
Now divide the second value of the image reslution with the number we obtained
720/2.25=320
So the resolution in which we have to convert the images with batch image converter will be 480x320.
Convert all the images in all the folders in the resolution you obtain
Rest all the steps same
DONE!!!
ATTACHMENTS:
CM Bootanimation Port.zip
The Flashing zip, How to use manual and the Calculator step Re:explained in text document, all packed in one zip
Tools.zip
Tools needed
:good:LIKE, SUBSCRIBE, SHARE!
:good:HIT THANKS