Snippet $25705 authored by Simon Josefsson



Replicant 6 non-free firmware

echo '073a464a9f5129c490502c77374495c38a25ba790c10e27f51b43845baeba6bf' | sha256sum -c
mkdir cm-10.1.3-i9300
cd cm-10.1.3-i9300
unzip ../
cd ..

adb root
adb wait-for-device 
adb remount
adb shell mkdir /system/vendor/firmware
adb shell chmod 755 /system/vendor/firmware

# nfc works out of the box!

# front-camera
adb push cm-10.1.3-i9300/system/vendor/firmware/setfile.bin /system/vendor/firmware/setfile.bin
adb push cm-10.1.3-i9300/system/vendor/firmware/fimc_is_fw.bin /system/vendor/firmware/fimc_is_fw.bin

# bluetooth
adb push cm-10.1.3-i9300/system/bin/bcm4334.hcd /system/vendor/firmware/
adb push cm-10.1.3-i9300/system/bin/bcm4334_murata.hcd /system/vendor/firmware/
adb push cm-10.1.3-i9300/system/bin/bcm4334_semco.hcd /system/vendor/firmware/
adb push cm-10.1.3-i9300/system/bin/bcm4334_semcosh.hcd /system/vendor/firmware/

# wifi
adb push cm-10.1.3-i9300/system/etc/wifi/bcmdhd_apsta.bin_b2 /system/vendor/firmware
adb push cm-10.1.3-i9300/system/etc/wifi/bcmdhd_mfg.bin_b2 /system/vendor/firmware
adb push cm-10.1.3-i9300/system/etc/wifi/bcmdhd_p2p.bin_b2 /system/vendor/firmware
adb push cm-10.1.3-i9300/system/etc/wifi/bcmdhd_sta.bin_b2 /system/vendor/firmware
adb push cm-10.1.3-i9300/system/etc/wifi/nvram_mfg.txt /system/vendor/firmware
adb push cm-10.1.3-i9300/system/etc/wifi/nvram_mfg.txt_murata /system/vendor/firmware
adb push cm-10.1.3-i9300/system/etc/wifi/nvram_mfg.txt_semcosh /system/vendor/firmware
adb push cm-10.1.3-i9300/system/etc/wifi/nvram_net.txt /system/vendor/firmware
adb push cm-10.1.3-i9300/system/etc/wifi/nvram_net.txt_murata /system/vendor/firmware
adb push cm-10.1.3-i9300/system/etc/wifi/nvram_net.txt_semcosh /system/vendor/firmware

# GPS - requires ROM with fixed / to launch gpsd properly.
# see patch below, against devices/samsung/i9300/
# inspired by
# use ROM from if unsure
# if you have problems, try 'chown -R gps.system /data/gps' too
mkdir cm-13.0-20160820-SNAPSHOT-ZNH5YAO0J2-i9300
cd cm-13.0-20160820-SNAPSHOT-ZNH5YAO0J2-i9300
unzip ../cm-13.0-20160820-SNAPSHOT-ZNH5YAO0J2-i9300 system.transfer.list system.img
mkdir image
sudo mount system.img image/
adb push cm-13.0-20160820-SNAPSHOT-ZNH5YAO0J2-i9300/image/bin/glgps /system/bin
adb push cm-13.0-20160820-SNAPSHOT-ZNH5YAO0J2-i9300/image/lib/hw/ /system/lib/hw/
adb push cm-13.0-20160820-SNAPSHOT-ZNH5YAO0J2-i9300/image/bin/gps.cer /system/bin

From b6cac1a04b9738d614bacbfb8335dedd55c85afe Mon Sep 17 00:00:00 2001
From: Simon Josefsson <>
Date: Fri, 9 Sep 2016 18:31:43 +0000
Subject: [PATCH] Launch gpsd.

 rootdir/ | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/rootdir/ b/rootdir/
index 45b4501..050c459 100644
--- a/rootdir/
+++ b/rootdir/
@@ -42,14 +42,14 @@ on fs
     # zram
     swapon_all /fstab.smdk4x12

-#on boot
+on boot
 # Start GPS daemon
-#service gps-daemon /system/bin/sh /system/bin/
-#    class main
-#    socket gps seqpacket 0660 gps system
-#    user gps
-#    group system inet sdcard_rw gps
-#    seclabel u:r:glgps:s0
+service gps-daemon /system/bin/sh /system/bin/
+    class main
+    socket gps seqpacket 0660 gps system
+    user gps
+    group system inet sdcard_rw gps
+    seclabel u:r:glgps:s0

 on property:dev.bootcomplete=1
 # boot on default pegasusq settings (for better performance)