Skip to content

Commit

Permalink
u8815: tweaks to make me feel better
Browse files Browse the repository at this point in the history
  • Loading branch information
Daz Jones committed Mar 12, 2013
1 parent 20ab3ec commit 5fe3408
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions configs/baseband.sh → configs/libcm.sh
@@ -1,17 +1,18 @@
#!/system/bin/sh

# Determined by arch/arm/mach-msm/hardware_self_adapt.c
cat /proc/app_info | grep -A1 "baseband_version:" | grep -q "109808"
baseband=$?
cat /proc/app_info | grep -A1 "framebuffer_boosted:" | grep -q "1"
boosted=$?

mount -o remount,rw /system

if [ -f /system/lib/libcm.so ]; then
rm /system/lib/libcm.so
fi

# Link the correct libcm.so to /system/lib/libcm.so depending on baseband.
if [ $baseband == 0 ]; then
# Link the correct libcm.so to /system/lib/libcm.so depending on framebuffer memory
# (which can be used to determine the baseband early on).
if [ $boosted == 0 ]; then
ln -s /system/lib/109808/libcm.so /system/lib/libcm.so
mount -o remount,ro /system
exit 0
Expand Down
2 changes: 1 addition & 1 deletion device.mk
Expand Up @@ -72,7 +72,7 @@ PRODUCT_COPY_FILES += \
device/huawei/u8815/configs/AutoVolumeControl.txt:system/etc/AutoVolumeControl.txt \
device/huawei/u8815/configs/media_codecs.xml:system/etc/media_codecs.xml \
device/huawei/u8815/configs/media_profiles.xml:system/etc/media_profiles.xml \
device/huawei/u8815/configs/baseband.sh:system/etc/baseband.sh \
device/huawei/u8815/configs/libcm.sh:system/etc/libcm.sh \
device/huawei/u8815/configs/vold.fstab:system/etc/vold.fstab

PRODUCT_COPY_FILES += \
Expand Down
2 changes: 1 addition & 1 deletion ramdisk/init.huawei.rc
Expand Up @@ -217,7 +217,7 @@ service port-bridge /system/bin/port-bridge /dev/smd0 /dev/ttyGS0
group system inet
disabled

service libcm_link /system/bin/sh /system/etc/baseband.sh
service libcm_link /system/bin/sh /system/etc/libcm.sh
user root
disabled
oneshot
Expand Down

0 comments on commit 5fe3408

Please sign in to comment.