The next step is to get the closed binaries. The script device/semc/urushi/extract-files.sh does that by downloading them from the phone via adb.
I no longer have Sony firmware in my phone so there's no need to connect the phone when the Cyanogenmod zip I used to flash it has the same contents, right?
The below patch changes the source to the zip:
hajma@c:~/android/system-ics/device/semc/urushi$ git diff ./extract-files.sh
diff --git a/extract-files.sh b/extract-files.sh
index f3aaa2c..192ea96 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -5,10 +5,11 @@ DEVICE=urushi
BASE=../../../vendor/$VENDOR/$DEVICE/proprietary
-while getopts ":nh" options
+while getopts ":nzh" options
do
case $options in
n ) NC=1 ;;
+ z ) FROMZIP=1;;
h ) echo "Usage: `basename $0` [OPTIONS] "
echo " -n No clenup"
echo " -h Show this help"
@@ -27,7 +28,11 @@ for FILE in `cat proprietary-files.txt | grep -v ^# | grep -v ^$`; do
if [ ! -d $BASE/$DIR ]; then
mkdir -p $BASE/$DIR
fi
- adb pull /system/$FILE $BASE/$FILE
+ if [ "$FROMZIP" = "1" ]; then
+ unzip $2 system/$FILE -d $BASE
+ else
+ adb pull /system/$FILE $BASE/$FILE
+ fi
done
./setup-makefiles.sh
...
and more breakage:
hajma@c:~/android/system-ics$ brunch urushi
...
make: *** No rule to make target 'vendor/cm/proprietary/lib/armeabi/libjackpal-androidterm4.so', needed by 'out/target/product/urushi/system/lib/libjackpal-androidterm4.so'. Stop.
make: *** Waiting for unfinished jobs....
target thumb C: calibrator <= hardware/ti/wlan/mac80211/ti-utils/ini.c
hajma@c:~/android/system-ics$
The file was supposed to be delivered with get-prebuilts:
hajma@c:~/android/system-ics/vendor/cm$ ./get-prebuilts
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3347k 100 3347k 0 0 175k 0 0:00:19 0:00:19 --:--:-- 205k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 178 100 178 0 0 296 0 --:--:-- --:--:-- --:--:-- 295
100 551k 100 551k 0 0 373k 0 0:00:01 0:00:01 --:--:-- 1375k
Archive: ./proprietary/Term.apk
caution: filename not matched: lib/armeabi/libjackpal-androidterm4.so
but the Term.apk now has a newer version:
hajma@c:~/android/system-ics/vendor/cm$ unzip -l proprietary/Term.apk |grep libjackpal-androidterm
13532 2015-04-15 08:09 lib/armeabi/libjackpal-androidterm5.so
5648 2015-04-15 08:09 lib/mips/libjackpal-androidterm5.so
5240 2015-04-15 08:09 lib/x86/libjackpal-androidterm5.so
I'll have a look at updating the term later, for now I'll use the zip one:
hajma@c:~/android/system-ics/vendor/cm$ mkdir -p proprietary/lib/armeabi/
hajma@c:~/android/system-ics/vendor/cm$ unzip -j ~/Downloads/cm-9.1.0-urushi.zip -d proprietary/lib/armeabi system/lib/libjackpal-androidterm4.so
external/llvm/include/llvm/ADT/PointerUnion.h:64:39: error: comparison between ‘enum llvm::PointerLikeTypeTraits::’ and ‘enum llvm::PointerLikeTypeTraits::’ [-Werror=enum-compare]
NumLowBitsAvailable = PT1BitsAv < PT2BitsAv ? PT1BitsAv : PT2BitsAv
while everybody on the Internet just removes -Wall from the makefile, it can be fixed in a simpler manner, as it has been workarounded before apparently:
hajma@c:~/android/system-ics/external/llvm$ git diff include/llvm/ADT/PointerUnion.h
diff --git a/include/llvm/ADT/PointerUnion.h b/include/llvm/ADT/PointerUnion.h
index 3e3f214..6450bdb 100644
--- a/include/llvm/ADT/PointerUnion.h
+++ b/include/llvm/ADT/PointerUnion.h
@@ -54,7 +54,7 @@ namespace llvm {
static inline void *getAsVoidPointer(void *P) { return P; }
static inline void *getFromVoidPointer(void *P) { return P; }
enum {
-#if (__GNUC__ == 4 && __GNUC_MINOR__ == 7)
+#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
PT1BitsAv = static_cast< int >(PointerLikeTypeTraits<PT1>::NumLowBitsAvailable),
PT2BitsAv = static_cast< int >(PointerLikeTypeTraits<PT2>::NumLowBitsAvailable),
#else
...
and more:
In file included from system/extras/ext4_utils/output_file.c:30:0:
/usr/include/zlib.h:34:19: fatal error: zconf.h: No such file or directory
#include "zconf.h"
^
compilation terminated.
The cause is
ugly and the solution is
uglier.
getting closer...
Boot image: out/target/product/urushi/boot.img
error: unsupported page size 131072
device/semc/msm7x30-common/custombootimg.mk:5: recipe for target 'out/target/product/urushi/boot.img' failed
make: *** [out/target/product/urushi/boot.img] Error 255
Now this is caused by a second part of a
changeset missing in the cm9.1 branch ... this
changeset has to be applied.
aaaand here it is:
Package complete: /home/hajma/android/system-ics/out/target/product/urushi/cm-9-20150804-UNOFFICIAL-urushi.zip
41ef84db95dc7b24f78c8d0788fc1bcd cm-9-20150804-UNOFFICIAL-urushi.zip
I don't dare to flash this yet though ;-)