Awesome, added to top post... going to try these out tonight
Thanks. By the way, Jocopa3 is adding interactivity to the PTPatch format now. Are there any lessons learned from the design of QuickPatch that might be useful for him to know about?
Thanks. By the way, Jocopa3 is adding interactivity to the PTPatch format now. Are there any lessons learned from the design of QuickPatch that might be useful for him to know about?
Just from looking at it quickly, I don't see a way of doing multiple options (like QuickPatch antifog), or providing textual prompts for user input, or specifying whether user input is a string or byte or whatever. It doesn't store the old data so patches can't be reverted. There is no way to filter user input. It also doesn't leave much room for extensibility.
Why not just refine the format used by QP instead? It should address all of the things the proposed binary format is trying to address, with some added benefits, and without any real drawbacks as far as I can tell.
The point of QP was to develop a good patch format, QP itself is just a way to test it out. I'd be perfectly happy scrapping QP if other tools pick up support for the format (although the instant patching without reinstall is a must for me, will keep it around until other tools add that feature).
Just from looking at it quickly, I don't see a way of doing multiple options (like QuickPatch antifog), or providing textual prompts for user input, or specifying whether user input is a string or byte or whatever. It doesn't store the old data so patches can't be reverted. There is no way to filter user input. It also doesn't leave much room for extensibility.
Why not just refine the format used by QP instead? It should address all of the things the proposed binary format is trying to address, with some added benefits, and without any real drawbacks as far as I can tell.
You might want to post these ideas on their thread. That way, they'll see the suggestions.
- There are few mods that use the multiple options support, but that would be a nice thing to have.
- There is a type variable in the new version proposed by Jocopa; it's one byte - 00 = data, 01 = hex number. etc.
- PTPatches do not require the old data, as PocketTool backs up the original libminecraftpe.so after a patch, then generate an undo patch by diffing the original and the final library. Reverting has worked like this in PocketTool for at least a month now.
- I guess so; however, the PT format is pretty compact and easy to manipulate without external libraries to read JSON.
I do, however, believe that patches should support the two formats equally, with similar prompts for interactivity, etc.
- There are few mods that use the multiple options support, but that would be a nice thing to have.
There are lots of instances where multiple variants of mods are published... While it could usually be done with user input, it might be easier for everyone in many cases just to have multiple options -- short days / long days, tough mobs / weak mobs, etc.
- There is a type variable in the new version proposed by Jocopa; it's one byte - 00 = data, 01 = hex number. etc.
Ah, I missed that. That should work.
- PTPatches do not require the old data, as PocketTool backs up the original libminecraftpe.so after a patch, then generate an undo patch by diffing the original and the final library. Reverting has worked like this in PocketTool for at least a month now.
I guess this comes from the fact that PT can work on the assumption that nothing else is modifying the .so, since it's being pulled out of the APK, while QP works with the target directly. QP assumes the target might have been modified, so it stores the original state. This way, if the PT version of the same patch has already been applied, QP will recognize it.
I never thought about getting the original bytes from the APK. I suppose a path to a resource (inside an APK) could be used for the QP format as an alternative for including the bytes themselves, and it could just extract it and pull the bytes out and store them in the saved patch the way they're saved now... Then again, I think it's easier to just store the bytes in the patch when it's generated.
- I guess so; however, the PT format is pretty compact and easy to manipulate without external libraries to read JSON.
Yeah, it would be much easier to read the binary data than parse JSON without using a proper JSON library. But with a proper JSON library, the JSON should actually be at least as easy to work with as the binary data, if not easier. Assuming things are still going to be written in Java for the most part, this shouldn't really be an issue on android, org.json should work fine (and I'm not sure it even counts as "external"). There's about 15 different JSON libraries out there for C++; also I'm working on an awesome header-only C++ library, but it's not quite finished yet..
I do, however, believe that patches should support the two formats equally, with similar prompts for interactivity, etc.
I thought I could install CM on my phone, but I can't... apparently the stock firmware is too new and nobody's come up with a way to install CM on it yet... I can't really do much about it until I can test it myself =/
I've gone insane and downloaded the script and modified it to avoid writing/reading anything from the SD card and I still get this damn error!
Can you confirm that the libminecraftpe.so is actually at the location in the third line there (/data/data/.../libminecraftpe.so) by taking a look with a file browser? X-plore file browser will do the trick.
Also it looks like you changed the quickpatch-tmp path from "/mnt/sdcard/quickpatch-tmp" to "/quickpatch-tmp", correct? From the error, it looks like it's a directory; it shouldn't be. It shouldn't exist since QP wants to create it, but the path should be in a location where QP can write... I assumed "/mnt/sdcard/" was always writable, but I guess it's not. You probably won't have permission to write to "/" unless your permissions are really screwed up.
edit - ok, from looking at the script again, you can theoretically put the path to "quickpatch-tmp" anywhere as long as the path up to "quickpatch-tmp" exists. The file is manipulated as root and then chmod 777 (full permission)*, so it should be accessible to non-root user (the rest of the script).
But quickpatch-tmp itself shouldn't be a directory, which it does appear to be in your case. If you want to put a file there called quickpatch-tmp just to make sure you can, that's fine; it will just be deleted when the program runs.
*Now that I look at it, it should be 666, since it's not executable (mode +x doesn't even exist on Android), but it doesn't appear to be hurting anything.
Can u figure out why its nit wirking for me. Im ruuning cyanogen mod jellybean
There are problems with running SL4A on cyanogenmod, apparently. Someone had a workaround for it a few pages back.
That problem is going to be fixed in a new version I'm working on; it's going to be a regular APK, no SL4A or weird stuff, probably in the play store. I'm not so sure what to do about the permissions issues, though, and it looks like you'll run into those as soon as you fix this (there are workarounds for those issues in this thread too).
Can you confirm that the libminecraftpe.so is actually at the location in the third line there (/data/data/.../libminecraftpe.so) by taking a look with a file browser? X-plore file browser will do the trick.
Also it looks like you changed the quickpatch-tmp path from "/mnt/sdcard/quickpatch-tmp" to "/quickpatch-tmp", correct? From the error, it looks like it's a directory; it shouldn't be. It shouldn't exist since QP wants to create it, but the path should be in a location where QP can write... I assumed "/mnt/sdcard/" was always writable, but I guess it's not. You probably won't have permission to write to "/" unless your permissions are really screwed up.
edit - ok, from looking at the script again, you can theoretically put the path to "quickpatch-tmp" anywhere as long as the path up to "quickpatch-tmp" exists. The file is manipulated as root and then chmod 777 (full permission)*, so it should be accessible to non-root user (the rest of the script).
But quickpatch-tmp itself shouldn't be a directory, which it does appear to be in your case. If you want to put a file there called quickpatch-tmp just to make sure you can, that's fine; it will just be deleted when the program runs.
*Now that I look at it, it should be 666, since it's not executable (mode +x doesn't even exist on Android), but it doesn't appear to be hurting anything.
I think I'm an idiot. Mucking around with scripting at 3am I should have noticed it wanted something to do in the data/data folder. Unfortunatly I was mucking around with pocket tool aswell and it deleted my minecraft so I don't know if the file was missing before or after I tried.
I created an empty quckpatch-tmp thinking that it needed a folder with full permission so that's what I did there.
I also lost the script I modified because when you restart CM10 (or aindoid for that matter) anything that's not meant to be in the root dir automatically gets deleted.
I'll try again except just modify the script for 666 permissions and tell you how it goes. BTW: I've never programmed and I barely know anything about linux so taking baby steps!
Edit: Yep, pocket tool broke it, now I'm back to the sd card permissions error :\
edit2: So i've tried changing the permissions to 775, 666 and 777 and they all keep giving me the same error. I've also tried getting it to do it business in the root dir but it just fails instantly.
I'm getting the no permissions error too. Was able to fix the java exception through changing /data and /cache etc. to 777, but I am unable to patch any mods.
Error log:
selected: 1
Remounting.
failed: Invalid argument
mount: can't find /mnt/sdcard/quickpatch-mnt in /proc/mounts
-rw-r--r-- system system 7073916 2012-10-06 11:00 libminecraftpe.so
rm failed for /mnt/sdcard/quickpatch-tmp, No such file or directory
dd: can't open '/mnt/sdcard/quickpatch-mnt/libminecraftpe.so': Read-only file system
rm failed for /mnt/sdcard/quickpatch-tmp, No such file or directory
dd: can't open '/mnt/sdcard/quickpatch-mnt/libminecraftpe.so': Read-only file system
If I try to chmod 777 it, i get told that it is read only file. Even with su root.
If I try to chmod 777 it, i get told that it is read only file. Even with su root.
You're up to where I'm at when trying to fix it. I've discovered that you can not (even if with root and su) give anything in the sdcard space greater permissions than 775. The creator of Quick Patch (autophil) is working on making quick patch work. If you happen to find a work around in the mean time, please share.
I have an HTC Inspire 4g and I am running a non-sense rom...just stock Jellybean. Quickpatch will only load when I am on HTC Sense? Can you fix this.
Looks like you're getting the premission errors everyone else is getting from being on a cyanogen mod 10 or similar ROM. If you read through page 9, all your questions shall be answered.
Edit: got it working, all you need to do if fix permissions to get sl4a working then modify the script to do its business in the cache folder.
Edit 2: Let me repeat, I GOT IT WORKING! If someone actually cares, I can give instructions and upload the modified script (unless autophil wants to update his script)
Looks like you're getting the premission errors everyone else is getting from being on a cyanogen mod 10 or similar ROM. If you read through page 9, all your questions shall be answered.
Edit: got it working, all you need to do if fix permissions to get sl4a working then modify the script to do its business in the cache folder.
Edit 2: Let me repeat, I GOT IT WORKING! If someone actually cares, I can give instructions and upload the modified script (unless autophil wants to update his script)
Can you tell me it? thanks
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumThanks. By the way, Jocopa3 is adding interactivity to the PTPatch format now. Are there any lessons learned from the design of QuickPatch that might be useful for him to know about?
http://www.minecraftforum.net/topic/1112628-mod-patching/page__st__20#entry18276911
Just from looking at it quickly, I don't see a way of doing multiple options (like QuickPatch antifog), or providing textual prompts for user input, or specifying whether user input is a string or byte or whatever. It doesn't store the old data so patches can't be reverted. There is no way to filter user input. It also doesn't leave much room for extensibility.
Why not just refine the format used by QP instead? It should address all of the things the proposed binary format is trying to address, with some added benefits, and without any real drawbacks as far as I can tell.
The point of QP was to develop a good patch format, QP itself is just a way to test it out. I'd be perfectly happy scrapping QP if other tools pick up support for the format (although the instant patching without reinstall is a must for me, will keep it around until other tools add that feature).
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYou might want to post these ideas on their thread. That way, they'll see the suggestions.
- There are few mods that use the multiple options support, but that would be a nice thing to have.
- There is a type variable in the new version proposed by Jocopa; it's one byte - 00 = data, 01 = hex number. etc.
- PTPatches do not require the old data, as PocketTool backs up the original libminecraftpe.so after a patch, then generate an undo patch by diffing the original and the final library. Reverting has worked like this in PocketTool for at least a month now.
- I guess so; however, the PT format is pretty compact and easy to manipulate without external libraries to read JSON.
I do, however, believe that patches should support the two formats equally, with similar prompts for interactivity, etc.
There are lots of instances where multiple variants of mods are published... While it could usually be done with user input, it might be easier for everyone in many cases just to have multiple options -- short days / long days, tough mobs / weak mobs, etc.
Ah, I missed that. That should work.
I guess this comes from the fact that PT can work on the assumption that nothing else is modifying the .so, since it's being pulled out of the APK, while QP works with the target directly. QP assumes the target might have been modified, so it stores the original state. This way, if the PT version of the same patch has already been applied, QP will recognize it.
I never thought about getting the original bytes from the APK. I suppose a path to a resource (inside an APK) could be used for the QP format as an alternative for including the bytes themselves, and it could just extract it and pull the bytes out and store them in the saved patch the way they're saved now... Then again, I think it's easier to just store the bytes in the patch when it's generated.
Yeah, it would be much easier to read the binary data than parse JSON without using a proper JSON library. But with a proper JSON library, the JSON should actually be at least as easy to work with as the binary data, if not easier. Assuming things are still going to be written in Java for the most part, this shouldn't really be an issue on android, org.json should work fine (and I'm not sure it even counts as "external"). There's about 15 different JSON libraries out there for C++; also I'm working on an awesome header-only C++ library, but it's not quite finished yet..
That would certainly make things easier.
It looks like the same permissions problem others were having. I'll look into it, maybe I can find a better place to store things.
It has to do with CM10 or similar roms. Read my post here
I thought I could install CM on my phone, but I can't... apparently the stock firmware is too new and nobody's come up with a way to install CM on it yet... I can't really do much about it until I can test it myself =/
Can you confirm that the libminecraftpe.so is actually at the location in the third line there (/data/data/.../libminecraftpe.so) by taking a look with a file browser? X-plore file browser will do the trick.
Also it looks like you changed the quickpatch-tmp path from "/mnt/sdcard/quickpatch-tmp" to "/quickpatch-tmp", correct? From the error, it looks like it's a directory; it shouldn't be. It shouldn't exist since QP wants to create it, but the path should be in a location where QP can write... I assumed "/mnt/sdcard/" was always writable, but I guess it's not. You probably won't have permission to write to "/" unless your permissions are really screwed up.
edit - ok, from looking at the script again, you can theoretically put the path to "quickpatch-tmp" anywhere as long as the path up to "quickpatch-tmp" exists. The file is manipulated as root and then chmod 777 (full permission)*, so it should be accessible to non-root user (the rest of the script).
But quickpatch-tmp itself shouldn't be a directory, which it does appear to be in your case. If you want to put a file there called quickpatch-tmp just to make sure you can, that's fine; it will just be deleted when the program runs.
*Now that I look at it, it should be 666, since it's not executable (mode +x doesn't even exist on Android), but it doesn't appear to be hurting anything.
Can u figure out why its nit wirking for me. Im ruuning cyanogen mod jellybean
There are problems with running SL4A on cyanogenmod, apparently. Someone had a workaround for it a few pages back.
That problem is going to be fixed in a new version I'm working on; it's going to be a regular APK, no SL4A or weird stuff, probably in the play store. I'm not so sure what to do about the permissions issues, though, and it looks like you'll run into those as soon as you fix this (there are workarounds for those issues in this thread too).
I think I'm an idiot. Mucking around with scripting at 3am I should have noticed it wanted something to do in the data/data folder. Unfortunatly I was mucking around with pocket tool aswell and it deleted my minecraft so I don't know if the file was missing before or after I tried.
I created an empty quckpatch-tmp thinking that it needed a folder with full permission so that's what I did there.
I also lost the script I modified because when you restart CM10 (or aindoid for that matter) anything that's not meant to be in the root dir automatically gets deleted.
I'll try again except just modify the script for 666 permissions and tell you how it goes. BTW: I've never programmed and I barely know anything about linux so taking baby steps!
Edit: Yep, pocket tool broke it, now I'm back to the sd card permissions error :\
edit2: So i've tried changing the permissions to 775, 666 and 777 and they all keep giving me the same error. I've also tried getting it to do it business in the root dir but it just fails instantly.
Wrists are twitching, time to find my turntables
I think pocket tool doesn't need root
Possible Fix
Error log:
If I try to chmod 777 it, i get told that it is read only file. Even with su root.
You're up to where I'm at when trying to fix it. I've discovered that you can not (even if with root and su) give anything in the sdcard space greater permissions than 775. The creator of Quick Patch (autophil) is working on making quick patch work. If you happen to find a work around in the mean time, please share.
Looks like you're getting the premission errors everyone else is getting from being on a cyanogen mod 10 or similar ROM. If you read through page 9, all your questions shall be answered.
Edit: got it working, all you need to do if fix permissions to get sl4a working then modify the script to do its business in the cache folder.
Edit 2: Let me repeat, I GOT IT WORKING!
Can you tell me it?