View Single Post
Posts: 76 | Thanked: 374 times | Joined on Feb 2016
#1
This requires a clean flash coming from cm11. Coming from the "SNAPSHOT" cm12.1 base also requires a clean flash if you would like sfdroid (for now). If a clean flash is too much work, wait for SFOS 2.0.2 to be released when cloud backup/restore is introduced to make it easier. Once on this base, OTAs are possible.

Until cm12.1 sfdroid becomes less buggy, more reliable, and more stable, this project will stay separate from the wiki and the cm11.0 base. Big thank you to BluesLee, sledges, mal-, kimmoli, monich, krnlyng, nh1402, Jolla, and any other contributors, testers, community members, or devs (in no particular order). Parts of this post have been taken from the wiki, and other parts from BluesLee's excellent thread.

Pros over cm11.0 base:
  • Better bluetooth functionality and performance.
  • Camcorder works.
  • Some video playback fixed.
  • Possibly lower sensor cpu usage without "ramp up" issue -- usage may vary.
Cons:
  • sfdroid (Android in a window) support is very early and unstable.
  • Laggy z-axis as a part of the sensorsfix3.zip. If you have issues, please post here or let me know on IRC.
  • OTA updates take hours to install due to a dbus bug. I recommend doing them overnight.

SFOS Installation:
  • If you're using multirom, ensure that you're running an older version of recovery that supports the "Flash Zip" capability for Sailfish. This build is recommended: http://d-h.st/BzdC
  • Depending on if you'd like to do a native install or use multirom, follow either native or multirom instructions on the wiki using the following CM12.1 and SFOS zips instead.
  • Flash sensorsfix3.zip on top of SFOS in recovery. If using the multirom method, go to Advanced=>Multirom => List Roms => <Sailfish ROM> => Flash Zip.
  • Reboot and setup your device.
  • There's no reason to OTA currently.

Test a very early preview of sfdroid:
Do not use this on a main rom unless you know how to revert. Additionally very little support will be given unless a logcat (devel-su /system/bin/logcat > blah) can be provided to debug the remaining crashes.
Known Sfdroid Bugs:
  • No audio
  • No gps, bluetooth, etc
  • The window and card (in task switcher) will be black on app switch. Tap or hold your finger on the screen when switching back to sfdroid to see android again.
  • Nexus 5 runs out of ram easily with sfdroid enabled and gapps. And when android crashes from OOM, it often re-optimizes apps. Testing enabling KSM and zram swap now.
  • Probably still some other crashes. Please post with a logcat (see above).
  • Google camera will not work. Additionally, SFOS camera will not work after using the AOSP camera until a reboot.
  • No AOSP keyboard swype support, install google keyboard from play store if desired.

Sfdroid Early Preview Installation:
  • Ensure you're running a cm12.1 base (cm-12.1-20160704-UNOFFICIAL-hammerhead.zip) SFOS installation.
  • Flash sfdroid on top of SFOS in recovery (multirom method should go to Advanced=>Multirom=>List Roms=><Sailfish ROM>=>Flash Zip).
  • Optional: Flash gapps. IMPORTANT: you must use our gapps package).
  • Add nemo to a required group (must have a password set in Settings => Developer Options):
    Code:
    devel-su usermod -G net_bt_stack -a nemo
  • Reboot
Disable Sfdroid:
Code:
curl -o http://sprunge.us/JPOI init.rc.bak
curl -o http://sprunge.us/JXPJ init.zygote32.rc.bak
devel-su
cp -f init.rc.bak /init.rc
cp -f init.zygote32.rc.bak /init.zygote32.rc
OTA Update Support:
DO NOT attempt an OTA to 2.0.2.X yet. If you want sfdroid support and are on an older base ("SNAPSHOT" cm12.1 build), you won't be able to get support from OTA'ing -- you must reflash using the new base.
Code:
RELEASE=<the version> # e.g. RELEASE=2.0.1.11
ssu release $RELEASE
devel-su sed -i -e 's#^adaptation=.*$#adaptation=http://repo.merproject.org/obs/home:/RealJohnGalt:/testing:/hammerhead/sailfish_latest_armv7hl/#' \
/usr/share/ssu/repos.ini
ssu dr mw
ssu ar mw http://repo.merproject.org/obs/nemo:/devel:/hw:/common/sailfish_latest_armv7hl/
ssu er mw
ssu lr
ssu lr
# ^ double-triple check that no -two- enabled repos point to the same URL

