Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: tangrs on August 07, 2012, 08:14:31 am

Title: Early beta of nspire version string patcher
Post by: tangrs on August 07, 2012, 08:14:31 am
For a bit of fun, I made a version string patcher for the Nspire.

(http://i50.tinypic.com/34dljrn.jpg)

It's still a WIP requiring polish but it works for now :)

I'll publish binaries soon but the impatient can see how it works by visiting the github repo https://github.com/tangrs/nspire-version-patcher
Title: Re: Early beta of nspire version string patcher
Post by: Hayleia on August 07, 2012, 08:21:00 am
Lol, that is awesome XD
By the way, it has been a long time since the last time I saw you. Are you still working on nspiremovieplayer ? :)
Title: Re: Early beta of nspire version string patcher
Post by: tangrs on August 07, 2012, 08:27:36 am
Lol, that is awesome XD
By the way, it has been a long time since the last time I saw you. Are you still working on nspiremovieplayer ? :)

Most of the development in nspiremovieplayer is finding a faster way to decode JPEGS. So there is research work going on behind the scenes XD
Title: Re: Early beta of nspire version string patcher
Post by: Jim Bauwens on August 07, 2012, 09:02:42 am
Glad to see you're still having fun with the Nspire :)
Also, nice application. I wonder, can you spoof the version number that the Student software detects ?
That would be even cooler as you could trick the software that you have a newer version of the OS installed.
Title: Re: Early beta of nspire version string patcher
Post by: Nick on August 07, 2012, 10:06:34 am
how is it possible to find the location of those things? the more apps like these i see, the more confused i get xp

nice work btw, really nice :) and i like it how you call it android xp
Title: Re: Early beta of nspire version string patcher
Post by: Levak on August 07, 2012, 10:12:09 am
I've got better and shorter :
Code: [Select]
#include <os.h>
#include "libndls.h"

static unsigned addr_addrs[] = {0x107C1DDC, 0x10801E3C, 0x107A2DC8, 0x107FF0D0};
#define addr ((unsigned *)nl_osvalue((unsigned*)addr_addrs, 4))

int main(int argc, char* argv[]) {
char lol[]  = "Whatever you want";
char * lol2 = malloc(sizeof(lol));
strcpy(lol2, lol);
    *(addr) = lol2;
    return 0;
}

(http://i.imgur.com/cZZNf.png)


el problemo ?


Edit : oh, and by the way, show_msg_usr_input() does not work in the current revision of Ndless because my patch for it didn't yet get pushed to the Ndless svn by ExtendeD.
Title: Re: Early beta of nspire version string patcher
Post by: Nick on August 07, 2012, 10:14:53 am
@levak
how come your ':' are messed up a bit? since they have a space in front of them, and the third one even totally dissapeared :o
Title: Re: Early beta of nspire version string patcher
Post by: Adriweb on August 07, 2012, 10:16:22 am
Very nice both of you ;-)
Title: Re: Early beta of nspire version string patcher
Post by: Levak on August 07, 2012, 03:34:34 pm
@levak
how come your ':' are messed up a bit? since they have a space in front of them, and the third one even totally dissapeared :o

