View Single Post
Old 09-28-2019, 06:15 PM   #143
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,911
Karma: 146918083
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by geek1011 View Post
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}
That is brilliant! Thank you very much.
JSWolf is online now   Reply With Quote