Repository navigation
Building patches
All that is needed to create a patch set it two builds
- One with straight synced source
- A second built from the same source (that means no repo sync in between) and one with the mod applied to the source code.
Most roms only need this process done once per Android version (ICS, Jellybean etc.) and is usually device-independent (exceptions would be things like: phone mods would require a phone instead of a wifi-tablet, etc. You get the idea).
The PDroid family of mods is so invasive that they require a patch set for each major romtype (categorized here as things like Cyanogen, AOSP, AOKP, PA, Evervolv and so forth). Because of their size, and the vast amount of patched code, sometimes an upstream patch will break our patches and the patches have to be remade.
If you are new to the ROM building process, look in your device forums, I guarantee there is a walk-through. You can start coming to us for help only at the point where you are applying patches...before that you should consult the experts in building for your ROM/device.
There are a number of scripts designed to help make Auto-Patcher patches, from the build process to patch creation. They can be found in the diff_tools folder of the Auto-Patcher source. The scripts do work as intended (./batch.sh, if configured appropriately, will order your builds and produce working patches) but the documentation is sparse at best and the scripts need vetting and tidying.
If you are creating Auto-Patcher patches, or have questions about how to so, please post at our OpenPDroid/Auto-patcher Developer social group on XDA. I keep the main Auto-Patcher thread there for more general help, this group will put you in touch with like-minded team members who are involved in the every day maintenance of the Auto-Patcher.
Okay, so you have the two builds, one regular and one with a mod applied? If your mod is a change to the framework.jar, you create a patch like this by creating a diff from one directory up...let's see
$ ls
pdroid-framework stock-framework
$ java -jar baksmali.jar -a 17 -b pdroid-framework/framework.jar -o pdroid-framework/smali
$ java -jar baksmali.jar -a 17 -b stock-framework/framework.jar -o stock-framework/smali
$ diff -Npru stock-framework/smali pdroid-framework/smali > framework.patch
$ ls
pdroid-framework stock-framework framework.patch
Use the folder structure I gave you, the patch command is based on where you made the patches from. If you do it differently and then put the patches in the Autopatcher, it wouldn't work.