Re: [DNG] Identifying or rsetting a microsd card
On Tue, Dec 10, 2019 at 05:01:24AM +0100, k...@aspodata.se wrote: > Hendrik: > ... > > Device Start End Sectors Size Type > > /dev/sdb1 20483481532768 16M unknown > > /dev/sdb2 34816 31116254 31081439 14.8G unknown > > # file -s /dev/sdb1 > # file -s /dev/sdb2 > > Regards, > /Karl Hammar root@midwinter:~# file -s /dev/sdb1 /dev/sdb1: data root@midwinter:~# file -s /dev/sdb2 /dev/sdb2: data root@midwinter:~# file -s /dev/sdb /dev/sdb: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x0,0,2), end-CHS (0x3ff,255,63), startsector 1, 31116287 sectors, extended partition table (last) root@midwinter:~# All the attempts to figure out what's on it have resulted in more or less the same conclision, so I'll take that as definitive; This is an MBR-formatted disk, with the entire partitions encrypted, so it's unlikely I can find any useful data on it. Time to give up and reformat it empty. Thanks for all the forensic tricks. -- hendrik > > > ___ > Dng mailing list > Dng@lists.dyne.org > https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] Identifying or rsetting a microsd card
Anno domini 2019 Wed, 11 Dec 13:24:46 -0700 Gregory Nowak scripsit: > On Wed, Dec 11, 2019 at 05:32:46PM +, Simon Hobson wrote: > > I would imagine there's a command you can send to the card which tells it > > to bulk-erase itself. Function in one of the disk utils ? > > Yup, hdparm. It works for SSD, I don't know if it would work for SD > cards too. > > Greg > > Does not "blkdiscard /dev/..." do the same job? Nik -- Please do not email me anything that you are not comfortable also sharing with the NSA, CIA ... ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] Identifying or rsetting a microsd card
On Wed, Dec 11, 2019 at 05:32:46PM +, Simon Hobson wrote: > I would imagine there's a command you can send to the card which tells it to > bulk-erase itself. Function in one of the disk utils ? Yup, hdparm. It works for SSD, I don't know if it would work for SD cards too. Greg -- web site: http://www.gregn.net gpg public key: http://www.gregn.net/pubkey.asc skype: gregn1 (authorization required, add me to your contacts list first) If we haven't been in touch before, e-mail me before adding me to your contacts. -- Free domains: http://www.eu.org/ or mail dns-mana...@eu.org ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] Identifying or rsetting a microsd card
marc wrote: > > I wonder if writing 0xff instead of 0x00 is kinder to flash > media. In particular, if the controller is dumb/smart enough > to only erase, not write... I would imagine there's a command you can send to the card which tells it to bulk-erase itself. Function in one of the disk utils ? Simon ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] Identifying or rsetting a microsd card
> Ah, but zero the whole disk and it will > > dd if=/dev/zero of=/dev/sdb bs=1M > > It'll use one write cycle on the media. I wonder if writing 0xff instead of 0x00 is kinder to flash media. In particular, if the controller is dumb/smart enough to only erase, not write... regards marc ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] Identifying or rsetting a microsd card
>>> Hm, dd if=/dev/zero of=/dev/sdb bs=1M count=1 >> >> Yes, that will clear it out. But what file system is customarily on >a new >> 16G microsd card? And does that fs really need everything cleared >out? > >No, that will not wipe the GPT or it's backup. Ah, but zero the whole disk and it will dd if=/dev/zero of=/dev/sdb bs=1M It'll use one write cycle on the media. Simon -- ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] Identifying or rsetting a microsd card
Hendrik: ... > Device Start End Sectors Size Type > /dev/sdb1 20483481532768 16M unknown > /dev/sdb2 34816 31116254 31081439 14.8G unknown # file -s /dev/sdb1 # file -s /dev/sdb2 Regards, /Karl Hammar ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] Identifying or rsetting a microsd card
On 09/12/2019 21:59, Hendrik Boom wrote: > On Mon, Dec 09, 2019 at 10:45:46PM +0100, Antony Stone wrote: >> On Monday 09 December 2019 at 22:38:26, Hendrik Boom wrote: >> >>> I have an sd card that used to be in an android phone. >>> My usual tools tell me very little: >>> >>> root@midwinter:~# lsblk --fs /dev/sdb >>> NAME FSTYPE LABEL UUID MOUNTPOINT >>> sdb >>> ├─sdb1 >>> └─sdb2 >>> >>> root@midwinter:~# fdisk -l /dev/sdb >>> Disk /dev/sdb: 14.9 GiB, 15931539456 bytes, 31116288 sectors >>> Units: sectors of 1 * 512 = 512 bytes >>> Sector size (logical/physical): 512 bytes / 512 bytes >>> I/O size (minimum/optimal): 512 bytes / 512 bytes >>> Disklabel type: gpt >>> Disk identifier: 4F1502F0-81F3-49FA-A294-8B8FB4DB6964 >> >> I'm really rather surprised that a 16Gbyte SD card is has a GPT partition >> table. > > My guess is that Android put it there and that it's not what was on it > originally. > >> >>> Device Start End Sectors Size Type >>> /dev/sdb1 20483481532768 16M unknown >>> /dev/sdb2 34816 31116254 31081439 14.8G unknown >>> root@midwinter:~# >>> >>> Is there another way to find out anything? >> >> Well, given that it's got a GPT partition table, try sgdisk instead of >> sfdisk. >> >>> Or is this likely to be an Google-encrypted card I can do nothing with >>> except restore it to an almost virginal state? >> >> What do you *want* to do with it? >> >> Read it, copy it, reformat it, what? > > Read it if I can (and I aready suspect I can't); otherwise reformat > it to whatever file system it is that most > consumer devices using microsd cards expect. > Kind of a factory reset. > >> >>> And what is the proper way to reformat an sdcard to the file >>> systems just about everything accepts without using >>> up its remaining lifetime? >> >> Hm, dd if=/dev/zero of=/dev/sdb bs=1M count=1 > > Yes, that will clear it out. But what file system is customarily on a new > 16G microsd card? And does that fs really need everything cleared out? No, that will not wipe the GPT or it's backup. Use something like 'gdisk z /dev/sdb' then dd it after if paranoid. Confliction between MBR <=> GPT can cause corruption. > > -- hendrik > ___ > Dng mailing list > Dng@lists.dyne.org > https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng > ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] Identifying or rsetting a microsd card
On Mon, Dec 09, 2019 at 10:45:46PM +0100, Antony Stone wrote: > On Monday 09 December 2019 at 22:38:26, Hendrik Boom wrote: > > > I have an sd card that used to be in an android phone. > > My usual tools tell me very little: > > > > root@midwinter:~# lsblk --fs /dev/sdb > > NAME FSTYPE LABEL UUID MOUNTPOINT > > sdb > > ├─sdb1 > > └─sdb2 > > > > root@midwinter:~# fdisk -l /dev/sdb > > Disk /dev/sdb: 14.9 GiB, 15931539456 bytes, 31116288 sectors > > Units: sectors of 1 * 512 = 512 bytes > > Sector size (logical/physical): 512 bytes / 512 bytes > > I/O size (minimum/optimal): 512 bytes / 512 bytes > > Disklabel type: gpt > > Disk identifier: 4F1502F0-81F3-49FA-A294-8B8FB4DB6964 > > I'm really rather surprised that a 16Gbyte SD card is has a GPT partition > table. My guess is that Android put it there and that it's not what was on it originally. > > > Device Start End Sectors Size Type > > /dev/sdb1 20483481532768 16M unknown > > /dev/sdb2 34816 31116254 31081439 14.8G unknown > > root@midwinter:~# > > > > Is there another way to find out anything? > > Well, given that it's got a GPT partition table, try sgdisk instead of sfdisk. > > > Or is this likely to be an Google-encrypted card I can do nothing with > > except restore it to an almost virginal state? > > What do you *want* to do with it? > > Read it, copy it, reformat it, what? Read it if I can (and I aready suspect I can't); otherwise reformat it to whatever file system it is that most consumer devices using microsd cards expect. Kind of a factory reset. > > > And what is the proper way to reformat an sdcard to the file > > systems just about everything accepts without using > > up its remaining lifetime? > > Hm, dd if=/dev/zero of=/dev/sdb bs=1M count=1 Yes, that will clear it out. But what file system is customarily on a new 16G microsd card? And does that fs really need everything cleared out? -- hendrik ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] Identifying or rsetting a microsd card
On Monday 09 December 2019 at 22:38:26, Hendrik Boom wrote: > I have an sd card that used to be in an android phone. > My usual tools tell me very little: > > root@midwinter:~# lsblk --fs /dev/sdb > NAME FSTYPE LABEL UUID MOUNTPOINT > sdb > ├─sdb1 > └─sdb2 > > root@midwinter:~# fdisk -l /dev/sdb > Disk /dev/sdb: 14.9 GiB, 15931539456 bytes, 31116288 sectors > Units: sectors of 1 * 512 = 512 bytes > Sector size (logical/physical): 512 bytes / 512 bytes > I/O size (minimum/optimal): 512 bytes / 512 bytes > Disklabel type: gpt > Disk identifier: 4F1502F0-81F3-49FA-A294-8B8FB4DB6964 I'm really rather surprised that a 16Gbyte SD card is has a GPT partition table. > Device Start End Sectors Size Type > /dev/sdb1 20483481532768 16M unknown > /dev/sdb2 34816 31116254 31081439 14.8G unknown > root@midwinter:~# > > Is there another way to find out anything? Well, given that it's got a GPT partition table, try sgdisk instead of sfdisk. > Or is this likely to be an Google-encrypted card I can do nothing with > except restore it to an almost virginal state? What do you *want* to do with it? Read it, copy it, reformat it, what? > And what is the proper way to reformat an sdcard to the file > systems just about everything accepts without using > up its remaining lifetime? Hm, dd if=/dev/zero of=/dev/sdb bs=1M count=1 That should blow away the existing partition table and let you start from scratch with sfdisk again. Antony. -- These clients are often infected by viruses or other malware and need to be fixed. If not, the user at that client needs to be fixed... - Henrik Nordstrom, on Squid users' mailing list Please reply to the list; please *don't* CC me. ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
[DNG] Identifying or rsetting a microsd card
I have an sd card that used to be in an android phone. My usua tools tell me very littls: root@midwinter:~# lsblk --fs /dev/sdb NAME FSTYPE LABEL UUID MOUNTPOINT sdb ├─sdb1 └─sdb2 root@midwinter:~# fdisk -l /dev/sdb Disk /dev/sdb: 14.9 GiB, 15931539456 bytes, 31116288 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 4F1502F0-81F3-49FA-A294-8B8FB4DB6964 Device Start End Sectors Size Type /dev/sdb1 20483481532768 16M unknown /dev/sdb2 34816 31116254 31081439 14.8G unknown root@midwinter:~# Is there another way to find out anything? Or is this likely to be an Google-encrypted card I can do nothing with except restore it to an almost virginal state? And what is the proper way to reformat an sdcard to the file systems just about everything accepts without using up its remaining lifetime? -- hendrik ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng