boka18 boka18 - 1 month ago 21
Git Question

How to apply patches from GitHub

I'm building Paranoid Android, and I need to apply patches from my device tree (p8000).

Here is the link: https://github.com/visi0nary/android_device_elephone_p8000/tree/cm-12.1/patches

I see that it has .sh file, but I really dont know how to apply it. I have the sources from PA and my device tree already synced. Now all i need to do is apply this patches to make the FingerPrint sensor work.

Any help is appreciated!

Answer

You just need to run the .sh(./apply-patch in terminal) file in a correct directory. If you run the file, directly in patches folder, there's already cd command to set correct paths for patches to apply. If this won't help, or you need to apply only some of the patches, you can apply them one-by-one with:

git apply -v <path to .patch file>
Comments