Some Notes for Building Unofficial Ports of Android

Here are some quick notes of how to use other people’s work on Github when building unofficial Cyanogenmod or other custom Android builds.

Many unofficial device maintainers have a local_manifests xml file, which specifies replacement projects. See some documentation about local_manifests here:

This modifies the repo command to tell it to pull in altered projects that should replace or add to the original set of projects you are working off, such as device specific files. Example here:

Next, you want to look for the build patches, which maintainers typically put in the device specific folders (from the root folder, look in device common or the by the actual device name). For example, some maintainers may place the patches here:

Ultimately how this is organized will vary by the maintainer.

Upgrading from a Galaxy Nexus

Galaxy Nexus

In the past month, Koodo mobile had a sale on the recertified Nexus 4 for $150 pre-taxes, so I finally pulled the trigger for an upgrade. I had been using the Galaxy Nexus for 1.5 years, having purchased it from Rogers when I switched to Wind mobile.

In short, when buying a new Android phone in 2014:

  • Look for 2GB of RAM or more
  • Buy from a major manufacturer, and be sure to check the disk speed (read and write)
  • Get a newer model with a power efficient chipset


On paper, the Galaxy Nexus still has mid range specs: the second greatest version of Android with 4.3 Jellybean, had a 720p HD display at 4.65″, 1 GB of RAM, and a CPU/GPU that is on par with regards to performance. It would appear to be very close to the likes of the Moto G, which has rave reviews and has been gaining popularity because of its attractive price point of about $200 for the 16GB variant. What gives?

The Galaxy Nexus was a great phone for its time, but it had some glaring flaws. For me personally, what drove me to ultimately upgrade was:

  1. Lag, lag everywhere… Despite having all the right specs on paper, I was experiencing significant lag everywhere despite being pretty light on the phone.
  2. Battery life wasn’t enough for my usage patterns… I couldn’t make it through a workday without having to recharge my phone.
  3. Discontinued support… Grim outlook for 1 or 2 improving significantly in the near future

Let me explain…

  1. Lag: On a smartphone, in addition to making phone calls, you expect to be using Internet connected services. Those services run in the background and consume resources on the device. Android has come a long way since its conception, where the first device shipped with 100MB of available RAM. Now when it comes to the Galaxy Nexus, it may sound like 1GB has to be enough, increasing the amount by 10 times over the span of just 4 years. Unfortunately, this isn’t the case with the operating system consistently consuming more than half of what’s left. Out of the box, a portion of this memory is usually reserved for hardware components, notably the GPU, the radio baseband, and the camera – around 300MB worth. Now this number ranges depending on the device, but on the Galaxy Nexus, it was crippling the device performance with other services running on the phone. Once the phone starts running out of RAM, it actually has to work to remove things from RAM in order to keep doing what it’s supposed to. This process, called garbage collection, is one of the key contributors to stuttering in Android. The second contributor is – if applications can remain in RAM in a ‘standby’ state, they will be launched faster than if they had to be launched from scratch from a ‘cold boot’ from the disk, because RAM is much much faster than the disk memory. This means that this process is dependent on how fast the device can read from the disk memory. Unfortunately for the Galaxy Nexus, the disk memory is magnitudes slower than what its supposed to be, leading more more lag. On newer devices from major manufacturers such as Samsung, they make sure that the disk memory is quick enough. The same cannot be said for the likes of Huawei or no name brands. Despite Android 4.4 KitKat having lower requirements for RAM, I do not recommend any less than 2GB of RAM on a new smartphone, or it is guaranteed to be a mediocre experience. 
  2. Battery: While this isn’t a published spec, the Galaxy Nexus has a less power efficient package that results in an average of 1.5 hours of screen-on time in most scenarios. Smartphones in 2014 typically are capable of at least double this figure, but this is not a published spec. It is good to check review sites such as AnandTech for the WiFi browsing time, 4G browsing time, and 3G browsing time for the specific device. Newer models have newer chipsets, which are much more power efficient than older models. It is useful to know what chipset was released in the last while to know the difference. Or you can just go with a huge battery, but that also means you will end up with a bulkier device.
  3. Support: The Galaxy Nexus runs off a Texas Instrument CPU/GPU combination. Texas Instruments’ mobile division had gone belly up, meaning that there is no more software support from the manufacturer. Google stops their commitment for upgrading their software after 18 months. This means that the hardware issues in #1 and #2 will no longer improve with some sort of software fix. Here’s a good diagram by HTC (




