RSS
 

Change Dreamboard Endroid To Use Celsius

17 Feb

If you have a jailbroken iPhone, perhaps you’ve installed Dreamboard and are using the Endroid theme. Perhaps, like me, you don’t live in the United States, so you want to see the temperature in Centigrade instead of Fahrenheit. Perhaps, also like me, you’ve searched the web to find out how to do it. If you found this page, you’ve found your answer!

Dreamboard Endroid in Celsius

Dreamboard Endroid in Celsius

Unfortunately, the details are a little tricky, but I’ll explain them as carefully as I possibly can below.

Step 1 – Install OpenSSH

OpenSSH allows you to log into your iPhone as if it were a computer, and tinker around with the files on it. Go to Cydia, search for OpenSSH, then install it.

Step 2 – Log on to your iPhone

If you have a terminal program installed on your jailbroken iPhone, you can use that to log on. Do so, and go straight to Step 2b. Otherwise…

  • Make sure your iPhone is connected to a WiFi network, and you have a computer with a terminal program (ie, a Mac or Linux machine, or a Windows machine with the right software installed) also connected to the same network.
  • Find out your iPhone’s IP address. To do this, go to Settings, then WiFi, then hit the blue arrow to the right of the name of the WiFi network you are connected to. You’ll see the phone’s IP address listed in a table. It will probably be 192.168.something.something or 10.1.something.something.

    My Phone's IP Address

    My Phone's IP Address

  • Open a terminal and type ssh root@<your IP address>. For example, I typed ssh root@192.168.1.4 because my IP address was 192.168.1.4
  • If you’ve only just installed OpenSSH, your password is alpine.


Step 2b – if your password is alpine, change it

The very first computer virus for the iPhone took advantage of the fact that many people don’t change their password after installing OpenSSH. To change your password,

  • Think of a password that you know you will remember.
  • Type passwd
  • Enter your new password
  • Enter it again to confirm you typed it correctly


Step 3 – Change Farenheit to Celsius

The files that control what you see in the Endroid layout are in the folder /var/mobile/Library/DreamBoard/Endroid/Widgets/HTC. You can see them by typing

cd /var/mobile/Library/DreamBoard/Endroid/Widgets/HTC
ls

There are only two files, an html file, a css file and a javascript file. There’s also a folder containing the images. If you’re an HTML or Javascript guru, you can have lots of fun here. If not, what you need to do is change line 132 of functions.js from

url="http://weather.yahooapis.com/forecastrss?u=f&p=";

to

url="http://weather.yahooapis.com/forecastrss?u=c&p=";

Spot the difference? The ‘u=f’ becomes ‘u=c’. Now, the iPhone doesn’t come with any of my favourite text editors – nor even any of my less favourite. However, you can make the required change via these commands :

mv functions.js original-functions.js
cat original-functions.js | sed 's/u=f/u=c/g' > functions.js

Dreamboard Lock Screen Fixed

Dreamboard Lock Screen Fixed

And you’re done! The first command moves the original functions.js file to a safe place, and the second command goes through that copy, changing every ‘u=f’ to ‘u=c’ (there’s only one) and writing the results back into functions.js.

If your phone doesn’t immediately display temperatures in Centigrade, try using it normally for a little while. Maybe lock the screen, check your email, whatever. If something goes wrong, you can always restore the original using the command

mv original-functions.js functions.js

Or, since you’re poking around in your phone, perhaps you’d also like to….

Step 4 – Change The Date On The Lock Screen to Day/Month/Year

By default, it shows Month/Day/Year, so the date of this blog post looks like 2/17/2012 instead of 17/2/2012. This is easy to fix. Enter the following commands :

cd /var/mobile/Library/DreamBoard/Endroid/Widgets/Lockscreen
mv Lockscreen.html original-Lockscreen.html
cat original-Lockscreen.html | sed 's/Date/QWERTY/g' | \
 sed 's/Month/Date/g' | \
 sed 's/QWERTY/Month/g' > Lockscreen.html

This makes a copy of your Lockscreen.html, then swaps the HTML fields <dateDate></dateDate> and <dateMonth><dateMonth>. Have a look at your lock screen (if need be, unlock then lock again) and see the happy result!

Again, if something goes wrong, you can restore the original Lockscreen.html via

mv original-Lockscreen.html Lockscreen.html

 

 
 

Tags: , , , ,

Leave a Reply

 

 
  1. nk

    March 5, 2012 at 11:37 pm

    i don’t really understand open ssh and command but have successfully changed things just by editing .js files using ifile. could you explain how to change the date format using this method? i couldn’t get it to work

     
  2. nk

    March 5, 2012 at 11:38 pm

    meant to say using ifunbox.. not ifile.

     
  3. Mike H

    March 7, 2012 at 3:26 pm

    basically, you need to change line 47 of /var/mobile/Library/DreamBoard/Endroid/Widgets/Lockscreen/Lockscreen.html from

    <dateMonthNum></dateMonthNum>/<dateDate></dateDate>/<dateYear></dateYear>
    
    

    to

    <dateDate></dateDate>/<dateMonthNum></dateMonthNum>/<dateYear></dateYear>
    

    hope that helps!

     
  4. Francois hayek

    May 29, 2012 at 2:59 pm

    i tried to change the date to day moth year as you did but i got only date and time and the day disappear . need help please thanks

     
  5. Mike H

    July 25, 2012 at 8:21 am

    Sorry for the late reply – can you upload your file somewhere so I can see it?

     
  6. Terence

    March 20, 2013 at 10:57 pm

    Thank you for your helpful information !

     
  7. stormtigers

    June 20, 2013 at 5:20 am

    Exellent thanks very much.
    Was annoying the hell out of me !