Samsung Galaxy S4 – IPv6 borked….

I have been running around trying to figure out why my Samsung Galaxy S4 (Android 4.3) seems to lose its IPv6 prefix when it has been sleeping for a while. At first I blamed my edge CPE device, as I had rebuilt a OpenWRT recently and switched from WIDE-DHCPv6+RADVD to 6relayd.  And I had never noticed if the previous implementation had this issue or not.

Symptoms:  If I leave the device idle for a certain amount of time (which apparently would be longer than the preferred life of the prefix), when I open the browser I note that v6-sites are not reachable until my router sends an unsolicited RA.   I installed some free apps such as MyIPv6 and Network Info ii and although all seemed normal during phone use, after a certain time the prefixes would be non-functional, and would even not appear in these apps as existing, until the next RA sent by the router and all would resume correctly.

As well, if for whatever reason the prefix received by prefix delegation changes, an idle device (read: screen off….) will only learn of the new prefix once the route sends an RA containing that new prefix.


Out of desperation I started googling and apparently I am not alone:

I especially liked the comment from the Samsung developers:

OK, well I tested this, as did the reporter of this issue.  Simply locking the phone (turning off the screen), with an ICMP ping to the IPv4 and IPv6 addresses respectively.  The IPv6 address of my phone ceases to reply to ICMP echo requests when I turn off the screen (as expected) –  YET IPv4 REQUESTS ARE NOT IGNORED and replies are sent by the GS4!   So what gives, Samsung devops?  This is with or without the power saving features enabled.  I don’t believe this cockamamie notion about  running down batteries – its either laziness, incompetence or an outright dismissal of a bug.

And frankly, I wouldn’t really care if ICMP echo/echo-reply data was discarded, however ND, RA and other critical v6 traffic shouldn’t be.  Or, at the very least, send a solicited RA or reset the IPv6 stack entirely, because when the phone wakes from sleep or is unlocked, the IPv6 stack is broken up until a router sends an RA.  And in my case, 6relayd seems to send one every 7 minutes or so, with a randomized +/- interval of a few seconds.  And some networks I have connected to send RAs every hour, not every few seconds, since IPv6 protocols allow for address assignment to occur without RAs….So it could be a long wait!  And even if a network sends an unsolicited-RA every 30 seconds, that is 30 seconds where your connectivity is v4-only when you benefit from a dual-stacked environment.  Not very modern-ish behaviour by a so-called industry leader!

I hate to admit it, but I tested iPhone4, 4S, 5 and iPad mini as well as Windows XP/7, and they all behave correctly when woken from whatever state they were in post-prefix-expiry.  I will be borrowing some other Android devices as I can get my hands on them to compare results.  But as of now I don’t have a very high regard for Samsung’s IPv6 implementation!


Samsung coders need to get a clue!  “End users can connect to networks continually by IPv4” is not an acceptable answer.  As IPv6 grows in popularity and necessity, that is a pretty bone-headed opinion.  Need I point out that at the time of this writing, that forum post is less than 6 months old!


Lenovo Ideapad K1 – AOSP Ice Cream Sandwich 4.0.4 goodness (keeping your apps!)

Back around January 2012 I picked up a cheap Android tablet, a Lenovo Ideapad K1.  I didn’t really see the point of having a tablet, to be frank, but I figured I might as well get a cheap one to tinker with.  Its a glorified Kindle really 🙂    In any case, I did do a bit of shopping to get something I had hopes would not be EOL right away.  I should have known that if it was 329$ at Futureshop, something was up…..anyway…

I had done some reading and at that time in 2012, Lenovo was promising an upgrade to ICS (I would link to that site however Lenovo was smart enough to destroy the online presence of those claims!) so I figured I would be covered for future functionality.

Well in June 2012, Lenovo discontinued the K1, so my 32GB tablet seemed stuck with Honeycomb 3.1.x.  That was until a sometimes whiny thread on the Lenovo support forum coaxed Lenovo into releasing a “vanilla” version of ICS.  This release however, does not include any of the Lenovo apps or customizations, and more importantly, has no Google Play or anything else to make installing more apps other than by copying them with the USB cable.  Yuck!

The vanilla release by Lenovo was useless to the K1 userbase, yet it likely paved the way for a number of alternatives, fathered by the now notorious Khanning88.   With apparently the blessing of Lenovo, he greatly contributed to the release of a Vanilla ICS for the K1 with GooglePlay, as well as my ROM of choice, an AOSP 4.0.4 version that installed flawlessly.  There are a few minor issues (auto brightness seems broken and a few other cosmetics) but overall I am happy with ICS 4.0.4.  It is certainly faster than the Lenovo HC, and the WiFi doesn’t freeze up like it used to in HC3.1.  Score!

Now my significant other was quite alarmed to learn that her precious Battleship clone game “Warships” was no longer on the tablet since the Khanning88 version as well as the vanilla ICS provided by Lenovo did not include the apps and customizations.  Luckily I was able to find a Lenovo honeycomb stock version for the K1.  I downloaded the .zip file and unzipped it, copying the userdata.img file to a Linux machine.  At that point, it is possible to mount the .img and copy the .ipk apps from it!!!   Like so;

