Originally Posted by Chahk
Is it possible to run the patches directly on the phone via terminal emulator or adb shell (assuming all prerequisites like adb, drivers, and sfk are installed)?
yes with some modification to the code it can do that. but you will have to convert it to real sh script instead of bash. it's somewhat different.
Originally Posted by bsimpson1
First of all, thanks a lot for these scripts, and for the tutorial you provided in your other thread on how to patch them manually. The script seemed to work just fine but for some reason the resulting binaries would be a few bytes smaller than the original file and so I'd get an error that would say something about ELF header magic ( can't remember the exact error message) and they could not be executed. I decided to try to create my own script and finally managed to get something working. My original script is run from the phone itself, but I tried to port it to yours as a dbs/patcher script replacement, keeping as much of the original functionality as I could. It seems to work, but could maybe use some polishing. I thought you might be interested in it, as it does not require any installation of extra binaries (it uses grep and dd to perform the functions of sfk). Feel free to use any of it how and where you might see fit. To use it just put it into dbs in place of the original patcher script.
Update: The patcher in patcherv2.zip now correctly restores the file permissions.
As an interesting side note I noticed that with unmodified files, my CPU usage while the phone is otherwise idle and only a single core is active, is reported as 3% with periodic spikes every few seconds of up to 10%. Once the strings are cleaned from the files, the CPU consistently reports usage of 0% or 1%, and the spikes are completely nonexistent.
You're welcome. This may be caused because the strings are replaced with "nothing", It might be a good idea for me to count the numbers (in hex) of the string and then replace it all with zero's instead. I think this creates more compatibility, but I'm not 100% sure of that.
Some files indeed get corrupted by hexxing them, (at least when removing strings), maybe putting zero's there would fix it. as I am not advanced in hex at all I honestly don't know before I have tested it.. anyways, the binary templates that are included should not corrupt the files.
I really appreciate you have put this effort in updating the patcher. It really looks awesome, I have not tested it yet, but if it really can replace sfk consistently It will be great. I will take a look at the script and I am certainly interested in it! The script looks pretty advanced to me actually, for example that regex is just badass!
I think I will integrate your patcher and generate an option that lets you choose between your method (local patching, on PC) and my method (remote patching, on phone), that way users could choose what they prefer. Of course I will add your credits to the top because you made it. not me :P
I will look into this very soon, for the meanwhile you could create merge pull requests on the git if you'd like.
And btw I am really glad to hear that removing the strings actually lowered the cpu usage
, that's a great thing! and is absolutely the goal of the script next to making it more readable ^^
Thanks a lot for your wisdom and effort on this patcher