Difference between revisions of "Porting/adb"

From RCS Wiki
Jump to navigation Jump to search
(→‎android-libext4-utils: Add Debian bug report)
(→‎android-platform-system-core: Add missing "apt source" step; thanks to fitzsim)
 
Line 58: Line 58:
 
= android-platform-system-core =
 
= android-platform-system-core =
  
 +
apt source fastboot
 
  sed -i 's/amd64/ppc64el/g' android-platform-system-core-*/debian/control
 
  sed -i 's/amd64/ppc64el/g' android-platform-system-core-*/debian/control
  

Latest revision as of 21:19, 31 August 2022

adb and fastboot do not build out of the box for ppc64le on Debian. fitzsim documented the following workarounds:

android-libext4-utils

apt source android-libext4-utils
sed -i 's/\(mips64el\)/\1 ppc64el/g' android-platform-system-extras-*/debian/control
cd android-platform-system-extras-*/
dpkg-buildpackage -rfakeroot

Tickets

android-platform-external-boringssl

apt source android-platform-external-boringssl

Apply this patch:

--- android-platform-external-boringssl-10.0.0+r36.orig/src/crypto/fipsmodule/sha/sha1.c
+++ android-platform-external-boringssl-10.0.0+r36/src/crypto/fipsmodule/sha/sha1.c
@@ -113,10 +113,12 @@ uint8_t *SHA1(const uint8_t *data, size_
     (ix) = (a) = ROTATE((a), 1);       \
   } while (0)
 
+#if 0
 #ifndef SHA1_ASM
 static void sha1_block_data_order(uint32_t *state, const uint8_t *data,
                                   size_t num);
 #endif
+#endif
 
 #include "../digest/md32_common.h"
 
@@ -189,6 +191,7 @@ static void sha1_block_data_order(uint32
 *         <appro@fy.chalmers.se> */
 #define X(i)  XX##i
 
+#if 0
 #if !defined(SHA1_ASM)
 static void sha1_block_data_order(uint32_t *state, const uint8_t *data,
                                   size_t num) {
@@ -339,6 +342,7 @@ static void sha1_block_data_order(uint32
   }
 }
 #endif
+#endif
 
 #undef DATA_ORDER_IS_BIG_ENDIAN
 #undef HASH_CTX

In libcrypto.mk, add -DOPENSSL_NO_ASM to the CFLAGS+= line.

dpkg-buildpackage -rfakeroot

Install the resulting packages.

android-platform-system-core

apt source fastboot
sed -i 's/amd64/ppc64el/g' android-platform-system-core-*/debian/control

In that same control file, replace versioned references to android-libunwind-dev with unversioned references to libunwind-dev

cd android-platform-system-core-*/
make -f debian/rules libbase.so liblog.so fastboot/fastboot adb/adb

You should now have working adb and fastboot binaries:

LD_LIBRARY_PATH=`pwd` ./adb/adb --help
LD_LIBRARY_PATH=`pwd` ./fastboot/fastboot --help