French/English difference =(

EDIT : (http://i.imgur.com/C1cJml.jpg) (http://i.imgur.com/C1cJm.jpg)(http://i.imgur.com/Mi3at.png)

Code: [Select]
#include <os.h>
#include "libndls.h"

static unsigned addr_addrs[] = {0x107C1DDC, 0x10801E3C, 0x107A2DC8, 0x107FF0D0};
#define addr ((char **)nl_osvalue((int*)addr_addrs, 4))
static unsigned build_addrs[] = {0x10825114, 0x10865174, 0x10806100, 0x10862408};
#define build ((char *)nl_osvalue((int*)build_addrs, 4))
static unsigned version_addrs[] = {0x100A9CD8, 0x100A9F98, 0x100A93D4, 0x100A96BC};
#define version ((unsigned *)nl_osvalue((int*)version_addrs, 4))

int main() {

int major = 3;
int minor = 1;
int revision = 0;
int b = 392;
int ok =
show_2numeric_input("Change version", "model : [3.1].0.392", "3.", &major, -2, 0xF, "1.", &minor, -2, 0xFF)
&& show_2numeric_input("Change version", "model : 3.1.[0.392]", "0.", &revision, -2, 0xF, "392", &b, -2, 0xFFF);
printf("%d", ok);
if(ok){
char v[] = {major, minor, revision};
/* patch inside infos */
char * lol = malloc(sizeof(char)*15);
sprintf(lol, " %d.%d.%d.%03d", v[0], v[1], v[2], b);
*(addr) = lol;

/* patch outide infos */
sprintf(build, "%03d", b);
*(version-3) = 0xE3A02800 | (v[1]*10+v[2]); // MOV R2, #A, LSR16
*(version-2) = 0xE3A01400 | (v[0]); // MOV R1, #3, LSR24
*(version-1) = 0xE0800001; // ADD R0, R0, R1
*(version) =   0xE0800002; // ADD R0, R0, R2
show_msgbox("", "Successfully patched");
} else {
show_msgbox("", "Patch canceled");
}
    return 0;
}
Title: Re: Early beta of nspire version string patcher
Post by: DJ Omnimaga on August 07, 2012, 04:05:59 pm
Wow nice, so basically we can change most of the system menu text and stuff?
Title: Re: Early beta of nspire version string patcher
Post by: Wayne on August 07, 2012, 05:36:15 pm
Yeah TI finally released 4.1.1  :thumbsup:
Title: Re: Early beta of nspire version string patcher
Post by: Levak on August 07, 2012, 05:38:34 pm
Wow nice, so basically we can change most of the system menu text and stuff?
You thought is was not possible ?
It is just a matter of time, a matter of goal and a matter of usability.

With Ndless, you can run any ASM or C code, so you can basically modify any value, any code in the OS that is running.
Title: Re: Early beta of nspire version string patcher
Post by: Adriweb on August 07, 2012, 05:44:02 pm
Awesome levak :P
Title: Re: Early beta of nspire version string patcher
Post by: Nick on August 07, 2012, 06:19:42 pm
so now we can trick the sending software by telling it we are running another OS?
Title: Re: Early beta of nspire version string patcher
Post by: Lionel Debroux on August 08, 2012, 01:06:54 am
Quote
so now we can trick the sending software by telling it we are running another OS?
Seems so, indeed :)
Title: Re: Early beta of nspire version string patcher
Post by: Levak on August 08, 2012, 01:07:43 am
so now we can trick the sending software by telling it we are running another OS?

Yep =)
For example, I guess the software won't tell us to update.
Title: Re: Early beta of nspire version string patcher
Post by: tangrs on August 08, 2012, 06:09:39 am
I've got better and shorter :
Code: [Select]
#include <os.h>
#include "libndls.h"

static unsigned addr_addrs[] = {0x107C1DDC, 0x10801E3C, 0x107A2DC8, 0x107FF0D0};
#define addr ((unsigned *)nl_osvalue((unsigned*)addr_addrs, 4))

int main(int argc, char* argv[]) {
char * lol  = "Whatever you want";
char * lol2 = malloc(sizeof(lol));
strcpy(lol2, lol);
    *(addr) = lol2;
    return 0;
}

(http://i.imgur.com/cZZNf.png)


el problemo ?


Edit : oh, and by the way, show_msg_usr_input() does not work in the current revision of Ndless because my patch for it didn't yet get pushed to the Ndless svn by ExtendeD.

What pointer are you patching? (Oh and watch your malloc - it'll always allocate 4 bytes :))

Or is this the format string?
Title: Re: Early beta of nspire version string patcher
Post by: Levak on August 08, 2012, 08:10:46 am
What pointer are you patching? (Oh and watch your malloc - it'll always allocate 4 bytes :))

Or is this the format string?

I was patching the formatting String which was much easier than rewrite sprintf.

But you may look at the second code I've posted, where it also patch the areas that the Nspire uses to send to the Computer Link Software its version.
Title: Re: Early beta of nspire version string patcher
Post by: critor on August 08, 2012, 01:44:22 pm
Please welcome vPatch, based on Levak code.
http://tiplanet.org/forum/viewtopic.php?f=43&t=10204

The tool asks you for the OS version you want to set.
It also stores the last version it is given in a config file and can automatically restore it if moved to the Ndless startup folder.

Which means that TI-Nspire Computer Link should now stop telling you to install OS 3.2. ;)


Download:
http://tiplanet.org/forum/archives_voir.php?id=6640
Title: Re: Early beta of nspire version string patcher
Post by: Lionel Debroux on August 08, 2012, 01:49:03 pm
Sweet :)
Title: Re: Early beta of nspire version string patcher
Post by: critor on August 08, 2012, 02:16:35 pm
Just announed in news:
http://ourl.ca/16738.new#new
Title: Re: Early beta of nspire version string patcher
Post by: Hayleia on August 09, 2012, 11:30:01 am
I like how Levak's program makes every software think it is another version of the OS, but I also like how tangrs' program allows to write anything we want, not only numbers :)
Title: Re: Early beta of nspire version string patcher
Post by: Levak on August 09, 2012, 12:11:18 pm
I like how Levak's program makes every software think it is another version of the OS, but I also like how tangrs' program allows to write anything we want, not only numbers :)
In the first page, my first comment shows a program that allows you to rewrite the fomratting string with what you want in only 10 lines.
And also, tangrs, ExtendeD commited my patch in order to add the String API and the bug fix in show_msg_user_input().