maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N9 / N950 (https://talk.maemo.org/forumdisplay.php?f=51)
-   -   [MOD] Enable Traffic/Automatic day-night in Drive & Traffic in Maps (https://talk.maemo.org/showthread.php?t=85353)

sony123 2012-07-09 06:32

[MOD] Enable Traffic/Automatic day-night in Drive & Traffic in Maps
 
[ WARNINGS ]
This isn't a difficult mod, but do need basic linux/programming knowledge. So if you don't know what the following steps mean, please don't attempt it or ask around for help. I don't provide modified files because I think distributing them are illegal.
The mod is pretty safe. If you break your device (unlikely) or break Drive app (more likely), it's your own responsibility. In the worst case, you can go to terminal and become root, use "apt-get install --reinstall nokia-drive-qml " to restore Drive app.

[ What is this? ]
- So far, there are three hidden features revealed and three community fixes/add-on
  • Hidden Features
    • Live traffic for Drive
    • Live traffic for Maps
    • Automatic day/night (Thanks to nieldk and Arie)
    • Beta Testing: Traffic detail page showing events' starting location and causes.
  • Community Fixes
    • Fix erratic auto day/night switching for some users. (Thanks to mbanck)
    • Fix sticky 'Show Traffic' state. (Thanks to nailwood)
    • Distance/Time-to-arrival toggle button in guidance view. (Thanks to mbanck)
- UPDATE 08/07: Traffic detail page for Drive is in beta testing.
- UPDATE 08/07: Maps traffic patch has been integrated into colin.stephane's unstable patch.
- UPDATE 07/17: There is now all-in-one patches prepared by colin.stephane. There are two versions, stable and unstable. Stable currently doesn't contain community fixes. Unstable contains community fixes, sometimes still under development. They can be downloaded from here.
- Tried on PR1.3. Thanks to Arie, he confirmed that this works on PR1.2 as well.

[ Traffic ]

Thanks to jd4200 and colin.stephane for the initiative of using patch to apply the mods. The easiest and recommended way is to apply the all-in-one patch by colin.stephane:

http://talk.maemo.org/showpost.php?p...&postcount=130

jd4200's patch can be found here. It is traffic + auto day/night without the community fixes.

[ Automatic Day/Night ]

I. Used the all-in-one patch above (Recommend)


[ Community Fixes/Add-on ]

[ Possible features for community to implement ]

[ FAQ ]
Q. How do I apply a patch?
A. Download http://harmattan-dev.nokia.com/pool/...+0m6_armel.deb to install the patch utility. (If the clicking on the deb file doesn't install, go to terminal in root then type 'dpkg -i [path_to_your_patch_deb]/patch_2.6-2+maemo7+0m6_armel.deb' to install it.)
If you use the all-in-one patch, first download it and save it in a folder of your choice. Launch terminal, login as root , go to the folder where the downloaded patch resides, type:
Code:

cp -r /usr/lib/drive-qml /usr/lib/drive-qml-original
patch -p0 -i Patch-to-enable-traffic-and-day-night-autoswitch-in-drive-for-N9-PR1.3.diff

For jd4200's patches, please follow the step in his post.

Q. I applied the patch/modified the codes, but no traffic overlay shows up?
A. Go to San Francisco and see if traffic shows up. If it does, then most likely traffic data re not available at your area. Go to desktop Nokia Map site and see if there is live traffic. No traffic in desktop site = no traffic in Drive.

Q. I totally messed up and Drive doesn't launch. What should I do?
Launch terminal, log in as root (type 'devel-su', then default password is 'rootme')
rm -rf /usr/lib/drive-qml apt-get install --reinstall nokia-drive-qml
[ Credits ]

Thanks to whoever worked on the Drive app, without him/her leaving well-organized traces in the codes we would never know!
Thanks to everyone contributing to this thread!

[ Traffic Screenshot ]

Drive
https://dl.dropbox.com/u/54692247/20...8_23-29-04.png

Maps
https://dl.dropbox.com/u/54692247/20...9_01-50-50.png

Morpog 2012-07-09 07:10

Re: [MOD] Traffic working in Drive!!!
 
Great find! I'm excited about it and wonder if there could be more stuff hidden?

nieldk 2012-07-09 07:19

Re: [MOD] Traffic working in Drive!!!
 
nice finding, probably preparing an update to our device like symbian and Lumia drive app

http://www.youtube.com/watch?v=VbINz5ZhcNU

Arie 2012-07-09 07:22

Re: [MOD] Traffic working in Drive!!!
 
Quote:

Originally Posted by Morpog (Post 1234218)
Great find! I'm excited about it and wonder if there could be more stuff hidden?

There's a lot of unfinished stuff/secrets hidden in Harmattan, we just have to find it :)

Edit: modified files here...

http://talk.maemo.org/showpost.php?p...2&postcount=18

I know that sony123 is against this, but some people aren't comfortable making changes like this :)

Nad 2012-07-09 07:24

Re: [MOD] Traffic working in Drive!!!
 
Quote:

Originally Posted by nieldk (Post 1234220)
nice finding, probably preparing an update to our device like symbian and Lumia drive app

http://www.youtube.com/watch?v=VbINz5ZhcNU

hopefully so, it was the final missing feature in drive from symbian ! I think it will be coming in because store may be getting an update as reviews are not working!

sony123 2012-07-09 08:12

Re: [MOD] Traffic working in Drive!!!
 
Add steps to first post. Please give it a try and enjoy!

colin.stephane 2012-07-09 09:15

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
sony123,

Please do a backup of your modified files and attach it to the 1st post.

Then I can do a diff file to patch easily ...

A++

sony123 2012-07-09 09:23

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Quote:

Originally Posted by colin.stephane (Post 1234275)
sony123,

Please do a backup of your modified files and attach it to the 1st post.

Then I can do a diff file to patch easily ...

A++

Sorry as I said I don't feel comfortable distributing the modified files, I believe it is illegal from Nokia's term. Maybe someone else will do it eventually.

Arie 2012-07-09 09:25

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Checked 15 times now, it doesn't work on PR1.2 at all.


If someone sends me their files, from PR1.3 I can mod them and post them...

Someone else will have to test them, but I can modify them as was written here.

aShtk 2012-07-09 09:41

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
models/AppSettingsModel.qml: 3 lines, line 23/165/180

You uncomment true and you comment false ?
This is not clear.

rash.m2k 2012-07-09 09:51

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Quote:

Originally Posted by aShtk (Post 1234292)
models/AppSettingsModel.qml: 3 lines, line 23/165/180

You uncomment true and you comment false ?
This is not clear.

Nope they are ALL set to false, he is setting to true, if yours are true then you must have changed it.

aShtk 2012-07-09 09:59

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
That's what I said, read again xD

colin.stephane 2012-07-09 10:09

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Quote:

Originally Posted by aShtk (Post 1234292)
models/AppSettingsModel.qml: 3 lines, line 23/165/180

You uncomment true and you comment false ?
This is not clear.

Thanks you to pointing out the modifications explanations are not clear at all ...

A++

rash.m2k 2012-07-09 10:13

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
ALRIGHT brilliant!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!

This is definitely the BEST surprise I have had since owning the Nokia N9.

Thank you so much!

nieldk 2012-07-09 10:14

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
modified the files (pr1.3) - a few differences from OP.
Seems traffic is working, but navigation stopped working (stuck after choosing destination)

EDIT: my mistake, works absolutely great on pr1.3

nieldk 2012-07-09 10:16

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
on pr1.3 as root in terminal

apt-get update
apt-get install --reinstall nokia-drive-qml

will restore app, in case you f... up ;)

aShtk 2012-07-09 10:17

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
If you have never coded anything in your life, it can be tricky to know how to uncomment lines.


A comment line begins by //
But you can comment several line of codes using /* then */ or something like that.


Example : models/AppSettingsModel.qml: 3 lines, line 23/165/180

Line 23 :

traffic: true

Line 166 :
trafficOn = get('traffic');

Line 180 :
trafficOn = get('allowConnections') && get('mapSensor') && get('traffic') && device.online;



Example 2 : views/settings/settingsPage.qml: line 72, un-comment the whole ButtomItem {}.


/** TODO: uncomment when management makes up their minds
ButtonItem {
id: traffic
itemId: "traffic"
title: qsTrId("qtn_drive_traffic_settings_item")
subtitle: trafficSettingsSubtitle();
iconUrl: "../../resources/traffic/list_item/traffic_on.png"
}
*/

HAS TO BECOME :

ButtonItem {
id: traffic
itemId: "traffic"
title: qsTrId("qtn_drive_traffic_settings_item")
subtitle: trafficSettingsSubtitle();
iconUrl: "../../resources/traffic/list_item/traffic_on.png"
}

Arie 2012-07-09 10:23

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Retested again... Works on PR1.2

I'll upload this for anyone that's using PR1.2 and PR1.3 :)

