how to find the decompressed size of CX OS
how to find the decompressed size of CX OS
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?
-
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)- Messages: 745
- Inscription: 29 Mar 2016, 01:22
- Localisation: This account is no longer used.
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: how to find the decompressed size of CX OS
That's something I was wondering about, as I don't use the publicly available decrypting method.
-
critorAdmin
Niveau 19: CU (Créateur Universel)- Messages: 41496
- Images: 14632
- Inscription: 25 Oct 2008, 00:00
- Localisation: Montpellier
- Genre:
- Calculatrice(s):→ MyCalcs profile
- YouTube: critor3000
- Twitter/X: critor2000
- GitHub: critor
Re: how to find the decompressed size of CX OS
critor a écrit:That's something I was wondering about, as I don't use the publicly available decrypting method.
What is that method?
-
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)- Messages: 745
- Inscription: 29 Mar 2016, 01:22
- Localisation: This account is no longer used.
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: how to find the decompressed size of CX OS
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
-
critorAdmin
Niveau 19: CU (Créateur Universel)- Messages: 41496
- Images: 14632
- Inscription: 25 Oct 2008, 00:00
- Localisation: Montpellier
- Genre:
- Calculatrice(s):→ MyCalcs profile
- YouTube: critor3000
- Twitter/X: critor2000
- GitHub: critor
Re: how to find the decompressed size of CX OS
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();
}
}
-
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)- Messages: 745
- Inscription: 29 Mar 2016, 01:22
- Localisation: This account is no longer used.
- Genre:
- Calculatrice(s):→ MyCalcs profile
-
critorAdmin
Niveau 19: CU (Créateur Universel)- Messages: 41496
- Images: 14632
- Inscription: 25 Oct 2008, 00:00
- Localisation: Montpellier
- Genre:
- Calculatrice(s):→ MyCalcs profile
- YouTube: critor3000
- Twitter/X: critor2000
- GitHub: critor
Re: how to find the decompressed size of CX OS
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
-
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)- Messages: 745
- Inscription: 29 Mar 2016, 01:22
- Localisation: This account is no longer used.
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: how to find the decompressed size of CX OS
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.
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.
Co-mainteneur de GCC4TI (documentation en ligne de GCC4TI), TIEmu et TILP.
-
Lionel DebrouxSuper Modo
Niveau 14: CI (Calculateur de l'Infini)- Messages: 6859
- Inscription: 23 Déc 2009, 00:00
- Localisation: France
- Genre:
- Calculatrice(s):→ MyCalcs profile
- Classe: -
- GitHub: debrouxl
Re: how to find the decompressed size of CX OS
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?
-
parrotgeek1Programmeur
Niveau 11: LV (Légende Vivante)- Messages: 745
- Inscription: 29 Mar 2016, 01:22
- Localisation: This account is no longer used.
- Genre:
- Calculatrice(s):→ MyCalcs profile
Re: how to find the decompressed size of CX OS
You can modify imgmanip to output the keys. Take a look at the source code
-
LegimetProgrammeur
Niveau 2: MI2 (Membre Initié)- Messages: 13
- Inscription: 12 Déc 2013, 02:49
- Genre:
- Calculatrice(s):→ MyCalcs profile
11 messages
• Page 1 sur 2 • 1, 2
Retourner vers Native: Ndless, Linux, ...
Qui est en ligne
Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 13 invités