feat: 添加电池和GPS支持,更新配置文件,新增相关脚本和服务
This commit is contained in:
22
battery/init.redroid.battery.sh
Normal file
22
battery/init.redroid.battery.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/vendor/bin/sh
|
||||
|
||||
SRC_PATH=/vendor/etc/init/hw/battery/power_supply
|
||||
DEST_PATH=/data/vendor/battery/power_supply
|
||||
|
||||
copy_files() {
|
||||
if [ -f $DEST_PATH/battery/v ]; then
|
||||
ret=$(cmp -s $SRC_PATH/battery/v $DEST_PATH/battery/v || echo -n 1)
|
||||
if [ "$ret" != "1" ]; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
rm -rf $DEST_PATH
|
||||
cp -r $SRC_PATH $DEST_PATH
|
||||
echo `expr 80 + $RANDOM % 20` > $DEST_PATH/battery/capacity
|
||||
chmod -R 777 $DEST_PATH
|
||||
}
|
||||
|
||||
copy_files
|
||||
|
||||
mount --bind $DEST_PATH /sys/class/power_supply
|
||||
chmod 755 /sys/class/power_supply
|
||||
1
battery/power_supply/battery/capacity
Normal file
1
battery/power_supply/battery/capacity
Normal file
@@ -0,0 +1 @@
|
||||
64
|
||||
1
battery/power_supply/battery/capacity_level
Normal file
1
battery/power_supply/battery/capacity_level
Normal file
@@ -0,0 +1 @@
|
||||
Normal
|
||||
1
battery/power_supply/battery/charge_counter
Normal file
1
battery/power_supply/battery/charge_counter
Normal file
@@ -0,0 +1 @@
|
||||
2926000
|
||||
1
battery/power_supply/battery/charge_full
Normal file
1
battery/power_supply/battery/charge_full
Normal file
@@ -0,0 +1 @@
|
||||
4524000
|
||||
1
battery/power_supply/battery/charge_full_design
Normal file
1
battery/power_supply/battery/charge_full_design
Normal file
@@ -0,0 +1 @@
|
||||
4524000
|
||||
1
battery/power_supply/battery/current_avg
Normal file
1
battery/power_supply/battery/current_avg
Normal file
@@ -0,0 +1 @@
|
||||
-68125
|
||||
1
battery/power_supply/battery/current_max
Normal file
1
battery/power_supply/battery/current_max
Normal file
@@ -0,0 +1 @@
|
||||
3250000
|
||||
1
battery/power_supply/battery/current_now
Normal file
1
battery/power_supply/battery/current_now
Normal file
@@ -0,0 +1 @@
|
||||
3240000
|
||||
1
battery/power_supply/battery/cycle_count
Normal file
1
battery/power_supply/battery/cycle_count
Normal file
@@ -0,0 +1 @@
|
||||
13213213
|
||||
1
battery/power_supply/battery/health
Normal file
1
battery/power_supply/battery/health
Normal file
@@ -0,0 +1 @@
|
||||
Good
|
||||
1
battery/power_supply/battery/online
Normal file
1
battery/power_supply/battery/online
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
1
battery/power_supply/battery/present
Normal file
1
battery/power_supply/battery/present
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
1
battery/power_supply/battery/status
Normal file
1
battery/power_supply/battery/status
Normal file
@@ -0,0 +1 @@
|
||||
Charging
|
||||
1
battery/power_supply/battery/technology
Normal file
1
battery/power_supply/battery/technology
Normal file
@@ -0,0 +1 @@
|
||||
Li-ion
|
||||
1
battery/power_supply/battery/temp
Normal file
1
battery/power_supply/battery/temp
Normal file
@@ -0,0 +1 @@
|
||||
100
|
||||
1
battery/power_supply/battery/time_to_full_now
Normal file
1
battery/power_supply/battery/time_to_full_now
Normal file
@@ -0,0 +1 @@
|
||||
-1
|
||||
1
battery/power_supply/battery/type
Normal file
1
battery/power_supply/battery/type
Normal file
@@ -0,0 +1 @@
|
||||
Battery
|
||||
1
battery/power_supply/battery/v
Normal file
1
battery/power_supply/battery/v
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
1
battery/power_supply/battery/voltage_max
Normal file
1
battery/power_supply/battery/voltage_max
Normal file
@@ -0,0 +1 @@
|
||||
20000000
|
||||
1
battery/power_supply/battery/voltage_min
Normal file
1
battery/power_supply/battery/voltage_min
Normal file
@@ -0,0 +1 @@
|
||||
20000000
|
||||
1
battery/power_supply/battery/voltage_now
Normal file
1
battery/power_supply/battery/voltage_now
Normal file
@@ -0,0 +1 @@
|
||||
20000000
|
||||
1
battery/power_supply/dc/current_max
Normal file
1
battery/power_supply/dc/current_max
Normal file
@@ -0,0 +1 @@
|
||||
687500
|
||||
1
battery/power_supply/dc/current_now
Normal file
1
battery/power_supply/dc/current_now
Normal file
@@ -0,0 +1 @@
|
||||
100000
|
||||
1
battery/power_supply/dc/online
Normal file
1
battery/power_supply/dc/online
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
1
battery/power_supply/dc/type
Normal file
1
battery/power_supply/dc/type
Normal file
@@ -0,0 +1 @@
|
||||
Unknown
|
||||
1
battery/power_supply/dc/voltage_max
Normal file
1
battery/power_supply/dc/voltage_max
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
battery/power_supply/dc/voltage_now
Normal file
1
battery/power_supply/dc/voltage_now
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
battery/power_supply/usb/current_max
Normal file
1
battery/power_supply/usb/current_max
Normal file
@@ -0,0 +1 @@
|
||||
687500
|
||||
1
battery/power_supply/usb/current_now
Normal file
1
battery/power_supply/usb/current_now
Normal file
@@ -0,0 +1 @@
|
||||
100000
|
||||
1
battery/power_supply/usb/online
Normal file
1
battery/power_supply/usb/online
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
1
battery/power_supply/usb/type
Normal file
1
battery/power_supply/usb/type
Normal file
@@ -0,0 +1 @@
|
||||
USB
|
||||
1
battery/power_supply/usb/voltage_max
Normal file
1
battery/power_supply/usb/voltage_max
Normal file
@@ -0,0 +1 @@
|
||||
5000000
|
||||
1
battery/power_supply/usb/voltage_now
Normal file
1
battery/power_supply/usb/voltage_now
Normal file
@@ -0,0 +1 @@
|
||||
4600000
|
||||
Reference in New Issue
Block a user