From 1c973d04cd4d7725231445bfe6cac09e234f1212 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Thu, 4 Jul 2013 19:05:59 +0200 Subject: Use charger for lpm, with optimized graphics Signed-off-by: Paul Kocialkowski --- BoardConfig.mk | 1 + galaxys3_base.mk | 10 +- lpm.rc | 78 +- res/charger/LICENSE | 2 + res/charger/battery_0.png | Bin 0 -> 6746 bytes res/charger/battery_1.png | Bin 0 -> 6731 bytes res/charger/battery_2.png | Bin 0 -> 6733 bytes res/charger/battery_3.png | Bin 0 -> 6731 bytes res/charger/battery_4.png | Bin 0 -> 6729 bytes res/charger/battery_5.png | Bin 0 -> 6663 bytes res/charger/battery_charge.png | Bin 0 -> 9146 bytes res/charger/battery_fail.png | Bin 0 -> 9297 bytes res/charger/charger.svg | 2418 ++++++++++++++++++++++++++++++++++++++++ 13 files changed, 2459 insertions(+), 50 deletions(-) create mode 100644 res/charger/LICENSE create mode 100644 res/charger/battery_0.png create mode 100644 res/charger/battery_1.png create mode 100644 res/charger/battery_2.png create mode 100644 res/charger/battery_3.png create mode 100644 res/charger/battery_4.png create mode 100644 res/charger/battery_5.png create mode 100644 res/charger/battery_charge.png create mode 100644 res/charger/battery_fail.png create mode 100644 res/charger/charger.svg diff --git a/BoardConfig.mk b/BoardConfig.mk index 55e36d4..4e82411 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -142,6 +142,7 @@ BOARD_HAS_NO_SELECT_BUTTON := true # Charging mode BOARD_CHARGING_MODE_BOOTING_LPM := /sys/class/power_supply/battery/batt_lp_charging BOARD_BATTERY_DEVICE_NAME := "battery" +BOARD_CHARGER_RES := device/samsung/i9300/res/charger # assert TARGET_OTA_ASSERT_DEVICE := m0,i9300,GT-I9300 diff --git a/galaxys3_base.mk b/galaxys3_base.mk index 187686c..d6de70a 100644 --- a/galaxys3_base.mk +++ b/galaxys3_base.mk @@ -108,12 +108,18 @@ PRODUCT_COPY_FILES += \ # RIL PRODUCT_PACKAGES += \ - libsamsung-ril \ - ipc-modemctrl + libsamsung-ril \ + ipc-modemctrl PRODUCT_PROPERTY_OVERRIDES += \ mobiledata.interfaces=pdp0,wlan0,gprs,ppp0 +# Charger +PRODUCT_PACKAGES += \ + charger \ + charger_res_images + + # Filesystem management tools PRODUCT_PACKAGES += \ static_busybox \ diff --git a/lpm.rc b/lpm.rc index 2a94492..95e1e98 100644 --- a/lpm.rc +++ b/lpm.rc @@ -6,73 +6,55 @@ on init export LD_LIBRARY_PATH /vendor/lib:/system/lib export ANDROID_ROOT /system export ANDROID_DATA /data - export EXTERNAL_STORAGE /sdcard + export ANDROID_CACHE /cache + export SECONDARY_STORAGE /mnt/emmc + export EXTERNAL_STORAGE /mnt/sdcard symlink /system/etc /etc + mkdir /mnt 0775 root system - mkdir /sdcard - mkdir /preload mkdir /system - mkdir /data - mkdir /cache - mkdir /efs mkdir /tmp - mkdir /dbdata mkdir /mnt 0775 root root - #mount /tmp /tmp tmpfs - -on early-fs - mount ext4 /dev/block/mmcblk0p9 /system ro wait noatime - mount ext4 /dev/block/mmcblk0p12 /data wait nosuid nodev noatime discard,noauto_da_alloc,journal_async_commit - - mkdir /data/log 0777 - chmod 0666 /dev/log/radio - chmod 0666 /dev/log/main - chmod 0666 /dev/log/event on boot -# write /sys/class/sec/switch/usb_sel PDA - -# CPU Frequency Governor - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor pegasusq - -# EHCI runtime enable for LPA - write /sys/devices/platform/s5p-ehci/power/control auto + ifup lo + hostname localhost + domainname localdomain - ifup lo - hostname localhost - domainname localdomain - - class_start default - -service debuggerd /system/bin/debuggerd + class_start default service ueventd /sbin/ueventd + class core critical service console /system/bin/sh + class core console -service playlpm /system/bin/playlpm - user root - -service immvibed /system/bin/immvibed - oneshot - -service lpmkey /system/bin/lpmkey - user root - -# adbd is controlled by the persist.service.adb.enable system property service adbd /sbin/adbd disabled -# adbd on at boot in emulator -on property:ro.kernel.qemu=1 - start adbd +service charger /charger + class default + user root -on property:persist.service.adb.enable=1 +# Always start adbd on userdebug and eng builds +# In recovery, always run adbd as root. +on property:ro.debuggable=1 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 6860 + write /sys/class/android_usb/android0/functions adb + write /sys/class/android_usb/android0/enable 1 + write /sys/class/android_usb/android0/iManufacturer $ro.product.manufacturer + write /sys/class/android_usb/android0/iProduct $ro.product.model + write /sys/class/android_usb/android0/iSerial $ro.serialno start adbd + setprop service.adb.root 1 -on property:persist.service.adb.enable=0 - stop adbd - +# Restart adbd so it can run as root +on property:service.adb.root=1 + write /sys/class/android_usb/android0/enable 0 + restart adbd + write /sys/class/android_usb/android0/enable 1 diff --git a/res/charger/LICENSE b/res/charger/LICENSE new file mode 100644 index 0000000..732945d --- /dev/null +++ b/res/charger/LICENSE @@ -0,0 +1,2 @@ +Copyright: Copyright (C) 2012-2013 Paul Kocialkowski +License: Creative Commons BY-SA 3.0 diff --git a/res/charger/battery_0.png b/res/charger/battery_0.png new file mode 100644 index 0000000..a204975 Binary files /dev/null and b/res/charger/battery_0.png differ diff --git a/res/charger/battery_1.png b/res/charger/battery_1.png new file mode 100644 index 0000000..659f30c Binary files /dev/null and b/res/charger/battery_1.png differ diff --git a/res/charger/battery_2.png b/res/charger/battery_2.png new file mode 100644 index 0000000..c6f9da1 Binary files /dev/null and b/res/charger/battery_2.png differ diff --git a/res/charger/battery_3.png b/res/charger/battery_3.png new file mode 100644 index 0000000..4dbdc22 Binary files /dev/null and b/res/charger/battery_3.png differ diff --git a/res/charger/battery_4.png b/res/charger/battery_4.png new file mode 100644 index 0000000..3af128a Binary files /dev/null and b/res/charger/battery_4.png differ diff --git a/res/charger/battery_5.png b/res/charger/battery_5.png new file mode 100644 index 0000000..45f83d1 Binary files /dev/null and b/res/charger/battery_5.png differ diff --git a/res/charger/battery_charge.png b/res/charger/battery_charge.png new file mode 100644 index 0000000..fa1657f Binary files /dev/null and b/res/charger/battery_charge.png differ diff --git a/res/charger/battery_fail.png b/res/charger/battery_fail.png new file mode 100644 index 0000000..5f0bbe5 Binary files /dev/null and b/res/charger/battery_fail.png differ diff --git a/res/charger/charger.svg b/res/charger/charger.svg new file mode 100644 index 0000000..6196388 --- /dev/null +++ b/res/charger/charger.svg @@ -0,0 +1,2418 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + ? + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.1