12-21-2014, 05:30 PM | #1 | |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
AutoPatch beta (~ for 3.12.0)
Well, based on this 3.12 patch discussion, here's a prototype for the Kobo patching itself using patch files you copy to the reader.
This is an early beta, there may be bugs, it may brick your reader... Currently it only runs at startup (1-2 minutes after the device finished booting into nickel), sees if there's anything to patch, in which case it does that and reboots. While you'll notice the reboot, there is no visual feedback of any kind. The patches are stored in a hidden dir .autopatch; you can use one big file or split them up into multiple patch files. You can disable individual patches either by editing them to `no` or moving them to a subdir like disabled/. Patches that fail to apply will be moved to failed/ subdir and the output of the patch32lsb program added so you have a clue as to what may have gone wrong. https://github.com/frostschutz/Kobo Quote:
Edit: beta3 released Edit: Project discontinued. To uninstall, create a .autopatch/uninstall file Last edited by frostschutz; 02-24-2015 at 05:52 PM. |
|
01-01-2015, 01:40 PM | #2 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
Not much feedback so far... any thoughts? Any point developing this any further?
|
Advert | |
|
01-01-2015, 05:47 PM | #3 |
350 Hoarder
Posts: 3,574
Karma: 8281267
Join Date: Dec 2010
Location: Midwest USA
Device: Sony PRS-350, Kobo Glo & Glo HD, PW2
|
Actually, I'm not sure exactly what this does or how it makes GeoffR's patch any easier. What can it automate when you need to manually select yes/no for each patch, and even change numbers to your liking in some of the patches? I guess I'm not seeing how any of that can be automated.
|
01-03-2015, 05:48 PM | #4 |
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Sorry I haven't go to testing this yet. I don't have any experience with cross-compiling to run on Kobo devices, do you have a patch32lsb executable available? Edit: I was looking at the github ink and missed the attachment.
What happens when the firmware is updated, does the autopatcher need to be re-installed? Does it handle the situation where a firmware update only changes some files and not others? For example the librmsdk.so.1.0.0 is sometimes identical from one firmware version to the next. From what I understand the device needs to reboot twice after changing a patch to install the new patch? There are some definate advantages to doing it this way: you don't need to run the patching program (kpg.exe or patch32lsb) on an external computer, and the files to be patched are taken directly from the device instead of extracted from a downloaded firmware archive. For those already used to patching from an external computer there probably isn't any incentive to switch to this method, but perhaps those who haven't patched before will find this method easier. Last edited by GeoffR; 01-03-2015 at 06:33 PM. Reason: Now I see the attachment ... |
01-03-2015, 07:37 PM | #5 | |||||
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
Quote:
Quote:
Quote:
Quote:
Quote:
It already supports several patch files, so if you were to split the one big file into individual ones, you'd no longer have to edit just for [Yes/No], you could just move the ones you don't want into the disabled dir. I still want to add support for patches that work for any firmware version as long as its unique signature can be found; so while a string may be at a different address in each firmware version, as long as it's the same string and unique the patch should still work. |
|||||
Advert | |
|
01-04-2015, 08:48 PM | #6 | ||
Wizard
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
Quote:
|
||
01-05-2015, 07:42 AM | #7 | |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
It already treats each individual patch file as all-or-nothing; so if one patch depends on another patch, they should be in the same file; whereas independent patches can be split into separate files.
Quote:
I'll put your updated patch32lsb in the next beta, I'll also try to get the USB hook in place for that one. |
|
01-20-2015, 07:00 AM | #8 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
AutoPatch beta3 uses the v0.10 patch32lsb and patch files (from here), and the same USB hook and nickel freeze I'm using in AutoShelf. It no longer reboots automatically, you'll have to do that at your convenience.
It doesn't seem to work well, though. patch32lsb says 'cannot parse line' for find_base_address. For that reason I won't attach it here, but you can get it from the GitHub releases page. Edit: BAH. My mistake, I had another copy of old patch32lsb in the wrong path. So stupid Last edited by frostschutz; 01-20-2015 at 08:41 AM. |
01-22-2015, 09:35 AM | #9 |
Evangelist
Posts: 407
Karma: 314204
Join Date: Jan 2015
Device: bq Avant XL, Kobo Aura H2O, Onyx Boox M96C Plus
|
Is AutoPatch beta2 public?
|
01-22-2015, 09:49 AM | #10 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
beta2 was a mistake, so it's beta3... it's attached to the first post
|
02-08-2015, 02:12 PM | #11 |
Evangelist
Posts: 407
Karma: 314204
Join Date: Jan 2015
Device: bq Avant XL, Kobo Aura H2O, Onyx Boox M96C Plus
|
I have some doubts:
If i want to patch the files where i put *.patch files? If i put *.patch in disable/ the program disable the patch independent of the yes/no switch? When the patch is applied the files remain in the same directory or it is move to avoid be repatched the next time? I want to be all clarified before install it because at the moment i have the file patch with GeoffR's program but i want to be able to activate/deactivate within nickel. Edit: Is there some date to the next beta? |
02-08-2015, 03:15 PM | #12 | ||||
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
Quote:
Quote:
Quote:
Quote:
So right now I'm not sure if / when I'll find the time / motivation to make a new beta. |
||||
06-16-2016, 04:45 AM | #13 |
Connoisseur
Posts: 65
Karma: 200153
Join Date: Apr 2016
Device: Kobo Glo Hd
|
I want to test AutoPatch with KHD downloads, but I don't know so much about linux internals and I have some questions...
- You included patch32lsb.c but not the executable. We need to compile it for kobo devices with specific parameters or we can use a binary from Metazoa pack? - Can you explain autopatch.rules ? KERNEL=="fsl-usb2-udc" (autopatch and autoshelf) ACTION=="remove" (autopatch) SUBSYSTEM=="drivers" (autoshelf) - suspend_nickel() and resume_nickel(). How did you find that ? ;-) - To process KHD downloads, in autopatch.sh, before cd "$AUTOPATCH" line, maybe this will be enough: Code:
# If there are downloaded patches from KHD extract them DOWNLOADED_ZIP="download.php" if [ -f /mnt/onboard/"$DOWNLOADED_ZIP" ] then unzip -o /mnt/onboard/"$DOWNLOADED_ZIP" *.patch -d /mnt/onboard/.autopatch rm /mnt/onboard/"$DOWNLOADED_ZIP" fi |
06-17-2016, 04:25 PM | #14 |
Connoisseur
Posts: 65
Karma: 200153
Join Date: Apr 2016
Device: Kobo Glo Hd
|
Still not tested, but I've prepared an AutoPatch Mod to be used with KHD.
I didn't find patch32lsb binary for arm in mobileread. Can somebody post it ? Files: https://github.com/pipcat/kobo/tree/.../autopatch-khd Readme: Spoiler:
|
06-17-2016, 05:30 PM | #15 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
0.6 Beta take 2 (0.5.905) | user_none | Sigil | 178 | 09-30-2012 07:30 PM |
New Beta for BB? | FF2 | Amazon Kindle | 2 | 05-28-2011 10:21 AM |
Beta Beta Test of Major New Features | Starson17 | Calibre | 45 | 05-17-2010 10:55 AM |
0.6 out of beta? | Nate the great | Calibre | 3 | 07-17-2009 02:45 AM |