UDEV

To access devices connected to USB via adb or fastboot on linux, you need to configure udev rules. For detailed information about udev, take a look at udev – Arch Linux from the ArchLinux wiki (note that UDEV rules are not exclusive to Arch; udev is used in numerous distributions). You can follow the method below to add rules for any user that is part of the plugdev group, or you can follow Google Android’s instructions to add rules only for your username.

Follow these steps to setup the correct rules:

  1. Verify your username is included in the plugdev group. Type
    groups
    from a terminal and look for plugdev in the listed groups. If you do not see plugdev listed, you can add your username to the group with:
    sudo gpasswd -a username plugdev
    where username should be replaced with your linux username.
  2. Copy the set of rules listed below these steps to a text file and save it as /etc/udev/rules.d/51-android.rules. You will need sudo/su to write to that directory. So, for instance:
    sudo nano /etc/udev/rules.d/51-android.rules
    These rules cover all vendors listed by Google. Optionally, you can add just the vendor corresponding to the device(s) you plan to connect to your computer.
  3. Restart your computer and then test plugging in your device to the computer with USB debugging enabled.
#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0664", GROUP="plugdev"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0664", GROUP="plugdev"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0664", GROUP="plugdev"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0664", GROUP="plugdev"
#Fujitsu & Fujitsu Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0664", GROUP="plugdev"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0664", GROUP="plugdev"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0664", GROUP="plugdev"
#Haier
SUBSYSTEM=="usb", ATTR{idVendor}=="201e", MODE="0664", GROUP="plugdev"
#Hisense
SUBSYSTEM=="usb", ATTR{idVendor}=="109b", MODE="0664", GROUP="plugdev"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0664", GROUP="plugdev"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0664", GROUP="plugdev"
#Intel
SUBSYSTEM=="usb", ATTR{idVendor}=="8087", MODE="0664", GROUP="plugdev"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0664", GROUP="plugdev"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0664", GROUP="plugdev"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0664", GROUP="plugdev"
#Lenovo
SUBSYSTEM=="usb", ATTR{idVendor}=="17ef", MODE="0664", GROUP="plugdev"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0664", GROUP="plugdev"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0664", GROUP="plugdev"
#MTK
SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", MODE="0664", GROUP="plugdev"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0664", GROUP="plugdev"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0664", GROUP="plugdev"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0664", GROUP="plugdev"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0664", GROUP="plugdev"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10a9", MODE="0664", GROUP="plugdev"
#Pegatron
SUBSYSTEM=="usb", ATTR{idVendor}=="1d4d", MODE="0664", GROUP="plugdev"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0664", GROUP="plugdev"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0664", GROUP="plugdev"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0664", GROUP="plugdev"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0664", GROUP="plugdev"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0664", GROUP="plugdev"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0664", GROUP="plugdev"
#Sony
SUBSYSTEM=="usb", ATTR{idVendor}=="054c", MODE="0664", GROUP="plugdev"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0664", GROUP="plugdev"
#Teleepoch
SUBSYSTEM=="usb", ATTR{idVendor}=="2340", MODE="0664", GROUP="plugdev"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0664", GROUP="plugdev"
#Wileyfox
SUBSYSTEM=="usb", ATTR{idVendor}=="2970", MODE="0664", GROUP="plugdev"
#YU
SUBSYSTEM=="usb", ATTR{idVendor}=="1ebf", MODE="0664", GROUP="plugdev"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0664", GROUP="plugdev"
#ZUK
SUBSYSTEM=="usb", ATTR{idVendor}=="2b4c", MODE="0664", GROUP="plugdev"

Troubleshooting

1. Make sure your device is connected and accessible via usb. lsusb should show a list of connected devices. The section after ‘ID’ in the output should match one of the idVendor numbers from the udev rules. For example, a Nexus One with idVendor 18d1 should return something like:

Bus 001 Device 005: ID 17ef:480d Lenovo Integrated Webcam [R5U877]
Bus 002 Device 002: ID 0bda:0119 Realtek Semiconductor Corp. 
Bus 002 Device 009: ID 18d1:4e12 Google Inc. Nexus One (debug)
Bus 004 Device 003: ID 0a5c:2145 Broadcom Corp. Bluetooth with Enhanced Data Rate II
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

2. If the device is detected in lsusb, try running adb devices. If you get ???????????? device, try reloading the udev rules:

 sudo sh -c "(udevadm control --reload-rules && udevadm trigger --action=change)"

You can also try disconnecting and reconnecting the usb cable to your device.

3. If you cannot access your device via adb, even after adding your linux user to the plugdev group and restarting the computer, you can try starting the adb service as root. This is dangerous and not recommended:

adb kill-server
sudo $(which adb) start-server
adb devices

Similarly, if fastboot devices returns no permissions, try running fastboot as root:

sudo $(which fastboot) devices

Content of this page is based on informations from wiki.cyanogenmod.org, under CC BY-SA 3.0 licence.

Documentation

So you want to help out…

As with the CyanogenMod project as a whole, this wiki lives or dies based on your participation and willingness to help out. If you’re not a programmer or developer per se, but you’re good with words and want to help, we could use your expertise!

Making Contributions

Everyone is welcome and invited to help with the wiki. The only caveat is to be sure whatever you contribute you have the right to contribute. That said, we invite anyone who is an authority on some material that is appropriate for this wiki to add their knowledge for the benefit of the CyanogenMod community. We appreciate it!

We use templates, templates, templates!

This wiki has many thousands of web pages including articles, contact lists, walkthroughs, and much more. To make it easier to maintain, the wiki has been designed to avoid duplicating information in many places, which would require a lot of work to keep up to date.

Instead, this wiki uses a feature called templates, which is a way of breaking a wiki page into small bite-sized chunks, each of which can be included by reference, or “transcluded” into another page.

One thing that’s neat about transclusion is that a page can include a template which is itself made of multiple pages. In fact, a template can even intelligently determine which page is transcluding it, meaning it can alter its content depending on the context.

Sound a little confusing? Do a little reading up on templates, and it may start to make more sense. But in essence, it comes down to this:

The CM Wiki Golden Rule:

NEVER DUPLICATE INFORMATION.

That means that if any chunk of information needs to appear in two places (such as on two separate pages), first create a template, then transclude that template into the new page(s). If something about that chunk of info should change, you only have to change it once, and the two pages that use it will automatically get the change “for free”.

Fixing Problems: The Plan

How to fix a problem:

  1. If the problem is something very simple, like a typo or other minor change, feel free to fix it on your own.
  2. Some problems, such as incorrect information for a device, should be changed in the device template, which is a page full of “settings” that describe that device. An example of this might be the wrong screen dimensions, or the build instructions showing the wrong branch (such as “jellybean” instead of “gingerbread”.) A simple fix to the device template settings should resolve this.
  3. If the problem is more substantial than either of the above scenarios, and you understand how wiki templates work, and you are able to make the change to the Template without negatively affecting any other page that may be using that template, feel free to fix it!
  4. If you are unable to resolve the issue on your own and would like someone else to look at it, report the problem on the Site Problems page, and hopefully someone will take a look.

Using the Device Template

There is one kind of template that’s very special on the CM wiki, and that’s the template for devices. Examples of devices include, say, a tablet, or a smartphone, or an android-based game console, or whatever. The Nexus 7 tablet (codename: “grouper”) is a device. So is the HTC Desire Z smartphone (codenamed “vision”). A device is a single piece of hardware that has its own development repository and therefore its own unique distribution of CyanogenMod.

The device template is a special wiki template that’s used to store ALL the information about a single device that is used to automatically generate custom build instructions, device info pages, installation walkthroughs, and more for that device. There’s only one device template per device, and it includes all the characteristics for that device that can be used to build wiki pages using the templating system.

So, using a device template, we can create a very generic set of installation instructions, and have those instructions automatically customized for each individual device. When a new device comes along, we won’t have to rewrite the installation instructions for that device. Instead, by filling out the device template, the installation instructions can “build themselves” to match the requirements for that device.

If this doesn’t make complete sense yet, keep reading. Hopefully you’ll get the gist of it.

How device templates work

A device template has the following name:

Template:Device_codename

where codename is the code name for the device. To create a new device, say, with a code name of “bambi”, you’d create a new page at Template:Device_bambi.

But what do you put in this device template page? We’ve created a nice, fresh, blank for you to use as a base. It’s located, appropriately enough at Template:Device_codename (not working right now). Start with this page, and copy its contents. Then paste it, again using our example, to the page at Template:Device_bambi. Next, modify its contents, choosing appropriate parameters and values for this device.

When you’re done, head over to the devices page. More information can be found there on how to add your device to the list and quickly create an info page, installation instructions, and more.

Wiki roles

As a new visitor, you may not be able to edit any page or template you want. But if you can prove that you are a competent editor, you may be given additional privileges to help maintain and develop the wiki.

Just as the individual devices have developers who are responsible for maintaining the source code for that device, we hope we’ll have volunteers to keep the wiki up to date for devices and device families (like tablets that are all made by the same company for example).

More info on the various roles and how to apply to get elevated editing privileges are forthcoming.

A first attempt at a style guide

If you’re going to be editing text, or even creating new pages, here’s a quick go at some style pointers. Read it carefully.

  1. Make it easy to read/digest for anyone. Not just technical people.
  2. Don’t dumb it down, though. The audience is your typical non-professional, non-IT end user with an interest in learning what CM is, and why they would use it. And yeah, there’s some smaller percentage of them with a bit more experience who might want to actually start hacking their devices themselves.
  3. The goal is to make it EASY for visitors to learn. It’s not meant to be in any way elitist or to create artificial hurdles to learning. The wiki is here to help people.
  4. Tone should be irreverent and informal. This is fun stuff. But keep it accurate and as compressed as possible without being overly dry and boring.
  5. Include references and links to other sites whenever possible. Never be afraid to send someone to another site if it’s relevant to the topic– this includes other ROMS or wikis.
  6. When writing step-by-step instructions, start with a bolded header that explains the goal, ending with a colon. (To do some operation, follow these instructions:) Then number each step individually using the wiki list tag. Keep each step super-clean and simple.
  7. Use active, present-tense verbs in instructions. (“Double-click on the icon…”)
  8. All on-screen menu items should be bolded and listed from most general to most specific. So present the information in the order that the user will encounter it. Also, use text (“Under the File menu, choose Open File…”) rather than shortcuts like File->Open File. It’s better to standardize this in as clear a manner as possible. The extra work of typing out the steps will pay off for the reader.
  9. It’s also a good idea to tell the user what to expect from an action. (“If all goes well, your build should now begin.”)
  10. All terminal activity should be presented in Courier using the <code> and </code> tags. Always indicate what text comes from the computer vs. what is entered by the user. Precede console inputs with a “$” to indicate user input.
  11. Similarly, any reference to file names or directories within text should also be in Courier. (“Look in the /data directory for a file called README.TXT.”)
  12. When accurate grammar is needed, check with Strunk and White. (But that doesn’t mean you can’t use slang and shitty grammar– as long as you’re clear. Just sayin’.)
  13. Coordinate your pages with a designer. We should have an uniform, appealing layout and color scheme. Plus tons of screenshots and such are always nice to look at.

