Author Topic: Hacking the NSpire Link Software  (Read 9066 times)

0 Members and 1 Guest are viewing this topic.

Offline TheSmartWon

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 7
  • Rating: +1/-0
    • View Profile
Hacking the NSpire Link Software
« on: August 05, 2013, 12:14:07 am »
Hello everyone, I have discovered something interesting and that could be used to benefit a lot of people who are on 3.2.4, and wanting to downgrade to 3.1, so that they can use NDless! Those who are mad TI is being Apple (locking down products to make more money :( )! The only problem is I need help.

So the deal is that TI got pretty lazy making their software "TI-Nspire Computer Link". Go ahead and download a copy http://education.ti.com/en/us/software/details/en/82035809F7E6474099944056CCB01C20/ti-nspire_computerlink.
Go into the lib folder to discover they literally leave the entire application's code lying around in .jar files. I mean TI, really?
Use your favorite Java decompiler on all the .jar files. I prefer http://java.decompiler.free.fr/. The ones that seem to be of importance are all but the sda-gui code, which seems to be only GUI stuff.

Voila. You have the code in your hands that is used to upgrade, downgrade, and communicate with your TI-Device. I'm just too little and unexperienced in Java to understand and wreak havoc on it all.

In the end all you would do is reinsert the new code back into the separate modules of the Link Software, and then run the Linking Software as usual. Maybe even a separate program could be ripped and developed. We could have any current NSpire-CX or NSpire-CX CAS on any boot2 and OS wanted, without the use of a RS232 adapter and command lines.

While this isn't a nice game to be made for people to install, I hope there is still some support out for this. It's fun to reverse engineer! Come here Java programmers! Lets tear down the system and understand it before 3.6 is released, and we are clueless where to start. I really welcome all supporters. I'm especially looking at nLaunch CX guy, Excale, and Lionel Debroux. (Even though nLaunch was written in C :P).

--------------------------
It's a far shot, but dreams are allowed, right?
« Last Edit: August 05, 2013, 09:03:02 am by TheSmartWon »

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Hacking the NSpire Link Software
« Reply #1 on: August 05, 2013, 12:27:20 am »
Sorry to cut you in your dreams but ... modifying TINCLS is only part of the problem.
Indeed, the OS of the calc itself includes checks, checks based on an area in memory you can't erase with a "reformat all" from the Diagnostic menu and only Ndless programs (such as nsNandMgr) or the OS itself can access, not even the computer software.

The anti-downgrade protection sets a "minimal-version" field in that memory area. Then, on boot, the boot2 will check that version with the current installed OS, if it is an older one, it won't boot at all (even deleting that OS, IIRC), if it is a newer or same one, it will allow boot.
The OS 3.2.4 sets the minimal-version to 3.2.4. The OS 3.2 sets it to 3.1. Same for other older OSes up to 2.0.

Also, without modifying TINCLS, look at TiLP, a free, open source and multi-platform all-TI-device-communication-program designed by the community.
If such feature would have ever been possible and added to TiLP, be sure that every Nspire user would use it instead of using TINCLS.
« Last Edit: August 05, 2013, 12:35:59 am by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Hacking the NSpire Link Software
« Reply #2 on: August 05, 2013, 12:33:19 am »
Quote
Go into the lib folder to discover they literally leave the entire application's code lying around in .jar files. I mean TI, really?
Yes, that's what most Java applications do. Nothing special here.

Quote
Even though nLaunch was written in C++ :P
Nope, nLaunch / nLaunch CX / nLaunchy were not written in C++.

As Levak wrote, having a modified computer-side tool doesn't fix / work around limitations and protections on the calculator side in any way. What's more, one needn't tinker with TINCLS / TINCS, as one can use libti*/TILP instead. By now, it's been a long time since TILP and TI's official software have become co-installable.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline TheSmartWon

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 7
  • Rating: +1/-0
    • View Profile
Re: Hacking the NSpire Link Software
« Reply #3 on: August 05, 2013, 09:02:27 am »
Well, I have much to learn. I see. I've been searching for days, and never even heard of TiLP. And what methods are there for changing that "minimal downgrade" area of memory? Assume one was to upgrade from a 2.X to 3.1, wouldn't their "minimal downgrade" area of memory change? And wouldn't there be a method to trace how it happens?

Sorry Lionel for the C++ part, I know it was C. It was a mistype
« Last Edit: August 05, 2013, 11:53:05 am by TheSmartWon »

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: Hacking the NSpire Link Software
« Reply #4 on: August 05, 2013, 04:24:17 pm »
Knowing how it happens doesn't change much as long as you can't execute your own code to reverse it. So you would have to find a way to execute code on OS 3.2.4 by reverse engineering the OS. But since OS 3.6 should come soon, nobody wants to spend much time on this.

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Hacking the NSpire Link Software
« Reply #5 on: August 05, 2013, 05:16:15 pm »
And what methods are there for changing that "minimal

[...] and only Ndless programs (such as nsNandMgr) or the OS itself can access [...]
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Hacking the NSpire Link Software
« Reply #6 on: August 05, 2013, 10:47:01 pm »
The only way to change the minimal version for the time being is to sell your calc then buy an older one. :P
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline TheSmartWon

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 7
  • Rating: +1/-0
    • View Profile
Re: Hacking the NSpire Link Software
« Reply #7 on: August 09, 2013, 03:54:09 pm »
But since OS 3.6 should come soon, nobody wants to spend much time on this.

So when 3.6 comes out, will people spend much time on this? And where will they be secretly meeting so I can listen in and help? :P

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Hacking the NSpire Link Software
« Reply #8 on: August 10, 2013, 01:30:17 am »
Quote
So when 3.6 comes out, will people spend much time on this?
We'll see.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Hacking the NSpire Link Software
« Reply #9 on: August 10, 2013, 04:00:46 am »
And where will they be secretly meeting so I can listen in and help? :P

Since there is a 0.000001% chance that you are working for TI (as does any other member here who have less than 100,000 posts), I doubt anyone else than the Ndless team could attend such meeting :P

Who knows, Lionel is a big TI hater, but maybe in fact he is secretly working for them and has been trolling us hard for so long? :trollface:
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Hacking the NSpire Link Software
« Reply #10 on: August 10, 2013, 05:30:06 am »
On the one side, it's a fact that I'm indirectly working for them, unpaid (except the occasional hardware donation), through libti*/gfm/tilp and other programs.
On the other side, I unsuccessfully tried to educate them about the pitfalls of the closed nature of the Nspire. I did predict the exact class of events which unfolded for the Nspire series over the last 14 months, it was pure common sense based on the history of other platforms, but the top-level management is lacking basic common sense. As a result, I washed my hands about the matter, and I started contributing to nLaunchy upon the release of nLaunch CX (for adding support of CM OS on the CX, with Excale). Recently, I contributed a patch which explicitly makes it harder for TI to remove nLaunchy, so the fact is that I'm now explicitly working against TI's corrupt practices and against their business model :)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline TheSmartWon

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 7
  • Rating: +1/-0
    • View Profile
Re: Hacking the NSpire Link Software
« Reply #11 on: August 11, 2013, 04:54:03 pm »
Yeah, I've been reading through the code for updating the NSpire OS, and it is quite nasty in trying to force updates automatically. If only I understood how things work enough to make the actual calculator think 3.1 is actually 3.2.4 :( . I have a pretty deep question to ask about OS files that is not answered on Hackspire, where is the best place to ask it? I think this community is giving TI popularity at the cost of their products being disliked by teachers. I am quite happy with it.