Buscar este blog

viernes, 10 de abril de 2015

Conectar a MSSQL desde Linux CentOS 6.5

Desactivar SElinux
instalar apache:
yum install php apr  apr-util apr-util-ldap  httpd httpd-tools mailcap php-cli php-common php-mbstring
yum install epel-release
sino
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6*.rpm

yum install php-pdo php-mssql php-odbc

jueves, 9 de abril de 2015

Comandos para iptables in centos 6

agregar puerto 443 in rackspace
iptables -A INPUT -p tcp -m conntrack --ctstate NEW -m tcp --dport 443 -j ACCEPT

comando para guardar
service iptables save

comando para reinicia
service iptables restart

Comando para cargar un archivo de reglas
iptables-restore file   ó
iptables-restore < file

Comando para guardar
service iptables save ó
iptables-save > file

luego restart

lunes, 30 de marzo de 2015

Custom android driver for devices

CUSTOM MADE DRIVER FOR ANDROID DEVICES ON WINDOWS

You need to modify 3 things in order to make Google USB driver work for any android phone on any Windows:
1-modify android_winusb.inf file.
2- Digitally sign the modified driver
3- modify adb
and here are the details:
1-modify android_winusb.inf
the format to add is:
    ;Comment usually the device name
    %SingleAdbInterface%        = USB_Install, USB\; here you put VID and PID
    %CompositeAdbInterface%        = USB_Install, USB\; same as above but add the MI
before i go on, vid is the usb vendor id; it doesn’t have to be the same for the same Device OEM: for example: MSI gets usb chip in MSI enjoy tablet from a company and usb chip in MSI enjoy plus tablets in another company (rockchip).
How to get the vid and pid : they are in drivers you are merging; but if you don’t have a driver for the device you can get it by opening device manager; then right-click the device – select properties-in new dialog go to Details tab >in property drop menu select hardware ids. for example you see something like:
Image
    USB\VID_2207&PID_0000&REV_0222&MI_01
    USB\VID_2207&PID_0000&MI_01
take this value for composite adb device and remove MI for single adb device, you get
    ;MSI WindPad Enjoy 7 plus
    %SingleAdbInterface%        = USB_Install, USB\VID_2207&PID_0000
    %CompositeAdbInterface%     = USB_Install, USB\VID_2207&PID_0000&REV_0222&MI_01
    ;
copy this 2 line TWICE , once to  [Google.NTx86] section and another to [Google.NTamd64] section
REPEAT for every device you want to support
Now an optional edit for [Strings] Section: edit
    [Strings]
    ProviderName                = “Google, Inc.”
    SingleAdbInterface          = “Android ADB Interface”
    CompositeAdbInterface       = “Android Composite ADB Interface”
    SingleBootLoaderInterface   = “Android Bootloader Interface”
    WinUSB_SvcDesc              = “Android USB Driver”
    DISK_NAME                   = “Android WinUsb installation disk”
    ClassName                   = “Android Device”
To:
    [Strings]
    ProviderName                = “Google, Inc.”
    SingleAdbInterface          = “MSI ADB Interface”
    CompositeAdbInterface       = “MSI Composite ADB Interface”
    SingleBootLoaderInterface   = “MSI Bootloader Interface”
    WinUSB_SvcDesc              = “MSI USB Driver”
    DISK_NAME                   = “MSI WinUsb installation disk”
    ClassName                   = “MSI Tablet”
2- Sign the driver:
Although the original google usb driver was signed by google , modifying android_winusb.inf will prevent installing it on windows 8 showning an error message
Image
    The hash file is not present in the specified catalog file. The file is likely corrupt o the    victim of tampering.
This is only in Windows 8. Windows 7 or earlier do not show this error message. You have to regenerate catalog file (probably with Windows SDK) and sign
Workaround: A workaround for internal tesing is to diable windows signature verification : either temporarily or permanently:
temporarily:
Go to left upper or lower corner of screen to open charms bar and click settings charm.
choose Change PC settings
choose General
Scroll down, and click ‘Restart now’ under ‘Advanced startup’.
Click ‘Troubleshoot’.
Click ‘Advanced Options’
Click ‘Windows Startup Settings’
Click Restart.
or
run cmd
 and type:
shutdown -o -r -t 0
then after restarting choose  ‘Disable driver signature enforcement‘  from the list . install your driver before restarting.
Permanently:
press Window+Q
search for cmd
right click cmd
choose run as administrator from action bar
type in cmd:
    bcdedit -set loadoptions DISABLE_INTEGRITY_CHECKS
    bcdedit -set TESTSIGNING ON
3- modify adb:
a bug in adb make it doesn’t connect to some device vendors. add usb vendor id to it and recompile. modified ad are available:
Workaround:
in the command line:
echo 0x0e79 >> “%USERPROFILE%\.android\adb_usb.ini
this adds the vendor id to a file named adb_usb.ini in the user files
where 0e79 is the usb vendor id