Content of this page is based on informations from wiki.cyanogenmod.org, under CC BY-SA 3.0 licence.

Barebones

Some of the apps that come with your phone can be safely removed without causing stability issues. They take up space and use resources that could be used for other things. Removing unwanted apps will theoretically make your phone run faster and smoother, plus, you can configure your phone just the way you want it.

Below is a chart that shows what apps might come pre-installed in CyanogenMod. You can delete any app that shows ‘yes’ under ‘Remove’; However, if you delete an app, you will no longer be able to use its functionality until you reinstall it. So, for example, if you never listen to music on the device, it is perfectly safe to remove Music.apk. However, you will need to reinstall Music.apk if you ever do want to listen to music on your phone.

Backup apks

You should back up any apks that you plan to remove. That way, you can easily re-install them if you change your mind. You have two main options:

  • Nandroid backup from the recovery console, or
  • Manual backup with
$ adb pull /system/app/ ~/Desktop/app/

How to find applications

To find what apps are installed on the device, you will need to run the following, either in adb shell, or the device’s term:

$ ls /system/app

or

$ ls /data/app

You can also list installed packages using the package manager, either in Terminal Emulator or via adb shell:

$ pm list packages

To see a list of installed packages along with their associated files:

$ pm list packages -f

At a lower level, you can pull the packages.xml and the packages.list files using adb and examine them directly to determine what is installed and what the related .apk file is called and where it is stored. packages.xml will show you the package name and the .apk file installation path and name. In packages.list you can look up the package name and locate the data path. Both of these files will tell you a great deal more, these are the things that pertain to the present article.

$ adb pull /data/system/packages.xml
$ adb pull /data/system/packages.list

Generally, any apps you install from the market or otherwise manually install will be in /data/app, while any apps that come pre-installed will be in /system/app.

How to remove applications

Remember to watch the case of all files, directories, apk names, and package names!

Case matters. Example.apk and example.apk are two different things.

To remove applications you can use aps on the market Titanium Backup, ROM Toolbox Pro, ES File Explorer or do it through ADB
First of all you restart adbd as root

$ adb root

ADB

/system apps /data apps
$ adb remount
$ adb shell rm -f /system/app/<apk name>.apk
$ adb uninstall <package name>

Term (on device)

/system apps /data apps
$ su
$ mount -o rw,remount /system
$ rm -f /system/app/<apk name>.apk

$ su
$ mount -o rw,remount /data
$ rm -f /data/app/<apk name>.apk
$ pm uninstall <package name>

How to reinstall applications

Change your mind? No problem! You have two options, depending on how you backed up your files:

  • Restore your Nandroid backup from the recovery console, or
  • Manually restore your app with
$ adb install ~/Desktop/app/<apk name>.apk

List of Default Apps for each version of CyanogenMod

CM 7 Apps List

<apk name> <package name> Removable Description
AccountAndSyncSettings.apk com.android.providers.subscribedfeeds no? Syncs settings to Google servers. Needed for Gmail app notifications.
ADWLauncher.apk com.android.launcher yes ADW System Launcher. Only remove if you have a second replacement home.
ApplicationsProvider.apk com.android.providers.applications yes? Fetches the list of applications installed on the phone to provide search suggestions.
Bluetooth.apk com.android.bluetooth yes Bluetooth app
BooksPhone.apk com.google.android.apps.books yes[1] Google Books application
Browser.apk com.android.browser yes Internet Browser

PLEASE NOTE: This is apparently a hard-coded requirement for Google Voice Search (along with Talk and Voice); without it, Voice Search will FC after recognizing speech. Having Dolphin, etc., installed will not work.

Calculator.apk com.android.calculator2 yes Calculator app
Calendar.apk com.android.calendar yes Calendar app / widget
CalendarProvider.apk com.android.providers.calendar yes Calendar sync
Camera.apk com.android.camera yes Camera app
CarHomeGoogle.apk com.google.android.carhome yes[1] Car Dock Search?
CarHomeLauncher.apk com.android.cardock yes[1] Car Dock Launcher?
CertInstaller.apk com.android.certinstaller no? (Web?) Certificate Installer. When removed, the WIFI will not be turned on (Automatically turned off).
ChromeToPhone.apk com.google.android.apps.chrometophone yes[1] Send links from Chrome to phone
CMParts.apk com.cyanogenmod.cmparts yes CyanogenMod Settings. Will FC if you try and access settings and this is not installed.
CMPartsHelper.apk com.cyanogenmod.cmpartshelper yes CMParts Helper?
CMStats.apk com.cyanogenmod.stats yes CyanogenMod anonymous statistics reporting service. Safe to remove, but will FC CMParts (CyanogenMod Settings) if you try and select the configuration options if it’s not installed. (CMParts can be decompiled and edited to remove the menu options, but it’s merely a cosmetic issue).
CMUpdateNotify.apk com.cyanogenmod.updatenotify yes CyanogenMod Update Notifications. Safe to remove, but will FC CMParts (CyanogenMod Settings) if you try and select the configuration options if it’s not installed. (CMParts can be decompiled and edited to remove the menu options, but it’s merely a cosmetic issue).
CMWallpapers.apk com.cyanogenmod.CMWallpapers yes Default CyanogenMod wallpapers.
com.amazon.mp3.apk com.amazon.mp3 yes[1] App that links to Amazon .mp3 store.
Contacts.apk com.android.contacts no Contacts app; the Call log, Contacts and Favorites screens
ContactsProvider.apk com.android.providers.contacts no Contacts sync
DefaultContainerService.apk com.android.defcontainer no Needed to install apps.
DeskClock.apk com.android.deskclock yes Clock and Alarm app
Development.apk com.android.development yes Development app
DownloadProvider.apk com.android.providers.downloads no Handles downloading files (Market, Browser, etc)
DrmProvider.apk com.android.providers.drm no Provides DRM functions, needed to access media files (including ringtones)
DSPManager.apk com.bel.android.dspmanager yes Digital Sound Processing
Email.apk com.android.email yes POP/IMAP email client
Facebook.apk com.facebook.katana yes[1] Facebook app
FileManager.apk org.openintents.filemanager yes IOFilemanager app
FOTAKILL.apk com.cyanogenmod.android.fotakill no? OTA Killer
Gallery3D.apk com.cooliris.media yes 3D Photo Gallery
GenieWidget.apk com.google.android.apps.genie.geniewidget yes[1] News and Weather Widget
Gmail.apk com.google.android.gm yes[1] Gmail app
GoogleBackupTransport.apk com.google.android.backup yes[1] Backup Mechanism for apps and settings?
GoogleCalendarSyncAdapter.apk com.google.android.syncadapters.calendar yes[1] Calendar sync
GoogleContactsSyncAdapter.apk com.google.android.syncadapters.contacts yes[1] Contacts sync
GoogleFeedback.apk com.google.android.feedback yes[1] ForceClose reporting
GoogleGoggles.apk com.google.android.apps.unveil yes[1] Google Goggles app
GooglePartnerSetup.apk com.google.android.partnersetup yes[1]  ???
GoogleQuickSearchBox.apk com.google.android.googlequicksearchbox yes[1] Google search box
GoogleServicesFramework.apk com.google.android.gsf yes[1] Provides account / login information to Google Apps
googlevoice.apk com.google.android.apps.googlevoice yes[1] Google Voice
HtcCopyright.apk com.htc.copyright yes Puts “HTC Copyright” info in the Legal Information of the About Phone dialog. Useless and safe to delete.
HtcEmailPolicy.apk com.android.email.policy yes Email.apk uses this for a connection to a Microsoft Exchange email server. Without it a connection to Exchange 2007/2010 will not work as the exchange device policy is not accepted. An Exchange administrator can configure the policy to allow/disallow features and functions on the device. In case of loss or theft the device can be reset to factory default remotely to prevent unauthorized acces.
HtcSettings.apk com.android.htcsettings yes HTC Radio settings, probably better to leave alone but otherwise safe to delete
HTMLViewer.apk com.android.htmlviewer yes Used by browser.apk to filter HTML. ??? Doesn’t seem to be needed.
kickback.apk com.google.android.marvin.kickback yes[1] Gives haptic feedback for some apps (accessibility menu option)
LatinIME.apk com.android.inputmethod.latin yes On-screen keyboard
LatinImeTutorial.apk com.google.android.latinimetutorial yes[1] Tutorial for on-screen keyboard
LiveWallpapersPicker.apk com.android.wallpaper.livepicker yes Live Wallpaper Selector
Maps.apk com.google.android.apps.maps no[1] Google Maps. Froyo depends on this apk, along with its associated dependencies (com.google.android.maps.xml, com.google.android.maps.jar), in order to access copy protected apps in the Android market.
MarketUpdater.apk com.android.vending.updater yes[1] Updates app list / download list in market? Needed by Vending.apk
MediaProvider.apk com.android.providers.media no Needed to access media files (including ringtones)
MediaUploader.apk com.google.android.apps.uploader yes[1] Share media from the Gallery with MMS, Bluetooth, Email, Picasa
Mms.apk com.android.mms yes Provides sms and mms (text) services
Music.apk com.android.music yes Music Player (and “Video” Player)
NetworkLocation.apk com.google.android.location yes[1] Provides network (cell) location (as opposed to GPS location)
OneTimeInitializer.apk com.google.android.onetimeinitializer yes[1] Runs on first boot. Conflicts with google app “Provision.apk”.
PackageInstaller.apk com.android.packageinstaller no Used to manually install apks (i.e. non-market apks)
PassionQuickOffice.apk com.qo.android.htcgep yes[1] Allows Email/Gmail apps to open attachments
Phone.apk com.android.phone no Phone app; Dialer screen
PicoTts.apk com.svox.pico yes Text to speech. From SD data?
Protips.apk com.android.protips yes ‘protips’ widget
Provision.apk com.android.provision yes* Runs on first boot. Conflicts with google app “SetupWizard.apk”. Okay to delete if loading the gapps zip.
QuickSearchBox.apk yes Search box? Need for search in Phone app.
RomManager.apk com.koushikdutta.rommanager yes Rom Manager App
Settings.apk com.android.settings no devices settings menu
SettingsProvider.apk com.android.providers.settings no Settings sync?
SetupWizard.apk com.android.setupwizard yes[1] Setup Wizard when you first use your phone.
soundback.apk com.google.android.marvin.soundback yes[1] sound feedback (accessibility option)
SoundRecorder.apk com.android.soundrecorder yes Sound Recorder app
SpareParts.apk com.android.spare_parts yes Extra ‘settings’ menu
SpeechRecorder.apk com.android.speechrecorder yes Records audio samples to test speech recognition
Stk.apk com.android.stk yes Sim Tool Kit; Required if you use SIM applications (like authenticatino, banking, PKI etc)
Street.apk com.google.android.street yes[1] Streetview for Google maps
Superuser.apk com.noshufou.android.su yes Remembers ‘su’ settings
SystemUI.apk com.android.systemui no Part of the system UI.
Talk.apk com.google.android.talk yes[1] Google Talk
talkback.apk com.google.android.marvin.talkback yes[1] voice feedback (accessibility option)
TelephonyProvider.apk com.android.providers.telephony no Phone sync?
Term.apk com.android.term yes Gives access to terminal
ThemeChooser.apk com.tmobile.themechooser yes Part of the T-Mobile theming app
ThemeManager.apk com.tmobile.thememanager yes Part of the T-Mobile theming app
Torch.apk net.cactii.flash2 yes LED Flashlight
TtsService.apk android.tts yes[1] Text to Speech. Needed by Google Navigator from Google Maps v5+. Otherwise, safe to remove.
Twitter.apk com.twitter.android yes[1] Native Twitter client
UserDictionaryProvider.apk com.android.providers.userdictionary yes Dictionary for LatinIME(keyboard) / Needed for LatinIME.apk to function
Vending.apk com.android.vending yes[1] Market app
VoiceDialer.apk com.android.voicedialer yes Voice dialer app
VoiceSearch.apk com.google.android.voicesearch yes[1] Voice Search for Google Search, Google Maps, etc
VpnServices.apk com.android.server.vpn yes Virtual Private Network app
YouTube.apk com.google.android.youtube yes[1] YouTube player

