I downloaded the PDroid source from the XNA forum and fount 3 files in it with the .patch extension. Could somebody please explain me what are files with this extension for? Ignore the fact that they are from the PDroid source since I think there are other projects using them. As I can see these files can be opened in text editor and there are some script lines in them but I don't know what they are for?
Patch files are not specifically to do with Android. They just represent a difference between two text files (or two folders of text files). They can be produced by the
diff tool, or by a version control system, and the same change can be applied to files by the
patch tool, or by a version control system.
Patch files are often used by programmers to communicate a change that should be applied to source code.
From the XDA thread for PDroid these are if you are building PDroid from source.
EDIT: The specifics of what a .patch file is are in Dan's post.
If you are building the source you need to take the following steps:
Download: PDroid 2.3.4 source (v1.27) (yes it is based on 2.3.4 but also works with 2.3.3 and 2.3.5 flawlessly)
Get the 2.3.4 source from AOSP (branch: android-2.3.4_r1)
Extract the patches from the above archive to the 2.3.4 tree root
patch -p1 -i build.patch patch -p1 -i frameworks.patch patch -p1 -i libcore.patch
Building from source:
Make a clean build
Apply the patches (see above)
source build/envsetup.sh make update-api mmm frameworks/base mmm frameworks/base/services/java mmm libcore
go to the repository directory and execute the command:
git am <path-to-file.patch>
It will find the correct file in the repository directory and execute the changes.