Active Topics

 


Reply
Thread Tools
Posts: 567 | Thanked: 2,965 times | Joined on Oct 2009
#1
Previously I posted this thread http://talk.maemo.org/showthread.php?t=91606 with a reverse-engineered copy of Fremantle PR 1.3 MCE. Thanks to some new reverse engineering skills/tools and some renewed interest in N900 work, I decided to go back and verify all the reverse engineering work I did for MCE to make sure it really IS a 1:1 clone. After a few all-nighters and a LOT of hard work (plus massive quantities of Coca-Cola , I found out it wasn't a 1:1 clone and came up with some fixes.

http://www.cncmods.net/files/mce/mce_1.8.126+0m5.tar.gz is the new source code, http://www.cncmods.net/files/mce/ mce_1.8.126+0m5_armel.deb is the new binary package (which I am running on my own phone as of 4:30am or so) You will also need http://www.cncmods.net/files/mce/mod...e-dbus-names.h and http://www.cncmods.net/files/mce/spl...n-dbus-names.h as those were fixed.

The fixes I made are:
1.Correct values for modechange_response_t in modechange-dbus-names.h
2.Correct values for splashscreen_t in splashscreen-dbus-names.h
3.Correct prototype of devlock_notify_remove in libdevlock.h
4.Fix calls to devlock_notify_remove in mce_devlock_exit (in devlock.c)
5.Fix a stray space in a log message in mce_mode_init (in modetransition.c)
6.Fix some issues in keypress_trigger (in tklock.c)
and 7.Fix an incorrect comparison in call_state_trigger (in tklock.c).

As of this release, all my analysis (and my binary diff tools) have convinced me that everything is a 1:1 functionally equivalent clone with the exception of keypress_trigger in tklock.c and set_tklock_state in tklock.c. Those 2 are still showing up as not being matches.

If you want an actual diff file, you could download the old code (from the link in the original thread I linked to above) and the new code and make one.

Anyone who wants to take these changes and put them into CSSU repos or wherever else, feel free. (some of these may be fixes that were already made by others since my initial reverse engineering work)
 

The Following 36 Users Say Thank You to jonwil For This Useful Post:
Posts: 1,994 | Thanked: 3,342 times | Joined on Jun 2010 @ N900: Battery low. N950: torx 4 re-used once and fine; SIM port torn apart
#2
Quick line...
Bumping... So who is going to compare it with, and put it into, CSSU repos?
Best wishes. Thank you!
~~~~~~~~~~~~~~~~~
Per aspera ad astra...
 

The Following User Says Thank You to Wikiwide For This Useful Post:
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#3
keypress_trigger should be fixed by https://gitorious.org/community-ssu/...9202eda23c5bd8

set_tklock_state seems like doing the same, despite the binary code differs. It seems the source code (in stock mce) has been optimized a bit in exchange of readability (I did some experiments and achieved almost the same binary). Will try again to make it exactly the same as in the stock.
__________________
Never fear. I is here.

720p video support on N900,SmartReflex on N900,Keyboard and mouse support on N900
Nothing is impossible - Stable thumb2 on n900

Community SSU developer
kernel-power developer and maintainer

 

The Following 9 Users Say Thank You to freemangordon For This Useful Post:
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#4
Originally Posted by Wikiwide View Post
Quick line...
Bumping... So who is going to compare it with, and put it into, CSSU repos?
Best wishes. Thank you!
~~~~~~~~~~~~~~~~~
Per aspera ad astra...
Guess who
__________________
Never fear. I is here.

720p video support on N900,SmartReflex on N900,Keyboard and mouse support on N900
Nothing is impossible - Stable thumb2 on n900

Community SSU developer
kernel-power developer and maintainer

 

The Following 12 Users Say Thank You to freemangordon For This Useful Post:
Posts: 567 | Thanked: 2,965 times | Joined on Oct 2009
#5
My guess is that although its all GCC 4.2.1, it may not be the exact same GCC Nokia used which might produce slightly different output given the same input.
That said, it SHOULD be possible to identify which compiler Nokia used. The most likely candidate is either something from http://repository.maemo.org/pool/fre...ree/g/gcc-4.2/ or something from the scratchbox repos although I dont know how Nokia did things.
 

The Following User Says Thank You to jonwil For This Useful Post:
Posts: 567 | Thanked: 2,965 times | Joined on Oct 2009
#6
And yes I realize that we dont need to have an identical binary to actually use this thing but being able to take source code (either released by Nokia or created through cloning/reverse engineering) and get the same binaries Nokia did would be a usefull ability in general terms IMO.
 

The Following 3 Users Say Thank You to jonwil For This Useful Post:
Posts: 567 | Thanked: 2,965 times | Joined on Oct 2009
#7
I have uploaded a new source zip at http://www.cncmods.net/files/mce2/mc...126+0m5.tar.gz and a new binary at http://www.cncmods.net/files/mce2/mc...+0m5_armel.deb
It contains the keypress_trigger fix from https://gitorious.org/community-ssu/...9202eda23c5bd8.

I have also uploaded a diff file at http://www.cncmods.net/files/mce2/mce.diff containing the changes since my original release of MCE code at the top of http://talk.maemo.org/showthread.php?t=91606 (obviously the diff file doesn't contain the contents of the 2 systemui headers since those live elsewhere)
As before, I am now running this new binary on my own N900 (after all, if I am going to spend time reverse engineering this thing, I should be willing to be a guinea pig and test it on my own device)

Not sure about set_tklock_state, it seems to be functionally equivilant but I intend to continue digging a bit to see if I can get it to the point where my binary diff tool says "its the same". It might not be possible to get that far though.

EDIT: Fixed url of diff file

Last edited by jonwil; 2014-10-07 at 20:47.
 

The Following 15 Users Say Thank You to jonwil For This Useful Post:
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#8
jonwil: those 2 header files are already on CSSU gitorious:

https://gitorious.org/community-ssu/...a150e973a0911:

and

https://gitorious.org/community-ssu/...2019b17251494:
__________________
Never fear. I is here.

720p video support on N900,SmartReflex on N900,Keyboard and mouse support on N900
Nothing is impossible - Stable thumb2 on n900

Community SSU developer
kernel-power developer and maintainer

 

The Following 2 Users Say Thank You to freemangordon For This Useful Post:
Posts: 567 | Thanked: 2,965 times | Joined on Oct 2009
#9
Yes but the versions I posted are different to whats there already.
 

The Following 2 Users Say Thank You to jonwil For This Useful Post:
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#10
Originally Posted by Wikiwide View Post
Quick line...
Bumping... So who is going to compare it with, and put it into, CSSU repos?
Best wishes. Thank you!
~~~~~~~~~~~~~~~~~
Per aspera ad astra...
http://talk.maemo.org/showpost.php?p...&postcount=429
__________________
Never fear. I is here.

720p video support on N900,SmartReflex on N900,Keyboard and mouse support on N900
Nothing is impossible - Stable thumb2 on n900

Community SSU developer
kernel-power developer and maintainer

 

The Following 6 Users Say Thank You to freemangordon For This Useful Post:
Reply

Tags
fremantle, reverse


 
Forum Jump


All times are GMT. The time now is 12:11.