[1] NOTE: These are Google apps & are safe to remove as far as phone stability is concerned. Might break other Google apps if removed.

CM 10.1 Apps List (WIP)

<apk name> <package name> <label> Removable Description Version
Apollo.apk com.andrew.apollo Apollo yes Apollo music player. Remove it when switching to another player. 1.1
ApplicationsProvider.apk com.android.providers.applications Search Applications Provider no[2] ? 4.2.2
AriesParts.apk com.cyanogenmod.settings.device Advanced settings yes 4.2.2
BackupRestoreConfirmation.apk com.android.backupconfirm com.android.backupconfirm yes Restores sync’d Google settings. 4.2.2
BasicDreams.apk com.android.dreams.basic Basic Daydreams yes Customizable screensaver 4.2.2
Bluetooth.apk com.android.bluetooth Bluetooth Share yes Bluetooth app. After removal Bluetooth wont turn on. 4.2.2
bluetooth Bluetooth no not removable 4.2.2
Browser.apk com.android.browser Browser yes Internet Browser

PLEASE NOTE: This is apparently a hard-coded requirement for Google Voice Search (along with Talk and Voice); without it, Voice Search will FC after recognizing speech. Having Dolphin, etc., installed will not work.

4.2.2
Calculator.apk com.android.calculator2 Calculator yes Calculator app. Remove if you dont use or switching. v3.1.2
Calendar.apk com.android.calendar Calendar yes Calendar app. Surely remove if switching or no use. 4.2.2
CalendarProvider.apk com.android.providers.calendar Calendar Storage yes Provides sync for Calendar app. CAUTION: If you are syncing other calendar app with your google calendars, dont do this! :CAUTION 4.2.2
CellBroadcastReceiver.apk com.android.cellbroadcastreceiver Cell Broadcasts yes Cell Broadcast app. “Can be usefull when skiing or mountain hiking, receives cell broadcast allerts” 4.2.2
CertInstaller.apk com.android.certinstaller Certificate Installer no (Web?) Certificate Installer. When removed, the WIFI will not be turned on (Automatically turned off). MORE 4.2.2
CMFileManager.apk com.cyanogenmod.filemanager File Manager yes File Manager with root 1.0.1
CMUpdater.apk com.cyanogenmod.updater CM Updater yes On the run CyanogenMod updater. Lets you skip all .zip installing update to new CM. Delete if you can upgrade through Recovery. 2.1
CMWallpapers.apk com.cyanogenmod.CMWallpapers CM Wallpapers yes Cyanogen Mod Wallpapers, includes the “No wallpaper” option 4.2.2
Contacts.apk com.android.contacts Contacts yes Contacts app; the Call log, Contacts and Favorites screens. Can be removed when switching(Contacts+ etc.) 4.2.2
ContactsProvider.apk com.android.providers.contacts Contacts Storage yes[2] Contacts sync/save place. When removed contacts disappear as well as the google sync function. 4.2.2
DefaultContainerService.apk com.android.defcontainer Package Access Helper no[2] ? 4.2.2
DeskClock.apk com.android.deskclock Clock no[2] Clock app + Clock widget. 2.0.3
Development.apk com.android.development Dev Tools yes Developer apps unlockable. 1.0
DownloadProvider.apk com.android.providers.downloads Download Manager yes Android download manager. “When downloading you can see a notification.” After removal you cant download (Except through Opera built in downloader, or some other apps) 4.2.2
DownloadProviderUi.apk com.android.providers.downloads.ui Downloads yes[2] List/manage downloads 4.2.2
DrmProvider.apk com.android.providers.drm DRM Protected Content Storage yes Provides DRM functions, needed to access DRM protected media files. 4.2.2
DSPManager.apk com.bel.android.dspmanager DSP Manager yes Digital Sound Processing. Built in Equalizer (PERSONAL OPINION: It’s very good!) 2.0
Email2.apk com.android.email Email yes POP/IMAP email client. Not GMail. Many apps for switch. 4.1
Exchange2.apk com.android.exchange Exchange Services yes Provides sync for Mail app. (Not GMail) 5.0
com.android.facelock Face Unlock yes Provides capability to unlock screen with face recognition. 4.2.2
FM2.apk yes For cells that can pick up FM.
FusedLocation.apk com.android.location.fused Fused Location no Helps to balance battery consumption when simultaneously using GPS/Network location recognition. In some situations gives system crashes. 4.2.2
Galaxy4.apk com.android.galaxy4 Black Hole yes Live wallpaper 1.0
Gallery2.apk com.android.gallery3d Gallery yes 3D Photo Gallery. 1.1.400
HoloSpiralWallpaper.apk com.android.wallpaper.holospiral com.android.wallpaper.holospiral yes Live Wallpaper. 4.2.2
HTMLViewer.apk com.android.htmlviewer HTML Viewer yes Lets you view HTML files on your device. 4.2.2
InputDevices.apk com.android.inputdevices Input Devices yes[2] Looks like safe to remove. ?May cause some problems with keyboard settings? 4.2.2
KeyChain.apk com.android.keychain Key Chain no[2] Password keeper. 4.2.2
LatinIME.apk com.android.inputmethod.latin Android Keyboard (AOSP) yes Stock android keyboard. Safe to remove if replaced with something else for eg. Swype,Swift 4.2.2
LiveWallpapers.apk com.android.wallpaper Android Live Wallpapers yes
LiveWallpapersPicker.apk com.android.wallpaper.livepicker Live Wallpaper Picker yes Android Live Wallpapers Picker. Safe to Remove if you don’t use live wallpapers 4.2.2
LockClock.apk com.cyanogenmod.lockclock cLock yes cLock widget. Clock with weather. 2.2.5
MagicSmokeWallpapers.apk com.android.magicsmoke Magic Smoke Wallpapers yes Wallpaper
MediaProvider.apk com.android.providers.media Media Storage no[2] Needed to access media files (including ringtones) 4.2.2
Mms.apk com.android.mms Messaging yes Safe to remove as long as you have an alternative messaging app
Nfc.apk NFCservice yes[2] Looks like could disable NFC service, but NFC options are still active. Safe to delete if your hardware doesn’t support NFC.
NoiseField.apk com.android.noisefield Bubbles yes Bubbles live wallpaper
PackageInstaller.apk com.android.packageinstaller Package Installer no[2] Used to manually install apks (i.e. non-market apks) 4.2.2
PhaseBeam.apk com.android.phasebeam Phase Beam yes dev live wallpaper – Remove if you removed dev-tools
Phone.apk com.android.phone Phone yes[2] Phone app. Can be removed when switching(Contacts+ etc.). Still able to call and receive calls. CAUTION: Before removal hybernate it with some app and reboot. May cause Phone.apk stopped working. In such situation quickly between each prompt try to turn it back on! :CAUTION 4.2.2
PhotoTable.apk com.android.dreams.phototable Photo Screensavers yes Screensavers with your own pictures. (I didn’t see any person using this and none of my friends use Screensaver on Android)
PicoTts.apk com.svox.pico Pico TTS yes Text to speech. “Looks like Google Maps needs it to run” 1.0
Provision.apk com.android.provision com.android.provision yes Runs on first boot. 4.2.2
QuickSearchBox.apk com.android.quicksearchbox Search yes Search box widget. Need for search in Phone app. 4.2.2
RomManager.apk com.koushikdutta.rommanager yes Rom Manager App
Settings.apk com.android.settings Settings no devices settings menu 4.2.2
SettingsProvider.apk com.android.providers.settings Settings Storage no Part of the settings sync system. 4.2.2
SetupWizard.apk com.android.setupwizard yes[1] Setup Wizard when you first use your phone.
SharedStorageBackup.apk com.android.sharedstoragebackup com.android.sharedstoragebackup no[2] Possibly USB connection menu. 4.2.2
SoundRecorder.apk com.android.soundrecorder Sound Recorder yes Sound Recorder app. Many switches in Play Store. 4.2.2
SystemUI.apk com.android.systemui System UI no[2] Interface. ?Looks like notification bar mostly? 4.2.2
TelephonyProvider.apk com.android.providers.telephony Phone/Messaging Storage no Phone service base. Remove = no calls. 4.2.2
Term.apk jackpal.androidterm Terminal Emulator yes Gives access to terminal 1.0.53
ThemeChooser.apk com.tmobile.themechooser Themes yes Cyanogenmod theme system. You are left with Default theme. 0.1
ThemeManager.apk com.tmobile.thememanager Themes provider yes Cyanogenmod theme system. You are left with Default theme. 2.0.25
Torch.apk net.cactii.flash2 Torch yes 4.2.2
Trebuchet.apk com.cyanogenmod.trebuchet Trebuchet yes System Launcher. Only remove if you have a second replacement home. 1.0
UserDictionaryProvider.apk com.android.providers.userdictionary User Dictionary yes Dictionary for LatinIME(keyboard) / Needed for LatinIME.apk to function 4.2.2
VideoEditor.apk com.android.videoeditor Movie Studio yes 1.1
VisualizationWallpapers.apk com.android.musicvis Music Visualization Wallpapers yes 4.2.2
VoiceDialer.apk com.android.voicedialer Voice Dialer yes Voice Search for Google Search, Google Maps, etc 4.2.2
VoicePlus.apk org.cyanogenmod.voiceplus Voice+ yes ? 1.0
VpnDialogs.apk com.android.vpndialogs VpnDialogs yes Part of the VPN system. 4.2.2
WAPPushManager.apk com.android.smspush com.android.smspush yes[2] Tethering connectivity. Safe to remove if you don’t use tethering/access point mode. 4.2.2
android Android System no System 4.2.2
accounts Accounts no not removable 4.2.2
appwidgets Application Widgets no not removable 4.2.2
data.usage.policy Data Usage and Policy no not removable 4.2.2
wallpaper Wallpaper no not removable 4.2.2
wifi.access.points Wifi Access Points no not removable 4.2.2

