View Single Post
Old 06-20-2021, 04:10 PM   #736
Clem2605
Connoisseur
Clem2605 began at the beginning.
 
Posts: 53
Karma: 10
Join Date: May 2020
Device: Kobo H2O, Kobo Libra H2O, Boox Tab Ultra C
Hello,

I have a problem with my 'Larger Sleep/Power-off timeouts' patch. I don't know if this is the right place to post this, but I didn't find anywhere else.

Anyway, here it is:
I use kobopatch_4.26.16704 to go with my Libra H2O and I used the site 'kobopatch' to set up 'Larger Sleep/Power-off timeouts' to the values I wanted, here's the URL: https://pgaskin.net/kobopatch-patche...65,193,220,248

I copy/pasted the results in my 'libnickel' file and then used the overrides in kobopatch.yaml to enable it, here it is:
Code:
Larger Sleep/Power-off timeouts:
  - Enabled: no
  - PatchGroup: Sleep/Power-off timeouts
  - Description: |
      Increase the available sleep/power-off timeouts to larger values (up to a
      few weeks). To customize this patch, see https://pgaskin.net/kobopatch-patches/lgrpwroff-15505.html .

      IMPORTANT - Although this patch has been tested by multiple users and
      confirmed to be working, the interaction between the RTC timer and Nickel
      has many moving parts. As reported by JSWolf on MR, this patch might have
      issues with actually powering-off with timeouts longer than a day. The
      cause is likely to be the auto-sync interval or sleepcover causing the
      timer to be overridden/reset every day. Nevertheless, this patch should
      work reliably for timeouts under 12 hours, and probably under 1 day.

      If you are using this patch with timeouts above 12 hours, and can confirm
      if it works/doesn't work, please PM me or comment on GitHub with your
      setting values, sleepcover or not, auto-sync interval, wifi on/off, firmware
      version, and Kobo model.

      See https://github.com/pgaskin/kobopatch-patches/issues/28#issuecomment-537161827
      for more details about this.
  # Multiplier in N3PowerWorkflowManager::configureWakeup
  - ReplaceBytesAtSymbol: {Symbol: "N3PowerWorkflowManager::configureWakeup(AlarmControl*, int, char const*)", Offset: 12, FindH: 04 FB 05 F5, ReplaceH: 4F EA 05 45} # mul r5(dest), r4(multiplier), r5(mins)  -> lsl r5, r5, #16
  # Multiplier in N3PowerWorkflowManager::pollBattery
  - ReplaceBytesAtSymbol: {Symbol: "N3PowerWorkflowManager::pollBattery()", Offset: 106, FindH: 08 FB 00 F8, ReplaceH: 4F EA 00 48} # mul r8(dest), r8(multiplier), r0(mins)  -> lsl r8, r0, #16
  - ReplaceBytesAtSymbol: {Symbol: "N3PowerWorkflowManager::pollBattery()", Offset: 156, FindH: 02 FB 00 F2, ReplaceH: 4F EA 00 42} # mul r2(dest), r2(multiplier), r0(mins)  -> lsl r2, r0, #16
  # Menu text
  - FindBaseAddressString: "5 mins\0"
  - ReplaceString: {Offset: 0, Find: "5 mins\0", Replace: "1h0m"}
  - ReplaceString: {Offset: 8,  Find: "10 mins", Replace: "2h0m"}
  - ReplaceString: {Offset: 16, Find: "15 mins", Replace: "3h0m"}
  - ReplaceString: {Offset: 24, Find: "30 mins", Replace: "3h30m"}
  - ReplaceString: {Offset: 32, Find: "45 mins", Replace: "4h0m"}
  - ReplaceString: {Offset: 38, Find: "60 mins", Replace: "4h30m"}
  # Values (see https://www.mobileread.com/forums/showpost.php?p=3887105)
  - FindBaseAddressSymbol: "N3SettingsPowerView::initChoices()"
  - ReplaceInt: {Offset: 11,  Find: 5,  Replace: 55}
  - ReplaceInt: {Offset: 465, Find: 5,  Replace: 55}
  - ReplaceInt: {Offset: 99,  Find: 10, Replace: 110}
  - ReplaceInt: {Offset: 525, Find: 10, Replace: 110}
  - ReplaceInt: {Offset: 159, Find: 15, Replace: 165}
  - ReplaceInt: {Offset: 583, Find: 15, Replace: 165}
  - ReplaceInt: {Offset: 219, Find: 30, Replace: 193}
  - ReplaceInt: {Offset: 641, Find: 30, Replace: 193}
  - ReplaceInt: {Offset: 279, Find: 45, Replace: 220}
  - ReplaceInt: {Offset: 699, Find: 45, Replace: 220}
  - ReplaceInt: {Offset: 339, Find: 60, Replace: 248}
  - ReplaceInt: {Offset: 755, Find: 60, Replace: 248}
But I keep having an error in the log, here it is:
Spoiler:

Code:
        |   Patch("Larger Sleep/Power-off timeouts") enabled=true
          |     ResetBaseAddress()
          |     applying
          |     looping over instructions
          |       kobopatch.ReplaceBytesAtSymbol index=4 line=1230
          |         ReplaceBytesAtSymbol.FindH -> Expand <04 FB 05 F5> to set ReplaceBytesAtSymbol.Find to <04fb05f5>
          |         ReplaceBytesAtSymbol.ReplaceH -> Expand <4F EA 05 45> to set ReplaceBytesAtSymbol.Replace to <4fea0545>
          |           ReplaceBytesAtSymbol("N3PowerWorkflowManager::configureWakeup(AlarmControl*, int, char const*)", 12, []byte{0x4, 0xfb, 0x5, 0xf5}, []byte{0x4f, 0xea, 0x5, 0x45})
          |             FindBaseAddressSymbol("N3PowerWorkflowManager::configureWakeup(AlarmControl*, int, char const*)") -> 
          |         could not apply patch "Larger Sleep/Power-off timeouts": line 1230: inst 4: ReplaceBytesAtSymbol: FindBaseAddressSymbol: could not find symbol
        --> could not apply patch "Larger Sleep/Power-off timeouts": line 1230: inst 4: ReplaceBytesAtSymbol: FindBaseAddressSymbol: could not find symbol
(The red line in the first bit of code is the line 1230)

It seems to be unable to find a symbol but I have no idea of how to fix the mistake or even from where it came from.

Thank you so much for any reply!
Clem2605 is offline   Reply With Quote