Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tesdisk / photorec failed to run in MacOS Catalina #65

Closed
syhrz opened this issue Jun 17, 2019 · 27 comments
Closed

tesdisk / photorec failed to run in MacOS Catalina #65

syhrz opened this issue Jun 17, 2019 · 27 comments

Comments

@syhrz
Copy link

syhrz commented Jun 17, 2019

Seems like the binary for MacOS still in 32 bit. This cause the binary failed to run since MacOS Catalina removing support for 32 bit application.

sh: ./photorec: Bad CPU type in executable
@syhrz
Copy link
Author

syhrz commented Jun 18, 2019

Just a little update, it's successfully run after I build the 64 bit binary version myself.

@cgsecurity
Copy link
Owner

cgsecurity commented Jun 20, 2019

I don't have a Mac computer myself.
TestDisk documentation https://www.cgsecurity.org/testdisk.pdf about compilation on macOS is very light.
Can you add more information ? Documentation can be edited via https://github.com/cgsecurity/testdisk_documentation

@darnel
Copy link

darnel commented Sep 16, 2019

Quick lazy solution is brew install testdisk, it currently installs 7.1 and works well.

@MohdMash
Copy link

MohdMash commented Oct 9, 2019

Hi guys,
I am tired of trying to run testDisk on my macPro wish Catalina 10.15. It never works, it just says: Bad CPU type in executable. Can you help me with the 64 bit version?

@darnel
Copy link

darnel commented Oct 9, 2019

@MohdMash use Homebrew package system (https://brew.sh) as I did :)

@MohdMash
Copy link

MohdMash commented Oct 9, 2019

Hi Darnel, Thanks for the reply. I visited the link and saw the testDisk, but actually I am lost, I don't know what to do.

@darnel
Copy link

darnel commented Oct 10, 2019

@MohdMash Homebrew is package manager - similar to apt, yum... etc in Linux. It can deliver (mostly command-line interface) programmes in form of pre-compiled binaries or source codes, that are compiled during install. /someone correct me if needed/

If you need testdisk simply install Homebrew from Terminal by long command from https://brew.sh/#install and then enter brew install testdisk into Terminal.

@MohdMash
Copy link

MohdMash commented Oct 10, 2019

It worked very well! Thanks a lot Darnel :)

Repository owner locked and limited conversation to collaborators Oct 22, 2019
Repository owner unlocked this conversation Oct 22, 2019
@cgsecurity cgsecurity mentioned this issue Oct 22, 2019
@filipfjeldstad
Copy link

filipfjeldstad commented Nov 6, 2019

Hello! I am able to get it running on Catalina, but not having external harddrives showing up. Any tips or help would be appreciated!

@1pavanb
Copy link

1pavanb commented May 17, 2020

Hello! I am able to get it running on Catalina, but not having external harddrives showing up. Any tips or help would be appreciated!

@filipfjeldstad You have to run it with sudo. sudo testdisk /list

Otherwise it shows this message
TestDisk 7.1, Data Recovery Utility, July 2019
Christophe GRENIER grenier@cgsecurity.org
https://www.cgsecurity.org
Please wait...
No disk detected.
You need to be root to use TestDisk.

is that what happened to you? hope it helps

@janjan32
Copy link

janjan32 commented Jun 21, 2020