[1] NOTE: These are Google apps & are safe to remove as far as phone stability is concerned. Might break other Google apps if removed.

[2] NOTE:These apps may be removable but I didn’t test them (yet). If you want you can do it yourself and fill these blanks.

CM 10.1 Google Apps List (WIP)

<apk name> <package name> <label> Removable Description Version
com.google.android.configupdater ? 4.2.2
GenieWidget.apk ? yes News and weather widget ?
GmsCore.apk ? no[2] ? ?
GoogleBackupTransport.apk com.google.android.backup yes Handles backup of settings. Safe when not used.
GoogleCalendarSyncAdapter.apk com.google.android.syncadapters.calendar yes Calendar sync. CAUTION: If you are syncing other calendar app with your google calendars, dont do this! :CAUTION
GoogleContactsSyncAdapter.apk com.google.android.syncadapters.contacts yes Contacts sync with google account. Only if not used.
GoogleFeedback.apk com.google.android.feedback yes ForceClose reporting
GoogleLoginService.apk manager no[1] Google login system. Disables google accounts functions.
GooglePartnerSetup.apk com.google.android.partnersetup no In App purchases.
GoogleServicesFramework.apk com.google.android.gsf yes[1] Provides account / login information to Google Apps
GoogleTTS.apk com.google.android.tts yes Text to speech. “Looks like Google Maps needs it to run”
LatinImeDictionaryPack.apk
MediaUploader.apk com.google.android.apps.uploader yes[1][2] Share media from the Gallery with MMS, Bluetooth, Email, Picasa. “Can also be Play Store actualisations notifier”
NetworkLocation.apk com.google.android.location yes[1] Provides network (cell) location (as opposed to GPS location)
OneTimeInitializer.apk com.google.android.onetimeinitializer yes Runs on first boot. Conflicts with google app “Provision.apk”.
Phonesky.apk GooglePlay no Rather com.android.vending-1.apk but… “Phonesky” happens. :D
Talk.apk com.google.android.talk yes Google Talk.
Talkback.apk
VoiceSearchStub.apk com.google.android.googlequicksearchbox yes Voice Search for Google Search, Google Maps, etc. Not working without Browser app.
com.google.android.inputmethod.latin.dictionarypack Dictionary Provider yes Dictionary provider for Android Keyboard. Removable if you dont use it. Used with other keyboards. 4.2.2
GoogleEars.apk com.google.android.ears yes
SpareParts.apk com.android.spare_parts yes Extra ‘settings’ menu. (Usefull!)
?Superuser.apk com.noshufou.android.su yes Remembers ‘su’ settings. Remove if you dont use Root apps.
?Tag.apk com.android.apps.tag
?ChromeBookmarksSyncAdapter.apk ? no[2] ? ?
?Stk.apk ? no[2] ? ?
?DeviceParts.apk ? no[2] ? ?

[1] NOTE: These are Google apps & are safe to remove as far as phone stability is concerned. Might break other Google apps if removed.

[2] NOTE:These apps may be removable but I didn’t test them (yet). If you want you can do it yourself and fill these blanks.

CM 11 Apps List (WIP)

<apk name> <package name> <label> Removable Description Version
Apollo.apk com.andrew.apollo Apollo yes Apollo music player. Remove it when switching to another player. 1.1
AsantiKeypad.apk
BasicDreams.apk com.android.dreams.basic Basic Daydreams yes Customizable screensaver 4.2.2
Bluetooth.apk com.android.bluetooth Bluetooth Share yes Bluetooth app. After removal Bluetooth wont turn on. 4.2.2
BluetoothExt.apk
Browser.apk com.android.browser Browser yes Internet Browser

PLEASE NOTE: This is apparently a hard-coded requirement for Google Voice Search (along with Talk and Voice); without it, Voice Search will FC after recognizing speech. Having Dolphin, etc., installed will not work.

4.2.2
Calculator.apk com.android.calculator2 Calculator yes Calculator app. Remove if you dont use or switching. v3.1.2
Calendar.apk com.android.calendar Calendar yes Calendar app. Surely remove if switching or no use. 4.2.2
Camera2.apk
CellBroadcastReceiver.apk com.android.cellbroadcastreceiver Cell Broadcasts yes Cell Broadcast app. “Can be usefull when skiing or mountain hiking, receives cell broadcast allerts” 4.2.2
CertInstaller.apk com.android.certinstaller Certificate Installer no (Web?) Certificate Installer. When removed, the WIFI will not be turned on (Automatically turned off). MORE 4.2.2
CMBugReport.apk
CMFileManager.apk com.cyanogenmod.filemanager File Manager yes File Manager with root 1.0.1
CMHome.apk
CMWallpapers.apk com.cyanogenmod.CMWallpapers CM Wallpapers yes Cyanogen Mod Wallpapers, includes the “No wallpaper” option 4.2.2
DeskClock.apk com.android.deskclock Clock no[2] Clock app + Clock widget. 2.0.3
Development.apk com.android.development Dev Tools yes Developer apps unlockable. 1.0
DevicePerformanceSettingsHelper.apk
DocumentsUi.apk
DownloadProviderUi.apk com.android.providers.downloads.ui Downloads yes[2] List/manage downloads 4.2.2
DSPManager.apk com.bel.android.dspmanager DSP Manager yes Digital Sound Processing. Built in Equalizer (PERSONAL OPINION: It’s very good!) 2.0
Email.apk
Exchange2.apk com.android.exchange Exchange Services yes Provides sync for Mail app. (Not GMail) 5.0
com.android.facelock Face Unlock yes Provides capability to unlock screen with face recognition. 4.2.2
FM2.apk yes For cells that can pick up FM.
Galaxy4.apk com.android.galaxy4 Black Hole yes Live wallpaper 1.0
Gallery2.apk com.android.gallery3d Gallery yes 3D Photo Gallery. 1.1.400
HoloSpiralWallpaper.apk com.android.wallpaper.holospiral com.android.wallpaper.holospiral yes Live Wallpaper. 4.2.2
HTMLViewer.apk com.android.htmlviewer HTML Viewer yes Lets you view HTML files on your device. 4.2.2
InCallUI.apk
KeyChain.apk com.android.keychain Key Chain no[2] Password keeper. 4.2.2
LatinIME.apk com.android.inputmethod.latin Android Keyboard (AOSP) yes Stock android keyboard. Safe to remove if replaced with something else for eg. Swype,Swift 4.2.2
LiveWallpapers.apk com.android.wallpaper Android Live Wallpapers yes
LiveWallpapersPicker.apk com.android.wallpaper.livepicker Live Wallpaper Picker yes Android Live Wallpapers Picker. Safe to Remove if you don’t use live wallpapers 4.2.2
LockClock.apk com.cyanogenmod.lockclock cLock yes cLock widget. Clock with weather. 2.2.5
MagicSmokeWallpapers.apk com.android.magicsmoke Magic Smoke Wallpapers yes Wallpaper
Nfc.apk NFCservice yes[2] Looks like could disable NFC service, but NFC options are still active. Safe to delete if your hardware doesn’t support NFC.
NoiseField.apk com.android.noisefield Bubbles yes Bubbles live wallpaper
PackageInstaller.apk com.android.packageinstaller Package Installer no[2] Used to manually install apks (i.e. non-market apks) 4.2.2
PacProcessor.apk
PhaseBeam.apk com.android.phasebeam Phase Beam yes dev live wallpaper – Remove if you removed dev-tools
PhotoPhase.apk
PhotoTable.apk com.android.dreams.phototable Photo Screensavers yes Screensavers with your own pictures. (I didn’t see any person using this and none of my friends use Screensaver on Android)
PrintSpooler.apk
Provision.apk com.android.provision com.android.provision yes Runs on first boot. 4.2.2
SoundRecorder.apk com.android.soundrecorder Sound Recorder yes Sound Recorder app. Many switches in Play Store. 4.2.2
Stk.apk
TelephonyProvider.apk com.android.providers.telephony Phone/Messaging Storage no Phone service base. Remove = no calls. 4.2.2
Term.apk jackpal.androidterm Terminal Emulator yes Gives access to terminal 1.0.53
Torch.apk net.cactii.flash2 Torch yes 4.2.2
UserDictionaryProvider.apk com.android.providers.userdictionary User Dictionary yes Dictionary for LatinIME(keyboard) / Needed for LatinIME.apk to function 4.2.2
VideoEditor.apk com.android.videoeditor Movie Studio yes 1.1
VisualizationWallpapers.apk com.android.musicvis Music Visualization Wallpapers yes 4.2.2
VoicePlus.apk org.cyanogenmod.voiceplus Voice+ yes ? 1.0
WAPPushManager.apk com.android.smspush com.android.smspush yes[2] Tethering connectivity. Safe to remove if you don’t use tethering/access point mode. 4.2.2
WhisperPush.apk
android Android System no System 4.2.2
accounts Accounts no not removable 4.2.2
appwidgets Application Widgets no not removable 4.2.2
data.usage.policy Data Usage and Policy no not removable 4.2.2
wallpaper Wallpaper no not removable 4.2.2
wifi.access.points Wifi Access Points no not removable 4.2.2

CM 13 Apps List

