View Single Post
Posts: 856 | Thanked: 1,681 times | Joined on Apr 2010 @ Aleppo ,Syria
#942
//EDIT
a few posts below
freemangordon did another fix for abc
so this patch is not needed unless you want to remove an installed abc-patch
or if you want to use quality tweaked libgstdsp.so


_____-____-_____

Hello everybody

i have just finished a script that fixes abettercamera issues with 720p

HOWTO:

1- Download the script from here :
http://db.tt/eGCqXzVK
or
http://www.4shared.com/archive/1-XKf...cpatchtar.html

2- place at MyDocs
Code:
sudo gainroot
tar xzvf MyDocs/abcpatch.tar.gz
./karam/patcher.sh
---------------
usages :
patcher.sh pathit : will fix abettercamera by making it launched after replacing the proper codex. and after closing it 720p ones will be replaced instead

patcher.sh patchit100 : the same as the above one but it activates the 100 quality trick with libgstdsp.so with both abettercamera and stock camera

pather.sh unpatchit : will reverse everything and restore to the previous old status (unpatched)
---------------
so
Code:
./karam/patcher.sh patchit
#or
./karam/patcher.sh patchit100
#or
./karam/patcher.sh unpatchit
---------------
NOTE : THAT THIS SCRIPT WILL REPLACE ALL THE NEEDED FILES
IN A RESULT :
DON'T WORRY ABOUT UNINSTALLING ABETTERCAMERA WITHOUT REMOVING THE PATCH
IT WILL TRIGGER THE PROPER COMMANDS TO /var/lib/dpkg/info/abettercamera.prerm SO IT REMOVES IT WHILE REMOVING ABETTERCAMERA
also will restore the default one if you used unpatchit

plus if you used patchit then patchit100 (wanted to switch) there would be no problems as the script will remove that one and install the new one

for those who want to see the script before downloading it's required files
Code:
#!/bin/sh
# a script to patch abettercamera application for making it compatible with 720p patch
# Created by karam.baki <karam.baki@gmail.com>

if [ "$(id -u)" != "0" ]; then
   echo -e "\033[31mYou need to run this script as root.\nPlease become root (e.g. \"sudo gainroot\") before launching this script\033[m"
   exit
fi

if dpkg -l | grep -w abettercamera 1>/dev/null;then

case "$1" in
patchit)
if [ -f /opt/abettercamera/abettercamera_720p ];then
   echo "A Better Camera application is already patched"