[root@panel K1]# unzip
  inflating: flash-windows.bat
  inflating: files/flash.cfg
  inflating: files/userdata.img
  inflating: files/android-info.txt
  inflating: files/blob
  inflating: files/bootloader.bin
  inflating: files/flash.bct
  inflating: files/flash.cfg~
  inflating: files/flash_fuse.cfg
  inflating: files/libnv3p.dll
  inflating: files/libnvaes_ref.dll
  inflating: files/libnvapputil.dll
  inflating: files/libnvboothost.dll
  inflating: files/libnvdioconverter.dll
  inflating: files/libnvflash.dll
  inflating: files/libnvos.dll
  inflating: files/libnvusbhost.dll
  inflating: files/nvflash
  inflating: files/nvflash.exe
  inflating: files/ramdisk.img
  inflating: files/README.txt
  inflating: files/boot.img
  inflating: files/recovery.img
  inflating: files/system.img
   creating: files/backup/

[root@panel K1]# cd files
[root@panel files]# mount -o loop userdata.img /mnt
[root@panel files]# cd /mnt
[root@panel mnt]# cd app
[root@panel app]# ls -al
total 524604
drwxr-xr-x 2 root root      4096 Mar 21 19:39 .
drwxr-xr-x 3 root root      4096 Dec 31  1969 ..
-rw-r--r-- 1 root root  49054253 Jan 10  2012 01-Accuweather.apk
-rw-r--r-- 1 root root   1672560 Jan 10  2012 02-amazonmp.apk
-rw-r--r-- 1 root root  16205288 Jan 10  2012 03-AngryBirdsHD.apk
-rw-r--r-- 1 root root  23426456 Jan 10  2012 04-BackgammonLenovo.apk
-rw-r--r-- 1 root root  41814965 Jan 10  2012 06-DP30Lenovo.apk
-rw-r--r-- 1 root root   5670102 Jan 10  2012 07-DTGFull.apk
-rw-r--r-- 1 root root   1888591 Jan 10  2012 08-ebuddy.apk
-rw-r--r-- 1 root root  23297425 Jan 10  2012 09-EuchreLenovo.apk
-rw-r--r-- 1 root root    799746 Jan 10  2012 10-FileBrowser.apk
-rw-r--r-- 1 root root   4038616 Jan 10  2012 11-GOF2Lenovo.apk
-rw-r--r-- 1 root root  23373538 Jan 10  2012 12-HeartsLenovo.apk
-rw-r--r-- 1 root root   4915710 Jan 10  2012 13-Kindle.apk
-rw-r--r-- 1 root root    933775 Jan 10  2012 14-KongregateArcade.apk
-rw-r--r-- 1 root root  12479897 Jan 10  2012 15-LenovoIME.apk
-rw-r--r-- 1 root root    423102 Jan 10  2012 18-mSpotMovie.apk
-rw-r--r-- 1 root root   1786115 Jan 10  2012 19-MobileSecurity-24.apk
-rw-r--r-- 1 root root    657252 Jan 10  2012 20-mSpotMusic.apk
-rw-r--r-- 1 root root   3691126 Jan 10  2012 21-ooVoo.apk
-rw-r--r-- 1 root root    355690 Jan 10  2012 22-PokeTALK.apk
-rw-r--r-- 1 root root   1205274 Jan 10  2012 23-PrinterShare.apk
-rw-r--r-- 1 root root   1298896 Jan 10  2012 24-slackerradio.apk
-rw-r--r-- 1 root root  24607966 Jan 10  2012 25-SolitaireLenovo.apk
-rw-r--r-- 1 root root  26826532 Jan 10  2012 26-TalkingTomFree.apk
-rw-r--r-- 1 root root   2420289 Jan 10  2012 27-VendettaOnline.apk
-rw-r--r-- 1 root root   7036976 Jan 10  2012 28-VortexHD.apk
-rw-r--r-- 1 root root 102670289 Jan 10  2012 29-NFSShift.apk
-rw-r--r-- 1 root root  23416563 Jan 10  2012 30-SpadesLenovo.apk
-rw-r--r-- 1 root root   4426679 Jan 10  2012 31-flash10-android.apk
-rw-r--r-- 1 root root  11986764 Jan 10  2012 32-warships.apk
-rw-r--r-- 1 root root  51858089 Jan 10  2012 35-UserHelp.apk
-rw-r--r-- 1 root root   7390418 Jan 10  2012 36-Netflix.apk
-rw-r--r-- 1 root root  14505602 Jan 10  2012 A01-eReader.apk
-rw-r--r-- 1 root root   6753383 Jan 10  2012 A02-mediagallery.apk
-rw-r--r-- 1 root root   4242141 Jan 10  2012 A03-music.apk
-rw-r--r-- 1 root root   1786831 Jan 10  2012 A04-musicserver.apk
-rw-r--r-- 1 root root   3038175 Jan 10  2012 A05-VideoPlayer.apk
-rw-r--r-- 1 root root   4675181 Jan 10  2012 A06-MovieStory.apk
-rw-r--r-- 1 root root   4415718 Jan 10  2012 A07-ArcWorkshop4.6.apk
-rw-r--r-- 1 root root   8401969 Jan 10  2012 A08-PSP.apk
-rw-r--r-- 1 root root   3482357 Jan 10  2012 A09-ArcSyncForLenovo.apk
-rw-r--r-- 1 root root   3210094 Jan 10  2012 A10-FaceService.apk
-rw-r--r-- 1 root root    473935 Jan 10  2012 A11-SMService.apk
-rw-r--r-- 1 root root    482779 Jan 10  2012 A12-DRMPlayer.apk


Voila!!!!   the precious “32-warships.apk” is recovered.  I downloaded Astro File Manager , copied the files to the K1, and tapped them in Astro.  Click install and I can now enjoy my AOSP ICS, and my significant other can keep playing her games.