I've installed homebrew and still can't get photorec to work. It worked on High Sierra but not Catalina. :( Any advice?
I'm using the root account, too.
Any ideas?

Last login: Sun Jun 21 09:59:34 on ttys004
MacBook-Pro-2:~ root# /var/root/Downloads/testdisk-7.2-WIP/photorec ; exit;
-sh: /var/root/Downloads/testdisk-7.2-WIP/photorec: Bad CPU type in executable
logout
-n Saving session...
-ne
...copying shared history...
-ne
...saving history...
-n truncating history files...
-ne
...
completed.

[Process completed]

@cgsecurity
Copy link
Owner

cgsecurity commented Jun 21, 2020

I've installed homebrew and still can't get photorec to work. It worked on High Sierra but not Catalina. :( Any advice?
I'm using the root account, too.
Any ideas?

Last login: Sun Jun 21 09:59:34 on ttys004
MacBook-Pro-2:~ root# /var/root/Downloads/testdisk-7.2-WIP/photorec ; exit;
-sh: /var/root/Downloads/testdisk-7.2-WIP/photorec: Bad CPU type in executable

Use the binary photorec installed via homebrew instead of the binary downloaded from cgsecurity.org.
Run "sudo photorec"

@janjan32
Copy link

janjan32 commented Jun 22, 2020

Thank you so much! Recovering now. I hope it works. : )

@janjan32
Copy link

janjan32 commented Jun 22, 2020

And I don't need the root! So nice.

@janjan32
Copy link

janjan32 commented Jun 22, 2020

I was able to download files, but i'm getting an error 32 broken pipe when I try to expand them. I can't seem to find a way to expand them.
files

@darnel
Copy link

darnel commented Jun 22, 2020

@janjan32 Fact that some file is recovered unfortunately doesn't imply that content is correct.

@janjan32
Copy link

janjan32 commented Jun 22, 2020

I'm testing it with a formatted GoPro SD card.and it's finding files (MP4) quicktime can't open them. I've changed the file type to .mov. no luck. Oh well.

@LeeBinder
Copy link

LeeBinder commented Dec 12, 2021

Thank you very much. Is there any way to install testdisk-7.2-WIP (beta) via brew - and if so, can you please share the command?

On https://formulae.brew.sh/formula/testdisk I only see 7.1, so I guess the answer is no ..

@cgsecurity
Copy link
Owner

cgsecurity commented Dec 12, 2021

TestDisk 7.2-WIP is available for i386 and x86_64 macos from https://www.cgsecurity.org/
So no need to use brew

@LeeBinder
Copy link

LeeBinder commented Dec 12, 2021

Great, thank you Christophe - just had seen that a few seconds before you replied 👍 I am wishing you a pleasant remainder of your Sunday.

@bram-03
Copy link

bram-03 commented Jul 8, 2022

Hello! I am able to get it running on Catalina, but not having external harddrives showing up. Any tips or help would be appreciated!

Hii, I have the same issue. installed both Testdisk 7.1 and 7.2-WIP and still the same result with "No hard disk found". I try to recover my external harddisk on a macbook (2014, MacOS Catalina).

I hope someone could give me THE solution? Thanks in advance.

@alehxandro
Copy link

alehxandro commented Sep 19, 2022

I did all that you said here and still no working, macbook pro 2107 catalina
"/Applications/testdisk-7.2-WIP/photorec ; exit;
zsh: bad CPU type in executable: /Applications/testdisk-7.2-WIP/photorec"

@cgsecurity
Copy link
Owner

cgsecurity commented Sep 19, 2022

I did all that you said here and still no working, macbook pro 2107 catalina "/Applications/testdisk-7.2-WIP/photorec ; exit; zsh: bad CPU type in executable: /Applications/testdisk-7.2-WIP/photorec"

You need to use TestDisk 7.2-WIP "Mac OS X Intel 64-bit"

@LeeBinder
Copy link

LeeBinder commented Sep 19, 2022

also Catalina, also Intel MacBook. Confirming that as supposed and expected with TestDisk 7.2-WIP "Mac OS X Intel 64-bit":

Bildschirmfoto 2022-09-19 um 22 01 55

:)

@alehxandro
Copy link

alehxandro commented Sep 19, 2022

I did all that you said here and still no working, macbook pro 2107 catalina "/Applications/testdisk-7.2-WIP/photorec ; exit; zsh: bad CPU type in executable: /Applications/testdisk-7.2-WIP/photorec"

You need to use TestDisk 7.2-WIP "Mac OS X Intel 64-bit"

I did it and does not work, says this . . .

PhotoRec 7.2-WIP, Data Recovery Utility, March 2022
Christophe GRENIER grenier@cgsecurity.org
https://www.cgsecurity.org

PhotoRec is free software, and
comes with ABSOLUTELY NO WARRANTY.

No hard disk found
You need to be root to use PhotoRec.

And I'm the administrator I don't understand it!
Captura de Pantalla 2022-09-19 a la(s) 18 16 12

@cgsecurity
Copy link
Owner

cgsecurity commented Sep 20, 2022

@LeeBinder
Copy link

LeeBinder commented Sep 20, 2022

FYI, I do have SIP partially disabled:

System Integrity Protection status: unknown (Custom Configuration).

Configuration:
	Apple Internal: disabled
	Kext Signing: disabled
	Filesystem Protections: disabled
	Debugging Restrictions: disabled
	DTrace Restrictions: enabled
	NVRAM Protections: enabled
	BaseSystem Verification: enabled

Current csr-active-config value in NVRAM..

..as 32 bit hex:
0x00000a0f

..as base64:
DwoAAA==

Maybe that's why photorec works here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants