Wizard
Posts: 2,694
Karma: 6254413
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
|
Quote:
Originally Posted by 93terp
oh dear, I've messed up big time. I installed the new patches before installing the updated firmware and now my Forma is in a do-loop trying to do the patches update. Help! How can I force exit/stop so that I can install the new firmware?
and
|
What do you mean by do-loop? Does it switch back and forth between normal boot and updates, does it not get past blinking lights, or does it keep rebooting into the updates? Also, which version were you on before?
It shouldn't be possible to cause it to loop when applying updates which only touch nickel/libnickel/etc unless the internal storage is failing. The init script sets it to boot to recovery before updating, and puts it back after removing the upgrade file. In addition, it will reset if there's unfixable FS corruption on the user storage, or if `pickel should-factory-reset` returns true. Here's some stuff from pickel (TLDR: it's a counter for failed boots): Spoiler:
Code:
00010a28 DFF8E004 ldr.w r0, =0xc0a ; 0x10f0c, CODE XREF=sub_1086a+98
00010a2c 0221 movs r1, #0x2 ; argument "__oflag" for method open@PLT
00010a2e 7844 add r0, pc ; argument "__file" for method open@PLT, "/dev/mmcblk0"
00010a30 FFF79CEE blx open@PLT ; open
00010a34 411C adds r1, r0, #0x1
00010a36 0546 mov r5, r0
00010a38 3FF477AF beq.w loc_1092a
00010a3c 07F1B009 add.w sb, r7, #0xb0
00010a40 4FF40072 mov.w r2, #0x200 ; argument "__nbytes" for method read@PLT
00010a44 4946 mov r1, sb ; argument "__buf" for method read@PLT
00010a46 FFF7CEEE blx read@PLT ; read
00010a4a DFF8C424 ldr.w r2, =0xb6e ; 0x10f10
00010a4e 99F83731 ldrb.w r3, [sb, #0x137]
00010a52 D9F83311 ldr.w r1, [sb, #0x133]
00010a56 7A44 add r2, pc ; 0x115c8
00010a58 52F82320 ldr.w r2, [r2, r3, lsl #2]
00010a5c 9142 cmp r1, r2
00010a5e 01D1 bne loc_10a64
00010a60 042B cmp r3, #0x4
00010a62 22D0 beq loc_10aaa
loc_10a64:
00010a64 9142 cmp r1, r2 ; CODE XREF=sub_1086a+500
00010a66 4FF00004 mov.w r4, #0x0
00010a6a 01D0 beq loc_10a70
loc_10a6c:
00010a6c 4FF0FF33 mov.w r3, #0xffffffff ; CODE XREF=sub_1086a+578
loc_10a70:
00010a70 DFF8A014 ldr.w r1, =0xb46 ; 0x10f14, CODE XREF=sub_1086a+512
00010a74 0133 adds r3, #0x1
00010a76 89F83731 strb.w r3, [sb, #0x137]
00010a7a 0022 movs r2, #0x0 ; argument "__whence" for method lseek@PLT
00010a7c 2846 mov r0, r5 ; argument "__fd" for method lseek@PLT
00010a7e 7944 add r1, pc ; 0x115c8
00010a80 51F82330 ldr.w r3, [r1, r3, lsl #2]
00010a84 1146 mov r1, r2 ; argument "__offset" for method lseek@PLT
00010a86 C9F83331 str.w r3, [sb, #0x133]
00010a8a FFF7DCEE blx lseek@PLT ; lseek
00010a8e 4946 mov r1, sb ; argument "__buf" for method write@PLT
00010a90 4FF40072 mov.w r2, #0x200 ; argument "__n" for method write@PLT
00010a94 2846 mov r0, r5 ; argument "__fd" for method write@PLT
00010a96 FFF7ACEE blx write@PLT ; write
00010a9a 2846 mov r0, r5 ; argument "__fd" for method close@PLT
00010a9c FFF7C0EE blx close@PLT ; close
00010aa0 43E7 b loc_1092a
loc_10aa2:
00010aa2 DFF87484 ldr.w r8, =0xb52 ; 0x10f18, CODE XREF=sub_1086a+56
00010aa6 F844 add r8, pc ; 0x115fc
00010aa8 00E7 b loc_108ac
loc_10aaa:
00010aaa 0124 movs r4, #0x1 ; CODE XREF=sub_1086a+504
00010aac DEE7 b loc_10a6c
Code:
r0 = open("/dev/mmcblk0", 0x2);
r1 = r0 + 0x1;
r5 = r0;
if (r1 != 0x0) {
r9 = r7 + 0xb0;
r0 = read(r0, r9, 0x200);
r3 = *(int8_t *)(r9 + 0x137);
r1 = *(r9 + 0x133);
r2 = *(0x115c8 + r3 * 0x4);
if ((r1 == r2) && (r3 == 0x4)) {
r4 = 0x1;
r3 = 0xffffffff;
}
else {
r4 = 0x0;
if (r1 != r2) {
r3 = 0xffffffff;
}
}
*(int8_t *)(r9 + 0x137) = r3 + 0x1;
*(r9 + 0x133) = *(0x115c8 + (r3 + 0x1) * 0x4);
r0 = lseek(r5, 0x0, 0x0);
r0 = write(r5, r9, 0x200);
r0 = close(r5);
}
goto loc_1092a;
Last edited by geek1011; 08-12-2020 at 01:11 PM.
|