Android Launcher 3 Build from Eclipse (From 4.4.2 Source)


Work done


Do it yourself

  1. Use Git to pull down the latest Launcher 3 source:

    git clone

  2. Import existing code into Eclipse (Android Project from Existing Code)
  3. Change the project build target to API level 19
  4. Add Android support libraries
  5. Build protocol buffers JAR from AOSP source. You will actually need to build the protoc binary as well. You need to know how to use ‘make’ have gcc available for the protoc binary, and Maven for the JAR:…l/protobuf.git
  6. Use protoc binary built from step above to generate the file:

    protoc –javanano_out=src/ -I protos protos/backup.proto

  7. Rename the Android package (Android Tools->Rename Application Package) to one of your choice
  8. Add min SDK in a new ‘uses-sdk’ element in AndroidManifest.xml (works down to API level 17 without too many complaints in Lint, obviously stick to 19 to play it safe).
  9. Clean and run. BIND APP WIDGETS error can be ignored


Fabio Lo Brutto:

Android Play Store Content Ratings are Almost Useless – Too Many Apps are Indiscriminately Rated for ‘Everyone’


A Mobile Casino Slot Machine App Rated ‘Everyone’

The app shown in the screenshot is Slot Machine Free Casino Slots, a free app on the Android Play Store. I am starting off with this offender because it highlights the severity of the issue.

This app is a slots machine simulator. Link to a YouTube trailer is here. Social features include logging into a Facebook or SOFTGAMES (game publisher) account. You can spend real money just like you can at a real slot machine. The part about gambling is where it is a gray area, because clearly this facilities real gambling and turns your smartphone into a mobile casino, as it allows users to spend real currency, but the app store is full of apps like this. The app at least should be rated with a ‘Medium maturity’ content rating.

Here’s a screenshot of their mobile web app showing cost of the virtual currency purchase screen, where Google will gladly take your money via Google Wallet:


What are Content Ratings for the Play Store?

A version for developers is available here, and here’s the section specific for gambling:

Apps that facilitate real gambling are not permitted in Google Play. Apps with gambling themes or simulated gambling must be rated medium maturity or high maturity.

The Play Store content ratings guide is quoted below:


Applications in this category should not collect user’s location data or contain objectionable material. Applications should not share user content or include social features.
Low maturity

Applications in this category may include instances of mild cartoon or fantasy violence or other potentially offensive content. Applications may collect user location data for the purpose of providing location specific information or otherwise improving the user experience, but should not share the data with other users. Applications may include some social features but should not focus on allowing users to find and communicate with each other.
Medium maturity

Applications in this category may include sexual references; intense fantasy or realistic violence; profanity or crude humor; references to drug, alcohol and tobacco use; social features and simulated gambling. Applications may collect user location data for the purpose of sharing or publishing with the user’s consent.
High maturity

Applications in this category may focus on or include frequent instances of sexual and suggestive content; graphic violence; social features; simulated gambling; and strong alcohol, tobacco and drug references. Applications may collect user location data for the purpose of sharing or publishing with the user’s consent.

Google’s Blind Eye to Real Gambling in the Play Store

Google’s position so far is to allow apps like this, as I am not aware of any app takedowns because of faciliting real gambling in apps, despite explicitly allowing gambling in the submission policies. Apple is different in that it allows for real gambling apps only certain geographic areas, and all apps are subject to approval before launch.

At the very least, Google is protecting themselves by making sure that developers are agreeing to the guidelines set out by Google, so it is ultimately not Google’s responsibility to the problem of gambling in the play store.

