apbf icon indicating copy to clipboard operation
apbf copied to clipboard

Process didn't exit successfully

Open Growik opened this issue 3 years ago • 4 comments

Have no idea, what's wrong.

Generating possible patterns... Patterns to try: 1614

Pattern: 2-1-0-3 ●●● ●○○ ○○○ Passphrase: '3214' 1 / 1614 [>---------------------------------------------------------------------------------------] 0.06 % 564.72/s 3s An error occurred, heres the output for the decryption attempt:

  • status: exit code: 0

  • stdout: Attempting to decrypt data partition or user data via command line. Attempting to decrypt FBE for user 0... Failed to decrypt user 0

  • stderr: error: process didn't exit successfully: .\apbf.exe (exit code: 1)

Growik avatar Jan 10 '22 23:01 Growik

I think it has to do with apfs being built with an older version of twrp which outputs const STDOUT_NORMAL: &str = "Attempting to decrypt data partition via command line.\n"

whenever there's a failed attempt rather then: Attempting to decrypt data partition or user data via command line. Attempting to decrypt FBE for user 0... Failed to decrypt user 0

I tried const STDOUT_NORMAL: &str = "Attempting to decrypt data partition via command line.\nAttempting to decrypt FBE for user 0...\nFailed to decrypt user 0\n"; but that doesn't work either

fraschm1998 avatar Jan 11 '22 19:01 fraschm1998

I added return false; right above the //Report and exit in fn try_phrase(phrase: &str) -> bool { and it seems to be running fine now.

fraschm1998 avatar Jan 11 '22 19:01 fraschm1998

You also may have to run it twice as the DOTS in src/config.rs is set from 0-8 whereas some devices like my Dad's op7pro with twrp-3.5.2-Nebrassy-2 is from 1-9. To change that you just replace pub const DOTS: [u16; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8]; with pub const DOTS: [u16; 9] = [1, 2, 3, 4, 5, 6, 7, 8, 9];

EDIT: I think I'm wrong about this. I thought the DOTS was the same as the passphrase but passphrase already increments by 1.

fraschm1998 avatar Jan 11 '22 20:01 fraschm1998

I have found the solution just replace with this line

const STDOUT_NORMAL: &str = "Attempting to decrypt data partition or user data via command line.\nAttempting to decrypt FBE for user 0...\nFailed to decrypt user 0\n";

and it will work successfully.

iitzrohan avatar Jun 16 '22 11:06 iitzrohan

This should be fixed by https://github.com/timvisee/apbf/pull/7

qlyoung avatar Jul 26 '23 16:07 qlyoung