Author Topic: Early beta of nspire version string patcher  (Read 12243 times)

0 Members and 1 Guest are viewing this topic.

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Early beta of nspire version string patcher
« on: August 07, 2012, 08:14:31 am »
For a bit of fun, I made a version string patcher for the Nspire.



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

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Early beta of nspire version string patcher
« Reply #1 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 ? :)
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline tangrs

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 229
  • Rating: +98/-0
    • View Profile
    • tangrs blog
Re: Early beta of nspire version string patcher
« Reply #2 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

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: Early beta of nspire version string patcher
« Reply #3 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.

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: Early beta of nspire version string patcher
« Reply #4 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

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Early beta of nspire version string patcher
« Reply #5 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;
}




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.
« Last Edit: August 08, 2012, 08:11:14 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 Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: Early beta of nspire version string patcher
« Reply #6 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

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Early beta of nspire version string patcher
« Reply #7 on: August 07, 2012, 10:16:22 am »
Very nice both of you ;-)
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Early beta of nspire version string patcher
« Reply #8 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 :

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;
}
« Last Edit: August 07, 2012, 04:00:36 pm 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 DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Early beta of nspire version string patcher
« Reply #9 on: August 07, 2012, 04:05:59 pm »
Wow nice, so basically we can change most of the system menu text and stuff?

Offline Wayne

  • LV3 Member (Next: 100)
  • ***
  • Posts: 72
  • Rating: +3/-3
    • View Profile
Re: Early beta of nspire version string patcher
« Reply #10 on: August 07, 2012, 05:36:15 pm »
Yeah TI finally released 4.1.1  :thumbsup:

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: Early beta of nspire version string patcher
« Reply #11 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.
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: Early beta of nspire version string patcher
« Reply #12 on: August 07, 2012, 05:44:02 pm »
Awesome levak :P
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: Early beta of nspire version string patcher
« Reply #13 on: August 07, 2012, 06:19:42 pm »
so now we can trick the sending software by telling it we are running another OS?

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Early beta of nspire version string patcher
« Reply #14 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 :)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.