When apps are submitted, developers will see the following in order to consent to Play Store guidelines:


Even ‘Top Developers’ Offend – Case in Point: Yahoo

Moving on from gambling, let’s talk about private user data.

Yahoo has many apps under its portfolio. But I’ve discovered that they have been sloppy at keeping content ratings relevant for some of their apps, particularly for their Fantasy sports apps. They currently have 14 apps published.

The Yahoo Fantasy Basketball and Yahoo Fantasy Hockey apps are rated ‘Everyone’. But they both contain social messaging features that should automatically put it in the ‘Medium maturity’ category.

Here’s a look at the Play Store page:


The screenshots even show social messaging features:


If you go to Yahoo Sports and view their terms and conditions, they clearly state that they will collect user personal information:

By signing up for Fantasy Basketball, you agree to Yahoo!’s use of your personal information as described in Yahoo!’s Privacy Policy, located at

Apps Rated as ‘Everyone’ Collect User Personal Data, Including your Location – Case in Point: Electronic Arts Inc.

Here’s an example offender of putting apps in the ‘Everyone’ category – by Electronic Arts. Currently the 3rd top paid app in the Play Store. Need for Speed™ Most Wanted is rated as an ‘Everyone’ app, but has a terms and conditions of the app clearly states the application developer will collect your personal information, which is supposed to be non-personally identifiable, including your location:

2. Consent to Use of Data. To facilitate product support, product development and improvement as well as other services to you, you agree that EA or other third parties may use cookies, web beacons and other analytic technologies to collect, use, store and transmit non-personally identifiable technical and related information regarding your mobile device (including unique device id or UDID), IP address, geo-location, device make and model, operating system, software and applications, including application usage data. In addition, EA and/or third parties may collect, store, use and transmit non-personally identifiable game play data, session data, browser identifiers, carrier information well as online and Application usage metrics, statistics and/or analytics. Data collected by third parties will be collected, used, stored, transferred and disclosed pursuant to the third party’s privacy policy. See Appendix A for a non-exclusive list of third parties that may collect data via this Application. Appendix A includes both analytics companies and ad networks discussed in more detail in Section 3, below and includes URL’s for those third parties’ privacy policies and opt outs (if applicable). For data collected by or transferred to EA, EA may collect, use, store, share and transmit this information to third parties in a form that does not personally identify you in accordance with EA’s Privacy Policy located at

Here’s a screenshot of the app in the Play Store.


Electronic Arts is one of the largest publisher of games in the Play Store, yet a quick look at other games in the portfolio shows the same problem, most if not all of their games fall under the same terms and conditions, but yet are all have a content rating of ‘Everyone’.


Google Doesn’t Seem to Care Much

There doesn’t seem to be an easy way to the content rating of apps on an Android device. Here’s what it takes to view the content rating of an app on an Android device. Google has hidden this information underneath the ‘Description’ tab.


The main way to report apps is through the Play Store, but this only works through the Android app, at the bottom of the app page as follows. You inexplicably cannot do this in a web browser:


Google’s primary source of revenue is advertisement and selling your data, but I really believe that we should expect better of Google for this specific issue.

As a side-note, the Play Store’s Google+ integration is a content rating breach, because messages are posted publicly to the application’s profile. With app developers responding back to users, it is effectively a social messaging system. You can’t flag the Play Store as inappropriate though.

Ending Remarks

There are countless examples of apps that will collect your personal data, but how many of them are rated appropriately so you can keep yourself from using these apps?

For now, setting the content filter in the Play Store app is almost useless. Apps rated for ‘Everyone’ can and will collect your personal data, or even facilitate gambling.

If your children own an Android smartphone, there isn’t really simple solution for stopping them from using the Play Store and being exposed to inappropriate content in apps and personal data collection.

Currently, there doesn’t seem to be an easy way to check for offending apps from Google. I recommend this free third-party app I came across recently – BitDefender Clueful. Here’s a link to their app on the Play Store. The app analyzes the list of installed applications on your device and shows you how your private data is being utilized.

