So I bought another one for my wife, this time I had to make the upgrade myself. It was not straightforward:
The first nubia used as recovery TWRP 3.0.2-0, the other is with clockwork-mod (v220.127.116.11).
- I had to resize the big "grow" partition manually, i.e. merge it with "userdata".
- suddenly I saw disconnections of Wifi, and that was due to the same MAC address of the 2 nubias.
So I searched for a solution to tune the MAC address. I found the hint on Intf0MacAddress in WCNSS_qcom_cfg.ini. But it did not work.
/data/misc/wifi/WCNSS_qcom_cfg.ini nor /system/etc/wifi/WCNSS_qcom_cfg.ini
echo 98:6c:f5:63:ec:d0 > /sys/devices/fb000000.qcom,wcnss-wlan/wcnss_mac_addrwhile in airplane mode.
In the end I found /persist/WCNSS_qcom_cfg.ini which indeed works, and overrides the other 2 files.
ANDROID_SERIAL to distinguish them?To have them accessible via adb at the same time, I need to distinguish by this serial number, which is unfortunately identical. For now I overwrite the kernel cmdline in img_info with "androidboot.serialno=XXX"
After receiving some (whatsapp) calls, I noticed it was almost impossible to get the screen back on, as expected.
So, as a workaround I turned off in Phone> Settings> Accessibility> Use proximity sensor.
But Whatsapp does not seem to have this option.
So I installed Sensors test and some app to "reset/calibrate" but to no effect.
So I started to look for the kernel driver, to fix a possible bug. There are confusingly multiple kernel sources on github:
The 3rd is the one used on Mokee (my fixes in https://github.com/mmaruska/android_kernel_nubia_nx507j). The other ones fail when (Android) "init" configures (selinux) sepolicy.
Btw. failures of the other kernels can be seen thanks to android ram-console: after the failure, the phone reboots to recovery and
adb shell cat /proc/last_kmsg
shows the problem.
In the end the problems is only the calibration, so
echo 500 > prox_threshold_low
fixes the issue. To see this value, I did:
echo 1 > prox_debug
and "dmesg -c" while running the sensor test app, to see:
[43580.286869] [SENSOR_ALS_PROX] [taos_prox_threshold_set: 2338] proxdata = 396
calendar/alarm database -- crash when entering the Alarm app:
android.database.sqlite.SQLiteException: Can't downgrade database from version 12 to 8
I removed the relevant file.
SystemUI crash due to wallpaper using too big image
java.lang.RuntimeException: Canvas: trying to draw too large(143769600bytes) bitmap.
AppCrashReceiver: com.android.systemui stopped unexpectedly...
My improvements (divided into feature-segments) https://github.com/mmaruska/android_kernel_nubia_nx507j/network