APK name Package name Label Removable Description Version
AntHalService.apk com.dsi.ant.server ANT HAL Service yes Service designed for various ANT/ANT+ devices like heart rate monitors, fitness equipment etc. 4.0.0
AudioFX.apk com.cyanogenmod.audiofx AudioFX yes Audio equalizer. 1.4.0
BackupRestoreConfirmation.apk com.android.backupconfirm com.android.backupconfirm yes UI for the backup confirmation dialog when issuing “adb backup” command. Remove it if you don’t use adb to backup your device. 6.0.1
BasicDreams.apk com.android.dreams.basic Basic Daydreams yes Customizable screensaver. 6.0.1
Bluetooth.apk com.android.bluetooth Bluetooth Share yes After removal, Bluetooth won’t turn on. 6.0.1
BluetoothExt.apk org.codeaurora.bluetooth Bluetooth extensions yes Service used for file sharing, handsfree equipment, Bluetooth modem and SIM adapter. 6.0.1
BluetoothMidiService.apk com.android.bluetoothmidiservice Bluetooth MIDI Service yes Service used for connecting your device with musical instruments, stage lighting and other time-oriented media via Bluetooth. 6.0.1
Browser.apk com.android.browser Browser yes Safe to remove as long as you install another browser. 6.0.1
Calendar.apk com.android.calendar Calendar yes Calendar app. 6.0.1
CalendarProvider.apk com.android.providers.calendar Calendar Storage yes Syncs your phone calendar with Google Calendar. Necessary for notifications too. 6.0.1
CallLogBackup.apk com.android.calllogbackup Call Log Backup/Restore yes Backup and restore your call logs (history). 6.0.1
CaptivePortalLogin.apk com.android.captiveportallogin CaptivePortalLogin yes A service used for displaying a special web page that is shown before using the Internet normally. Remove this if you don’t use public Wi-Fi networks. 6.0.1
CarrierConfig.apk com.android.carrierconfig com.android.carrierconfig yes Modifies carrier configuration. 1.0.0
CellBroadcastReceiver.apk com.android.cellbroadcastreceiver Cell Broadcasts yes Remove this if you don’t want to receive alerts for severe and extreme threats to life and property. 6.0.1
CertInstaller.apk com.android.certinstaller Certificate Installer no Without this, you won’t be able to grant apps some special permissions and access certain files and directories. 6.0.1
CMFileManager.apk com.cyanogenmod.filemanager File Manager yes Default file manager. Can be replaced by another one. 3.0.0
CMSettingsProvider.apk com.cyanogenmod.cmsettings CM Settings Storage no Contains CM specific preferences in System, Secure and Global. 6.0.1
CMUpdater.apk com.cyanogenmod.updater CM Updater yes Remove it if you are upgrading through Recovery. 2.3
CMWallpapers.apk com.cyanogenmod.wallpapers CM Wallpapers yes Remove it if you don’t need the “No wallpaper” option. 6.0.1
com.qualcomm.location.apk com.qualcomm.location LocationServices yes I haven’t encountered any problems after removal. Though one user reported that he lost his GPS signal upon removing this. Create a backup just in case. 1.0
Contacts.apk com.android.contacts Contacts no Managing contacts, groups, favorites etc. 6.0.1
ContactsProvider.apk com.android.providers.contacts Contacts Storage no Contacts sync. 6.0.1
DefaultContainerService.apk com.android.defcontainer Package Access Helper no Unpacks installation APK files. 6.0.1
Dialer.apk com.android.dialer Phone no Making phone calls. 2.21
DeskClock.apk com.android.deskclock Clock yes Remove it if you want to use another clock/alarm app. 4.1.0
Development.apk com.android.development Dev Tools yes Tools and tests for developers. 1.0
DocumentsUI.apk com.android.documentsui Documents no Necessary for accessing Downloads app. 6.0.1
DownloadProvider.apk com.android.providers.downloads Download Manager no If removed, download functionality won’t work in Google Play and the default browser. It will work in Chrome and possibly other browsers, although a notification icon in status bar might not show. If you don’t use Google Play for whatever reason, you can remove this app and use another download manager. 6.0.1
DownloadProviderUi.apk com.android.providers.downloads.ui Downloads no Downloads app. 6.0.1
Eleven.apk com.cyanogenmod.eleven Music yes Remove it if you want to use another music player. 2.0
Email.apk com.android.email Email yes Remove it if you don’t use a local email server. 6.0.1
ExactCalculator.apk com.android.calculator2 Calculator yes Calculator app. 6.0.1
Exchange2.apk com.android.exchange Exchange Services yes Provides sync for Email app. 6.0.1
ExternalStorageProvider.apk com.android.externalstorage External Storage no Grants apps access to external storage. 6.0.1
FMRadio.apk com.android.fmradio FM Radio yes FM Radio app. 2.0
framework-res.apk android Android System no Android system service. 6.0.1
FusedLocation.apk com.android.location.fused Fused Location yes Necessary for proper GPS functioning. 6.0.1
Galaxy4.apk com.android.galaxy4 Black Hole yes Live wallpaper. 1.0
Gallery2.apk com.android.gallery3d Gallery yes Remove it if you use another photo gallery. 1.1.40030
HoloSpiralWallpaper.apk com.android.wallpaper.holospiral Holo Spiral yes Live wallpaper. 6.0.1
HTMLViewer.apk com.android.htmlviewer HTML Viewer yes Lets you view HTML files on your device. 6.0.1
InputDevices.apk com.android.inputdevices Input Devices yes Default AOSP keyboard layout settings. 6.0.1
KeyChain.apk com.android.keychain Key Chain no Credential manager for various Google services. 6.0.1
LatinIME.apk com.android.inputmethod.latin Android Keyboard (AOSP) yes Stock Android keyboard. Safe to remove if replaced by another keyboard. 6.0.1
LiveWallpapers.apk com.android.wallpaper Android Live Wallpapers yes Remove it if you don’t use live wallpapers. 6.0.1
LiveWallpapersPicker.apk com.android.wallpaper.livepicker Live Wallpaper Picker yes Remove it if you don’t use live wallpapers. 6.0.1
LockClock.apk com.cyanogenmod.lockclock cLock yes Clock widget with weather. 3.4.1
ManagedProvisioning.apk com.android.managedprovisioning com.android.managedprovisioning yes Customizes the profile/device owner provisioning flows with corporate colors and logos. 6.0.1
MediaProvider.apk com.android.providers.media Media Storage no Needed for accessing media files (including ringtones). 6.0.1
messaging.apk com.android.messaging Messaging yes Make sure you install another messaging app before removing this. 1.0.001
MmsService.apk com.android.mms.service Messaging Service yes Necessary for receiving SMS/MMS. Some messaging apps won’t require this service, some will. Create a backup just in case. 6.0.1
NoiseField.apk com.android.noisefield Bubbles yes Live wallpaper. 1.0
org.cyanogenmod.platform-res.apk cyanogenmod.platform CyanogenMod System no CyanogenMod system service. 6.0.1
PackageInstaller.apk com.android.packageinstaller Package Installer no Used to manually install APK files (outside of Google Play). 6.0.1
PacProcessor.apk com.android.pacprocessor PacProcessor no A service for handling proxy auto-config files. Some users stated that after deleting this, their device started to malfunction until eventually they couldn’t go beyond boot animation. 6.0.1
PhaseBeam.apk com.android.phasebeam Phase Beam yes Live wallpaper for developers. Remove it if you also removed Dev Tools. 1.0
PhotoPhase.apk org.cyanogenmod.wallpapers.photophase PhotoPhase yes Live wallpaper. 1.0.11
PhotoTable.apk com.android.dreams.phototable Photo Screensavers yes Screensavers with your own pictures. 6.0.1
PicoTts.apk com.svox.pico Pico TTS yes Text to speech engine. 1.0
PrintSpooler.apk com.android.printspooler Print Spooler yes Interacts with the printer and orders the print jobs in your queue. 1.0
Profiles.apk com.cyanogenmod.profiles Profiles Trust Provider yes A trust agent used so that system profiles can better lock/unlock your device when you switch profiles. 6.0.1
Provision.apk com.android.provision com.android.provision yes Runs on first boot. Conflicts with “SetupWizard.apk”. 6.0.1
ProxyHandler.apk com.android.proxyhandler ProxyHandler yes 6.0.1
Screencast.apk org.cyanogenmod.screencast Screencast yes Screen capture app. 1.0.0.3
Settings.apk com.android.settings Settings no Settings app. 6.0.1
SettingsProvider.apk com.android.providers.settings Settings Storage no If removed, it may cause app crashes. 6.0.1
SharedStorageBackup.apk com.android.sharedstoragebackup com.android.sharedstoragebackup yes Performs a backup of shared-storage file systems. 6.0.1
Shell.apk com.android.shell Shell yes Error messages. 6.0.1
StatementService.apk com.android.statementservice Intent Filter Verification Service yes 1.0
Snap.apk org.cyanogenmod.snap Camera yes There are many alternatives in Play Store. 2.0.002
SnapdragonCamera.apk org.codeaurora.snapcam Snapdragon Camera yes There are many alternatives in Play Store. 2.0.002
SoundRecorder.apk com.android.soundrecorder Sound Recorder yes There are many alternatives in Play Store. 6.0.1
Stk.apk com.android.stk SIM Toolkit no A set of commands which define how the card should interact with the outside world. 6.0.1
SystemUI.apk com.android.systemui System UI no Android user interface. 6.0.1
Telecom.apk com.android.server.telecom Phone Call Management no A screen that shows when dialing. 6.0.1
TelephonyProvider.apk com.android.providers.telephony Phone and Messaging Storage no If removed, you won’t receive any calls. 6.0.1
TeleService.apk com.android.phone Phone Services no 6.0.1
telresources.apk com.android.frameworks.telresources com.android.frameworks.telresources yes Not sure what this is for, but it didn’t create any problems when frozen. 6.0.1
Terminal.apk com.android.terminal Terminal yes Offers local shell access. 6.0.1
ThemeChooser.apk org.cyanogenmod.theme.chooser Themes yes Installing CM themes. 1.0
ThemesProvider.apk org.cyanogenmod.themes.provider Themes Provider yes Necessary for proper functioning of Themes. 2.0
TimeService.apk com.qualcomm.timeservice com.qualcomm.timeservice yes Safe to remove. 6.0-980725103d
Trebuchet.apk com.cyanogenmod.trebuchet Trebuchet yes Default launcher. 6.0.1
UserDictionaryProvider.apk com.android.providers.userdictionary User Dictionary yes “Personal dictionary” option in “Settings > Language & Input”. Used with Android Keyboard (AOSP). If removed, Settings app may crash after modifying keyboard-related preferences. 6.0.1
VpnDialogs.apk com.android.vpndialogs VpnDialogs yes VPN app. 6.0.1
WallpaperCropper.apk com.android.wallpapercropper com.android.wallpapercropper yes Wallpaper cropping tool. 6.0.1
WAPPushManager.apk com.android.smspush com.android.smspush yes Tethering connectivity. Remove it if you don’t use tethering/access point mode. 6.0.1
webview.apk com.android.webview Android System WebView yes System component powered by Chrome that allows Android apps to display web content. Remove it if you don’t need in-app web content.

CM 13 Google Apps List

APK name Package name Label Removable Description Version
ConfigUpdater.apk com.google.android.configupdater ConfigUpdater yes Automatically updates certificates, firewall configuration, premium SMS list (you’ll be warned if an app sends a premium SMS), time zone information and SELinux configuration. 6.0.1
FaceLock.apk com.android.facelock Trusted Face yes Unlocks your phone using camera. 6.0.1
GoogleBackupTransport.apk com.google.android.backup Google Backup Transport yes Backups settings on Google servers. 6.0.1
GoogleCalendarSyncAdapter.apk com.google.android.syncadapters.calendar Google Calendar Sync yes Google Calendar sync. 5.2.3-99827563-release
GoogleContactsSyncAdapter.apk com.google.android.syncadapters.contacts Google Contacts Sync yes Syncs your contacts with Google account. 6.0.1
GoogleFeedback.apk com.google.android.feedback Market Feedback Agent yes Allows other apps to call it and ask you to provide market feedback. 6.0.1
GoogleLoginService.apk com.google.android.gsf.login Google Account Manager no Google login system. Disables Google account functions. 6.0.1
GoogleOneTimeInitializer.apk com.google.android.onetimeinitializer Google One Time Init yes Runs on first boot. Conflicts with “Provision.apk”. 6.0.1
GooglePackageInstaller.apk com.google.android.packageinstaller Package Installer yes Used to manually install APK files (outside of Google Play). 6.0.1
GooglePartnerSetup.apk com.google.android.partnersetup Google Partner Setup no Runs application in conjunction with Google products. 6.0.1
GoogleServicesFramework.apk com.google.android.gsf Google Services Framework no Provides account/login information to Google apps. 6.0.1
GoogleTTS.apk com.google.android.tts Google Text-to-speech Engine yes Powers applications to read the text on your screen aloud. 3.8.16
Phonesky.apk com.android.vending Google Play Store no Browse and install various Android apps. 6.4.13.C-all [0] 275-4070
PrebuiltGmsCore.apk com.google.android.gms Google Play services no Services necessary for proper functioning of Google Play. 8.7.03 (2645110-430)
talkback.apk com.google.android.marvin.talkback Talkback yes Helps blind and vision-impaired users interact with their devices. 4.5.0 Beta

