How to make your Galaxy Note 4 fast

 

Galaxy Note 4

Update: the following was tested for N910FXXU1COH4 and N910FXXU1COI3. For N910FXXU1COJ3 Samsung added an “AppFreezer” system. But it still kills background processes.

The Galaxy Note 4 is an amazing piece of hardware. Recently, it was updated to Android 5.1.1 which solved many performance problems the previous Lollipop (5.0.1) release had.

Unfortunately, the phone still feels sluggish. When you go back to an app that was used 5 minutes ago, you can see how it recreates the app from scratch, there’s a delay with many actions and it feels like an old phone. If you compare it with ie. a Nexus 5, the latter feels faster to use, yet it’s older, has a weaker CPU and less memory.

But worse! With the 5.1.1 release on the Galaxy Note 4 some apps will behave badly. For example you won’t get incoming VoIP calls, missing messages, missing notifications on Android Wear and so on.

People often blame TouchWiz (the Samsung framework modifications). So I decided to have a look at their framework.

Samsung indeed does change the process management part of their device. It seems this was added during the early Android versions (1.x, 2.x) and most of it is not necessary anymore. The default memory management of Android was greatly enhanced since Android Honeycomb (3.x) and even more since ART in Lollipop.

Basically what Samsung does is kill apps and services in the background very frequently. I’m really puzzled of what’s the point in it. I suspect the Samsung engineer responsible for memory management is pictured below:

I have no idea of what I’m doing

And there’s a lot of memory management systems in their framework. It seems that when they noticed memory problems, they just wrote a new one!

Fortunately, there’s a way to solve it:

  • root your device
  • edit system/build.prop with the following:

Find the following line and switch it to false, like this:

sys.config.samp_spcm_enable=false

This disables the service killer. Now your services will run reliably. Let’s add the following lines to disable their memory management:

sys.config.samp_enable=false
ro.config.fha_enable=true
ro.sys.fw.use_trim_settings=false

The first line disables their Smart Adjust Manager which is a system that tries to rate tasks, do some statistics and kill the ones that seem to take most memory. It seems like a good idea at first but unfortunately it kills tasks you use the most as well and has absolutely no place on a system with 3GB of memory.

The second line enables a simpler memory management system (in fact, it disables most of the old memory management stuff, the ones that you configure with dha/sha lines). It’s very close to the AOSP one.

Finally, the TRIM system, as its name implies, removes cached apps. It seems it was designed for devices with 1GB of memory or less. Why it’s enabled on a Galaxy Note 4 is beyond human understanding.

With these lines, the device feels just as fast and smooth as an AOSP device. Your battery will also lasts longer during active use because the device won’t spend time killing and recreating tasks all the time. Multitasking is a joy again.

This proves that TouchWiz is not bloated but it’s just their braindead memory management.

Note: these modifications likely work with other Galaxy devices but I don’t have the time to reverse engineer all of them. If someone wants to try (Galaxy S6, S6 Edge, Note 5) feel free to report your experience in the comments below.

New version of I’m sleeping

I'm sleeping

A new version of I’m sleeping has been released!
Changes in this version:

- automatically puts the phone in silent mode when set in the UI and the time is within the sleeping range
- likewise for unsilencing
- added a "call through" mode which allows repeated calls to reach you

Head over to Google Play to find it.

Apple’s “inventions”

Tim Crook

So let’s see what Apple copied from Android invented with the iPhone 5:

  • Shared Photo Streams (Google+ Events Party Mode)
  • Panorama photo mode
  • taking photos while shooting a video
  • Points of Interests in Maps
  • Turn navigation
  • Satellite imagery in Maps
  • 3D Maps
  • changing camera angle in Maps with 2 fingers
  • iCloud tabs (Google Tabs Sync)
  • Sports team scores in Siri
  • Movies recommendations in Siri

And I’m not talking about 5 GHz WiFi, 16:9 screen aspect ratio, 1080p video support, and backside illuminated camera sensor which were available on the Galaxy Nexus which was released almost a year ago.

Now I suppose they can sue everyone else.

Android, WiFi and power consumption

Android is not very well documented when it comes to power consumption. Most user manuals tell you that, in order to save power, you have to turn off the features you don’t need. While these advice have their merits, they often involve a significant trade off. For this article, we’ll focus on wifi usage.

Wifi versus mobile data

When it comes to power usage, wifi behaves quite differently than 2G/3G mobile data. To keep things short, wifi is more power efficient when doing actual data transfer but less when staying on doing nothing, at least that’s the case with simple implementations. For example, my Sony Ericsson Xperia X10 Mini Pro (Android 2.1) will barely last a day when wifi is turned on and connected to an access point (AP) and there’s a reason for that:

