Author Topic: Damaged YAFTL context  (Read 447 times)

Offline trpaslik

  • Member
  • Posts: 4
  • Karma: +0/-0
    • View Profile
  • iDevice: iPhone 4
  • iDroid Version: -
  • Jailbreak: -
Damaged YAFTL context
« on: May 24, 2012, 11:55:34 AM »
I've killed YAFTL context of my iPhone4 ocassionaly. OpeniBoot started saying "yaftl: Wrong context version: ", iTunes restore stucks with error 9 (phone shows apple logo and empty progress bar, then restarts).
After 0xFFing controlblock fields in VSVFL context (to take YAFTL_Restore path) and commenting out panic in YAFTL_Restore() OpeniBoot can see the filesystem, but still no luck with iTunes restore.
Can I store YAFTL_Restore results somehow? Or is there some other way?

P.S. This is not a cry "you guys killed my shiny iPhone!", I'm ready for the worst case :)

Offline nickp666

  • Administrator
  • Member
  • *****
  • Posts: 682
  • Karma: +45/-0
    • View Profile
    • http://www.nickpack.com
  • iDevice: Various
  • iDroid Version: Latest
  • Jailbreak: Various
Re: Damaged YAFTL context
« Reply #1 on: May 24, 2012, 09:33:01 PM »
Currently we only do a read only restore because the code is as buggy as fuck, removing the panic wasnt entirely a good thing to do!

Have you tried a DFU restore? sometimes gets you out of it.

Offline Oranav

  • Dev
  • Member
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Damaged YAFTL context
« Reply #2 on: June 02, 2012, 10:03:13 PM »
Can you post the iBoot log from the restore process?

Offline trpaslik

  • Member
  • Posts: 4
  • Karma: +0/-0
    • View Profile
  • iDevice: iPhone 4
  • iDroid Version: -
  • Jailbreak: -
Re: Damaged YAFTL context
« Reply #3 on: June 14, 2012, 11:39:45 AM »
Sorry for delay

Sure, i tried a DFU restore too, same results.

Here is the log (with YAFTL_Restore enabled):
Code: [Select]
tasks: Initialized bootstrap.
tasks: Initialized irq.
tasks: Initialized uart reader.
clocks: Reconfigured clock 14 to 51300000. (0xa0000014)
clocks: Reconfigured clock 36 to 51300000. (0xb0000001)
clcd: Clock configured at 51300000.
pinot_init()
tasks: Last thread cannot sleep!
mipi_dsim_init()
clcd: p=2, m=57, s=1
tasks: Last thread cannot sleep!
tasks: Last thread cannot sleep!
pinot_init(): pinot_panel_id:      0xa2c205c8
pinot_init(): pinot_default_color: 0x00000000
pinot_init(): pinot_backlight_cal: 0x00000000
tasks: Last thread cannot sleep!
tasks: Last thread cannot sleep!
tasks: Last thread cannot sleep!
Found Gamma table 0x00c20548 / 0x00ffff7f
init: Initializing boot modules.
init: Initializing modules.
tasks: Last thread cannot sleep!
tasks: Last thread cannot sleep!
fmi: Found chip ID 2c 68 04 46 89 00 on fmi0:ce0.
fmi: Found chip ID 2c 68 04 46 89 00 on fmi0:ce1.
fmi: Found chip ID 2c 68 04 46 89 00 on fmi1:ce8.
fmi: Found chip ID 2c 68 04 46 89 00 on fmi1:ce9.
fmi: NAND board ID: (2, 1, 0x4604682c, 0x0, 4, 0x0, 0x0, 0).
fmi: eccfmt=0x000000f5, pagefmt=0x14540004.
fmi: eccfmt=0x000000f5, pagefmt=0x14540004.
fmi: tVal 0x00011111.
fmi: tVal 0x00011111.
fmi: Initialized NAND memory! 4096 bytes per page, 256 pages per block, 4096 blocks per CE.
vfl: Detected VSVFL.
blocks per ce: 0x00001000
blocks per bank: 0x1000
banks per ce: 0x00000001
bytes per page: 0x00001000
bank address space: 0x00001000
num ce: 0x00000004
pages per block: 0x00000100
pages per block2: 0x00000100
ecc bits: 0x0000001e
some_page_mask: 0x000001e4
pages_total: 0x00400000
pages_per_sublk: 0x00000400
some_sublk_mask: 0x00079000
banks_total: 0x00000004
num_ecc_bytes: 0x0000000a
bytes_per_spare: 0x0000000c
one: 0x00000001
some_crazy_val: 0x00000df1
vfl_blocks: 0x00000df5
fs_start_block: 0x00000e05
vsvfl: Opening 3f050.
vsvfl: Checking CE 0.
vsvfl: Checking CE 1.
vsvfl: Checking CE 2.
vsvfl: Checking CE 3.
vsvfl: detected chip vendor 0x120014
vsvfl: VFL successfully opened!
yaftl: got information from VFL.
pagesPerSublk: 2048
numBlocks: 980
bytesPerPage: 4096
total_banks_ftl: 8
metaBytes: 12
unkn20_1: 1
total_usable_pages: 2007040
yaftl: context is invalid. performing a read-only restore...
yaftl: out of TOC caches, but restore might have already succeeded.
yaftl: restore done.
mtd: New device, 'FTL Layer', registered.
bdev: Registered new device, 0x483617d0.
bdev: partition id: 0, name: System, range: 24576 - 1386758144
, range: 1386758144 - 3053477888�
fmi: UECC ce 0 page 0x00000110.
h2fmi: Found Plog
h2fmi: Found LwVM
h2fmi: Found Dkey
tasks: Initialized ACM.
USB: Hardware Configuration
    HWCFG1 = 0x00000264
    HWCFG2 = 0x228f60d0
    HWCFG3 = 0x07e800e8
    HWCFG4 = 0xdbf08030
