π
<-
Chat plein-écran
[^]

how to find the decompressed size of CX OS

C, C++, ASM...

how to find the decompressed size of CX OS

Message non lude parrotgeek1 » 08 Fév 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?
Avatar de l’utilisateur
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Prochain niv.: 88%
 
Messages: 745
Inscription: 29 Mar 2016, 01:22
Localisation: This account is no longer used.
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: how to find the decompressed size of CX OS

Message non lude critor » 08 Fév 2017, 23:27

That's something I was wondering about, as I don't use the publicly available decrypting method.
Image
Avatar de l’utilisateur
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Prochain niv.: 42.3%
 
Messages: 41496
Images: 14632
Inscription: 25 Oct 2008, 00:00
Localisation: Montpellier
Genre: Homme
Calculatrice(s):
MyCalcs profile
YouTube: critor3000
Twitter/X: critor2000
GitHub: critor

Re: how to find the decompressed size of CX OS

Message non lude parrotgeek1 » 08 Fév 2017, 23:33

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

What is that method?
Avatar de l’utilisateur
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Prochain niv.: 88%
 
Messages: 745
Inscription: 29 Mar 2016, 01:22
Localisation: This account is no longer used.
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: how to find the decompressed size of CX OS

Message non lude critor » 08 Fév 2017, 23:37

parrotgeek1 a écrit:
critor a écrit: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: Tout sélectionner
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
Avatar de l’utilisateur
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Prochain niv.: 42.3%
 
Messages: 41496
Images: 14632
Inscription: 25 Oct 2008, 00:00
Localisation: Montpellier
Genre: Homme
Calculatrice(s):
MyCalcs profile
YouTube: critor3000
Twitter/X: critor2000
GitHub: critor

Re: how to find the decompressed size of CX OS

Message non lude parrotgeek1 » 08 Fév 2017, 23:47

critor a écrit:
parrotgeek1 a écrit:
critor a écrit: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: Tout sélectionner
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: Tout sélectionner
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();
   }
}
Avatar de l’utilisateur
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Prochain niv.: 88%
 
Messages: 745
Inscription: 29 Mar 2016, 01:22
Localisation: This account is no longer used.
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: how to find the decompressed size of CX OS

Message non lude critor » 09 Fév 2017, 00:30

In what way does it not work ?
Image
Avatar de l’utilisateur
critorAdmin
Niveau 19: CU (Créateur Universel)
Niveau 19: CU (Créateur Universel)
Prochain niv.: 42.3%
 
Messages: 41496
Images: 14632
Inscription: 25 Oct 2008, 00:00
Localisation: Montpellier
Genre: Homme
Calculatrice(s):
MyCalcs profile
YouTube: critor3000
Twitter/X: critor2000
GitHub: critor

Re: how to find the decompressed size of CX OS

Message non lude parrotgeek1 » 09 Fév 2017, 00:51

critor a écrit: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
Avatar de l’utilisateur
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Prochain niv.: 88%
 
Messages: 745
Inscription: 29 Mar 2016, 01:22
Localisation: This account is no longer used.
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: how to find the decompressed size of CX OS

Message non lude Lionel Debroux » 09 Fév 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.
Avatar de l’utilisateur
Lionel DebrouxSuper Modo
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Prochain niv.: 11.2%
 
Messages: 6859
Inscription: 23 Déc 2009, 00:00
Localisation: France
Genre: Homme
Calculatrice(s):
MyCalcs profile
Classe: -
GitHub: debrouxl

Re: how to find the decompressed size of CX OS

Message non lude parrotgeek1 » 09 Fév 2017, 16:39

Lionel Debroux a écrit: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?
Avatar de l’utilisateur
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)
Niveau 11: LV (Légende Vivante)
Prochain niv.: 88%
 
Messages: 745
Inscription: 29 Mar 2016, 01:22
Localisation: This account is no longer used.
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Re: how to find the decompressed size of CX OS

Message non lude Legimet » 09 Fév 2017, 20:37

You can modify imgmanip to output the keys. Take a look at the source code ;)
Avatar de l’utilisateur
LegimetProgrammeur
Niveau 2: MI2 (Membre Initié)
Niveau 2: MI2 (Membre Initié)
Prochain niv.: 46.7%
 
Messages: 13
Inscription: 12 Déc 2013, 02:49
Genre: Non spécifié
Calculatrice(s):
MyCalcs profile

Suivante

Retourner vers Native: Ndless, Linux, ...

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 13 invités

-
Rechercher
-
Social TI-Planet
-
Sujets à la une
Comparaisons des meilleurs prix pour acheter sa calculatrice !
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
Phi NumWorks jailbreak
123
-
Faire un don / Premium
Pour plus de concours, de lots, de tests, nous aider à payer le serveur et les domaines...
Faire un don
Découvrez les avantages d'un compte donateur !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partenaires et pub
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
1276 utilisateurs:
>1258 invités
>13 membres
>5 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Autres sites intéressants
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)