I have a .patch file that I want to apply to the android kernel, and I do so via:
patch -p1 < <patch-file>
After running it, I see git binary diffs are not supported
print for the following line of the patch:
+PRODUCT_COPY_FILES += \
+ hardware/ril/libquectel-ril/arm64-v8a/dir:system/bin/dir \
whereas dir
is a binary defined in a patch file.
Should I be initializing git, adding all the files, and then running git apply patch-file
?
Edit:
After running git init
, git add
, git commit
, I ran git apply <patch-file>
, and now I get:
warning: device/qcom/common/rootdir/etc/init.class_main.sh has type 100644, expected 100755
error: patch failed: device/qcom/sdm845/sdm845.mk:87
error: device/qcom/sdm845/sdm845.mk: patch does not apply
warning: device/qcom/sepolicy/generic/vendor/common/file_contexts has type 100644, expected 100755
file.patch:37781: new blank line at EOF.
+
warning: system/core/init/selinux.cpp has type 100644, expected 100755
error: patch failed: system/core/init/selinux.cpp:430
error: system/core/init/selinux.cpp: patch does not apply