radio: comm board detected.
ACM: Ready.
radio: no response from baseband!
  ___                   _ ____              _   
 / _ \ _ __   ___ _ __ (_) __ )  ___   ___ | |_
| | | | '_ \ / _ \ '_ \| |  _ \ / _ \ / _ \| __|
| |_| | |_) |  __/ | | | | |_) | (_) | (_) | |_
 \___/| .__/ \___|_| |_|_|____/ \___/ \___/ \__|
      |_|                                       

version: openiboot 0.3 commit  for iPhone 4
ACM: Starting
ACM: Done: .

Offline Oranav

  • Dev
  • Member
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Damaged YAFTL context
« Reply #4 on: June 14, 2012, 06:01:09 PM »
That's the OpeniBoot log (though it still helps).
I'd like to see the iBoot log, from the restore process...
It is stored in "~/Library/Logs/iPhone Updater Logs/" or "%AppData%\Apple Computer\iTunes\iPhone Updater Logs\".

Offline trpaslik

  • Member
  • Posts: 4
  • Karma: +0/-0
    • View Profile
  • iDevice: iPhone 4
  • iDroid Version: -
  • Jailbreak: -
Re: Damaged YAFTL context
« Reply #5 on: June 15, 2012, 05:16:27 PM »
Ah, sorry, here is it: http://pastebin.com/3qpPtECd
Looks like nothing interesting is there, disconnect at some early stage w/o returning device log :(
Is it possible to see that boot log i.e. on serial port in real time?

Offline Oranav

  • Dev
  • Member
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Damaged YAFTL context
« Reply #6 on: June 16, 2012, 07:41:59 AM »
I think iBoot spits out debug data into the serial port only if the "debug-uarts" NVRAM variable is 1,
but I guess your NVRAM is also damaged.
You can however patch iBoot so it assumes "debug-uarts" is 1 by default, but I think it's easier over USB.

I was wrong, that log was the restore log, not the iBoot one.
Can you load iBoot using syringe (the same way you load OpeniBoot) and see if there's any output on iRecovery?

Offline trpaslik

  • Member
  • Posts: 4
  • Karma: +0/-0
    • View Profile
  • iDevice: iPhone 4
  • iDroid Version: -
  • Jailbreak: -
Re: Damaged YAFTL context
« Reply #7 on: June 28, 2012, 06:55:28 PM »
iBoot log:
Code: [Select]
[NAND] h2fmiPrintConfig:421 Chip ID 2C 68 04 46 89 00 on FMI0:CE0
[NAND] h2fmiPrintConfig:421 Chip ID 2C 68 04 46 89 00 on FMI0:CE1
[NAND] h2fmiPrintConfig:421 Chip ID 2C 68 04 46 89 00 on FMI1:CE8
[NAND] h2fmiPrintConfig:421 Chip ID 2C 68 04 46 89 00 on FMI1:CE9


=======================================
::
:: iBoot for n90ap, Copyright 2011, Apple Inc.
::
:: BUILD_TAG: iBoot-1219.43.32
::
:: BUILD_STYLE: RELEASE
::
:: USB_SERIAL_NUMBER: CPID:8930 CPRV:20 CPFM:03 SCEP:02 BDID:00 EC          [OK]
Boot Failure Count: 0 Panic Fail Count: 0
Delaying boot for 0 seconds. Hit enter to break into the command prompt...
HFSInitPartition: 0x5ff5ae80
Not HFS+ (signature 0x0000)
root filesystem mount failed
Entering recovery mode, starting command prompt
XT is not valid . Performing full NAND R/O restore ... 
yaFTL::restoreMount(l:2754): ran out of available cache pages on toc entry 336
yaFTL::restoreMount(l:2755): can still be enough to mount OS partition
[FTL:MSG] FTL_Open           [OK]
Boot Failure Count: 0 Panic Fail Count: 0
Delaying boot for 0 seconds. Hit enter to break into the command prompt...
HFSInitPartition: 0x5ff5ae80
Not HFS+ (signature 0x0000)
root filesystem mount failed
Entering recovery mode, starting command prompt
XT is not valid . Performing full NAND R/O restore ... 
yaFTL::restoreMount(l:2754): ran out of available cache pages on toc entry 336
yaFTL::restoreMount(l:2755): can still be enough to mount OS partition
[FTL:MSG] FTL_Open           [OK]
Boot Failure Count: 0 Panic Fail Count: 0
Delaying boot for 0 seconds. Hit enter to break into the command prompt...
HFSInitPartition: 0x5ff5ae80
Not HFS+ (signature 0x0000)
root filesystem mount failed
Entering recovery mode, starting command prompt

Strange, iBoot doesn't recognize HFS, but OpeniBoot can mount it after YAFTL_Restore()