Fairphone FP1U
I have this phone for more than 3,5 years
running on Android v4.2 !
Gapps
I dont have them, I dont even have a google account.
Although fairphone comes with an extra GApps package zip, I haven’t installed them either.
Fake GApps
Unfortunately there are some android apps that need GApps to run. So, without any further ado, here are my notes on how to add support for alternative open sources.
Disclaimer
Device may brick ! Do a full backup and keep it somewhere safe.
Location Service
We start with the easy one, how to add support for location service.
In Fdroid we can find the UnifiedNlp suite of packages that work as a Location provider middleware. On my device, I installed the below apps:
https://f-droid.org/repository/browse/?fdfilter=UnifiedNlp
UnifiedNlp
Screenshots from my fairphone, after a few reboots
Unified github
Just to make things perfectly clear, you can verify fdroid’s packages against these:
https://github.com/microg/android_packages_apps_UnifiedNlp/releases
Google Play Store
So notes are referring to Phonesky … I didnt follow them !!!
Instead of phonesky, I installed BlankStore !
Here is the github repo: BlankStore v0.7.5
https://github.com/mar-v-in/BlankStore/releases
microG
Now are going to a more interesting part. We need to install the μG to our phone.
microG F-Droid repo
It’s really easy, just add the fdroid repository and install the below two apps:
https://microg.org/fdroid/repo?fingerprint=9BD06727E62796C0130EB6DAB39B73157451582CBD138E86C468ACC395D14165
- microG Services Core
- microG Services Framework Proxy
microG Services Core
Now the difficult part.
Opening microG self-checked, we are going to see that spoof signature is not passing the test.
Xposed
Now the most difficult and dangerous thing you will need to do with your phone.
We need to install Xposed Installer
For Fairphone FP1U we need:
Package: de.robv.android.xposed.installer
Version name: 2.7 experimental
Download: de.robv.android.xposed.installer_v33_36570c.apk (770.28 KB)
MD5: 36570c6fac687ffe08107e6a72bd3da7
after that, we have to install the below xposed modules:
- Xposed Installer
- FakeGApps
- XposedGmsCoreUnifiedNlp
- XposedUnifiedNlp
download them and reboot your phone. If you think it may be helpful, cross your fingers.
This is a good time to remind you that you need to have a fresh backup
microG
Now let’s reboot our mobile phone again and try to open μG once more:
If everything seems like the above pictures, then you are done !
Errata 20170211
For android users with v4.2 on it, there are a few errata!
Location Services
You need the legacy network location package from UnifiedNlp
LegacyNetworkLocation.apk
μG - microG
The latest online version -somehow- doesnt work with my phone perfectly.
You can use the build from BRNmod an alternative CyanogenMod
https://files.brnmod.rocks/apps/GmsCore/Latest/
play-services-core-debug.apk 27-Jan-2017 11:22 4188872
Fairphone
How to disable the camera shutter sound:
code snippet only
[root@myhomepc platform-tools]# ./adb shell
shell@android:/ $ su
shell@android:/ # mount -o rw,remount /system
shell@android:/ # echo '' > /system/media/audio/ui/camera_shutter.ogg
If you missed my previous blog post about fairphone click here: here.
this blog post document how to became root and do “advanced” staff.
iFixit
Fairphone comes with an iFixit app - and of course with some other apps too ;)
If you want to remove it, you can simply connect your phone with your linux box, open USB debugging and adb shell through your phone
Fairphone is already rooted, so when you connect to it via adb, simply type:
su
to became root.
eg.
# adb shell
shell@android:/ $ su
shell@android:/ #
You can do what-ever you like - but be careful with it !
Next, remount your system partition to be read-write:
# mount -o rw,remount /system
and then simply remove the app you dont need:
# rm /system/app/FairPhoneIFixIt.apk
(you can alternative use an App-Remove application - but this is more fun, right ?)
and now to the more interesting thing:
Busybox
How to add busybox to your Fairphone.
You need to download the busybox-armv7l from here
and use adb to push it to your phone:
adb push busybox-armv7l /sdcard/
after that, connect via adb shell, become root, open system to read-write and
cp /sdcard/busybox-armv7l /system/bin/
Fairphone comes with toolbox
There are a few commands point to toolbox:
cat chmod chown cmp cp date dd df dmesg du getevent getprop grep hd id ifconfig iftop insmod ioctl ionice kill ln log ls lsmod lsof md5 mkdir mount mv nandread netstat newfs_msdos notify printenv ps reboot renice rm rmdir rmmod route schedtop sendevent setconsole setprop sleep smd start stop sync top touch umount uptime vmstat watchprops wipe
but busybox has move power:
[, [[, acpid, add-shell, addgroup, adduser, adjtimex, arp, arping, ash,
awk, base64, basename, beep, blkid, blockdev, bootchartd, brctl,
bunzip2, bzcat, bzip2, cal, cat, catv, chat, chattr, chgrp, chmod,
chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear, cmp, comm,
conspy, cp, cpio, crond, crontab, cryptpw, cttyhack, cut, date, dc, dd,
deallocvt, delgroup, deluser, depmod, devmem, df, dhcprelay, diff,
dirname, dmesg, dnsd, dnsdomainname, dos2unix, du, dumpkmap,
dumpleases, echo, ed, egrep, eject, env, envdir, envuidgid, ether-wake,
expand, expr, fakeidentd, false, fbset, fbsplash, fdflush, fdformat,
fdisk, fgconsole, fgrep, find, findfs, flock, fold, free, freeramdisk,
fsck, fsck.minix, fsync, ftpd, ftpget, ftpput, fuser, getopt, getty,
grep, groups, gunzip, gzip, halt, hd, hdparm, head, hexdump, hostid,
hostname, httpd, hush, hwclock, id, ifconfig, ifdown, ifenslave,
ifplugd, ifup, inetd, init, insmod, install, ionice, iostat, ip,
ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iprule, iptunnel,
kbd_mode, kill, killall, killall5, klogd, last, less, linux32, linux64,
linuxrc, ln, loadfont, loadkmap, logger, login, logname, logread,
losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lsof, lspci, lsusb, lzcat,
lzma, lzop, lzopcat, makedevs, makemime, man, md5sum, mdev, mesg,
microcom, mkdir, mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.minix,
mkfs.vfat, mknod, mkpasswd, mkswap, mktemp, modinfo, modprobe, more,
mount, mountpoint, mpstat, mt, mv, nameif, nanddump, nandwrite,
nbd-client, nc, netstat, nice, nmeter, nohup, nslookup, ntpd, od,
openvt, passwd, patch, pgrep, pidof, ping, ping6, pipe_progress,
pivot_root, pkill, pmap, popmaildir, poweroff, powertop, printenv,
printf, ps, pscan, pstree, pwd, pwdx, raidautorun, rdate, rdev,
readahead, readlink, readprofile, realpath, reboot, reformime,
remove-shell, renice, reset, resize, rev, rm, rmdir, rmmod, route, rpm,
rpm2cpio, rtcwake, run-parts, runlevel, runsv, runsvdir, rx, script,
scriptreplay, sed, sendmail, seq, setarch, setconsole, setfont,
setkeycodes, setlogcons, setserial, setsid, setuidgid, sh, sha1sum,
sha256sum, sha3sum, sha512sum, showkey, slattach, sleep, smemcap,
softlimit, sort, split, start-stop-daemon, stat, strings, stty, su,
sulogin, sum, sv, svlogd, swapoff, swapon, switch_root, sync, sysctl,
syslogd, tac, tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp,
tftpd, time, timeout, top, touch, tr, traceroute, traceroute6, true,
tty, ttysize, tunctl, udhcpc, udhcpd, udpsvd, umount, uname, unexpand,
uniq, unix2dos, unlzma, unlzop, unxz, unzip, uptime, users, usleep,
uudecode, uuencode, vconfig, vi, vlock, volname, wall, watch, watchdog,
wc, wget, which, who, whoami, whois, xargs, xz, xzcat, yes, zcat, zcip
to add a new command to your fairphone just link it against busybox:
shell@android:/system/bin # ln -s busybox vi
from here … you can do pretty much whatever you like !.
I am a proud owner of a fairphone.
For about ~300 euros i bought a really cool smartphone.
When you boot up your phone for the first time, there is a widget to add support for google apps.
Just remove it and go on with your life. Nothing useful here.
[EDIT #1] Before we begin our beautiful opensource journey, you must have in mind that ALL your personal devices can be hacked, stolen or be destroyed (crashed/brick/whatever). You have to remember that - you should have your digital data elsewhere and sync/backup/encrypt EVERYTHING. So dont use your phone as an offline image gallery, dont save everything in our mails.
First thing: Encrypt the /sdcard
You need to add a PIN to screen lock (Settings –> Security –> Screen Lock –> PIN)
after that tap through: Settings –> Security –> Encryption –> Encrypt device
Be aware: THIS MUST BE the first thing, cause every data on your SD (internal/external) will be destroyed.
So you have to unlock the screen everytime with that PIN and it’s the same PIN that you need to type on boot time. Not very safe.
It’s safer to change the PIN to decrypt your card with a passphrase. There is an excellent article here or just use (without reading) this app: Cryptfs Password
I downloaded the app (through the f-droid site and not through f-droid app), i’ve changed the PIN to a PASSPHRASE and then removed the app from my phone.
AGAIN you must be sure that no data are in your SDCARD.
Verify that your phone is booting up fine, decryption is using the passphrase, there is an unlock PIN for you mobile card and a different PIN to unlock your screen lock.
It’s not paranoia (not yet) but it’s the most safe and easy thing you can do.
Below i will just document the apps i am using through F-Droid:
- AdAway - Do remove ads
- AFWall+ - Firewall App
- Autostarts - Disable apps from starting at boot (or other state of your phone)
- Barcode Scanner - QR decoder and more
- DavDroid - CardDAV/CalDAV client
- DiskUsage - Disk Usage
- Epub3 Reader - Cause i read epub books
- F-droid - Free software for your android
- Firefox - Web Browser
- k9 - email client
- OpenFlashLight - a simple flash light
- OsmAnd~ - Openstreet Navigator (and more)
- RMaps - Map Client (and more)
- Ted - simple text editor
- Terminal Emulator - cause let’s face it, if you have a shell access you can do everything.
- Tincd-vpn - Vpn client
- VuDroid - Pdf Reader
- Wallabag - offline read later app
- Xabber - Jabber client
There are two closed source apps that i am using and couldnt find a decent replacement on f-droid (and believe me when i am telling you that i’ve tried a few).
- MyBookDroid - book cataloging
- Tweedle - twitter client
MyBookDroid is nowhere to find - I’ve moved it from my previous phone
[EDIT 2]: I’ve installed Twidere and used it for a while - but i didnt like it.
I will document the use of DavDroid to another blog post - cause you need a free software card/cal DAV server to use it.
DavDroid will give you the ability to synchronize your contacts against your own server.
K-9 has the ability to add PGP support - to encrypt your emails when talking to a recipient with PGP.
I will also document k-9 with my mail server setup.
Same thing about openvpn client.
So here it is !