Sunday, 16 April 2017

Resurrection of a Lenovo Ideapad K1: to neon or not to neon

In my previous post here I discussed my struggle with flashing my wife’s Lenovo Ideapad K1. And in the end I had to conclude that I could not conclude that I have bad flash or bad memory. This all was interesting, but not so helpful to get the tablet back to usable again.

When I install my images:
  • First: CM10.1_Wifi_Kaschemme_v1 or K1_CM10_JB_Starter_v2 with the nvflash tool.
  • Second: or with the recovery firmware CWM6.0.x.x.
I don't have any problems. The problems start after installing the gapps that are missing in these CyanogenMod android 4.1 / 4.2 images.  I use for that the file

I did a bit more research on my problems. There are a few elements to my "not working" tablet which helped me to narrow down the issue:
  • Messages that various google services have stopped or are not working any more.
  • Programs like youtube that not start or google play that gives [RH01] errors.
  • Logfile that gets filled with SIGILL errors and register dumps.
The last symptom  helped me most. After some time spend with google search I started to understand that I am hitting here an essential Tegra 2 vs Android 3.2+ issue.

The Tegra 2 T20 was at the time a relative advanced dual core Cortex A9 processor with a very good GPU so that it could do video decoding and encoding in the GPU. The Arm part is good but the GPU was the more advanced Nvidia item. A bit similar situation like the BCM2835 SoC processor of the Raspberry pi. Only is this not an ARMv6 but real ARMv7-A architecture, but to reduce some costs/complexity they have not implemented all the typical Cortex-A9 functions like the Advanced SIMD (NEON) extension. Probably Nvidia expected not to need this because the GPU could do the multimedia power lifting much better. From Tegra 3 Nvidia starts to support the full "instruction set".

The SIGILL error happens when a program is trying to execute a NEON instruction on a not NEON processor.  In the past, older than Android 4.1, was the assumption that most processors were ARMv5 and did programs not use NEON instructions, also not for AMRv7A.  In the SDK was it also explicitly asked for to have libraries for ARMv5 and ARMv7A with and without NEON or other extensions.

The issue I now have in 2017 looks to be two fold:
  • Google started to ship APK packages optimized for NEON, maybe on purpose, maybe by accident or maybe the compiler starts to optimize more/better in this direction.
  • For higher android versions is NEON compatibility of the ARMv7A architecture assumed.
This means that when a newer Android is installed on a tegra 2 platform we will hit the lack of NEON support. The program or parts of it will crash when there are no backup libraries for NEON emulation. All the google service packages and programs such as the google play, youtube etc. have this (potential) problem. My issue is that this "newer" is already by the Android 4.2 from the CM10 images and that the gapps package is pulling in a lot of newer versions of the libraries to support certain API's to talk back to Google and the Android universe.

It must be possible to keep and skip to the correct versions of the google apps to keep them working. However that is not so easy. There is always the danger that a new installed app is bringing the system down.

At this moment I see as only option to stay at android 3.2 and not to update too much. I have installed the old not rooted official Lenovo image: and with that older outdated version is for the last hours youtube and the web browser working.

Case closed: a working tablet with obsolete Android 3.2 and an odd ball ARM device in my collection.

A side note: this tablet went obsolete in early 2012 and therefore there are still some people working on it up to late 2013. There are quite some messages in the XDA and Lenove forums from that time, but nowadays are all links in the posts to file sharing servers dead. It is very difficult to find various images back. Therefore it is not really possible to have a long life on this kind devices in terms of (software) support. The PC is in that way a much durable concept.

Short update: Improved Android 3.2.1 image

I searched a bit longer and found here the following thread with a better Android 3.2.1. image for this tablet. This image has the following improvements:
  • Newer version of the root file system: 14_14_120109 build
  • Recovery image / bootloader
  • No levono market and other not working apps
  • Rooted
The original image name is: but it can also be found as

1 comment:

Chemo said...

I kept getting boot loops with any ROM
I flashed several until I could no longer flash any due to a 2 BCT error
Some people have encountered this issue and have fixed it with
Googling lead me here, tried, same result
Here is what happens every time:

Flashing ICS Stock Rom for Lenovo Ideapad K1

build 120607

Nvflash v1.8.90246 started
Using blob v1.1.57813Drive=═á▄Sâr
rcm version 0X20001
System Information:
chip name: t20
chip id: 0x20 major: 1 minor: 4
chip sku: 0x8
chip uid: 0x0428018043c12497
macrovision: disabled
hdcp: enabled
sbk burned: true
dk burned: true
boot device: emmc
operating mode: 4
device config strap: 0
device config fuse: 0
sdram config strap: 1

sending file: flash.bct
- 4080/4080 bytes sent
flash.bct sent successfully
odm data: 0x300c0011
downloading bootloader -- load address: 0x108000 entry point: 0x108000
sending file: bootloader.bin
\ 1393296/1393296 bytes sent
bootloader.bin sent successfully
waiting for bootloader to initialize
bootloader downloaded successfully
setting device: 2 3
creating partition: BCT
creating partition: PT
creating partition: EBT
creating partition: GP1
creating partition: SOS
creating partition: LNX
creating partition: APP
creating partition: CAC
creating partition: MSC
creating partition: USP
creating partition: UDA
creating partition: TMP
creating partition: GPT
Formatting partition 2 BCT please wait.. FAILED!
command failure: create failed (bad data)
bootloader status: specified partition is invalid or does not exist (code: 7) message: nverror:0x42008 (0x6042008) flags: 0

Any idea why this could be happening?