Content of this page is based on informations from wiki.cyanogenmod.org, under CC BY-SA 3.0 licence.

EndUser Profiles

The Profile Manager (available on CM10 via Settings/Profiles) is a feature that is implemented specifically for CyanogenMod. You will not find documentation of this feature in other Android platforms as a result.

The basic idea is to allow you to group “sets” of settings together and then apply them all at once, either manually or automatically.

For example, perhaps at night you want your ringer turned off and during work you want it at a low volume and in the afternoon (when you might be at your son’s game) you want it to be loud.

Below you can see a list of all the options that can be set in a profile.

While looking at the list of profiles (unless you’ve changed them they are “Default”, “Home”, “Night”, “Silent”, and “Work” — Any of these can be renamed or deleted except “Default) you have several options. If you click on the name of the profile (for instance, “Home”) then you will change to that profile — all the settings under that profile will now be active. If you click on the slider icon to the right it will take you into the settings for that particular profile. Or you can click on the “Application Groups” tab (opposite “Profiles” at the top).

Changing Profiles

Once you have decided exactly how you would like your settings to be during each of your contexts, then it is a question of how to choose the correct profile at the right time. In general you can choose a profile manually or automatically.

Choosing Profiles Manually

If you long-press your power button you will get a menu which includes the current profile. If you click on that then you will be presented with a menu of available profiles. Clicking on the desired profile chooses that profile and all setting changes are made to to your phone/tablet.

There are also widgets available which can be placed on your home screen which allow you to choose a given profile. See here for more details and the download.

Choosing Profiles Automatically

Choosing a profile automatically can be done at a certain time (e.g. at 11:00 every night I want my “Night” profile to be activated) or by means of a location (e.g. when I get in my car I see the availability of a bluetooth device and the profile “Car” can be activated automatically or when I get home I see my own AP wirelessly and so I want the profile “Home” activated automatically.) Here are some options, from simplest to complicated, from least capability to greatest capability:

  1. The alarm clock that comes with CM7 or CM10 can automatically activate a profile whenever an alarm goes off. Each alarm entry has a Profile field, to which you assign a profile that will start when the alarm triggers. This is a good enough option for automatic switching based on time events and it comes with CyanogenMod by default.
  2. There is a free application available on xda-developers.com called Profile Switcher. It is somewhat basic, but it does allow a simple scheduled on/off of any given profile. It also allows for switching on a certain profile for a given period of time (e.g. activate “Meeting” profile for the next 45 minutes). This would suffice nicely for many uses as long as they are time-related.
  3. Locale is another option, giving more capabilities for activating profiles automatically.
  4. There is a paid application called Tasker which lets you teach your phone to sit up and beg. It’s not *quite* like programming your phone, but it definitely takes a bit of learning. But when you combine it with Profile 4 Tasker +Widget you can activate any profile based on any of what Tasker calls “Contexts”. I won’t go into great detail here (there are lots of tutorials over at the Tasker web-site) but you can choose wireless availability, GPS location, cell tower proximity, bluetooth availability, timed schedules — just about anything you can imagine. Then whenever that context is true, Tasker can activate the profile you choose (or it can do any of hundreds of others of tasks as well — meshing with CyanogenMod Profiles is just a tiny portion of what it can do).
  5. Another paid app can come in handy if you want to automatically switch profiles for day and night time: “Good Night, Android!” It also offers the ability to create launcher shortcuts for profiles.

All Options

Here are some of the options that can be set in a profile

  • Mobile Data (on/off)
  • Bluetooth (on/off)
  • GPS (on/off)
  • Wi-fi (on/off)
  • Data-Sync (on/off)
  • Portable Wi-fi Hotspot (on/off)

Then for your volumes you can adjust:

  • Alarm (0-7)
  • Media (0-15)
  • Ringtone (0-7)
  • Notification (0-7)

For Vibrator you can adjust:

  • for calls (on/off)
  • for notifications (on/off)

For system settings you can adjust:

  • the lock screen mode (turning off the pattern or the lock screen entirely, like if you use a 3rd party lock screen)
  • Airplane Mode (on/off)

Application Groups

Application Groups allow you to group your applications together so that you can establish certain settings for that group of applications.

You could, for instance, group all your social media under a single application group. Then you would be able to change the notification style/volume/tone of all of them at once.

This is a bit confusing, but just think it through. You have the possibility of many profiles. You also have the possibility of many Application Groups. You have the same set of Application Groups across all Profiles and each Application Group has the same apps across all profiles. Each profile can define the settings for any of the Application Groups in any way that seems appropriate. Then activating that profile also changes all those settings on each Application Group where something is set. Make sense?

You define each “Application Group” in terms of what the name of that group is and which applications are included in it. You do this in the tab next to the “Profiles” tab on the main screen in profile setting. Then when you have these already defined you can choose settings for all those applications together when you are defining your “Profile” (after having clicked on the slider-icon next to the name of the profile you want to modify). Here are the settings you can change for a given set of applications:

  • Notification mode (on/off/no override)
  • Notification tone (choose your ringtone)
  • Ring mode (on/off/no override)
  • Phone ringtone (choose your ringtone)
  • Vibrate mode (on/off/no override)
  • Lights mode (on/off/no override)

Future of Profiles

There was some talk back in February/March of 2012 that the Profiles feature in CyanogenMod was going to be developed into a full-blown application allowing the various possibilities for automatic switching. However, it appears that the decision was made to leave that functionality in the hands of the 3rd party apps like Locale and Tasker.

Perhaps at some point the “hooks” for Tasker/Locale will become built-in.

Content of this page is based on informations from wiki.cyanogenmod.org, under CC BY-SA 3.0 licence.

Updating

These instructions are for those who have already installed CyanogenMod.

Use the CM Updater (CM10 and newer)

If you use the Google Apps addon (gapps) and are updating between versions where your old gapps is not compatible (e.g. upgrading CM 10.1 to 10.2), it is recommended you apply the update manually in recovery, because you need to flash an updated gapps package. If you do not use gapps or are upgrading a more minor version release, automatic upgrading is recommended.

To update CyanogenMod automatically:

  1. Ensure you’ve saved everything important, as doing an update requires the system be restarted.
  2. Go to the Settings, and then under About this [device], you should see a menu for checking for and installing updates.
  3. Follow the on-screen instructions to perform the update.

If your recovery does not support automatic update installing, you may have to install downloaded zip archive manually. In such case follow instructions in the section below, starting from step 2. You will find downloaded zip under /sdcard/cmupdater directory.

Updating Manually

Note:

These instructions should be accurate, but are a bit vague and could use some help. Feel free to fix it either by including better instructions located elsewhere, or by fixing it directly. Then remove this message!

To update CyanogenMod manually:

  1. Download the new version of CyanogenMod for your device. Also download other packages such as Google Apps. The file should typically have a name ending in .zip
  2. Boot device into recovery mode
  3. If you are doing a major upgrade like CyanogenMod 7 to CyanogenMod 10, you would want to do a Factory Reset from your recovery
    • Note: Different recovery images provide slightly different menu systems, so these instructions will have to be generic. If you have installed CM previously, the options in the recovery menu should already be familiar.
Click here to continue instructions using ADB Push (Preferred Method)
  1. In a computer terminal, make sure ADB is working by typing: adb devices. It should say XXXXXXXXXXXXX sideload where XXXXXXXXXXXXX are random characters (Not question marks)
  2. Place the CyanogenMod .zip package, as well as any optional .zip packages, on the root of /sdcard:
    • Using adb: adb push filename.zip /sdcard
    Note: You can copy the .zip packages to your device using any method you are familiar with. The adb method is used here because it is universal across all devices and works in both Android and recovery mode. If you are in recovery mode, you may need to ensure /sdcard (sometimes called Internal Storage) is mounted by checking its status in the Mounts menu. If you have booted regularly, USB debugging must be enabled.
  3. You want to use the recovery menu to select an option to flash the .zip file from sd, then locate the .zip and flash it
  4. If you have, do the same with optional packages like Google Apps
  5. Now select the option to restart the system, and hopefully it will have worked!
    • Note: If CyanogenMod 13 or above, you will have to flash CyanogenMod and Google Apps without rebooting the device in between.
Click here to continue instructions using ADB Sideload
  1. In Recovery navigate to Apply update or Install and choose ADB Sideload or Apply from ADB
    • Note: In TWRP Recovery, this is in Advanced –> ADB Sideload (You will have to swipe to start the function)
  2. In a computer terminal, make sure it is working by typing: adb devices. It should say XXXXXXXXXXXXX sideload where XXXXXXXXXXXXX are random characters (Not question marks)
  3. Type adb sideload filename.zip and press enter
  4. It should automatically flash the .zip file. To flash optional packages like Google Apps, repeat the process.
    • Note: If CyanogenMod 13 or above, you will have to flash CyanogenMod and Google Apps without rebooting the device in between.

External Links

Content of this page is based on informations from wiki.cyanogenmod.org, under CC BY-SA 3.0 licence.

Device Maintainers

WARNING:

The following tips are for those few who have the ability to accept changes into gerrit’s official CM repositories and/or who are able to bypass gerrit entirely. They are posted for convenience for these maintainers only, in case anyone forgets the steps :)

Note: Required Gerrit Permissions

To mass-submit to Gerrit, you will need the “Push” and “Create Reference” permissions. For mass pushes that include commits you didn’t create yourself, you may also need “Forge Author” and “Forge Committer” permissions. If you believe you are lacking appropriate permissions, contact a Gerrit admin (currently arcee, cyanogen, or ciwrl) for assistance.

Bypass Gerrit

Say you have a bunch of changes and want to skip gerrit’s interface entirely, pushing directly to the repository. For this you will need special privileges.

This is a summary of the user-upload feature, described in detail here.

To bypass Gerrit:

  1. repo sync
  2. branch the repository to anything.
  3. In the new branch, add your commits (or merge from another branch, git pull from AOSP, or whatever gets your changes in).
  4. Next, enter cmremote. This command will add the remote (use git remote -v to see it).
  5. To bypass gerrit, type git push cmremote HEAD:refs/heads/cm-13.0 (assuming cm-13.0 is the branch to which you are pushing).

To mass-push commits to Gerrit for review

  1. Repeat steps 1-4 above.
  2. Then, to mass-push TO Gerrit, use refs/for/branch instead of refs/heads/branch.

