π
<-

how to find the decompressed size of CX OS

C, C++, ASM...

how to find the decompressed size of CX OS

Unread postby parrotgeek1 » 08 Feb 2017, 23:22

I know how to dump RAM, but how do I find out the exact size of the OS so there is not extra data at the end?
User avatar
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 88.2%
 
Posts: 749
Joined: 29 Mar 2016, 01:22
Location: This account is no longer used.
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: how to find the decompressed size of CX OS

Unread postby critor » 08 Feb 2017, 23:27

That's something I was wondering about, as I don't use the publicly available decrypting method.
Image
User avatar
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Level up: 53.6%
 
Posts: 42408
Images: 17124
Joined: 25 Oct 2008, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
MyCalcs profile
YouTube: critor3000
Twitter: critor2000
GitHub: critor

Re: how to find the decompressed size of CX OS

Unread postby parrotgeek1 » 08 Feb 2017, 23:33

critor wrote:That's something I was wondering about, as I don't use the publicly available decrypting method.

What is that method?
User avatar
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 88.2%
 
Posts: 749
Joined: 29 Mar 2016, 01:22
Location: This account is no longer used.
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: how to find the decompressed size of CX OS

Unread postby critor » 08 Feb 2017, 23:37

parrotgeek1 wrote:
critor wrote:That's something I was wondering about, as I don't use the publicly available decrypting method.

What is that method?

archives_voir.php?id=4281 with the complete source code I'm not allowed to share.
In the public source code, the decryption key is missing.

Ok, all CX, CX CAS and CM raw images I've checked so far seems to end with the following pattern :
Code: Select all
12 0C F0 8F 12 0C 00 90 12 0C 10 90 12 0C 00 A0
1A 0C 00 A4 12 0C 00 AC 12 0C 00 B0 12 0C 00 B4
12 0C 00 B8 12 0C 00 BC 12 0C 00 C0 12 0C 00 C4
12 0C 00 C8 12 0C 00 CC 12 0C 00 DC 12 0C 00 A9
12 0C 00 81 12 0C 10 81 12 0C 20 81 12 0C 30 81
12 0C 40 81 12 0C 50 81 12 0C 60 81 12 0C 70 81
12 0C 80 81 12 0C 90 81 12 0C A0 81 12 0C B0 81
Image
User avatar
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Level up: 53.6%
 
Posts: 42408
Images: 17124
Joined: 25 Oct 2008, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
MyCalcs profile
YouTube: critor3000
Twitter: critor2000
GitHub: critor

Re: how to find the decompressed size of CX OS

Unread postby parrotgeek1 » 08 Feb 2017, 23:47

critor wrote:
parrotgeek1 wrote:
critor wrote:That's something I was wondering about, as I don't use the publicly available decrypting method.

What is that method?

archives_voir.php?id=4281 with the complete source code I'm not allowed to share.
In the public source code, the decryption key is missing.

Ok, all CX, CX CAS and CM raw images I've checked so far seem to end with the following pattern :
Code: Select all
12 0C F0 8F 12 0C 00 90 12 0C 10 90 12 0C 00 A0
1A 0C 00 A4 12 0C 00 AC 12 0C 00 B0 12 0C 00 B4
12 0C 00 B8 12 0C 00 BC 12 0C 00 C0 12 0C 00 C4
12 0C 00 C8 12 0C 00 CC 12 0C 00 DC 12 0C 00 A9
12 0C 00 81 12 0C 10 81 12 0C 20 81 12 0C 30 81
12 0C 40 81 12 0C 50 81 12 0C 60 81 12 0C 70 81
12 0C 80 81 12 0C 90 81 12 0C A0 81 12 0C B0 81

Thanks, it works EDIT: IT DOESN"T
Code: Select all
import java.io.*;
import java.util.*;
import java.nio.*;
import java.nio.file.*;

public class CutOS {
   public static int indexOf(byte[] outerArray, byte[] smallerArray) {
      for(int i = 0; i < outerArray.length - smallerArray.length+1; ++i) {
         boolean found = true;
         for(int j = 0; j < smallerArray.length; ++j) {
            if (outerArray[i+j] != smallerArray[j]) {
               found = false;
               break;
            }
         }
         if (found) return i;
      }
      return -1;
   }
   
