Selection | Setup | Checkout | Install CM | Apps | Hacking | Top |
Change history:
Froyo.
Ice Cream Sandwich.
Jelly Bean
KitKat
Lollipop(Galaxy S5)
Marshmallow(Galaxy S5)
These notes are very specific to jimc's preferences and configuration, but other readers can get an idea of the procedure which I've found to be efficient.
Since CyanogenMod-12 for Galaxy S5 is in nightly builds, new distro images will be frequent. In theory if the major number (CM-12) is not changing, you can install an upgrade without wiping data. However, in the jump from Android-5.0 to 5.1 several users had bootloops and app misbehavior which were cured by a factory reset (wiping data). Before upgrading it's best to back up everything, and to be prepared to follow this procedure.
After you flash CyanogenMod and do the initial boot, it will drop into the Welcome App (formerly known as the Setup Wizard). You can skip all of the items and take care of them later, but it's nicer to do it immediately. Unlike with the stock image, after I flashed CyanogenMod my firewall was passing traffic from the new phone, so I could set up the accounts in the first pass.
Setup wizard wants you to pick your language. Then hit Next.
It lets you set up Wi-fi, which is recommended if you're going to be downloading a lot of apps.
Give your loginID@gmail.com and the password for your Google account. You could also create a Google account at this point, though jimc recommends pre-creating it using another computer. Setup in CyanogenMod also lets you bypass this step entirely, although you need the Google account to use the Market app.
CyanogenMod-12 (and likely KitKat and Lollipop in
general) has Tap and Go
which can use NFC to import your Google account credential
(e-mail address and password) from another Android device. This worked
for me. I had hoped that it would import all my accounts, but it didn't.
To set up your Google account later, launch Settings, scroll way down to Accounts, hit +Add Account, pick Google, give loginid@gmail.com and your password.
It has to do stuff on the cloud server. Give it time.
On the next screen you're offered the chance to join Google+. Not a chance. Hit Next.
Do you want to back up your stuff in the cloud? Consider your security policies carefully here. Jimc insists on backing up to my own cloud server, but many other people think nothing of storing their personal files on a service with no service level agreement, whose business model is world domination through advertising. The prudent user will un-check both boxes and hit Next.
Google Location Service. While a lot of people are paranoid about revealing their point of physical presence, I am a little looser in this category than for the backups, and left both location boxes checked. These are to make your location available to apps, and to include your location in Google search queries. Hit Next.
CyanogenMod account: give your credential here. It also asks if you want to submit anonymous usage data. I said yes; only the most paranoid users will opt out.
The data sent in is a 128 bit unique ID (probably random), the chassis name (klte for the Galaxy S5), the version name of CyanogenMod that is installed, the country (where the carrier operates?), and the carrier name.
In the stock image they say they personalize your user experience by using your full name, although I haven't yet seen any of that. CM-12 did not ask for my full name. If you're paranoid you could give a screen or gaming alias. Hit Next.
Setup is complete. Hit Finish.
Next step is to set a few settings to make the UI a little less annoying while you restore your apps and data. Hit Menu - Settings and pick:
Device - Display & Lights
Brightness (automatic is on by default, good). Under LiveDisplay you can jigger the color calibration; I turned on Display Mode - Automatic, which emphasizes blue in daytime and red at night.
Sleep, set to 5 minutes. The default of 1 minute is too annoying when you're trying to take notes on what you're doing.
System:
Date & Time
Developer options: These are hidden. I'm not sure who enforces
this, Android-4.2.x Super Jelly Bean
in general, or
specifically CyanogenMod. However:
This wiki article tells
how to
turn on Developer Options: In Settings - About Tablet
(or About Phone), find the build number, and tap it seven times. You
will be notified that You are now a developer
, and the Developer
Options and Performance sections will be visible in the System
section.
The whole developer page has an on-off switch in the title row; turn on.
Advanced Reboot (reboot into Recovery etc.): turn on.
Stay awake when charging (turn on). I need this for the Night Clock app.
Root Access: change to Apps and ADB (default is Apps only).
Android Debugging: turn on.
On your laptop, un-tar your backups of /data/app and /data/data . For people just getting started with UNIX/Linux, here's the procedure. This is copied off my screen using my filenames, and you will have to substitute your own. My total size was 1.05Gb.
In KitKat and before, /{system,data}/app contained APK files, not
directories. In Lollipop it's reorganized. This example is from Antutu
Benchmark but all the apps downloaded so far look like this (others not yet
seen might be more complicated): /data/app/com.antutu.ABenchMark-1 is a
directory. It contains base.apk (the Java code), plus
./lib/arm/libabenchmark.so and another library. I'm going to restore one
KitKat app and see what happens. I used adb install
com.farproc.wifi.analyzer-1.apk
, picking this app because it's simple and
non-critical. It was installed in the new format, and it executed correctly,
but this app has no shared libraries. Play Store has no update for it; it's
already updated for Lollipop. Success!
Here's how to un-tar the backups:
mkdir -p /home/scratch/restore-0130 #Make a place to un-tar the backups.
cd /home/scratch/restore-0130
mkdir app # Extracting downloaded apps
cd app
tar xf ~jimc/upgrade/selen/files/data.app-0130.tar
cd .. # Return to containing directory, extract data
mkdir data
cd data
tar xzf ~jimc/upgrade/selen/files/data.data-0130.tgz # This one is compressed
cd ../app # Get ready to restore the apps.
ls -1 > ./install.sh # Makes a list of your apps. Option is minus one.
chmod 755 ./install.sh
Use your favorite editor on ./install.sh and exclude several items that are already installed or have other contraindications. Likely the already installed apps are specific to me, being carried over from Gingerbread. There's no reason to preserve them.
Now turn the list into a useful script, along these lines.
#!/bin/sh
apps="
com.amazon.kindle-1.apk
com.eclipsim.gpsstatus2-1.apk
etc. etc. Remove items to be excluded.
"
for a in $apps ; do
echo === Installing $a
adb install $a
done
Execute the script. I always capture the script output and check carefully later to see if anything strange happened. On the phone, the apps all end up in /data/app owned by system:system, and the app's data directory is created, /data/data/${APP} owned by its paranoid UID and group, mode 751.
./install.sh 2>&1 | tee /tmp/logfile
On each install, on the phone it will pop a box asking you to allow
Google to check for harmful apps
. Just hit accept
and it will go
a lot smoother. None of my apps were considered harmful.
Check for updates. Firefox and Google Earth needed an update. Also
I omitted some apps and installed them by hand from the market: Google Maps,
Street View on Google Maps
, Google Wallet, Google YouTube.
Missing apps that I couldn't find: Apollo (music player).
Now the real trick is to restore the data. In Android each app has its own user ID and group, as an aid to keeping a hostile app from stealing data from others and sending it to the mother ship. The UIDs are assigned in an arbitrary order which changes from one OS version to the next, so the UIDs in your backup will mostly be wrong, and most of the apps will not be able to read or write their data. Here's how I automated fixing the UIDs.
First, only a small subset of the data will be restored: I'll exclude apps that I didn't configure and didn't save a useful history in, and I'll also exclude apps that I put some investment into, but which I suspect have been upgraded in such a way that it would be dangerous to carry over settings from the previous incarnation. I have 171 directories backed up, but I'm excluding the majority, specifically:
I'm restoring these 52 directories:
Some of the apps refer to files on my external SD card, so I'm going to swap the cards now.
You will need to do adb push
writing into /data/data, so first do
adb root
which restarts the phone's ADB agent with escalated privilege.
Create this script (suggestion: on your laptop and push it over). On the phone put it in /data/data and call it untar-data. Change the mode to 755, because it will arrive with mode 777. The next script expects to find it there. Link to premade script, but I'm not giving any warranties etc.
#!/system/xbin/sh
# $1 = name of tar file, from "tar cf $1 $2"
# $2 = basename of data directory.
# Copy this script to /data/data (executable)
cd /data/data
if [ ! -d $2 ] ; then
echo " On phone: missing directory $2 skipped"
exit 4
fi
uid=`ls -ld $2 | awk '{print $2}'`
if [ -z "$uid" ] ; then
echo " On phone: can't determine UID of $2"
exit 4
fi
tar xpf $1
# We chown $uid $1 because xargs runs the command once even with no input.
find $2 ! -type l ! -user system -print0 | xargs -0 -n 25 chown $uid $1
find $2 ! -type l ! -user system -print0 | xargs -0 -n 25 chgrp $uid $1
rm $1
(end of script)
Create this script, which I called send-data. Put in the ./data directory, i.e. the one containing the app data you're going to send over. Link to premade script, but I'm not giving any warranties etc.
#!/bin/sh
apps="
uk.co.nickfines.RealCalc
etc. etc., fill in the list of app directories to be restored
"
tfil=/tmp/app.tar
for a in $apps ; do
echo === Restoring $a
if [ ! -d $a ] ; then
echo " Missing directory skipped"
continue
fi
tar cf $tfil $a
adb push $tfil /data/data/app.tar
adb shell "/data/data/untar-data /data/data/app.tar $a"
done
(end of script)
Execute the script. You have to change to the data directory first because the script looks in the current directory for the stuff to be restored.
cd ./data
../send-data |& tee /tmp/errs #I put the script in the containing directory
Check for problems, fix, and restore them again. Edit the list of apps to include only the ones you're going to restore again. I had seven apps with weird symlinks, probably broken in a previous unsuccessful restoration attempt.
Here are the outcomes when I tried each app. On Lollipop apps are supposed to have their own menu button (3 vertical dots, usually in the upper right corner), but a few have not been updated. To get the menu, long-press on the Recent Apps button (left of the Home key, two interlocking squares). It is possible to configure this key so a normal press gives the menu (as in KitKat and before) and a long press gives Recent Apps.
cn.wps.moffice_eng | Works incl. document history |
com.addz.mediascanner | Unfortunately it has stoppedand it didn't flag the media to be rescanned. |
com.andoku.two.full | Works incl. history |
com.cadreworks.cadrebible | Works, but books are missing, saved on internal flash which was not copied over. Download them again. |
com.eclipsim.gpsstatus2 | Works incl. my settings |
com.eclipsim.gpstoolbox.pro | Needed to un/reinstall the pro key, then it's honored. |
com.estrongs.android.pop | Works |
com.evanhe.dnsforward | Not tested |
com.fsck.k9 | Works incl. credential and old mail |
com.google.earth | Works |
com.google.zxing.client.android | Works, reads a barcode |
com.highwaynorth.jogtracker | Works incl. history |
com.honeywell.mobile.android.totalComfort | Works incl. credential |
com.leinardi.kitchentimer | Works incl. history |
com.neddashfox.nightclock | Works |
com.pas.webcam | Works, sends video |
com.rootmetrics | (Not tested) |
com.skype.raider | Works incl. test call |
com.smilerlee.solitaire | Icon was missing (botched install?) I reinstalled. |
com.xabber.android | Opens and connects |
de.schaeuffelhut.android.openvpn.installer | Works, installs OpenVPN |
de.schaeuffelhut.android.openvpn | Will not start, SELinux is blamed. |
eu.kowalczuk.rsync4android | Not tested yet |
gov.bnl.nndc | Works |
jackpal.androidterm | Works |
jackpal.droidexaminer | Works |
jp.sblo.pandora.jota.plus | Works incl. history |
jp.sblo.pandora.jota.plus.prokey | Accepted |
la.droid.periodic | Works |
lysesoft.andftp | Works incl. history |
net.healeys.lexic | Works |
net.he.networktools | Works incl. history |
net.simplyadvanced.ltediscovery | Works, discovered LTE for the first time! |
org.dmfs.caldav.lib | Works but you need to set up the account anew. |
org.dmfs.carddav.Sync | Works but you need to set up the account anew. |
org.dmfs.jb.workaround.carddavsync | Not tested yet |
org.dmfs.tasks | Works |
org.hermit.tricorder | Works (very old) |
org.mozilla.firefox | Works incl. history |
org.openintents.about | Infrastructure |
org.openintents.filemanager | Infrastructure |
org.openintents.safe | Works incl. secret database |
org.pocketworkstation.pckeyboard | Not tested yet |
org.strongswan.android | Not tested yet |
org.withouthat.acalendar | Not tested yet |
ru.org.amip.ClockSync | Works |
sk.vx.connectbot | Works incl. credentials on SD card |
sysinfo.sysinfo.sysinfo | If this is Phone Info, it works. |
tkj.android.homecontrol.mythmote | Not tested yet |
uk.co.nickfines.RealCalc | Works |
web.oss.sshsftpDaemon | Will not start, SELinux is blamed. |
com.amazon.kindle | Data restore omitted so I had to authenticate and download my books, but Kindle otherwise works. |
Now that the apps are restored it's time to set the rest of the settings. In Lollipop (CM-12) the settings have been reorganized again versus KitKat (CM-11). I'm listing only settings that I changed, with only a few exceptions.
First, there are zillions of ringtones and notification sounds. The
following are found in Media Gallery. Idiots, they've changed the
map from names to ringtones! Pyxis
used to be an antique
phone ringer; now it's some dumb music. For future reference
here are my ratings of 9 of the better tones. I'm going to try Eridani
but may not stick with it.
Similarly, here are some of the better notification sounds. I'm using CyanDoink.
Procedure to use your own music as an alarm: The
clock app and/or the audio flinger do not have permission to read music on
the external SD card or other unapproved places. On Android-5.x
Lollipop
you could copy sound files to /sdcard/Alarms/ (this all
works similarly with Ringtones and Notifications), but on Android-6.x
Marshmallow
the media scanner includes its contents, but if you
select it, the alarm background process lacks permission to read it and
falls back to an annoying default. The system location
is /system/media/audio/alarms (or ringtones or notifications, lower case).
Remount /system read-write, then copy/move your music file there.
Permissions on the provided files are 644 root:root. Both MP3 and Ogg work.
Avoid having another file elsewhere on the machine with the same
basename, because both will be shown in the Media Gallery list, and if you
guess the wrong one the player will not have permission to read it and you
will get a really annoying default alarm. After moving the file you need
to reboot, whereupon it rebuilds the Gallery list. There are media
rescanners on Play Store. ScanMediaPlease by Zhuowei Zhang seems to work
on Marshmallow.
Music is in /sdcard/Music and subdirectories recursively. Players such as VLC do have permission to read this directory.
To get to this page, start the phone app (icon of a phone), hit Menu, and pick Settings, and under that, General.
Sort by: change to Last Name.
Phone Ringtone: See the list above. I'm going to try Eridani but may not stick with it.
Under Phone Number Lookup: It has three features, all on by default (and I left them on):
Show nearby places when searching in the dialer.We'll see what that actually means.
Under Calls (Call Settings):
Calling Accounts: This is for VOIP services. They support SIP and IMS (integrating text messaging and video conference with VOIP). You can turn on or off the daemon that listens for incoming calls; listening uses more battery.
Voicemail - Service: leave on My Carrier
.
Voicemail - Setup: It defaulted to T-Mobile's voicemail number, which is +1 805 637 7249. To append the password (PIN), put a few commas to make it pause, then the digits of the password. Minimum number of commas seen in forum posts was 2, max 4. But I ended up not needing to append the password.
Voicemail - Sound: I set it to None. (The menu item doesn't show a change, hiss, boo!)
Voicemail - Vibration: I turned this on.
Blacklist: You can block incoming calls from particular numbers.
Call Forwarding: You can forward calls upon various conditions: always, when busy, when unanswered, when unreachable. The default for all of these is +1 805 637 7249. This is T-Mobile's voicemail number.
Additional Settings:
From here on are major sections in the main Settings app. You can get to it several ways: the white gear icon in the App Drawer (white circle with 6 dots); icon in the Quick Settings page (swipe down from the upper left corner); long press in the main screen background; or hit the Menu key.
WiFi: On; and configured the SSID (network name). Note: if you have WiFi on and are not in range of a connectable access point, the OS will do repeated wireless scans, which eats battery: almost half of capacity in 8 hours. Use your Quick Settings widget (see below) to turn it off.
Bluetooth: You need to pair your Bluetooth devices. No problems.
VPN: This is for a VPN that should start automatically. Skip it.
Tap and Pay (NFC payments): On Google's captive website it says, turn on NFC, look in Settings - Wireless - More, and see if there is a Tap and Pay menu item. If so, you should be able to use it if you have a USA (not international) SIM. The menu item is just an indicator, no settings, just a link to the above website. So allegedly this is going to work in CM-12. Update: Yes it does work: success (once) at an Apple Pay branded cash register. Update: policy changes have killed it. Details here.
Tethering and Portable Hotspot: This needs to be set up. It wants the SSID (network name), the security mode (usually WPA2 PSK), and the password, which clients will give to use your hotspot. It will pick the channel autonomously.
Sound Settings:
Phone ringtone: This was set under Phone Settings, but apparently you could use ES File Explorer to find a ringtone not in the Media Gallery.
Notification Ringtone: CyanDoink
.
Interruptions - Downtime: This is the old Quiet Hours
.
Turn on the days you want to be quiet (all of them), and set
the start and end times. It is helpful to designate particular
notifiable events as priority
. Briefly press either end
of the volume rocker and you get a popup on which you can
silence all notifications, or just non-priority notifications.
Phone calls are silenceable, but you can mark specific contacts
as having priority.
Other Sounds: I turned on the charging sound, played when you plug in a charger, so you know if it lacks power. It was too annoying so I turned it off again.
Display and Lights: Some of these were set up in the first step.
Adaptive Brightness: Turn on.
Live Display: Adjust colors between day and night.
Rotation: 0, 90, 180, 270 degrees: I need this for Night Clock.
Sleep: change to 5 minutes, default is 1 minute.
Daydream: Turn off. This (may) make it show cool pictures when docked; one forum posting reported that it got activated when not docked, and ate battery.
Themes: We have only one. Look for CyanogenMod Theme Engine in the Play Store.
Lock Screen:
Screen Lock (style): Change to Pattern Lock. A non-null lock style is required to use the X.509 certificate storage.
Auto lock: Change to 10 mins, default is 5 secs.
Power button locks instantly: Turn off.
Smart Lock: Apparently the phone will stay unlocked if any of these conditions are selected and are true:
Owner Info: Set this. The text needs to be short. I'm using
Selen -- jimc@jfcarter.net
. An alternate phone number
has been suggested, not the number of this phone.
Buttons:
Recent Button: You can undo this annoying innovation and put it back as it was in KitKat: short press = open menu, long press = show app switcher.
Keyboard Cursor Control: Turn on; when the keyboard is showing, the volume buttons move the cursor.
Status Bar:
Battery Style: Change to Text (from Circle). On CM-11 it had a nice text inside circle, which unfortuately is gone. See also Battery Circle. Update: change back to Circle, and the next item is Battery Percentage; pick Inside Circle. I must have missed this the first time through.
Alternate Signal Display: CM-11 had this, I don't see it in
CM-12. Choices were bars (default),
number (what I chose), number with dBm
label.
Show Notification Count: Turn off. When you close the Quick Settings panel it would insist on showing the notification count even if 0, very annoying.
Notification Drawer:
Show weather (in the Quick Settings panel): No way! Inappropriate. Turn off.
Quick Settings Panel: Enlarge first row: turn off.
Advanced Location Settings: Useless, turn off. This is for suppressing GPS if requested by an app.
Select Tiles: These are the ones I picked:
Accounts: These are the accounts I need to set up.
Privacy:
Privacy Guard: For each of the permissions of each app you can suppress it individually, or you can jail the app entirely (take away all permissions). I didn't change any.
Blacklist: Exclude particular phone numbers, for calls and SMS.
WhisperPush: This is an encrypted SMS provided by CyanogenMod, which I'm not using.
CyanogenMod Statistics: Turn on (it's on by default I think). The data sent in is a unique device ID, chassis name (klte), CyanogenMod version, country (US), and carrier. This is how the CM team knows which devices and back-versions to work on.
Date & Time
Storage: In the menu there's one item, USB Computer
Connection
. I wonder what that means. You can (also?) connect
a USB flash device with the phone as the host.
Language & Input: Under Android Keyboard I changed to the Material Dark theme; I don't like the default light theme.
Developer Options: These were set earlier.
The controls for the desktop (home screen, window manager,
Trebuchet
) used to be mixed with the general settings, but in
CyanogenMod-11 and following, you get to them by long-pressing in
the desktop background (or press the menu key if you have one).
It shows you an icon of a house, at the
top; press this to make the current page the default one. At the bottom are
icons for setting wallpaper, widgets and themes. In the center is a cluster
of 3 small dots. Click on the dots to open the settings menu. The default
scroll effects are actually decent, and None
is not really none;
you can leave it on None. My major change was to disable the ubiquitous
and annoying Google search bar. Click the dots again to close this menu.
On the phone (Selen) I use a 4x4 array of icons. On the tablet (Mica)
I use 5x8, of which the left three columns are occupied by a photo widget.
The default spacing of Comfortable
works out; Crammed
puts them too close together.
To create a new page, put an app icon or widget on the rightmost existing page and drag it off the right margin. This also works directly from the app drawer. To make a page disappear, including interior pages, remove (or relocate) all icons on it.
Wallpaper: I'm using Phase Beam from Live Wallpapers. Others are included in CM-12, and lots more are available on the Play Store.
I'm trying to use a similar layout on both Mica and Selen.
The bottom row of special icons are phone (vacant on Mica), app drawer,
and Firefox.
I've set 3 pages of icons. On Mica they are in the upper right 4x4
region and a photo or widget (3x3 or 3x4) goes on the vacant left side.
I'm using the Simple Photo Widget
. The provided Photo Widget
(part of Gallery) is fine except that you have to crop the picture and
let it store the cropped version, and when you go to change to a different
photo, I can't get Gallery to finish, i.e. you pick the photo and then
what?
Page 0 (Left): Games and Miscellaneous
| |||
-- | -- | Thermostat | H.E. Net Tools |
-- | -- | -- | -- |
Air Control | Mahjongg | -- | -- |
Andoku | Lexic | Solitaire | (DSP) |
Page 1 (Center): Often Used Apps
| |||
K-9 Mail | Tasks | Google Wallet | Phone Tester |
ClockSync | Gallery | Camera | Barcode Scanner |
Kitchen Timer | Amazon Kindle | Jog Tracker | Google Music |
Night Clock | Jota+ Text Edit | Maps by Google | -- |
Page 2 (Right): Technical Apps
| |||
StrongSwan | OpenVPN Set | Wifi Analyzer | GPS Status |
Messaging | Xabber | Google Sch | Play Store |
VX ConnectBot | Dropbear SSH | aCalendar | Contacts |
ES File Mgr | WPS Office | RealCalc | CadreBible |
Setup and testing for particularly troublesome apps is described on a separate page.
Selection | Setup | Checkout | Install CM | Apps | Hacking | Top |