To create a new remote branch (on github)

  1. Repeat steps 1-4 above.
  2. Then, to create a new (remote) branch, type git push -u cmremote HEAD:refs/heads/new-branch-name.

Content of this page is based on informations from wiki.cyanogenmod.org, under CC BY-SA 3.0 licence.

Dropbear

Note: LEGACY

This guide is provided for support on CM7 devices, OpenSSH is now used instead as of CM9

This short article explains how to connect to your Android device from another computer using the SSH protocol. This allows you to use a big screen and real keyboard to work on the device. This article focuses mainly on connecting with a Linux based computer. We will be using Dropbear on the Android device as an SSH server. Dropbear is already installed in CyanogenMod. [EDIT: Cyanogenmod 9.0 RC2 no longer includes Dropbear.]

The Android terminal is a fine app, but I prefer a big screen and real keyboard any time.

Prerequisites

  • CyanogenMod ≥ 5.0.6 (for dropbear & dropbear-keygen)
  • An SSH client such as OpenSSH or PuTTY
  • Android debug bridge tool. Please see SDK documentation for information on how to do this.
  • After the SDK is installed, ensure the device is connected to the computer through USB with ADB Debugging enabled in settings.

Create a SSH key for logging in

Create an SSH key on the computer that you wish to connect to your Android device with either `ssh-keygen` or `puttygen`. The public key will copied to the Android device and the private key remains on the computer. Only computers with the private key correctly installed can login to the Android device.

In linux:

ssh-keygen -t rsa

The output should look something like this:

Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in <Filename>.
Your public key has been saved in <Filename>.
adb push <Filename> /sdcard/authorized_keys

In Windows:
If using puttygen, paste the string from the puttygen window (looks like “ssh-rsa AAAAB3…hclQ==rsa-key-20100227”) in authorized_keys.

(Do not try to rename the file created by puttygen – it’s format is incompatible with dropbear)

A password can be used to connect to the device, in this case you can skip the steps above.

Prepare the Android Device

On the computer, open terminal and run the following commands:

adb shell
mkdir /data/dropbear
chmod 755 /data/dropbear
mkdir /data/dropbear/.ssh
chmod 700 /data/dropbear/.ssh
mv /sdcard/authorized_keys /data/dropbear/.ssh/
chown root: /data/dropbear/.ssh/authorized_keys
chmod 600 /data/dropbear/.ssh/authorized_keys
dropbearkey -t rsa -f /data/dropbear/dropbear_rsa_host_key
dropbearkey -t dss -f /data/dropbear/dropbear_dss_host_key

The end result should look something like this:

# ls -la /data/dropbear
drwxr-xr-x    1 root     root          2048 Sep  5 14:55 .
drwxrwx--x    1 system   system        2048 Sep  5 14:08 ..
drwx------    1 root     root          2048 Sep  5 14:51 .ssh
-rw-------    1 root     root           458 Sep  5 14:09 dropbear_dss_host_key
-rw-------    1 root     root           427 Sep  5 14:09 dropbear_rsa_host_key
# ls -la /data/dropbear/.ssh
drwx------    1 root     root          2048 Sep  5 14:51 .
drwxr-xr-x    1 root     root          2048 Sep  5 14:55 ..
-rw-------    1 root     root           406 Sep  5 14:01 authorized_keys
  • Creating directories and generating rsa/dsa keys is required even if you plan to use password login.

Finding the IP address of your Android device

Now to test Dropbear, first the IP address of the Android device must be determined, so as to communicate with it. On the Android device, through either adb shell or terminal emulator, do the following.

If connected through a WiFi network, use the following:

ifconfig eth0

The result should look something like this:

eth0: ip 192.168.1.64 mask 255.255.255.0 flags [up broadcast running multicast]

If connected through a mobile network, use the following:

ifconfig rmnet0

The result should look something like this:

rmnet0: ip 200.200.200.200 mask 255.255.255.252 flags [up broadcast multicast]

You can also list all interfaces using

ip addr
NOTE: It may not be possible host services such as SSH via your mobile network.

If that doesn’t work run cat /proc/net/dev to see the possible interfaces and use ifconfig with the appropriate interface.

Testing Dropbear

We’ll run dropbear in the foreground for testing with debugging information on the Android device. The “-s” option disables password logins (SSH public key authentication is still allowed though which is what we’re using). Use either adb shell or terminal emulator to do the following.

dropbear -s -v -F

(You can use the -Y option to specify a master password for login into any account, if not using key based authentication)

The output should look something like this:

...
TRACE (3220): listening on ':22'
TRACE (3220): enter dropbear_listen
TRACE (3220): dropbear_listen: all interfaces
TRACE (3220): bind(22) failed
TRACE (3220): leave dropbear_listen: success, 1 socks bound
[3220] Sep 05 15:16:43 Not backgrounding
NOTE: For more information about dropbear, run dropbear -h.

Now, on the computer, we will try to login to the Android device. Replace the path to your SSH private key and IP address as appropriate. On the computer’s terminal, do the following.

ssh -i ./The previously selected name for this key -l root 192.168.1.64

The output should look something like this:

Enter passphrase for key '/home/user/<Filename>':
TRACE (3229): entering fake-getpwnam
TRACE (3229): leaving fake-getpwnam
TRACE (3229): enter sign_key_free
TRACE (3229): enter dsa_key_free
TRACE (3229): leave dsa_key_free
TRACE (3229): enter rsa_key_free
TRACE (3229): leave rsa_key_free
TRACE (3229): leave sign_key_free

If it didn’t run ssh with the -v option to get verbose debugging output to try and see what went wrong.

If you get authentication errors, run this to show the device’s public rsa key

dropbearkey -y -f /data/dropbear/dropbear_rsa_host_key
  • the key is formatted like ‘ssh-rsa Som3Rand0mStr1n6 root@localhost’
  • copy and paste it to your PCs known_hosts file, ~/.ssh/known_hosts
  • and try connecting from your PC again

Assuming everything worked, dropbear can be turned off by running:

killall dropbear
NOTE: For Windows (PuTTY with SSH keyfile) you need to configure putty as follows:

  • Connection » Data » Auto-login Username = root
  • Connection » SSH » Auth » Private key file = Previously selected key file

Running dropbear normally

To run dropbear, from the Android device, run:

su
dropbear -s

The shell (whether or adb or terminal emulator) can now be exited safely and dropbear will continue to run.

Dropbear can be turned off by running:

killall dropbear

Automatic startup of the sshd-server on your device

To modify the file in /system/etc/ you need to remount the partition to read/write mode using

mount -o remount,rw /system

To run Dropbear on start up, edit the /etc/init.local.rc file (Your preferred editor can be used, as long as it doesn’t introduce Windows/DOS line breaks), and add the following snippet to the end of the file

# start Dropbear (ssh server) service on boot
service sshd /system/xbin/dropbear -s
   user  root
   group root
   oneshot

The `oneshot` option instructs Android that the service should not be restarted if it is killed. For a full understanding of the Android Init system see here.

Prepare the Android device (using a root password) for OLD BUILDS of CyanogenMod

NOTE: The native dropbear binary included in CyanogenMod 4.0.4 and later seems not to support correctly password protected logins in the sense that you can login even when providing a wrong password. To make it work correctly you need to compile your own dropbear binary statically linked with uClibc.
  1. Compile dropbear (statically linked with uClibc)
  2. Compile busybox (statically linked with uClibc) and enable
    1. Support for shadow passwords
    2. Use internal password and group functions rather than system func
    3. Use internal shadow password functions
    4. Use internal crypt functions
    5. passwd
    6. Check new passwords for weakness
  3. Copy the new dropbear and busybox binaries to the device:
    adb push busybox /sdcard/busybox
    adb push dropbear /sdcard/dropbear
    adb push dropbearkey /sdcard/dropbearkey
  4. Open the terminal and become superuser/root
  5. Create /data/local/bin directory
  6. Copy dropbear, dropbearkey and busybox to /data/local/bin and setup file permissions, ownership and links
  7. Remount /system read-write
  8. Create the needed passwd files
  9. Change the root password
  10. Create /etc/profile with a usable path
  11. Create /etc/shells
  12. Remount /system read-only
  13. Create the dropbear directory
  14. Generate rsa and dsa keys
  15. Link /data/dropbear directory to /system/etc/dropbear
    su
    mkdir /data/local/bin
    cp /sdcard/busybox /data/local/bin/busybox
    cp /sdcard/dropbear /data/local/bin/dropbear
    cp /sdcard/dropbear /data/local/bin/dropbearkey
    chown root.root /data/local/bin/dropbear
    chown root.root /data/local/bin/dropbearkey
    chown root.root /data/local/bin/busybox
    chmod 4755 /data/local/bin/busybox
    chmod 755 /data/local/bin/dropbear
    chmod 755 /data/local/bin/dropbearkey
    ln -s /data/local/bin/busybox /data/local/bin/passwd
    busybox mount -o remount,rw /dev/block/mtdblock3 /system
    echo "root:x:0:0::/data/dropbear:/system/bin/sh" > /etc/passwd
    echo "root::14531:0:99999:7:::" > /etc/shadow
    echo "root:x:0:" > /etc/group
    echo "root:!::" > /etc/gshadow
    echo "/system/bin/sh" > /etc/shells
    echo "PATH=\"/usr/bin:/usr/sbin:/bin:/sbin:/system/sbin:/system/bin:/system/xbin:/system/xbin/bb:/data/local/bin\"" > /etc/profile
    echo "export PATH" >> /etc/profile
    /data/local/bin/passwd
    Changing password for root
    New password:
    Retype password:
    Password for root changed by root
    mkdir /data/dropbear
    /data/local/bin/dropbearkey -t rsa -f /data/dropbear/dropbear_rsa_host_key
    /data/local/bin/dropbearkey -t dss -f /data/dropbear/dropbear_dss_host_key
    ln -s /data/dropbear /system/etc/dropbear
    busybox mount -o remount,ro /dev/block/mtdblock3 /system
  16. Then as root to run the compiled version, call it with the full path:
    /data/local/bin/dropbear

See also

Link to alternative explanation: dropbear login

Content of this page is based on informations from wiki.cyanogenmod.org, under CC BY-SA 3.0 licence.

sshd

NOTE: Many of the commands used here are redundant or unnecessary. They are included to further illustrate what is happening behind the scenes.

Prerequisites

  • CyanogenMod 10.1 on your remote device (build after May 12, 2013)
  • An SSH client on your local machine (such as OpenSSH or PuTTY)
  • A private SSH key. (If you don’t already have one, see this helpful article for information on how to make one.)
  • A means of running commands on your phone as root. This guide uses an adb connection to your device (see ADB intro for more information)

Setting up sshd

All command are executed from the adb root shell (su to root from adb shell), unless otherwise specified. Properly setting the file and directory permissions is critical for sshd to function as expected.

Setting up the directory structure

mkdir -p /data/ssh/empty
chmod 700 /data/ssh
chmod 700 /data/ssh/empty

/data/ssh holds the server’s host keys and configuration file. /data/ssh/empty is used for privsep.

