View Single Post
Old 09-28-2019, 03:38 PM   #142
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,805
Karma: 7423683
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by traycold View Post
In particular, I used the value of column 21 in the replace related to N3PowerWorkflowManager::configureWakeup (value in red above), but left unchanged (respect the original patch) the replace related to N3PowerWorkflowManager:ollBattery.
Looks good except for that (which is partly my fault). Thanks for pointing that out. I'll add the other instructions to the table.

Update: Done. You just need to update the other two replacements.

Update 2: I've made an easy-to-use customization page for this patch: https://pgaskin.net/kobopatch-patche...off-12920.html

And traycold, here's your patch (you can customize it here):
Spoiler:
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-12920.html .
  # Multiplier in N3PowerWorkflowManager::configureWakeup
  - ReplaceBytesAtSymbol: {Symbol: "N3PowerWorkflowManager::configureWakeup(AlarmControl*, int, char const*)", Offset: 11, FindH: 04 FB 05 F5, ReplaceH: 4F EA 45 55} # mul r5(dest), r4(multiplier), r5(mins)  -> lsl r5, r5, #21
  # Multiplier in N3PowerWorkflowManager::pollBattery
  - ReplaceBytesAtSymbol: {Symbol: "N3PowerWorkflowManager::pollBattery()", Offset: 101, FindH: 08 FB 00 F8, ReplaceH: 4F EA 40 58} # mul r8(dest), r8(multiplier), r0(mins)  -> lsl r8, r0, #21
  - ReplaceBytesAtSymbol: {Symbol: "N3PowerWorkflowManager::pollBattery()", Offset: 149, FindH: 02 FB 00 F2, ReplaceH: 4F EA 40 52} # mul r2(dest), r2(multiplier), r0(mins)  -> lsl r2, r0, #21
  # Menu text
  - FindBaseAddressString: "5 mins\0"
  - ReplaceString: {Offset: 0, Find: "5 mins\0", Replace: "34m"}
  - ReplaceString: {Offset: 8,  Find: "10 mins", Replace: "1h9m"}
  - ReplaceString: {Offset: 16, Find: "15 mins", Replace: "4h4m"}
  - ReplaceString: {Offset: 24, Find: "30 mins", Replace: "23h53m"}
  - ReplaceString: {Offset: 32, Find: "45 mins", Replace: "72h14m"}
  - ReplaceString: {Offset: 38, Find: "60 mins", Replace: "96h7m"}
  # Values (see https://www.mobileread.com/forums/showpost.php?p=3887105)
  - FindBaseAddressSymbol: "N3SettingsPowerView::initChoices()"
  - ReplaceInt: {Offset: 11,  Find: 5,  Replace: 1}
  - ReplaceInt: {Offset: 465, Find: 5,  Replace: 1}
  - ReplaceInt: {Offset: 99,  Find: 10, Replace: 2}
  - ReplaceInt: {Offset: 525, Find: 10, Replace: 2}
  - ReplaceInt: {Offset: 159, Find: 15, Replace: 7}
  - ReplaceInt: {Offset: 583, Find: 15, Replace: 7}
  - ReplaceInt: {Offset: 219, Find: 30, Replace: 41}
  - ReplaceInt: {Offset: 641, Find: 30, Replace: 41}
  - ReplaceInt: {Offset: 279, Find: 45, Replace: 124}
  - ReplaceInt: {Offset: 699, Find: 45, Replace: 124}
  - ReplaceInt: {Offset: 339, Find: 60, Replace: 165}
  - ReplaceInt: {Offset: 755, Find: 60, Replace: 165}

Last edited by geek1011; 09-28-2019 at 05:57 PM. Reason: customization page
geek1011 is offline   Reply With Quote