drop this in MyDocs
devel-su
rootme
cp -R drive-qml /usr/lib/

https://www.dropbox.com/s/27zgzbxyqqyktpf/drive-qml.zip

File edited to include automatic night/day setting :)

colin.stephane 2012-07-09 10:38

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
I continue thinking a unified diff patch file was the best to keep modifications safe with easy possibility to reverse ...

A++

Arie 2012-07-09 10:39

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Quote:

Originally Posted by colin.stephane (Post 1234335)
I continue thinking a unified diff patch file was the best to keep modifications safe with easy possibility to reverse ...

A++

It couldn't be easier than this...

Use my file to modify it, and to revert back to stock in terminal:
apt-get --reinstall install nokia-drive-qml

aShtk 2012-07-09 10:43

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Inception is not needed.
Thanks a lot, it's really welcome as a change.

Luckily the community works on improving the N9 user experience, because we cannot count on Nokia for that (Hello spelling correction with no accent, Hello facebook contacts linking that can one day, for no reason, break and you have to redo everything manually again, etc etc etc etc etc).

venomcortx1 2012-07-09 11:52

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Could you write the complete code for the replacement of files from MyDocs?

abuli 2012-07-09 12:08

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Quote:

Originally Posted by Arie (Post 1234336)
It couldn't be easier than this...