The strange thing is that they haven’t published a privacy policy for their application yet, but BitDefender historically does not sell collected information to third-party. By using Clueful, you do end up transmitting some data back to BitDefender. This is from their webpage privacy policy:

Information about our customers is an important part of our business, and we do not sell it to others. We share customer information only with the subsidiaries of BITDEFENDER, business partners or affliliated companies.


Synology NAS Network Backup to Windows Using DeltaCopy and rsync

Synology DSM 4.2 Backup and Restore Task Wizard (rsync)

Synology DSM 4.2 Backup and Restore Task Wizard (rsync)

Synology DS NAS devices have native functionality within Synology DSM to perform network backup to another Synology NAS, Amazon S3, or a rsync server to place the target files. I wanted to backup the files on the NAS onto my Windows installation using the DSM Backup and Restore task.

rsync is a protocol with an open-source command-line utility made for Unix-like systems. On Windows, the freeware program DeltaCopy makes running the rsync server service quite easy. But there were some hoops to hop through to get it working as desired, as it does have some limitations, including:

  • the lack of unicode character support (cygwin)
  • failure with file paths longer than 255 characters long (rsync)

The authors of DeltaCopy recommend replacing the cygwin library with a patched version to fix the problem of unicode characters, but in my usage this did not fix the more the crippling feature, which was was the 255 character short file path limitation. There is an easy workaround to both issues by using the rsync 3.0.6 Windows binaries compiled by Thomas Döring, placing the files in the DeltaCopy installation folder and replacing the files there.

The Synology network backup task fails with an error message when it runs into a problem from within DSM. To actually diagnose the issue, DeltaCopy’s rsync configuration has rsync logging disabled by default, so it must be turned on if you wish to find out what is actually happening. Within the DeltaCopy installation folder, the rsync configuration file is named ‘deltacd.conf’. You can add arguments to the configuration parameter ‘log file’ to debug any issues with the server. Refer to rsyncd.conf documentation for details.

DeltaCopy rsyncd.conf with logging enabled

Now you may wonder why we should bother with installing DeltaCopy at all, when the actual binaries for the rsync server get replaced anyway. The role of installing DeltaCopy is for ease of configuring the Windows service, rsyncd.conf from the ‘DeltaCopy Server’ GUI. You can achieve the desired results with the rsync 3.0.6 binaries alone if you are willing to write the configuration file and run the rsync server daemon yourself, which isn’t too hard either.

If you want to get rid of DeltaCopy completely, the uninstall process does not remove the Windows service it created on my machine. You have to use an elevated command prompt to delete the service yourself.

Steps to get this working:

  1. Download DeltaCopy and rsync 3.0.6 respectively
  2. Install DeltaCopy
  3. Extract rsync 3.0.6 files into DeltaCopy’s installation folder
  4. Run and configure DeltaCopy Server, installing the service with a local administrator account and creating a backup module (folder) that the service has permissions to read/write to. Synology requires that a username and password is set for the folder.
  5. Open the rsync TCP port (873)  inbound port within Windows Firewall as an inbound rule (Windows Firewall with Advanced Security). It is important to ensure that the network adapter active profile matches the one for the rule under the ‘Advanced’ tab.
  6. Test the connection from the Synology DS Backup & Restore page.

Tested with Windows 8 64-bit (DeltaCopy 1.4 by Synametrics, rsync 3.0.6 by Thomas Döring), Synology DS212J (DSM4.2).

Buried in Smartphones Hardware Specifications for 2013

Smartphone hardware has been progressing fast, but this year, we are starting to see more new confusing things regarding hardware specifications. It is turning into what the PC market has been like for years, where most people have stopped caring about the specifications because there is such an overwhelming amount of information out there. Instead of hard specifications such as clockspeeds and bandwidth, people care most about what’s on the surface and branding.