contrary to what happens with mobile data, Android cannot sleep while a wifi link is active, even idle

Well. At least that statement was true until fairly recently.

Wifi powersaving mode

Since recent versions of Android, a power saving mode (PS-Poll) was implemented and many phones use it. It works in the following way and is only active when the screen of the mobile device is off:

  • the AP will keep packets for the phone buffered
  • the phone will periodically (typically every few seconds) poll the AP and asking if there are new packets
  • if there are, the AP will send them in a burst

It’s like if the phone was taking a dive, surfacing each few seconds to ask if there are packets. This decreases greatly power usage. The drawback is that it increases latency significantly and some APs don’t handle power save mode properly and simply disconnect the device. This is fine for “background data” usage though (syncing, email checking and so on).

Here’s how to test if your phone supports PS-Poll:

  • connect to your AP
  • on the phone, go to Settings / About phone / Status and look the IP address field
  • on a terminal on your computer, type:
  • ping -t <ip_address> (note: on Linux/Unix, drop the -t)

You should get some output like:

Reply from 192.168.1.71: bytes=32 time=452ms TTL=64
Reply from 192.168.1.71: bytes=32 time=200ms TTL=64
Reply from 192.168.1.71: bytes=32 time=1512ms TTL=64
Reply from 192.168.1.71: bytes=32 time=762ms TTL=64
Reply from 192.168.1.71: bytes=32 time=1768ms TTL=64

Anything bigger than 1000ms indicates that PS-Poll is active. Turn on the screen and notice how the timing become smaller because then PS-Poll is disabled, bringing better latency.

Sleeping is the key

While PS-Poll helps a lot, it still doesn’t solve the main issue. Phones’ greatest power saving strategy is to put the processor (CPU) to sleep mode, basically the same that happens when you put your laptop to “sleep”. You close the lid, the machine stops but the memory content stays intact so that you can quickly wake up again to resume work.

And this is also what recent phones are able to do. For example the Samsung Galaxy S II and the Galaxy Nexus have a dedicated ARM Cortex-M3 chip (a full blown CPU) and dedicated memory in their wifi subsystem. This allows the phone to be put to sleep while the wifi link stays active.

Android 4.0 and default wifi sleep policy

This is probably why the default sleep policy in Android 4 (ICS) was changed from “sleep when screen turn off” to “never”. I was actually surprised to see the change and had to do some research to find out why this was done.

Now not all phones implement this but if your phone is recent, chances are it does.

N95 unlocking and battery extension

Following up on Vodafone’s inability to unlock my Nokia N95 I bought from them, I decided to use other ways.

First, there are tons of “online unlockers” websites who claim to be able to unlock phones but nobody explaining how they do it. I tried 2 of them and they weren’t successful, even though they advertise handling the N95.

The first one was E Distributions UK Ltd. They reimbursed my Paypal payment the same day with “unlock code cannot generate full refund”. Fair enough.

The other was a bit more problematic. I ordered an unlock code for my girlfriend’s LG KU990i from MobileUnlocked which is really Unlockingonline. After 2 days they claimed to have found the unlock code which was: “NO UNLOCK CODE”, which obviously was of no use for me. I complained to them asking for a refund and 2 days later they did so.

My guess is that those online unlockers probably work for older phones which have key generators available for them, but these companies also advertise that they can handle new phones for 2 reasons:

  • be indexed by search engines
  • be able to provide the service as soon as a keygenerator appears

Unfortunately this is just going to waste your time. You can try, but if you do make sure you always use Paypal as they have a reimbursement policy if the merchant fails to provide the service (make sure you keep copies of mails and website results).

I ended up unlocking both phones from a local store. No problems whatsoever.

Now on to fix one of the most annoying problem of the N95, and any modern smartphone: the limited battery life.

The N95’s original battery is a 950 mAh li-ion battery and has the amazing property of lasting about one day with moderate usage. Even worse, if you use your N95 to listen to some music, it dries out in 2 to 3 hours.

So I ordered a 2400 mAh li-polymere battery from mobiltec24. Unfortunately the phone was constantly switching itself off and crashing.. weird! I mailed them and they quickly sent a replacement battery which works fine so far. The phone lasts about 4 days with moderate usage, at last! This was the N95’s biggest problem and newer phones seem to have that problem as well. The battery is bigger and heavier (needs a modified battery cover, which is supplied) but the trade off is really worth it.