Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
u8815: add script for determining libcm to be used
This script thanks to a modification to fs/proc/app_info.c links the correct libcm.so to /system/lib/libcm.so 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 libcm.so findings :D
- Loading branch information
Daz Jones
committed
Mar 12, 2013
1 parent
aeb67c7
commit 20ab3ec
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/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=$? | ||
|
||
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 | ||
ln -s /system/lib/109808/libcm.so /system/lib/libcm.so | ||
mount -o remount,ro /system | ||
exit 0 | ||
fi | ||
|
||
ln -s /system/lib/2030/libcm.so /system/lib/libcm.so | ||
mount -o remount,ro /system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20ab3ec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, it was fefifofum who discovered the libcm stuff. 🌴
20ab3ec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libcm?!
20ab3ec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not CM as in CyanogenMod :p