Closed RayyanAnsari closed 2 years ago
FYI: On openSUSE, we install vendor/mkbootimg/gki
to /usr/lib/android-tools/
and then patch vendor/mkbootimg/mkbootimg.py
using https://build.opensuse.org/package/view_file/home:munix9/android-tools/fix-mkbootimg-gki-path.patch?expand=1
--- a/vendor/mkbootimg/mkbootimg.py
+++ b/vendor/mkbootimg/mkbootimg.py
@@ -28,6 +28,9 @@
import re
import tempfile
+import sys
+sys.path.append('/usr/lib/android-tools')
+
from gki.generate_gki_certificate import generate_gki_certificate
# Constant and structure definition is in
One more hint:
gki/generate_gki_certificate.py
requires avbtool
from vendor/avb/
.
We copy that using cp -pd vendor/avb/avbtool{,.py} /usr/bin/
I think that was it.
generate_gki_certificate
python function is defined at ./vendor/mkbootimg/gki
These python files need to be installed by CMakeLists.mkbootimg.txt
.
cc @JamiKettunen
I'll take a look tomorrow, thanks for letting me know. I didn't yet hit this myself as I use the android-tools
package from Void Linux repositories which is still on 31.0.3p2
; seems I'll be adopting the package as I use it practically every day (including mkbootimg
) so it receives more timely updates as well.
Getting this same (packaging?) bug in ubuntu noble 24.4 : https://bugs.launchpad.net/ubuntu/+source/android-platform-tools/+bug/2058228
@arthurlutz Ubuntu don't even build their android-tools from this repo based on https://git.launchpad.net/ubuntu/+source/android-platform-tools/tree/?h=ubuntu/noble (similar to upstream Debian: https://salsa.debian.org/android-tools-team/android-platform-tools) but deal directly with the android sources with their own makefiles, besides the fix is already well-known as per the PR which closed this issue here.
With the latest android-tools 33.0.3, creating a boot image using mkbootimg is broken with this error:
This issue does not happen in android-tools 31.0.3.
https://bugs.archlinux.org/task/76090 @anatol