Skip to content
Browse files

u8815: add script for determining libcm to be used

This script thanks to a modification to fs/proc/app_info.c links
the correct to /system/lib/ based on which baseband
is being used. This is possible as the baseband can be identified
by what framebuffer memory has been allocated by the bootloader.

This is being done because many people have been suffering from
random reboots on any custom ROM on the 2030 baseband for some
unknown reason, and 109808 works fine. Asking everyone to move
back to the 109808 baseband would be unreasonable and having
to maintain 2 builds for 1 lib is unreasonable too. :P

Thanks kra1o5 for the findings :D
  • Loading branch information
Dazzozo committed Mar 12, 2013
1 parent aeb67c7 commit 20ab3ecf1c68103fd44a2eed7c65199b066619f0
Showing with 29 additions and 0 deletions.
  1. +21 −0 configs/
  2. +1 −0
  3. +7 −0 ramdisk/init.huawei.rc
@@ -0,0 +1,21 @@

# Determined by arch/arm/mach-msm/hardware_self_adapt.c
cat /proc/app_info | grep -A1 "baseband_version:" | grep -q "109808"

mount -o remount,rw /system

if [ -f /system/lib/ ]; then
rm /system/lib/

# Link the correct to /system/lib/ depending on baseband.
if [ $baseband == 0 ]; then
ln -s /system/lib/109808/ /system/lib/
mount -o remount,ro /system
exit 0

ln -s /system/lib/2030/ /system/lib/
mount -o remount,ro /system
@@ -72,6 +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/ \

@@ -137,6 +137,8 @@ on fs
# Imported from init.msm7627a.rc
write /sys/module/block2mtd/parameters/block2mtd /dev/block/mmcblk0p17

start libcm_link

# msm specific files that need to be created on /data
on post-fs-data
mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
@@ -215,6 +217,11 @@ service port-bridge /system/bin/port-bridge /dev/smd0 /dev/ttyGS0
group system inet

service libcm_link /system/bin/sh /system/etc/
user root

on property:ro.baseband="msm"
start port-bridge
# Enable BT-DUN only for all msms

3 comments on commit 20ab3ec


This comment has been minimized.

Copy link
Owner Author

@Dazzozo Dazzozo replied Mar 12, 2013

Oops, it was fefifofum who discovered the libcm stuff. 🌴


This comment has been minimized.

Copy link

@alanorth alanorth replied Mar 12, 2013



This comment has been minimized.

Copy link
Owner Author

@Dazzozo Dazzozo replied Mar 12, 2013

Not CM as in CyanogenMod :p

Please sign in to comment.
You can’t perform that action at this time.