# You may have many of OpenRepos enabled. It's recommended to disable them, even
# though version --dup will do its best-effort to isolate repositories:
ssu lr | grep openrepos

devel-su zypper clean -a
devel-su zypper ref -f

version --dup
# if above fails, try again
version --dup

sync
reboot
Cool Stuff:
Change pixel_ratio to a smaller (but possibly better-fitting) ratio:
  • First enable the repository by entering root (with Developer Mode password):
    Code:
    devel-su
    ssu ar mer-tools
    ssu ur
  • To enable 1.82 pixel_ratio (opposed to 2.0 default):
    Code:
    curl http://sprunge.us/YbWB -o kimmoli-diyicons.sh
    chmod +x kimmoli-diyicons.sh
    devel-su ./kimmoli-diyicons.sh 1.82
  • To revert:
    Code:
    dconf reset /desktop/sailfish/silica/theme_pixel_ratio
    devel-su
    dconf update
    systemctl-user restart lipstick
MAC Address Randomization:
If you want to enable MAC address randomization each time the wlan interface is brought up, do the following:
  • Ensure you have a root password set. If unsure, go to Settings => Developer options, and save a password.
  • Either ssh or open terminal.
  • For temporary randomization until reboot or disable (toggle wlan afterward, reboot to disable):
    Code:
    devel-su sysctl -w net.core.randomize_mac=1
  • For permanent randomization (takes effect after the reboot):
    Code:
    devel-su
    echo "net.core.randomize_mac=1" > /etc/sysctl.d/macrand.conf
    reboot
Backup and restore
From your home directory on the Jolla phone do
Code:
 tar cvf vault.tar .vault
and transfer the tar file to your Nexus 5 and restore it using the Jolla backup and restore from the settings app.

Install keyboard prediction as root
Code:
 pkcon install jolla-xt9
Activate Low Power Mode (AKA "sneak peak" or "ambient display")
Code:
pkcon install mce-tools
mcetool --set-low-power-mode=enabled
Copy over maps package from Jolla Phone
Code:
pkcon download . sailfish-maps
FAQ:
  • Store is not working, or get an error about authentication when trying to install something in a shell.
    Run (with developer settings password):
    Code:
    devel-su
    ssu dr adaptation0
    pkcon refresh
  • Changed network mode in Settings, and now mobile data is intermittent or unreliable.
    Run:
    Code:
    dbus-send --system --type=method_call --print-reply --dest=org.ofono /ril_0 org.ofono.RadioSettings.SetProperty string:TechnologyPreference variant:string:lte
  • APN settings not sticking after reboot.
    This only needs to be run once (with developer settings password):
    Code:
    devel-su chown -R radio:radio /var/lib/ofono

Sources:
droid-config-hammerhead
droid-hal-version-hammerhead
droid-hal-hammerhead
android_kernel_lge_hammerhead
android_device_lge_hammerhead
Mer OBS Project



Donate to krnlyng (of sfdroid) https://www.paypal.com/cgi-bin/websc...=BDXQ6XV2ZXXUS
Donate to me (bitcoin): 1sfostM4Tbey3uP99Rvcx6edGTTRVF2U7

Last edited by RealJohnGalt; 2016-07-30 at 19:35. Reason: updated sfdroid
 

The Following 32 Users Say Thank You to RealJohnGalt For This Useful Post: