The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)
Adaptations/libhybris/Install SailfishOS for jfltexx
(→Things that work) |
|||
(9 intermediate revisions by 2 users not shown) | |||
Line 13: | Line 13: | ||
* Jolla Store (Harbour) doesn't work. Do not sign in with Jolla account. | * Jolla Store (Harbour) doesn't work. Do not sign in with Jolla account. | ||
− | |||
* Voicecall: receiving calls works properly (along with Speaker, Pad and Mic buttons) / making calls fails with 3 tone signal. | * Voicecall: receiving calls works properly (along with Speaker, Pad and Mic buttons) / making calls fails with 3 tone signal. | ||
* Camera: only front camera photo works. back camera photo + any camera video fails. | * Camera: only front camera photo works. back camera photo + any camera video fails. | ||
− | * Mobile Internet: intermittent feature, between reboots | + | * Mobile Internet: intermittent feature, between reboots: |
+ | ** setting PIN code for the SIM card seems to help; | ||
+ | ** additionally, try giving it 10-15sec pause once the SIM inserted screen shows up, and then enter the PIN to unlock. | ||
* Home key not working. | * Home key not working. | ||
* Headphone jack. | * Headphone jack. | ||
+ | * Screen going to suspend mode not working. | ||
=== Things that work === | === Things that work === | ||
Line 26: | Line 28: | ||
* SMS | * SMS | ||
* Audio | * Audio | ||
+ | * Bluetooth: now working, but with quirks. Details in the Release Notes for v0.0.9 | ||
+ | ** audio over bluetooth doesn't seem to work | ||
+ | ** may interfere with WiFi | ||
+ | ** may fail to load at times: toggling flight mode seems to help reset the state without rebooting | ||
+ | * using '''[https://github.com/beidl/brcm-patchram-plus brcm-patchram-plus]''' to make it work | ||
+ | * working command line: | ||
+ | <pre> | ||
+ | /usr/sbin/brcm_patchram_plus --patchram /vendor/firmware/bcm4335.hcd --enable_hci --bd_addr $(/bin/cat /efs/bluetooth/bt_addr) --no2bytes --tosleep 6000 /dev/ttyHS0 | ||
+ | </pre> | ||
+ | * using udev rfkill signal to catch events and trigger patchram: | ||
+ | <pre> | ||
+ | $ udevadm monitor | ||
+ | </pre> | ||
+ | |||
+ | == Image Building == | ||
+ | |||
+ | === useful links === | ||
+ | |||
+ | * [https://sailfishos.org/hadk_doc/SailfishOS-HardwareAdaptationDevelopmentKit-1.1.1.pdf HADK Porting Guide - used 1.1.1 (outdated, check out 1.1.2)] | ||
+ | * [https://github.com/search?q=user%3Asimonvanderveldt+droid Simon Van der Veldt's Github repos] | ||
+ | * [https://github.com/search?q=user%3Awickwire+droid Wickwire's Github repos] | ||
+ | * [https://wiki.cyanogenmod.org/w/Jfltexx_Info Cyanogenmod jfltexx Page] | ||
+ | * [https://wiki.cyanogenmod.org/w/Install_CM_for_jfltexx Cyanogenmod jfltexx Installation] | ||
+ | * [https://download.cyanogenmod.org/?type=snapshot&device=jfltexx Cyanogenmod jfltexx Releases] | ||
+ | * [https://wiki.merproject.org/wiki/Adaptations/libhybris Adaptations/libhybris] | ||
+ | |||
+ | * cm-12.1-20151117-SNAPSHOT-YOG7DAO1JN-jfltexx.zip | ||
+ | * cm-12.1-20151117-SNAPSHOT-YOG7DAO1JN-jfltexx-recovery.img | ||
+ | * I9505XXUHOB7_I9505YXYHOB5_BTU.zip | ||
+ | * Odin3_v3.10.7.zip | ||
+ | * heimdall-suite-1.4.0-win32.zip | ||
+ | |||
+ | === build notes === | ||
+ | |||
+ | '''The notes below follow the HADK Porting Guide (v1.1.1), which has recently been updated to v1.1.2)''' | ||
+ | |||
+ | |||
+ | |||
+ | 1 OVERVIEW -> Proceed as described; | ||
+ | |||
+ | 2 PREREQUISITES -> Proceed as described; | ||
+ | |||
+ | 3 PREPARING YOUR DEVICE -> Proceed as described; | ||
+ | |||
+ | |||
+ | 4.1 Setting up required environment variables | ||
+ | |||
+ | <pre> | ||
+ | $HOME/.hadk.env | ||
+ | |||
+ | export MER_ROOT="/home/<user>/mer" | ||
+ | export ANDROID_ROOT="$MER_ROOT/android/droid" | ||
+ | export VENDOR="samsung" | ||
+ | export DEVICE="jfltexx" | ||
+ | #ARCH conflicts with kernel build | ||
+ | export PORT_ARCH="armv7hl" | ||
+ | </pre> | ||
+ | |||
+ | Proceed as described; | ||
+ | |||
+ | |||
+ | 4.2 Setup the Mer SDK -> Proceed as described; | ||
+ | |||
+ | 4.3 Preparing the Mer SDK -> Proceed as described; | ||
+ | |||
+ | 4.4 Setting up an Android Build Environment | ||
+ | |||
+ | 4.4.1 Downloading and Unpacking Ubuntu Chroot -> Proceed as described; | ||
+ | |||
+ | 4.4.2 Entering Ubuntu Chroot -> Proceed as described; | ||
+ | |||
+ | 5.1 Checking out CyanogenMod Source | ||
+ | |||
+ | <pre> | ||
+ | repo init -u git://github.com/mer-hybris/android.git -b hybris-12.1 | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | Proceed as described; | ||
+ | |||
+ | |||
+ | 5.2 Device repos | ||
+ | |||
+ | $ANDROID_ROOT/.repo/local_manifests/jfltexx.xml | ||
+ | |||
+ | <pre> | ||
+ | <?xml version="1.0" encoding="UTF-8"?> | ||
+ | <manifest> | ||
+ | <project path="device/samsung/jflte" name="CyanogenMod/android_device_samsung_jfltexx" revision="cm-12.1" /> | ||
+ | <project path="device/samsung/jf-common" name="Cyanogenmod/android_device_samsung_jf-common" revision="cm-12.1" /> | ||
+ | <project path="device/samsung/msm8960-common" name="Cyanogenmod/android_device_samsung_msm8960-common" revision="cm-12.1" /> | ||
+ | <project path="device/samsung/qcom-common" name="Cyanogenmod/android_device_samsung_qcom-common" revision="cm-12.1" /> | ||
+ | <project path="hardware/samsung" name="Cyanogenmod/android_hardware_samsung" revision="cm-12.1" /> | ||
+ | <project path="kernel/samsung/jf" name="Cyanogenmod/android_kernel_samsung_jf" revision="cm-12.1" /> | ||
+ | <project path="rpm" name="wickwire/droid-hal-jfltexx" revision="master" sync-s="true" /> | ||
+ | <project path="hybris/droid-configs" name="wickwire/droid-config-jfltexx" revision="master" sync-s="true" /> | ||
+ | <project path="hybris/droid-hal-version-jfltexx" name="wickwire/droid-hal-version-jfltexx" revision="master" sync-s="true" /> | ||
+ | <project path="mlehtima/audioflingerglue" name="mlehtima/audioflingerglue" revision="master" sync-s="true" /> | ||
+ | <remove-project name="mer-hybris/hybris-boot" /> | ||
+ | <project path="hybris/hybris-boot" name="wickwire/hybris-boot" revision="wickwire-jfltexx" /> | ||
+ | </manifest> | ||
+ | </pre> | ||
+ | |||
+ | Proceed as described; | ||
+ | |||
+ | 5.3 Configure Mountpoint Information | ||
+ | |||
+ | '''$ANDROID_ROOT/hybris/hybris-boot/fixup-mountpoints''' should already have this additional block - so, nothing to do here: | ||
+ | |||
+ | <pre> | ||
+ | "jfltexx") | ||
+ | sed -i \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/aboot mmcblk0p6 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/apnhlos mmcblk0p1 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/backup mmcblk0p23 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p20 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p18 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/carrier mmcblk0p28 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/efs mmcblk0p10 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/fota mmcblk0p22 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/fsg mmcblk0p24 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/hidden mmcblk0p27 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/m9kefs1 mmcblk0p13 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/m9kefs2 mmcblk0p14 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/m9kefs3 mmcblk0p15 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/mdm mmcblk0p2 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/modemst1 mmcblk0p11 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/modemst2 mmcblk0p12 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/pad mmcblk0p9 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/param mmcblk0p19 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/persdata mmcblk0p26 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p17 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/recovery mmcblk0p21 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/rpm mmcblk0p7 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/sbl1 mmcblk0p3 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/sbl2 mmcblk0p4 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/sbl3 mmcblk0p5 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/ssd mmcblk0p25 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p16 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/tz mmcblk0p8 ' \ | ||
+ | -e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p29 ' \ | ||
+ | "$@" | ||
+ | ;; | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | 5.4 Building Relevant Bits of CyanogenMod | ||
+ | |||
+ | using '''defconfig''' from: '''arch/arm/configs/cyanogen_jf_defconfig''' | ||
+ | |||
+ | Before executing '''make -j4 hybris-hal''', perform actions | ||
+ | from [http://piratepad.net/hadk-faq http://piratepad.net/hadk-faq] '''lines 66-114''' in order to get GSM calls working: | ||
+ | |||
+ | <pre> | ||
+ | cd $ANDROID_ROOT | ||
+ | cd /external/sonivox | ||
+ | git checkout 047330f1c245bcb3641856a6adabfc344d6e3c36 | ||
+ | cd $ANDROID_ROOT | ||
+ | cd frameworks/av | ||
+ | git checkout 25be9ac20db51044e1b09ca67906355e4f328d48 | ||
+ | cd ~/mer/android/droid/kernel/samsung/jf | ||
+ | |||
+ | (check that the active branch is jfltexx) | ||
+ | |||
+ | make libaudioflingerglue miniafservice | ||
+ | </pre> | ||
+ | |||
+ | those packages should build ok, and then do | ||
+ | |||
+ | <pre> | ||
+ | make hybris-hal | ||
+ | </pre> | ||
+ | |||
+ | and then do | ||
+ | |||
+ | <pre> | ||
+ | hybris/mer-kernel-check/mer_verify_kernel_config ./out/target/product/$DEVICE/obj/KERNEL_OBJ/.config | egrep -e 'ERROR|WARNING' | ||
+ | WARNING: CONFIG_SCHEDSTATS is invalid | ||
+ | WARNING: CONFIG_SCHED_DEBUG is invalid | ||
+ | WARNING: CONFIG_WATCHDOG_NOWAYOUT is invalid | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | those 3 warnings only and no errors should be ok | ||
+ | |||
+ | |||
+ | 6 SETTING UP SCRATCHBOX2 TARGET -> Proceed as described; | ||
+ | |||
+ | |||
+ | 7.1 Creating Repositories for a New Device -> the files for this part should already be available from the local_manifest, nothing to do | ||
+ | |||
+ | 7.2.1 Building the droid-hal-device packages: | ||
+ | |||
+ | add the following repo to the merSDK: | ||
+ | |||
+ | <pre> | ||
+ | ssu ar testing http://repo.merproject.org/obs/home:/mal:/testing/sailfishos_latest_armv7hl/ | ||
+ | zypper ref and then zypper dup --from testing | ||
+ | </pre> | ||
+ | |||
+ | Proceed as described; | ||
+ | |||
+ | '''Important note: if the process hangs at ngfd-plugin-droid-vibrator''', abort the script and manually build the package: | ||
+ | |||
+ | <pre> | ||
+ | PKG=ngfd-plugin-droid-vibrator | ||
+ | cd ~/mer/devel/mer-hybris/$PKG | ||
+ | mb2 -s rpm/ngfd-plugin-droid-vibrator.spec -t samsung-jfltexx-armv7hl build | ||
+ | mv RPMS/*.rpm $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG | ||
+ | sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install zypper ref | ||
+ | </pre> | ||
+ | |||
+ | then resume '''build_packages.sh''' | ||
+ | |||
+ | When done, continue with [http://piratepad.net/hadk-faq http://piratepad.net/hadk-faq], follow the steps between '''lines 79-114''': | ||
+ | |||
+ | ('''for the load-module part''', check out '''14.8 PulseAudio Droid Modules''' in the '''HADK Porting Guide''') | ||
+ | |||
+ | <pre> | ||
+ | cd $ANDROID_ROOT | ||
+ | |||
+ | (create the two files below) | ||
+ | |||
+ | pack_source_af.sh | ||
+ | |||
+ | fold=audioflingerglue-0.0.1 | ||
+ | rm -rf $fold | ||
+ | mkdir $fold | ||
+ | |||
+ | mkdir -p $fold/out/target/product/${DEVICE}/system/lib | ||
+ | mkdir -p $fold/out/target/product/${DEVICE}/system/bin | ||
+ | mkdir -p $fold/external/audioflingerglue | ||
+ | |||
+ | cp ./out/target/product/${DEVICE}/system/lib/libaudioflingerglue.so $fold/out/target/product/${DEVICE}/system/lib/ | ||
+ | cp ./out/target/product/${DEVICE}/system/bin/miniafservice $fold/out/target/product/${DEVICE}/system/bin/ | ||
+ | cp ./external/audioflingerglue/*.h $fold/external/audioflingerglue/ | ||
+ | cp ./external/audioflingerglue/hybris.c $fold/external/audioflingerglue/ | ||
+ | |||
+ | tar -cjvf ${fold}.tgz $fold | ||
+ | |||
+ | audioflingerglue.spec | ||
+ | |||
+ | %define strip /bin/true | ||
+ | %define __requires_exclude ^.*$ | ||
+ | %define __find_requires %{nil} | ||
+ | %global debug_package %{nil} | ||
+ | %define __provides_exclude_from ^.*$ | ||
+ | %define device_rpm_architecture_string armv7hl | ||
+ | %define _target_cpu %{device_rpm_architecture_string} | ||
+ | |||
+ | Name: audioflingerglue | ||
+ | Summary: Android AudioFlinger glue library | ||
+ | Version: 0.0.1 | ||
+ | Release: 1 | ||
+ | Group: System/Libraries | ||
+ | License: ASL 2.0 | ||
+ | #BuildRequires: ubu-trusty | ||
+ | #BuildRequires: sudo-for-abuild | ||
+ | #BuildRequires: droid-bin-src-full | ||
+ | Source0: %{name}-%{version}.tgz | ||
+ | AutoReqProv: no | ||
+ | |||
+ | %description | ||
+ | %{summary} | ||
+ | |||
+ | %package devel | ||
+ | Summary: audioflingerglue development headers | ||
+ | Group: System/Libraries | ||
+ | Requires: audioflingerglue = %{version}-%{release} | ||
+ | BuildArch: noarch | ||
+ | |||
+ | %description devel | ||
+ | %{summary} | ||
+ | |||
+ | %prep | ||
+ | |||
+ | %if %{?device_rpm_architecture_string:0}%{!?device_rpm_architecture_string:1} | ||
+ | echo "device_rpm_architecture_string is not defined" | ||
+ | exit -1 | ||
+ | %endif | ||
+ | |||
+ | %setup | ||
+ | |||
+ | #sudo chown -R abuild:abuild /home/abuild/src/droid/ | ||
+ | #mv /home/abuild/src/droid/* . | ||
+ | #mkdir -p external | ||
+ | #pushd external | ||
+ | #tar -zxf %SOURCE0 | ||
+ | #mv audioflingerglue* audioflingerglue | ||
+ | #popd | ||
+ | %build | ||
+ | pwd | ||
+ | ls | ||
+ | tar -xvf %name-%version.tgz | ||
+ | %install | ||
+ | |||
+ | mkdir -p $RPM_BUILD_ROOT/%{_libexecdir}/droid-hybris/system/lib/ | ||
+ | mkdir -p $RPM_BUILD_ROOT/%{_libexecdir}/droid-hybris/system/bin/ | ||
+ | mkdir -p $RPM_BUILD_ROOT/%{_includedir}/audioflingerglue/ | ||
+ | mkdir -p $RPM_BUILD_ROOT/%{_datadir}/audioflingerglue/ | ||
+ | pushd %name-%version | ||
+ | cp out/target/product/*/system/lib/libaudioflingerglue.so \ | ||
+ | $RPM_BUILD_ROOT/%{_libexecdir}/droid-hybris/system/lib/ | ||
+ | |||
+ | cp out/target/product/*/system/bin/miniafservice \ | ||
+ | $RPM_BUILD_ROOT/%{_libexecdir}/droid-hybris/system/bin/ | ||
+ | |||
+ | cp external/audioflingerglue/audioflingerglue.h $RPM_BUILD_ROOT/%{_includedir}/audioflingerglue/ | ||
+ | cp external/audioflingerglue/hybris.c $RPM_BUILD_ROOT/%{_datadir}/audioflingerglue/ | ||
+ | |||
+ | popd | ||
+ | %files | ||
+ | %defattr(-,root,root,-) | ||
+ | %{_libexecdir}/droid-hybris/system/lib/libaudioflingerglue.so | ||
+ | %{_libexecdir}/droid-hybris/system/bin/miniafservice | ||
+ | |||
+ | %files devel | ||
+ | %defattr(-,root,root,-) | ||
+ | %{_includedir}/audioflingerglue/*.h | ||
+ | %{_datadir}/audioflingerglue/hybris.c | ||
+ | </pre> | ||
+ | |||
+ | 7.2.2 Troubleshoot errors from build_packages.sh -> Shouldn't be anything to do here; | ||
+ | |||
+ | 8.1 Additional Packages for Hardware Adaptation -> Shouldn't be anything to do here; | ||
+ | |||
+ | 8.2 Creating and Configuring the Kickstart File: | ||
+ | |||
+ | Proceed as described - and then add '''mal-''' repo to tmp/$KS (watch out for any typos): | ||
+ | |||
+ | <pre> | ||
+ | HA_REPO="repo --name=adaptation0-$DEVICE-@RELEASE@" | ||
+ | KS="Jolla-@RELEASE@-$DEVICE-@ARCH@.ks" | ||
+ | |||
+ | ##### older lines, kept for posterity and because sed is cool ##### | ||
+ | #sed -e "s|^$HA_REPO.*$|$HA_REPO --baseurl=file://$ANDROID_ROOT/droid-local-repo/$DEVICE|" $ANDROID_ROOT/hybris/droid-configs/installroot/usr/share/kickstarts/$KS > \ | ||
+ | tmp/$KS | ||
+ | #repo --name=testing2 --baseurl=http://repo.merproject.org/obs/home:/mal:/testing2/sailfishos_latest_armv7hl | ||
+ | #repo --name=common --baseurl=http://repo.merproject.org/obs/nemo:/testing:/hw:/common/sailfish_latest_armv7hl | ||
+ | #sed -e "s|^$HA_REPO.*$|$HA_REPO --baseurl=file://$ANDROID_ROOT/droid-local-repo/$DEVICE|;s|^repo --name=jolla-@RELEASE@.*|& \nrepo --name=testing2 \ | ||
+ | --baseurl=http://repo.merproject.org/obs/home:/mal:/testing2/sailfishos_latest_armv7hl\nrepo --name=common \ | ||
+ | --baseurl=http://repo.merproject.org/obs/nemo:/testing:/hw:/common/sailfish_latest_armv7hl|" \ | ||
+ | $ANDROID_ROOT/hybris/droid-configs/installroot/usr/share/kickstarts/$KS > tmp/$KS | ||
+ | ##### older lines, kept for posterity and because sed is cool ##### | ||
+ | |||
+ | sed -e "s|^$HA_REPO.*$|$HA_REPO --baseurl=file://$ANDROID_ROOT/droid-local-repo/$DEVICE|;s|^repo --name=jolla-@RELEASE@.*|& \nrepo --name=common \ | ||
+ | --baseurl=http://repo.merproject.org/obs/nemo:/testing:/hw:/common/sailfish_latest_armv7hl|" \ | ||
+ | $ANDROID_ROOT/hybris/droid-configs/installroot/usr/share/kickstarts/$KS > tmp/$KS | ||
+ | </pre> | ||
+ | |||
+ | 8.3.1 Making local repo aware of patterns -> Proceed as described; | ||
+ | |||
+ | 8.4 Building the Image with MIC | ||
+ | |||
+ | <pre> | ||
+ | cd $ANDROID_ROOT | ||
+ | hybris/droid-configs/droid-configs-device/helpers/process_patterns.sh | ||
+ | </pre> | ||
+ | |||
+ | Proceed as described; | ||
+ | |||
+ | <pre> | ||
+ | RELEASE=2.0.1.11 | ||
+ | EXTRA_NAME=-wickwire-005-devel | ||
+ | sudo mic create fs --arch $PORT_ARCH --tokenmap=ARCH:$PORT_ARCH,RELEASE:$RELEASE,EXTRA_NAME:$EXTRA_NAME --record-pkgs=name,url \ | ||
+ | --outdir=sfe-$DEVICE-$RELEASE$EXTRA_NAME --pack-to=sfe-$DEVICE-$RELEASE$EXTRA_NAME.tar.bz2 $ANDROID_ROOT/tmp/Jolla-@RELEASE@-$DEVICE-@ARCH@.ks | ||
+ | </pre> | ||
== Installation == | == Installation == |
Latest revision as of 10:55, 30 June 2016
Notes for installing Sailfish OS on the Samsung Galaxy S4 GT-I9505 LTE (jfltexx).
Contents |
[edit] Hardware Support
Device released | Linux Kernel |
Display | Touch | LED | Audio | NFC | Bluetooth | GSM | WLAN | GPS | Camera | Fingerprint | Sensors | Keys | Vibra | Haptics | Power Mgmt. |
RTC alarms |
USB | FM Radio | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SMS | Voice | Data | Connect | Hotspot | ALS | PS | Accel. | Gyro. | Magne. | Vol+/- | Home | Net. | Charge | ||||||||||||||||
3.4.107 | Y | Y | Y | Y | N | Y | Y | ? | Y | Y | ? | Y | N | ? | Y | Y | Y | Y | Y | Y | N | Y | Y | Y | ? | Y | Y | N/A |
[edit] Status
[edit] Things that don't work
- Jolla Store (Harbour) doesn't work. Do not sign in with Jolla account.
- Voicecall: receiving calls works properly (along with Speaker, Pad and Mic buttons) / making calls fails with 3 tone signal.
- Camera: only front camera photo works. back camera photo + any camera video fails.
- Mobile Internet: intermittent feature, between reboots:
- setting PIN code for the SIM card seems to help;
- additionally, try giving it 10-15sec pause once the SIM inserted screen shows up, and then enter the PIN to unlock.
- Home key not working.
- Headphone jack.
- Screen going to suspend mode not working.
[edit] Things that work
- Sensors
- GPS
- SMS
- Audio
- Bluetooth: now working, but with quirks. Details in the Release Notes for v0.0.9
- audio over bluetooth doesn't seem to work
- may interfere with WiFi
- may fail to load at times: toggling flight mode seems to help reset the state without rebooting
- using brcm-patchram-plus to make it work
- working command line:
/usr/sbin/brcm_patchram_plus --patchram /vendor/firmware/bcm4335.hcd --enable_hci --bd_addr $(/bin/cat /efs/bluetooth/bt_addr) --no2bytes --tosleep 6000 /dev/ttyHS0
- using udev rfkill signal to catch events and trigger patchram:
$ udevadm monitor
[edit] Image Building
[edit] useful links
- HADK Porting Guide - used 1.1.1 (outdated, check out 1.1.2)
- Simon Van der Veldt's Github repos
- Wickwire's Github repos
- Cyanogenmod jfltexx Page
- Cyanogenmod jfltexx Installation
- Cyanogenmod jfltexx Releases
- Adaptations/libhybris
- cm-12.1-20151117-SNAPSHOT-YOG7DAO1JN-jfltexx.zip
- cm-12.1-20151117-SNAPSHOT-YOG7DAO1JN-jfltexx-recovery.img
- I9505XXUHOB7_I9505YXYHOB5_BTU.zip
- Odin3_v3.10.7.zip
- heimdall-suite-1.4.0-win32.zip
[edit] build notes
The notes below follow the HADK Porting Guide (v1.1.1), which has recently been updated to v1.1.2)
1 OVERVIEW -> Proceed as described;
2 PREREQUISITES -> Proceed as described;
3 PREPARING YOUR DEVICE -> Proceed as described;
4.1 Setting up required environment variables
$HOME/.hadk.env export MER_ROOT="/home/<user>/mer" export ANDROID_ROOT="$MER_ROOT/android/droid" export VENDOR="samsung" export DEVICE="jfltexx" #ARCH conflicts with kernel build export PORT_ARCH="armv7hl"
Proceed as described;
4.2 Setup the Mer SDK -> Proceed as described;
4.3 Preparing the Mer SDK -> Proceed as described;
4.4 Setting up an Android Build Environment
4.4.1 Downloading and Unpacking Ubuntu Chroot -> Proceed as described;
4.4.2 Entering Ubuntu Chroot -> Proceed as described;
5.1 Checking out CyanogenMod Source
repo init -u git://github.com/mer-hybris/android.git -b hybris-12.1
Proceed as described;
5.2 Device repos
$ANDROID_ROOT/.repo/local_manifests/jfltexx.xml
<?xml version="1.0" encoding="UTF-8"?> <manifest> <project path="device/samsung/jflte" name="CyanogenMod/android_device_samsung_jfltexx" revision="cm-12.1" /> <project path="device/samsung/jf-common" name="Cyanogenmod/android_device_samsung_jf-common" revision="cm-12.1" /> <project path="device/samsung/msm8960-common" name="Cyanogenmod/android_device_samsung_msm8960-common" revision="cm-12.1" /> <project path="device/samsung/qcom-common" name="Cyanogenmod/android_device_samsung_qcom-common" revision="cm-12.1" /> <project path="hardware/samsung" name="Cyanogenmod/android_hardware_samsung" revision="cm-12.1" /> <project path="kernel/samsung/jf" name="Cyanogenmod/android_kernel_samsung_jf" revision="cm-12.1" /> <project path="rpm" name="wickwire/droid-hal-jfltexx" revision="master" sync-s="true" /> <project path="hybris/droid-configs" name="wickwire/droid-config-jfltexx" revision="master" sync-s="true" /> <project path="hybris/droid-hal-version-jfltexx" name="wickwire/droid-hal-version-jfltexx" revision="master" sync-s="true" /> <project path="mlehtima/audioflingerglue" name="mlehtima/audioflingerglue" revision="master" sync-s="true" /> <remove-project name="mer-hybris/hybris-boot" /> <project path="hybris/hybris-boot" name="wickwire/hybris-boot" revision="wickwire-jfltexx" /> </manifest>
Proceed as described;
5.3 Configure Mountpoint Information
$ANDROID_ROOT/hybris/hybris-boot/fixup-mountpoints should already have this additional block - so, nothing to do here:
"jfltexx") sed -i \ -e 's block/platform/msm_sdcc.1/by-name/aboot mmcblk0p6 ' \ -e 's block/platform/msm_sdcc.1/by-name/apnhlos mmcblk0p1 ' \ -e 's block/platform/msm_sdcc.1/by-name/backup mmcblk0p23 ' \ -e 's block/platform/msm_sdcc.1/by-name/boot mmcblk0p20 ' \ -e 's block/platform/msm_sdcc.1/by-name/cache mmcblk0p18 ' \ -e 's block/platform/msm_sdcc.1/by-name/carrier mmcblk0p28 ' \ -e 's block/platform/msm_sdcc.1/by-name/efs mmcblk0p10 ' \ -e 's block/platform/msm_sdcc.1/by-name/fota mmcblk0p22 ' \ -e 's block/platform/msm_sdcc.1/by-name/fsg mmcblk0p24 ' \ -e 's block/platform/msm_sdcc.1/by-name/hidden mmcblk0p27 ' \ -e 's block/platform/msm_sdcc.1/by-name/m9kefs1 mmcblk0p13 ' \ -e 's block/platform/msm_sdcc.1/by-name/m9kefs2 mmcblk0p14 ' \ -e 's block/platform/msm_sdcc.1/by-name/m9kefs3 mmcblk0p15 ' \ -e 's block/platform/msm_sdcc.1/by-name/mdm mmcblk0p2 ' \ -e 's block/platform/msm_sdcc.1/by-name/modemst1 mmcblk0p11 ' \ -e 's block/platform/msm_sdcc.1/by-name/modemst2 mmcblk0p12 ' \ -e 's block/platform/msm_sdcc.1/by-name/pad mmcblk0p9 ' \ -e 's block/platform/msm_sdcc.1/by-name/param mmcblk0p19 ' \ -e 's block/platform/msm_sdcc.1/by-name/persdata mmcblk0p26 ' \ -e 's block/platform/msm_sdcc.1/by-name/persist mmcblk0p17 ' \ -e 's block/platform/msm_sdcc.1/by-name/recovery mmcblk0p21 ' \ -e 's block/platform/msm_sdcc.1/by-name/rpm mmcblk0p7 ' \ -e 's block/platform/msm_sdcc.1/by-name/sbl1 mmcblk0p3 ' \ -e 's block/platform/msm_sdcc.1/by-name/sbl2 mmcblk0p4 ' \ -e 's block/platform/msm_sdcc.1/by-name/sbl3 mmcblk0p5 ' \ -e 's block/platform/msm_sdcc.1/by-name/ssd mmcblk0p25 ' \ -e 's block/platform/msm_sdcc.1/by-name/system mmcblk0p16 ' \ -e 's block/platform/msm_sdcc.1/by-name/tz mmcblk0p8 ' \ -e 's block/platform/msm_sdcc.1/by-name/userdata mmcblk0p29 ' \ "$@" ;;
5.4 Building Relevant Bits of CyanogenMod
using defconfig from: arch/arm/configs/cyanogen_jf_defconfig
Before executing make -j4 hybris-hal, perform actions from http://piratepad.net/hadk-faq lines 66-114 in order to get GSM calls working:
cd $ANDROID_ROOT cd /external/sonivox git checkout 047330f1c245bcb3641856a6adabfc344d6e3c36 cd $ANDROID_ROOT cd frameworks/av git checkout 25be9ac20db51044e1b09ca67906355e4f328d48 cd ~/mer/android/droid/kernel/samsung/jf (check that the active branch is jfltexx) make libaudioflingerglue miniafservice
those packages should build ok, and then do
make hybris-hal
and then do
hybris/mer-kernel-check/mer_verify_kernel_config ./out/target/product/$DEVICE/obj/KERNEL_OBJ/.config | egrep -e 'ERROR|WARNING' WARNING: CONFIG_SCHEDSTATS is invalid WARNING: CONFIG_SCHED_DEBUG is invalid WARNING: CONFIG_WATCHDOG_NOWAYOUT is invalid
those 3 warnings only and no errors should be ok
6 SETTING UP SCRATCHBOX2 TARGET -> Proceed as described;
7.1 Creating Repositories for a New Device -> the files for this part should already be available from the local_manifest, nothing to do
7.2.1 Building the droid-hal-device packages:
add the following repo to the merSDK:
ssu ar testing http://repo.merproject.org/obs/home:/mal:/testing/sailfishos_latest_armv7hl/ zypper ref and then zypper dup --from testing
Proceed as described;
Important note: if the process hangs at ngfd-plugin-droid-vibrator, abort the script and manually build the package:
PKG=ngfd-plugin-droid-vibrator cd ~/mer/devel/mer-hybris/$PKG mb2 -s rpm/ngfd-plugin-droid-vibrator.spec -t samsung-jfltexx-armv7hl build mv RPMS/*.rpm $ANDROID_ROOT/droid-local-repo/$DEVICE/$PKG sb2 -t $VENDOR-$DEVICE-armv7hl -R -msdk-install zypper ref
then resume build_packages.sh
When done, continue with http://piratepad.net/hadk-faq, follow the steps between lines 79-114:
(for the load-module part, check out 14.8 PulseAudio Droid Modules in the HADK Porting Guide)
cd $ANDROID_ROOT (create the two files below) pack_source_af.sh fold=audioflingerglue-0.0.1 rm -rf $fold mkdir $fold mkdir -p $fold/out/target/product/${DEVICE}/system/lib mkdir -p $fold/out/target/product/${DEVICE}/system/bin mkdir -p $fold/external/audioflingerglue cp ./out/target/product/${DEVICE}/system/lib/libaudioflingerglue.so $fold/out/target/product/${DEVICE}/system/lib/ cp ./out/target/product/${DEVICE}/system/bin/miniafservice $fold/out/target/product/${DEVICE}/system/bin/ cp ./external/audioflingerglue/*.h $fold/external/audioflingerglue/ cp ./external/audioflingerglue/hybris.c $fold/external/audioflingerglue/ tar -cjvf ${fold}.tgz $fold audioflingerglue.spec %define strip /bin/true %define __requires_exclude ^.*$ %define __find_requires %{nil} %global debug_package %{nil} %define __provides_exclude_from ^.*$ %define device_rpm_architecture_string armv7hl %define _target_cpu %{device_rpm_architecture_string} Name: audioflingerglue Summary: Android AudioFlinger glue library Version: 0.0.1 Release: 1 Group: System/Libraries License: ASL 2.0 #BuildRequires: ubu-trusty #BuildRequires: sudo-for-abuild #BuildRequires: droid-bin-src-full Source0: %{name}-%{version}.tgz AutoReqProv: no %description %{summary} %package devel Summary: audioflingerglue development headers Group: System/Libraries Requires: audioflingerglue = %{version}-%{release} BuildArch: noarch %description devel %{summary} %prep %if %{?device_rpm_architecture_string:0}%{!?device_rpm_architecture_string:1} echo "device_rpm_architecture_string is not defined" exit -1 %endif %setup #sudo chown -R abuild:abuild /home/abuild/src/droid/ #mv /home/abuild/src/droid/* . #mkdir -p external #pushd external #tar -zxf %SOURCE0 #mv audioflingerglue* audioflingerglue #popd %build pwd ls tar -xvf %name-%version.tgz %install mkdir -p $RPM_BUILD_ROOT/%{_libexecdir}/droid-hybris/system/lib/ mkdir -p $RPM_BUILD_ROOT/%{_libexecdir}/droid-hybris/system/bin/ mkdir -p $RPM_BUILD_ROOT/%{_includedir}/audioflingerglue/ mkdir -p $RPM_BUILD_ROOT/%{_datadir}/audioflingerglue/ pushd %name-%version cp out/target/product/*/system/lib/libaudioflingerglue.so \ $RPM_BUILD_ROOT/%{_libexecdir}/droid-hybris/system/lib/ cp out/target/product/*/system/bin/miniafservice \ $RPM_BUILD_ROOT/%{_libexecdir}/droid-hybris/system/bin/ cp external/audioflingerglue/audioflingerglue.h $RPM_BUILD_ROOT/%{_includedir}/audioflingerglue/ cp external/audioflingerglue/hybris.c $RPM_BUILD_ROOT/%{_datadir}/audioflingerglue/ popd %files %defattr(-,root,root,-) %{_libexecdir}/droid-hybris/system/lib/libaudioflingerglue.so %{_libexecdir}/droid-hybris/system/bin/miniafservice %files devel %defattr(-,root,root,-) %{_includedir}/audioflingerglue/*.h %{_datadir}/audioflingerglue/hybris.c
7.2.2 Troubleshoot errors from build_packages.sh -> Shouldn't be anything to do here;
8.1 Additional Packages for Hardware Adaptation -> Shouldn't be anything to do here;
8.2 Creating and Configuring the Kickstart File:
Proceed as described - and then add mal- repo to tmp/$KS (watch out for any typos):
HA_REPO="repo --name=adaptation0-$DEVICE-@RELEASE@" KS="Jolla-@RELEASE@-$DEVICE-@ARCH@.ks" ##### older lines, kept for posterity and because sed is cool ##### #sed -e "s|^$HA_REPO.*$|$HA_REPO --baseurl=file://$ANDROID_ROOT/droid-local-repo/$DEVICE|" $ANDROID_ROOT/hybris/droid-configs/installroot/usr/share/kickstarts/$KS > \ tmp/$KS #repo --name=testing2 --baseurl=http://repo.merproject.org/obs/home:/mal:/testing2/sailfishos_latest_armv7hl #repo --name=common --baseurl=http://repo.merproject.org/obs/nemo:/testing:/hw:/common/sailfish_latest_armv7hl #sed -e "s|^$HA_REPO.*$|$HA_REPO --baseurl=file://$ANDROID_ROOT/droid-local-repo/$DEVICE|;s|^repo --name=jolla-@RELEASE@.*|& \nrepo --name=testing2 \ --baseurl=http://repo.merproject.org/obs/home:/mal:/testing2/sailfishos_latest_armv7hl\nrepo --name=common \ --baseurl=http://repo.merproject.org/obs/nemo:/testing:/hw:/common/sailfish_latest_armv7hl|" \ $ANDROID_ROOT/hybris/droid-configs/installroot/usr/share/kickstarts/$KS > tmp/$KS ##### older lines, kept for posterity and because sed is cool ##### sed -e "s|^$HA_REPO.*$|$HA_REPO --baseurl=file://$ANDROID_ROOT/droid-local-repo/$DEVICE|;s|^repo --name=jolla-@RELEASE@.*|& \nrepo --name=common \ --baseurl=http://repo.merproject.org/obs/nemo:/testing:/hw:/common/sailfish_latest_armv7hl|" \ $ANDROID_ROOT/hybris/droid-configs/installroot/usr/share/kickstarts/$KS > tmp/$KS
8.3.1 Making local repo aware of patterns -> Proceed as described;
8.4 Building the Image with MIC
cd $ANDROID_ROOT hybris/droid-configs/droid-configs-device/helpers/process_patterns.sh
Proceed as described;
RELEASE=2.0.1.11 EXTRA_NAME=-wickwire-005-devel sudo mic create fs --arch $PORT_ARCH --tokenmap=ARCH:$PORT_ARCH,RELEASE:$RELEASE,EXTRA_NAME:$EXTRA_NAME --record-pkgs=name,url \ --outdir=sfe-$DEVICE-$RELEASE$EXTRA_NAME --pack-to=sfe-$DEVICE-$RELEASE$EXTRA_NAME.tar.bz2 $ANDROID_ROOT/tmp/Jolla-@RELEASE@-$DEVICE-@ARCH@.ks
[edit] Installation
[edit] Requirements for installation
- Base Android zip: CyanogenMod download
- Latest Sailfish OS release: (newest directory and then the zip)
- Computer with adb and fastboot installed
- Patience and luck
[edit] Installation steps
- Install Android base zip by following instructions: CyanogenMod jfltexx Page
- Install the Sailfish OS zip on top of that Android base
- Reboot
[edit] Report bugs
- Software-related bugs (Sailfish OS): first search in https://together.jolla.com. If not found, add your question and tag with "porting"
- App bugs (e.g. an app doesn't scale well on different screens): contact its developer
- Problems which depend on hardware: search existing http://bit.ly/port-bugs; add new http://bit.ly/port-new-bug
- Please do not contact Jolla Care, Jolla Developer Care or phone's maker (e.g. LG, OnePlus, Google), as this is the Sailfish OS community's build for other phones
- For hot discussions about bleeding edge issues, welcome to this xda thread :)