NOTE: Both /data/ssh and /data/ssh/empty should have already existed. They are created here in case of previous accidental deletion.

Helpful Tip

Commands can be pasted into PuTTY by right-clicking or pressing Shift-Ins.

Creating the server configuration file

cat /system/etc/ssh/sshd_config | \
sed 's/#PermitRootLogin yes$/PermitRootLogin no/' | \
sed 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' | \
sed 's/#PasswordAuthentication yes/PasswordAuthentication no/' | \
sed 's/#PermitEmptyPasswords no/PermitEmptyPasswords no/' | \
sed 's/#ChallengeResponseAuthentication yes/ChallengeResponseAuthentication no/' | \
sed 's;/usr/libexec/sftp-server;internal-sftp;' > \
/data/ssh/sshd_config
chmod 600 /data/ssh/sshd_config
  • PermitRootLogin no forbids root login (We’ll be logging in as shell.)
  • PubkeyAuthentication yes allows the public key authentication method
  • PasswordAuthentication no prevents the password authentication method
  • PermitEmptyPasswords no prevents submitting empty passwords (probably redundant, since we disabled password authentication *shrug*)
  • ChallengeResponseAuthentication no prevents the challenge response authentication method
  • Subsystem sftp internal-sftp allows sftp without the need for the sftp-server binary

NOTE: You could probably set a password for shell with passwd and use the password authentication method, but I am unsure of what, if any, effects this might have.

Helpful Tip

Lines that end in a \ continue the same command on the following line. This was done above improve readability of a long command.

Setting the Authorised Public Key

Upload your public key to your phone to /data/.ssh/authorized_keys in a text file on a single line. This file is a list of all the public keys that sshd will allow with one key per line. Since only your public key will be allowed, there will only be one line in it. First, make the directory where the public key will be stored, and grant it the correct permissions.

mkdir -p /data/.ssh
chmod 700 /data/.ssh
chown shell:shell /data/.ssh

Then upload your public key to your phone. (This one command is done on your computer.)

adb push your_public_key /data/.ssh/authorized_keys

Now, fix the permissions.

chmod 600 /data/.ssh/authorized_keys
chown shell:shell /data/.ssh/authorized_keys

NOTE: /data/.ssh should have already existed. As with, /data/ssh and /data/ssh/empty, it is created here in case of previous accidental deletion.

Helpful Tip

Some sftp clients may require the use of an SSH key agent to manage the key.

Starting sshd

There is a script already on the phone called start-ssh that will start sshd, but it requires modification:

mkdir -p /data/local/userinit.d
cat /system/bin/start-ssh | \
sed 's;/system/etc/ssh/sshd_config;/data/ssh/sshd_config;' > \
/data/local/userinit.d/99sshd
chmod 755 /data/local/userinit.d/99sshd
  • /system/etc/ssh/sshd_config is changed to /data/ssh/sshd_config so configuration changes are not lost after a /system flash

To start sshd, run /data/local/userinit.d/99sshd, the new version of start-ssh. It must be run as root. It will also get run automatically by /system/etc/init.d/90userinit on startup, along with any other scripts you put in /data/local/userinit.d.

Connecting and Usage

Once sshd has been started on the phone, you can connect to it with your favourite SSH client and the username shell. This is the same username adb shell gives you, so your permissions are the same until you choose to elevate them using su. You can connect as root (you’ll have to edit sshd_config to allow it), but that is highly inadviseable. Only using root when you have to puts you at a much smaller risk of accidentally wrecking things.

The shell user is pretty weak, so you might like to carve out a home folder, where shell has write access. There you can also keep settings for all your favourite shelly programs, like emacs, vim, and bash. The following is an example of just that.

Make the folder (as root, using su):

mkdir /data/home
chmod 755 /data/home
chown shell:shell /data/home

Everything else from here on in can be done as shell over SSH or with scp. Copy over some key config files (run on the computer):

scp .inputrc .bash_profile .bashrc .vimrc .screenrc shell@hostname:/data/home

Now, we’d like a fast way of configuring the home directory, since it gets ignored when we first log in. Put the following in /data/home/login:

#!/system/xbin/bash

HOME='/data/home'
cd
exec bash --login

Then set its permissions to allow execution:

chmod 755 /data/home/login

Now, to switch to the new home directory when you log in, just type exec /data/home/login.

Android has made it so that the files and directories shell creates can only be accessed by itself by default. If you want to access the files you make with shell from your other apps, like file browsers, without root access, you’ll need to change the default file and directory creation permissions. Add the following to your .bash_profile on a line by itself to allow read-only access from all apps: umask 0022. To allow all apps read/write access, use umask 0000 instead.

To emulate sudo behaviour, you might like to put the following alias in your .bashrc: alias sudo='su root'.

Troubleshooting

  • Change # DEBUG=1 to DEBUG=1 in /data/local/userinit.d/99sshd to enable debug logging to logcat
  • Reboot remote device (or kill the sshd process and run 99sshd)
  • Run logcat | grep sshd to show the debug log
  • When in debug mode, sshd will quit after the first ssh session exits. Recomment the DEBUG=1 line and restart 99sshd for normal behavior.

NOTE: Most issues will be related to permissions.

Helpful Tip

Some devices may be sluggish with the screen locked. Try unlocking the screen to see if performance improves.

Todo

  • Find specific versions of CM where supported
  • Identify effects of setting password for shell user
  • Add more troubleshooting information
  • Add a section for client (PuTTY) setup; specifically, private key conversion (puttygen) and/or ssh-agent (pageant) usage (this may be more useful has a it’s own document)

Problem with SELinux

My solution for problem:

W/sshd type=1400 audit(0.0:16): avc: denied { open } for name="sshd_config"
  • Install SuperSu ([1])
  • create directory /system/su.d
  • modify file 99sshd and add/change
supolicy --live "allow sysinit self:capability setgid;allow sysinit system_data_file:file open;"
/system/bin/logwrapper /system/bin/sshd -f /data/ssh/sshd_config

Notice I removed the -D param. Because with it the sshd was killed.
And added the logwrapper, because sshd can generate an output when error.

  • put the file 99sshd into /system/su.d/ (remount rw)

I choosed this directory because the userinit.sh had problems (selinux) with running another scripts.

Allowing root login

Modify file /data/ssh/sshd_config

AuthorizedKeysFile      /data/.ssh/authorized_keys.%u
PermitRootLogin yes

and rename file /data/.ssh/authorized_keys to authorized_keys.root and authorized_keys.shell

Content of this page is based on informations from wiki.cyanogenmod.org, under CC BY-SA 3.0 licence.

Compatibility Test Suite – CTS

What is CTS

From the official documentation:

The Android compatibility program works for the benefit of the entire Android community, including users, developers, and device manufacturers.

Each group depends on the others. Users want a wide selection of devices and great apps; great apps come from developers motivated by a large market for their apps with many devices in users’ hands; device manufacturers rely on a wide variety of great apps to increase their products’ value for consumers.

The CTS is an automated testing harness that includes two major software components:

  1. The CTS test harness runs on your desktop machine and manages test execution.
  2. Individual test cases are executed on attached mobile devices or on an emulator. The test cases are written in Java as JUnit tests and packaged as Android .apk files to run on the actual device target.

Setup CTS

Downloads

Download and unzip the latest CTS package from Google. You will want the following:

  1. Compatibility Test Suite zip
  2. CTS Verifier APK
  3. Media 1.0

APK Install

From extracted zip go to android-cts/repository/testcases:

adb install CtsDeviceAdmin.apk

Device Preparation

In Developer Options:

  1. Enable Stay Awake
  2. Enable Android Debugging
  3. Enable Allow Mock Locations
  4. Enable Allow Mock SMS

In Security:

  1. Set Screen Lock to None
  2. Tap Device Administrators – check the two check boxes for CTS (requires CtsDeviceAdmin.apk from above):
android.deviceadmin.cts.CtsDeviceAdminReceiver
android.deviceadmin.cts.CtsDeviceAdminReceiver2
  • Do NOT check the 3rd box for android.deviceadmin.cts.CtsDeviceAdminDeactivatedReceiver

Media Files:

In Android Media 1.0 zip run the following:

$ bash ./copy_media.sh all
  • This will push all media files to the device

Additional tasks:

  1. Device should have SIM card with data
  2. Device should be connected to Wi-Fi
  3. Install GMS packages (gapps)
  4. For tests, Default the browser to Chrome (do an activity to launch the chooser, select Chrome and press Always)
    1. Go through Chrome’s brief setup
  5. Do not log in to any accounts (Google, CM Account, etc)

Run CTS

In the extracted CTS zip, go to android-cts/tools and run the following command:

$ ./cts-tradefed

This opens the CTS command window. Here are useful commands:

  • This runs a full CTS test pass
cts-tf> run cts --plan CTS
  • To view all sessions in your /repository/results directory and number them:
cts-tf> l r

Re-run failures:

To re-run failures, create a plan based on results of a previous session:

cts-tf> add derivedplan --plan name_of_plan -s # -r fail
  • the -s # is for session. Enter the number that corresponds with the session based on ‘l r’
  • name_of_plan is a unique name for the plan you create – example n1_fails0411

Run a derived plan:

cts-tf> run cts --plan name_of_plan

Content of this page is based on informations from wiki.cyanogenmod.org, under CC BY-SA 3.0 licence.

Submitting A Port

Congratulations!

You’ve got the device, you spent weeks (months?) getting it to work. Now you want to submit your device and kernel tree back upstream to be recognized by CyanogenMod as an “official” device.

Here’s how to do it…

Prerequisites

You can save everyone a lot of time by making sure that you have met these requirements:

  • Full hardware support — Everything– every peripheral, every wireless feature– that is supported by stock *must* be supported by CyanogenMod. Any exceptions will be per device (case-by-case) and must be detailed in full.
  • Stability — Nothing should crash. Ever. CyanogenMod has a reputation for stability and your port must be rock-solid. This means no “sleep of deaths” either.
  • No overclock by default — While overclocking options in the Performance menu is well and good, leave the default speeds at stock.
  • Do not over-volt either — Do not go outside of the spec for power consumption. If you want to provide sysfs methods for upping the voltage, that’s up to you. But it must not be a default setting.
  • You have designated at least one device maintainer and at least one person to be responsible for the device’s wiki information. The former will evaluate submissions to the device’s repositories. The latter will ensure that the information/documentation about the device on the wiki is always up-to-date and correct. These people must be identified when applying for official recognition.

Optional (but awesome if you have it)

Submitting your device

  • Send an email to [email protected]
    • This email must contain links to your github repositories for your device
    • This email must contain gtalk and email addresses for contacting you
    • If a team worked on your device, all team members must be listed in the email

Once you have sent your email, expect a good amount of time to pass before a reply. This can take a couple of weeks. Your device will be reviewed. If things need to be changed, a conversation will start with you to help guide you through the process of being accepted. If your device is rejected, you will get a detailed response as to why. Not all devices will be accepted. Keep this in mind.

Content of this page is based on informations from wiki.cyanogenmod.org, under CC BY-SA 3.0 licence.