For PCs, you want an Intel i5 or i7. Some people might know how many cores a processor might have, and rarely someone might know the clockspeed. You won’t find many people who know the actual processor names. For phones, people only know devices on a model name basis. For the majority, these hard specifications no longer make an impact on how they use their computing devices on a daily basis, and they stopped committing their minds processing the excess of information. The first thing people talk about is how big the screen is, how good the things, and maybe the storage. After that, they might count the number of cores it has or how many megapixels the camera gives them. This is also how manufactures get away with getting rid of the user replaceable battery, and concealing the whole thing in tape so it can never be repaired.

In 2013, the smartphone is really converging into the same pattern, where users see less and less benefit with getting the best hardware on the block. Qualcomm has already done their homework and is working to push Snapdragon as a branded platform, trying to emulate Intel’s success at marketing over the years. Compared to the likes of Nvidia and Samsung, Qualcomm stands out because they have started to market the Snapdragon brand as a complete platform, not just as a single application processor, and are one of the few manufacturers capable of doing so. At the end of the day, this mess isn’t necessarily good news for end-users, because more marketing doesn’t really equate to better products at all, and maintaining the proper balance here is a fine line to tread.

Here is a short list of some hardware specifications for computer geeks to know about that will get buried this year:


  • ARM Cortex-A15/Cortex-A7 big.LITTLE 4×4: being called octacore everywhere when it isn’t designed to run with more than 4 at any given time
  • ARM Cortex-A7 quadcore: this isn’t expected to perform that much better than a pair of old Cortex-A9s, but can have good power efficiency
  • ARM Cortex-A9 r4p1: a new revision that should bring about similar performance to what Qualcomm is squeezing out of Krait, coming the second half 2013
  • Intel Atom: a single core does as well as several ARM-based ones, but Intel isn’t keen on selling cheap chips
  • Fabrication process: hopefully your next application processor was fabricated at either 28 or 32 nm, because everything else is ancient by now


  • LPDDR3 vs LPDDR2: LPDDR3 bringing significant power savings and graphical performance improvements with the increased memory bandwidth, but Samsung might be the only
  • one using it since  they make these
  • Baseband envelope tracking: expected to bring significant power savings to celluar radio
  • Inflated screen resolutions: resulting in poor gaming performance, despite all the ravings about how much PPI you can squeeze out of a screen
  • Shrinking internal storage:  some manufacturers pushing a device with 16GB of internal storage all the way down to just 60% at 9GB (Samsung Galaxy S4)
  • GPU performance: this is a mess I have not spent a lot of time looking at, but a lot of things can go wrong here with graphically intensive applications
  • RAM: this has always been an issue ever since the G1, since manufacturers count memory allocated for crucial components such asthe GPU and radio chipset and unavailable to the operating system in this count. With larger screens that do more graphically intensive work, you need more RAM for the GPU. This so far hasn’t been a big issue though since Android is pretty efficient at managing lack of memory.
  • Storage technologies: we never see any information regarding to this, but it matters. Look for those IO benchmarks when considering your next purchase.


What is BusyBox for an Android user?

When a phone is rooted, one of the most common things to do after rooting is the installation of the BusyBox binary, prior to running any applications that require root privileges.

To make sense of this, it is necessary to have a brief understanding of what BusyBox is. BusyBox is a collection of powerful command-line tools in a single binary executable that can be run for UNIX based systems, including Android. The collection of tools available depends on how the BusyBox binary was built, and the source code is GPLv2 open-source, available from  Many of the tools don’t do anything useful without elevated root privileges as in a rooted Android device.

Many Android applications that require root privileges use BusyBox from the command-line extensively. Some of the utilities are powerful enough to severely alter your device, such as the ability to write data directly any partition on your device. Many third-party firmware packages including Cyanogenmod utilize BusyBox extensively and already come with prebuilt with it, so users should be aware of consequences if making any modifications to the existing installation of BusyBox, by themselves of from one of many pre-packaged Play Store applications.

Keeping it on your device usually isn’t going to be a problem, but keep in mind that this tool can be destructive for your device and can make your device open to vulnerabilities compared to a stock shipping device. If you use the command-line a lot, you probably know what it is already and want to keep it installed.