Use my file to modify it, and to revert back to stock in terminal:
apt-get --reinstall install nokia-drive-qml

I beg to differ :)
As I am way out of me league (think I was already buying a n9 but still in love)
Can you give a noob guide?
Cant stat drive-qml no such file or..........

venomcortx1 2012-07-09 12:30

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Quote:

Originally Posted by nieldk (Post 1234408)
Download this file https://www.dropbox.com/s/27zgzbxyqqyktpf/drive-qml.zip

unzip it, and copy the unzipped files to MyDocs/drive-qml folder on phone

in terminal on phone, enter
$ devel-su (default password is rootme)
# cd /home/user/MyDocs
# cp -R drive-qml /usr/lib/

courtesie of Arie

it`s works! thanks!)

abuli 2012-07-09 12:48

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Got it working. Guess I can read after all. Thank you all. To bad it aint any traffic info where I live

Jaffa 2012-07-09 12:50

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Quote:

Originally Posted by colin.stephane (Post 1234335)
I continue thinking a unified diff patch file was the best to keep modifications safe with easy possibility to reverse ...

Quote:

Originally Posted by Arie (Post 1234336)
It couldn't be easier than this...

Use my file to modify it, and to revert back to stock in terminal:
apt-get --reinstall install nokia-drive-qml

Colin's suggestion is better. A unified diff/patch could be distributed freely, packaged and deployed.

Your method, Arie, has you distributing the complete files. These are copyright Nokia and so you are violating both Nokia's copyright and the terms of the forum.

jd4200 2012-07-09 14:12

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Edit: colin.stephane has posted a patch which takes care of everything, see here

Thanks sony123, a real nice find.
Here's an automated method (completely safe and reversable) to take away the tedious work.

Download this shell script, rename it to maps.sh
Download this patch:
traffic patch, rename it to traffic.patch


Place maps.sh and traffic.patch into the same directory on the N9 and, as root, cd to where you copied them and run
Code:

sh ./maps.sh
If you are told a patch has already been applied and asked about a reversal, just anser "n" (no) to all the questions.

If you want to restore the original files then, as root, run:
Code:

rm -rf /usr/lib/drive-qml
apt-get install --reinstall nokia-drive-qml


Morpog 2012-07-09 14:19

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
It can't find package patch when trying to apt-get install patch........

nieldk 2012-07-09 14:21

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Quote:

Originally Posted by Morpog (Post 1234489)
It can't find package patch when trying to apt-get install patch........

run apt-get update first

Morpog 2012-07-09 14:23

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Quote:

Originally Posted by nieldk (Post 1234491)
run apt-get update first

I already did....

Edit:
Do I need to add any special repo to my sources list?

jd4200 2012-07-09 14:26

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Quote:

Originally Posted by Morpog (Post 1234489)
It can't find package patch when trying to apt-get install patch........

Ah, I forgot I added the SDK repository.

Either download and install
http://harmattan-dev.nokia.com/pool/...+0m6_armel.deb

Or, add the following to: /etc/apt/sources.list.d/sdk.list
Code:

deb http://harmattan-dev.nokia.com/ harmattan/sdk free non-free
And run apt-get update, apt-get install patch

Morpog 2012-07-09 14:59

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Your patch works great!
Couldn't install the deb, so I added the SDK repository via MeeCatalog (easier to add and remove in there).

solstice88 2012-07-09 15:01

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Great work to sony123 for the discovery and Arie for the assistance to others.

billranton 2012-07-09 17:36

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
It's funny how we've all got used to this intentional crippling by nokia management. Just imagine what these guys will be able to deliver now they're free of it.

sony123 2012-07-09 18:45

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Quote:

Originally Posted by colin.stephane (Post 1234335)
I continue thinking a unified diff patch file was the best to keep modifications safe with easy possibility to reverse ...

A++

Thanks for the suggestion. Sorry that I don't know anything about patch so I misunderstood what you suggested. I have edited the first post to include the patch provided by jd4200.

biatch0 2012-07-10 03:08

Re: [MOD] How to enable Traffic in Drive for PR1.2/1.3
 
Made the changes to my files with the patch... No errors...

Unfortunately, it appears that Nokia Maps doesn't have Live Traffic for Kuala Lumpur, Malaysia yet.

Possibly I'm doing something wrong since all the traffic options appear but the traffic itself just doesn't load!!!

EDIT: Confirmed. No traffic info for Malaysia at this point. Traffic for Netherlands and USA load perfectly.

drvar 2012-07-10 07:29

Re: [MOD] How to enable Traffic in Drive for PR1.2/1.3
 
Quote:

Originally Posted by biatch0 (Post 1234958)
Made the changes to my files with the patch... No errors...

Unfortunately, it appears that Nokia Maps doesn't have Live Traffic for Kuala Lumpur, Malaysia yet.

Possibly I'm doing something wrong since all the traffic options appear but the traffic itself just doesn't load!!!

EDIT: Confirmed. No traffic info for Malaysia at this point. Traffic for Netherlands and USA load perfectly.

Can you check for Slovenia if possible?
(I like to know if it's worth the trouble..)

ceroberts75 2012-07-10 08:10

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Quote:

Originally Posted by jd4200 (Post 1234481)
Thanks sony123, a real nice find.

Anyway, here's a patch to take away the tedious work. Tested and works fine.

Automatic method:
Download this shell script, rename it to maps.sh
Download this patch, rename it to traffic.patch

Place them both in the same directory on the N9 and, as root, cd to where you copied them and run
Code:

sh ./maps.sh
Manual method:
*Download this patch, rename it to traffic.patch

*Install the patch program:
Code:

apt-get install patch
If it tells you it can't find the file, you don't have Nokia's SDK repository enabled, so either:
use the app. MeeCatalog to enable the SDK repository, or add the following to: /etc/apt/sources.list.d/sdk.list
Code:

deb http://harmattan-dev.nokia.com/ harmattan/sdk free non-free
After either, run apt-get update && apt-get install patch

*Make a backup of the original files.
Code:

cp -r /usr/lib/drive-qml/ /home/user/
*Do a test run first with:
Code:

patch --dry-run -p0 -i traffic.patch
*Only if no errors are displayed then you can safely modify the files with:
Code:

patch -p0 -i traffic.patch

I Seem to get can't open patch, permission denied.


Any ideas?

soryuuha 2012-07-10 08:37

Re: [MOD] How to enable Traffic in Drive for PR1.2/1.3
 
nice finding OP, wil try this out!

jd4200 2012-07-10 09:34

Re: [PR1.3 MOD] How to enable Traffic in Drive
 
Quote:

Originally Posted by ceroberts75 (Post 1235052)
I Seem to get can't open patch, permission denied.
Any ideas?

Try "chmod 777 traffic.patch" as both a normal user and root. (Granting permissions on the N9 are a bit dodgy, from a root perspective).
Then, as root, re-running "sh traffic.sh"


All times are GMT. The time now is 18:43.

vBulletin® Version 3.8.8