   public static void main(String args[]) throws Exception {
      String in = args[0];
      String out = args[1];
      byte[] bytes = Files.readAllBytes(Paths.get(in));
      String text = new String(bytes);
      // thanks critor
      byte[] patt = new byte[]{
         (byte)0x12, (byte)0x0C, (byte)0xF0, (byte)0x8F, (byte)0x12, (byte)0x0C, (byte)0x00, (byte)0x90, (byte)0x12, (byte)0x0C, (byte)0x10, (byte)0x90, (byte)0x12, (byte)0x0C, (byte)0x00, (byte)0xA0,
         (byte)0x1A, (byte)0x0C, (byte)0x00, (byte)0xA4, (byte)0x12, (byte)0x0C, (byte)0x00, (byte)0xAC, (byte)0x12, (byte)0x0C, (byte)0x00, (byte)0xB0, (byte)0x12, (byte)0x0C, (byte)0x00, (byte)0xB4,
         (byte)0x12, (byte)0x0C, (byte)0x00, (byte)0xB8, (byte)0x12, (byte)0x0C, (byte)0x00, (byte)0xBC, (byte)0x12, (byte)0x0C, (byte)0x00, (byte)0xC0, (byte)0x12, (byte)0x0C, (byte)0x00, (byte)0xC4,
         (byte)0x12, (byte)0x0C, (byte)0x00, (byte)0xC8, (byte)0x12, (byte)0x0C, (byte)0x00, (byte)0xCC, (byte)0x12, (byte)0x0C, (byte)0x00, (byte)0xDC, (byte)0x12, (byte)0x0C, (byte)0x00, (byte)0xA9,
         (byte)0x12, (byte)0x0C, (byte)0x00, (byte)0x81, (byte)0x12, (byte)0x0C, (byte)0x10, (byte)0x81, (byte)0x12, (byte)0x0C, (byte)0x20, (byte)0x81, (byte)0x12, (byte)0x0C, (byte)0x30, (byte)0x81,
         (byte)0x12, (byte)0x0C, (byte)0x40, (byte)0x81, (byte)0x12, (byte)0x0C, (byte)0x50, (byte)0x81, (byte)0x12, (byte)0x0C, (byte)0x60, (byte)0x81, (byte)0x12, (byte)0x0C, (byte)0x70, (byte)0x81,
         (byte)0x12, (byte)0x0C, (byte)0x80, (byte)0x81, (byte)0x12, (byte)0x0C, (byte)0x90, (byte)0x81, (byte)0x12, (byte)0x0C, (byte)0xA0, (byte)0x81, (byte)0x12, (byte)0x0C, (byte)0xB0, (byte)0x81
      };
      int w = indexOf(bytes,patt);
      byte [] subArray = Arrays.copyOfRange(bytes, w+patt.length, bytes.length);
      FileOutputStream fos = new FileOutputStream(out);
      fos.write(subArray);
      fos.close();
   }
}
User avatar
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 88.2%
 
Posts: 749
Joined: 29 Mar 2016, 01:22
Location: This account is no longer used.
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: how to find the decompressed size of CX OS

Unread postby critor » 09 Feb 2017, 00:30

In what way does it not work ?
Image
User avatar
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Level up: 53.6%
 
Posts: 42408
Images: 17124
Joined: 25 Oct 2008, 00:00
Location: Montpellier
Gender: Male
Calculator(s):
MyCalcs profile
YouTube: critor3000
Twitter: critor2000
GitHub: critor

Re: how to find the decompressed size of CX OS

Unread postby parrotgeek1 » 09 Feb 2017, 00:51

critor wrote:In what way does it not work ?

I fixed it. it has to go from 0 to the end of the pattern. It was my mistake
User avatar
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 88.2%
 
Posts: 749
Joined: 29 Mar 2016, 01:22
Location: This account is no longer used.
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: how to find the decompressed size of CX OS

Unread postby Lionel Debroux » 09 Feb 2017, 09:12

This is a brittle way to do the job, though it happens to work... you'd much better use imgmanip ;)
The set of decryption keys isn't that hard to build. Maybe imgmanip itself (or something close to that) can do it.
Membre de la TI-Chess Team.
Co-mainteneur de GCC4TI (documentation en ligne de GCC4TI), TIEmu et TILP.
User avatar
Lionel DebrouxSuper Modo
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 11.4%
 
Posts: 6873
Joined: 23 Dec 2009, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Class: -
GitHub: debrouxl

Re: how to find the decompressed size of CX OS

Unread postby parrotgeek1 » 09 Feb 2017, 16:39

Lionel Debroux wrote:This is a brittle way to do the job, though it happens to work... you'd much better use imgmanip ;)
The set of decryption keys isn't that hard to build. Maybe imgmanip itself (or something close to that) can do it.

I'm confused. Can you PM me?
User avatar
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Level up: 88.2%
 
Posts: 749
Joined: 29 Mar 2016, 01:22
Location: This account is no longer used.
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: how to find the decompressed size of CX OS

Unread postby Legimet » 09 Feb 2017, 20:37

You can modify imgmanip to output the keys. Take a look at the source code ;)
User avatar
LegimetProgrammeur
Niveau 4: MC (Membre Confirmé)
Niveau 4: MC (Membre Confirmé)
Level up: 8%
 
Posts: 13
Joined: 12 Dec 2013, 02:49
Gender: Not specified
Calculator(s):
MyCalcs profile

Next

Return to Native: Ndless, Linux, ...

Who is online

Users browsing this forum: ClaudeBot [spider] and 4 guests

-
Search
-
Social TI-Planet
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
1949 utilisateurs:
>1909 invités
>34 membres
>6 robots
Record simultané (sur 6 mois):
7582 utilisateurs (le 25/06/2025)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)