summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Dodd <atd7@cornell.edu>2012-06-04 20:14:35 -0400
committerAndrew Dodd <atd7@cornell.edu>2012-06-05 08:29:43 -0400
commit11c1b208ce307fd02450256c0824902048c090b0 (patch)
tree5b8d39d419b4807900463bed64e017596c4e0f73
parente43069e082ae725b0a318aaf5fe251f2ef1b5311 (diff)
downloaddevice_samsung_n7000-11c1b208ce307fd02450256c0824902048c090b0.tar.gz
device_samsung_n7000-11c1b208ce307fd02450256c0824902048c090b0.tar.bz2
device_samsung_n7000-11c1b208ce307fd02450256c0824902048c090b0.zip
n7000: use AOSP charger
Currently uses codeworkx's artwork from I9100. These are slightly too small for N7000's xHDPI screen, but I don't have codeworkx's art skills. Change-Id: I973b4edf606209f079a1803cd1b8d95805232759
-rwxr-xr-xBoardConfig.mk5
-rw-r--r--lpm.rc81
-rwxr-xr-xn7000.mk5
3 files changed, 39 insertions, 52 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk
index f3c7c8a..d9f6ff6 100755
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -132,6 +132,11 @@ BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_15x24.h\"
TARGET_SPECIFIC_HEADER_PATH := device/samsung/n7000/overlay/include
+# 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/galaxys2/res/charger
+
# assert, galaxynote needs to be removed later
TARGET_OTA_ASSERT_DEVICE := galaxynote,n7000,GT-N7000
diff --git a/lpm.rc b/lpm.rc
index 8b8bed8..755fd2a 100644
--- a/lpm.rc
+++ b/lpm.rc
@@ -6,82 +6,59 @@ on init
export LD_LIBRARY_PATH /vendor/lib:/system/lib
export ANDROID_ROOT /system
export ANDROID_DATA /data
+ export ANDROID_CACHE /cache
export SECONDARY_STORAGE /mnt/emmc
export EXTERNAL_STORAGE /mnt/sdcard
symlink /system/etc /etc
mkdir /mnt 0775 root system
- mkdir /mnt/sdcard 0000 system system
- mkdir /mnt/emmc 0000 system system
- symlink /mnt/sdcard /sdcard
- symlink /mnt/emmc /emmc
- mkdir /preload
mkdir /system
- mkdir /data
- mkdir /cache
- mkdir /efs
mkdir /tmp
- mkdir /dbdata
mkdir /mnt 0775 root root
- mkdir /mnt/.lfs 0775 root root
- #mount /tmp /tmp tmpfs
-on fs
- mount ext4 /dev/block/mmcblk0p9 /system wait ro
- mount ext4 /dev/block/mmcblk0p10 /data nosuid nodev noatime wait
-
- mkdir /data/log 0777
- mkdir /data/anr 0777
- mount ext4 /dev/block/mmcblk0p10 /data remount ro
-
- chmod 0666 /dev/log/radio
- chmod 0666 /dev/log/main
- chmod 0666 /dev/log/event
-
-on post-fs-data
-# insmod kernel modules
-# insmod /lib/modules/j4fs.ko
-# mount j4fs /dev/block/mmcblk0p4 /mnt/.lfs ro
on boot
# CPU Frequency Governor
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor powersave
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor powersave
- 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
+ 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/n7000.mk b/n7000.mk
index 390f30b..46c8e62 100755
--- a/n7000.mk
+++ b/n7000.mk
@@ -72,6 +72,11 @@ PRODUCT_PACKAGES += \
libs5pjpeg \
libfimg
+# Charger
+PRODUCT_PACKAGES += \
+ charger \
+ charger_res_images
+
# MFC API
PRODUCT_PACKAGES += \
libsecmfcapi