else
if [ -f /opt/abettercamera/abettercamera_720p.100 ];then
   echo "Removing 100 quality tuned patch first"
   mv /usr/share/applications/hildon/abettercamera.desktop.bak /usr/share/applications/hildon/abettercamera.desktop
   rm -r /opt/abettercamera/dsp
   rm /opt/abettercamera/abettercamera_720p.100
   rm /etc/sudoers.d/abettercamera.sudoers
   update-sudoers
   mv /opt/abettercamera/backup-dsp/lib/dsp/* /lib/dsp/
   mv /opt/abettercamera/backup-dsp/usr/lib/gstreamer-0.10/libgstdsp.so /usr/lib/gstreamer-0.10/
   mv /opt/abettercamera/backup-dsp/var/lib/dpkg/info/abettercamera.prerm /var/lib/dpkg/info/
   rm -r /opt/abettercamera/backup-dsp
fi
   echo "Installing"
   mkdir -p /opt/abettercamera/backup-dsp/usr/lib/gstreamer-0.10
   cp /usr/lib/gstreamer-0.10/libgstdsp.so /opt/abettercamera/backup-dsp/usr/lib/gstreamer-0.10/
   mkdir -p /opt/abettercamera/backup-dsp/lib/dsp
   cp /lib/dsp/* /opt/abettercamera/backup-dsp/lib/dsp/
   mkdir -p /opt/abettercamera/backup-dsp/var/lib/dpkg/info
   cp /var/lib/dpkg/info/abettercamera.prerm /opt/abettercamera/backup-dsp/var/lib/dpkg/info/
   cp -r abcpatch/dsp /opt/abettercamera/
   cp /usr/share/applications/hildon/abettercamera.desktop /usr/share/applications/hildon/abettercamera.desktop.bak
   cp abcpatch/abettercamera.desktop /usr/share/applications/hildon/
   cp abcpatch/abettercamera.sudoers /etc/sudoers.d/
   cp abcpatch/abettercamera_720p /opt/abettercamera/
   cp abcpatch/abettercamera.prerm /var/lib/dpkg/info/
   update-sudoers
   echo "A Better Camera application is now patched"
fi
;;

patchit100)
if [ -f /opt/abettercamera/abettercamera_720p.100 ];then
   echo "A Better Camera application is already patched"
else
if [ -f /opt/abettercamera/abettercamera_720p ];then
   echo "Removing the normal quality patch first"
   mv /usr/share/applications/hildon/abettercamera.desktop.bak /usr/share/applications/hildon/abettercamera.desktop
   rm -r /opt/abettercamera/dsp
   rm /opt/abettercamera/abettercamera_720p
   rm /etc/sudoers.d/abettercamera.sudoers
   update-sudoers
   mv /opt/abettercamera/backup-dsp/lib/dsp/* /lib/dsp/
   mv /opt/abettercamera/backup-dsp/usr/lib/gstreamer-0.10/libgstdsp.so /usr/lib/gstreamer-0.10/
   mv /opt/abettercamera/backup-dsp/var/lib/dpkg/info/abettercamera.prerm /var/lib/dpkg/info/
   rm -r /opt/abettercamera/backup-dsp
fi
   echo "Installing"
   mkdir -p /opt/abettercamera/backup-dsp/usr/lib/gstreamer-0.10
   cp /usr/lib/gstreamer-0.10/libgstdsp.so /opt/abettercamera/backup-dsp/usr/lib/gstreamer-0.10/
   mkdir -p /opt/abettercamera/backup-dsp/lib/dsp
   cp /lib/dsp/* /opt/abettercamera/backup-dsp/lib/dsp/
   mkdir -p /opt/abettercamera/backup-dsp/var/lib/dpkg/info/
   cp /var/lib/dpkg/info/abettercamera.prerm /opt/abettercamera/backup-dsp/var/lib/dpkg/info/
   cp -r abcpatch/dsp /opt/abettercamera/
   cp abcpatch/libgstdsp.so.100.stock /opt/abettercamera/dsp/stock/usr/lib/gstreamer-0.10/libgstdsp.so
   cp abcpatch/libgstdsp.so.100.720p /opt/abettercamera/dsp/720p/usr/lib/gstreamer-0.10/libgstdsp.so
   cp /usr/share/applications/hildon/abettercamera.desktop /usr/share/applications/hildon/abettercamera.desktop.bak
   cp abcpatch/abettercamera.100.desktop /usr/share/applications/hildon/abettercamera.desktop
   cp abcpatch/abettercamera.100.sudoers /etc/sudoers.d/abettercamera.sudoers
   cp abcpatch/abettercamera_720p.100 /opt/abettercamera/
   cp abcpatch/abettercamera.prerm /var/lib/dpkg/info/
   update-sudoers
   echo "A Better Camera application is now patched with quality tuned to 100"
fi
;;

unpatchit)

if [ -f /opt/abettercamera/abettercamera_720p ];then
   echo "Uninstalling"
   mv /usr/share/applications/hildon/abettercamera.desktop.bak /usr/share/applications/hildon/abettercamera.desktop
   rm -r /opt/abettercamera/dsp
   rm /opt/abettercamera/abettercamera_720p
   rm /etc/sudoers.d/abettercamera.sudoers
   update-sudoers
   mv /opt/abettercamera/backup-dsp/lib/dsp/* /lib/dsp/
   mv /opt/abettercamera/backup-dsp/usr/lib/gstreamer-0.10/libgstdsp.so /usr/lib/gstreamer-0.10/
   mv /opt/abettercamera/backup-dsp/var/lib/dpkg/info/abettercamera.prerm /var/lib/dpkg/info/
   rm -r /opt/abettercamera/backup-dsp
   echo "A Better Camera Patch is no longer installed"
else
if [ -f /opt/abettercamera/abettercamera_720p.100 ];then
   echo "Uninstalling"
   mv /usr/share/applications/hildon/abettercamera.desktop.bak /usr/share/applications/hildon/abettercamera.desktop
   rm -r /opt/abettercamera/dsp
   rm /opt/abettercamera/abettercamera_720p.100
   rm /etc/sudoers.d/abettercamera.sudoers
   update-sudoers
   mv /opt/abettercamera/backup-dsp/lib/dsp/* /lib/dsp/
   mv /opt/abettercamera/backup-dsp/usr/lib/gstreamer-0.10/libgstdsp.so /usr/lib/gstreamer-0.10/
   mv /opt/abettercamera/backup-dsp/var/lib/dpkg/info/abettercamera.prerm /var/lib/dpkg/info/
   rm -r /opt/abettercamera/backup-dsp
   echo "A Better Camera application is no longer installed"
else
   echo "Nothing to do, A Better Camera patch is not installed"
   exit 0
fi
fi
;;

*)
   echo "Usage: patchit.sh {patchit | patchit100 | unpatchit}
This patch fixes A Better Camera application bug and makes it compatible with 720p patch
There is also an option to install a tweaked libgstdsp.so to improve the image quality to 100 instead of 90

patchit    : will patch abettercamera with stock quality
patchit100 : will patch abettercamera with 100 tweaked quality
unpatchit  : will uninstall this patch and restore your default status"
        exit 1
        ;;
esac

exit 0
else
   echo "A Better Camera Application is not installed"
exit 1
fi
Enjoy

thanks to :
freemangordon for the 720p patch
vi_ for bringing up the libgstdsp.so tweak

after doing that
launch abettercamera shortcut normally, and there should be no problems at all

as for libgstdsp tweak it will increase the image quality
also the image size will be increased from ~800 kb to ~1.5 mb

IMPORTANT :
DON'T INSTALL THIS PATCH IF YOU DON'T HAVE 720P PATCH PREINSTALLED
IF YOU DO THAT YOU WILL HAVE PROBLEMS UNTIL YOU REMOVE THE ABCPATCH

Last edited by karam; 2012-04-11 at 20:18.
 

The Following 7 Users Say Thank You to karam For This Useful Post: