Battery Log and Amazfit do not work on SFOS 4

@nephros

harbour-batterylog-1.4.0-1.22.1 isn´t availble at the provided link.

I like to test it on XZ2 Compact. Version 1.3.3 gives me negative Values at Energie (-13344 mWh).

Here are all BMS-Values:

[defaultuser@XperiaXZ2Compact bms]$ ls
battery_type charge_full cycle_count_id resistance temp_warm
capacity charge_full_design debug_battery resistance_id time_to_empty_avg
capacity_raw charge_full_raw device soc_reporting_ready time_to_full_avg
cc_soc charge_now full_counter subsystem type
cc_step charge_now_raw learning_counter temp uevent
cc_step_sel constant_charge_voltage monotonic_soc temp_cold voltage_max_design
charge_counter current_now power temp_cool voltage_now
charge_counter_shadow cycle_count recharge_counter temp_hot voltage_ocv
[defaultuser@XperiaXZ2Compact bms]$ cat -n *
1 1310-1071
2 5
3 14
4 -1348272840
5 0
6 0
7 -1349316
8 80832
9 1113000
10 2899000
11 0
12 0
13 -3606823
14 4369879
15 215820
16 1
17 1
18 0
19 0
20 0
21 5
22 0
23 159179
24 336000
25 1
26 317
27 50
28 100
29 550
30 450
31 863
32 25349
33 BMS
34 POWER_SUPPLY_NAME=bms
35 POWER_SUPPLY_CAPACITY=5
36 POWER_SUPPLY_CAPACITY_RAW=14
37 POWER_SUPPLY_TEMP=317
38 POWER_SUPPLY_TEMP_COLD=50
39 POWER_SUPPLY_TEMP_COOL=100
40 POWER_SUPPLY_TEMP_WARM=450
41 POWER_SUPPLY_TEMP_HOT=550
42 POWER_SUPPLY_VOLTAGE_NOW=3677969
43 POWER_SUPPLY_VOLTAGE_OCV=3638433
44 POWER_SUPPLY_CURRENT_NOW=215820
45 POWER_SUPPLY_RESISTANCE_ID=336000
46 POWER_SUPPLY_RESISTANCE=159179
47 POWER_SUPPLY_BATTERY_TYPE=1310-1071
48 POWER_SUPPLY_CHARGE_FULL_DESIGN=2899000
49 POWER_SUPPLY_VOLTAGE_MAX_DESIGN=4380000
50 POWER_SUPPLY_CYCLE_COUNT=1
51 POWER_SUPPLY_CYCLE_COUNT_ID=1
52 POWER_SUPPLY_CHARGE_NOW_RAW=-3606823
53 POWER_SUPPLY_CHARGE_NOW=0
54 POWER_SUPPLY_CHARGE_FULL=1113000
55 POWER_SUPPLY_CHARGE_COUNTER=-1349316
56 POWER_SUPPLY_CHARGE_COUNTER_SHADOW=80832
57 POWER_SUPPLY_TIME_TO_FULL_AVG=25349
58 POWER_SUPPLY_TIME_TO_EMPTY_AVG=863
59 POWER_SUPPLY_SOC_REPORTING_READY=1
60 POWER_SUPPLY_DEBUG_BATTERY=0
61 POWER_SUPPLY_CONSTANT_CHARGE_VOLTAGE=4369879
62 POWER_SUPPLY_CC_STEP=0
63 POWER_SUPPLY_CC_STEP_SEL=0
64 POWER_SUPPLY_CC_SOC=0
65 POWER_SUPPLY_CHARGE_FULL_RAW=0
66 POWER_SUPPLY_LEARNING_COUNTER=0
67 POWER_SUPPLY_RECHARGE_COUNTER=0
68 POWER_SUPPLY_FULL_COUNTER=0
69 POWER_SUPPLY_MONOTONIC_SOC=5
70 4380000
71 3677969
72 3638433

The battery was changed, and while the charge counter was reset correctly, the BMS did not calculate the new real capacity; it only shows the values of the old battery (1113000). It now has 7 complete charge cycles. I discharged it to 0%, which resets the charge cycles back to 1. Maybe this is a bug with this port because it uses alpha software binaries:
( SW_binaries_for_Xperia_Android_10.0.7.1_r1_v12a_tama.img ).