testdisk icon indicating copy to clipboard operation
testdisk copied to clipboard

Function write_part_xbox not implemented

Open tlaurion opened this issue 5 years ago • 9 comments

Why is that @crrodriguez @holodnak @tobiaspal @mmuman @Enlik ?

Trying to salvage drive content with testdisk recognizing all the partition table and being ready to save content but unfortunately Function write_part_xbox not implemented is in the way :| TestDiskFatX TestdiskFatX_Save TestDiskFatX_Write_unsupported

tlaurion avatar May 24 '20 16:05 tlaurion

Version: debian buster 7.0-3+b4

Get:1 https://deb.debian.org/debian buster/main amd64 testdisk amd64 7.0-3+b4 [388 kB]
Fetched 388 kB in 4s (96.9 kB/s)   
Selecting previously unselected package testdisk.
(Reading database ... 222928 files and directories currently installed.)
Preparing to unpack .../testdisk_7.0-3+b4_amd64.deb ...
Unpacking testdisk (7.0-3+b4) ...
Setting up testdisk (7.0-3+b4) ...
Processing triggers for man-db (2.8.5-2) ...

tlaurion avatar May 24 '20 16:05 tlaurion

Same built from 8d54e20096ec347f0f144d5e0c02b32d24d374ab TestDisk 7.2-WIP, Data Recovery Utility, May 2020

tlaurion avatar May 24 '20 16:05 tlaurion

Removing lines in godmode.c results in a write being permitted, but a write error.

diff --git a/src/godmode.c b/src/godmode.c
index 0b41b0e..1f9531f 100644
--- a/src/godmode.c
+++ b/src/godmode.c
@@ -1410,12 +1410,6 @@ static int ask_write_partition_table(const list_part_t *list_part_org, disk_t *d
 	{
 #ifdef HAVE_NCURSES
 	  not_implemented("write_part_sun");
-#endif
-	}
-	else if(disk_car->arch == &arch_xbox)
-	{
-#ifdef HAVE_NCURSES
-	  not_implemented("write_part_xbox");
 #endif
 	}
 	else if(disk_car->arch->write_part!=NULL)

tlaurion avatar May 24 '20 16:05 tlaurion

Please tag me in if you have any useful input!

tlaurion avatar May 24 '20 16:05 tlaurion

Because nobody had the time and/or the need to have it implemented yet, hence the error.

mmuman avatar May 24 '20 16:05 mmuman

@mmuman any guidelines?

tlaurion avatar May 24 '20 17:05 tlaurion

Not really… You'll want to check how other partitioning schemes are implemented, and read documentation about the xbox one. And test your code against a blank image or device you can try in something else that can read it to make sure it works.

mmuman avatar May 24 '20 17:05 mmuman

Fixed offsets are used for XBOX partition "table". In practice, there is no table: https://www.jekkt.com/talks/xbox-presentation.pdf

cgsecurity avatar May 24 '20 19:05 cgsecurity

@cgsecurity yeah, discovered fatx partitions are right..wished I could just write what was found back to disk. Have a backup I could easily write back and test.

tlaurion avatar May 25 '20 06:05 tlaurion