Information and Communications Technology

Xenserver 7.0 API PowerShell Backup Running VMs

The script backups one or more virtual machines on one or more Xenserver hosts. The configuration of virtual machine to backup is read from an xml file.
This is the gist on github:

## SNAPUUID=`xe vm-snapshot uuid=$VMUUID new-name-label="SNAPSHOT-$VMUUID-$DATE"`
## xe template-param-set is-a-template=false ha-always-run=false uuid=${SNAPUUID}
## xe vm-export vm=${SNAPUUID} filename="$BACKUPPATH/$VMNAME-$DATE.xva"
## xe vm-uninstall uuid=${SNAPUUID} force=true
Import-Module XenServerPSModule
Connect-XenServer -url https://$XENHOST $XENUSER $XENPASSWORD
#Create temporary snapshot for hot backup (choose unique name for snapshot)
Invoke-XenVM -Name "Xenial Test" -XenAction Snapshot -NewName "Xenial Test Snapshot"
$snapshot = Get-XenVM -Name "Xenial Test Snapshot"
#Set is-a-template and ha-always-run to false
Set-XenVM -Uuid $snapshot.uuid -IsATemplate $false -HaAlwaysRun $false
#Export snapshot (path is on the server where this script runs)
Export-XenVM -Uuid $snapshot.uuid -XenHost $XENHOST -Path 'C:\Users\Administrator\Documents\Xenial Test.xva'
#Destroy Snapshot
Remove-XenVM -Uuid $snapshot.uuid
Information and Communications Technology

Windows Update Automatic Download, Install, Reboot and repeat (reboot and recall)

With this scheduled task you can install all windows updates without user intervention. The reboot is automatic until all updates are installed.
Download the three files on the following gist. The files must be copied in the folder C:\WUA:

  • C:\WUA\WUA_SearchDownloadInstall.vbs
  • C:\WUA\WUA_SearchDownloadInstall.bat
  • C:\WUA\WUA_SearchDownloadInstall.xml

After copying these three files open the task scheduler and import the WUA_SearchDownloadInstall.xml file. At the next reboot the task will start the update process and will reboot the pc many times until all updates are installed.
IMPORTANT: Remember to disable or delete the task when finished.

Information and Communications Technology

Windows 7 Recovering RegBack Scheduled Task

If you want to recover the task that backups the registry of windows 7. You must import this file in the Task Scheduler (save as xml and import):

<Task xmlns="">
 <Principal id="LocalSystem">
 <Actions Context="LocalSystem ">
Information and Communications Technology

Samsung Grand 2 G7102 updating to android 4.4.2 and replacing touch emergency calls only

Hello, yesterday i replaced the touch screen to my Galaxy Grand 2. It has android version 4.3 and after replacing the touch screen all was working.
So, after replacing touch screen i decided to update android to version 4.4.2. After updating the phone didn’t boot anymore. It hangs on boot with the blue text on top of the display “RECOVERY BOOTING…..”.
The problem was the touch screen. Detaching the touch screen the phone boots correctly to android 4.4.2. (this touch screen had no duos logo, another touch screen with the duos logo works perfectly)
Now another problem, with android 4.4.2 insering the sim card the phone says: Emergency calls only. This is a problem with modem.bin image. It has to be updated with odin 3.07 using the PHONE button. You have to download the modem.bin for android 4.4. You can find it on the internet, for example from here:
After updating the modem.bin with odin 3.07 the network works correctly.
(Use odin 3.07 because newer versions have no PHONE button)

Information and Communications Technology

[Android] Automatic brightness without sensor using front camera

I have a Samsung Grand Neo Plus. That phone misses the brightness sensor but has the front facing camera.
Using Lux Lite (the free version) or Lux (the full version) application it’s possible to configure the front facing camera as brightness sensor.
After installing it, the application uses the light conditions captured from the front camera to change the phone brightness. I set the brightness update on unlocking.
Another useful thing is the possibility to increase the brightness shaking the phone. In Settings >> Brightness >> Shake to increase brightness. It works being in the lock screen.
If the brightness is too high or low it’s possible to customize the regulations opening the application, modifying the brightness and clicking on the chains symbol to link the ambient light values to the display brightness.
For my Grand Neo Plus I linked the following values:

Luma Brightness
0 1%
1 4%
75 25%
194 35%
253 100%
255 100%
Information and Communications Technology

Android 5 Lollipop Enable Mobile Data with Llamalab Automate

Using Automate on a rooted Galaxy S4 with Lollipop 5.0.1 i was in trouble enabling or disabling mobile data. My android is rooted correctly but automate give me a timeout error.
To enable/disable mobile data i used a shell superuser command action block with one of these commands:

svc data enable
svc data disable
Information and Communications Technology

Reset/Restore Glam'our START boot hangs

I found an android phone of the Glam’our brand, the START model hanging on boot with the Glam’our logo unable to boot. The phone was rooted and with link2sd plus installed and with most of the applications linked to sd.
I tryed resetting it to factory defaults. I found no documentation about that. I supposed that it can be done in recovery mode, but how? Going to recovery mode it’s possible, but the steps are not so clear. At the end i realized it. Well, i did this way: i turned off the phone (removing the battery) and i turned it on pressing at the same time the buttons: VOL- and POWER until it shows up this menù in CHINESE!Glam Our Start Recovery
To reset the phone we need to select (with VOL-) the item containing “e MMC” after some chinese characters. Then i confirmed the choice with POWER and when the text changed to “data e MMC”, or something similar, i confirmed again with the POWER button. After a while the phone will reset and reboot.
At this point the phone will turn on correctly to the lock screen. After unlocking it and selecting the default SIM behaviour, the phone shows me this notification: “App permission management is closed” [from the application] and then I see as home screen a black screen (all black without icons). And NOW!!!
The home screen manager application (the launcher) doesn’t start up correctly. To solve this problem we can install a launcher from Play Store, for example i installed Nova Launcher. To install it we need to open the Play Store app, but how without home screen working?…. following these steps:

  1. From notification bar we can open Settings,
  2. Go to the application manager,
  3. Find and select Play Store,
  4. In the application details choose “Start Application”,
  5. After opening Play Store let’s install “Nova Launcher”.

At this point the phone is usable. Nova Laucher it’s good, better then the original launcher. Or you can use another launcher like, for example, Apex Launcher and Go Launcher.
These are the phone details:

Android 4.2.2
Kernel 3.4.5
Information and Communications Technology

Hidden / Unlock tethering using socks proxy on Android

Activating tethering/wifi router (on Android) navigating from your computer doesn’t work. The computer connects correctly to your phone wifi, but you’re unable to navigate. Seems your mobile operator detects you’re tethering and locks your traffic.
To hide/unlock tethering traffic you can use a proxy server installed on your android device, so internet requests are made by your android device and not directly from your computer:

+-------------+     +-------------------------+     +----------+
|  Computer   | --> | Proxy on android device | --> | Internet |
+-------------+     +-------------------------+     +----------+

There is a free proxy for android “Proxy Server” from Ice Cold Apps. Bu last version (v 3.2) doesn’t work, the pc loads the first web page and than returns always a page with 404 error.
So I used another proxy server from Ice Cold Apps the “Socks Server Ultimate”. It’s free as “Proxy Server” and works. Below the configuration steps:

  1. install Ice Cold Apps “Socks Server Ultimate” on your android device from Play Store
  2. open the app and configure a new socks server in this way:
    • server name: a name (let’s set Default)
    • run on port: a port from 1024 to 65536 (let’s set 8080)
    • select option “Start directly when app starts clean” to start this proxy when opening the app
    • exit and save
  3. start tethering/wifi router on your device
  4. start the app “Socks Server Ultimate” (proxy will start automatically)
  5. inside the app clic on “Info” and take note of the address that starts with 192.168…
  6. now we can configure the browser (for example firefox) on your pc: open firefox and configure the proxy in this way: Options >> Advanced >> Network >> Settings… (where is the address of the previous step that is the address of the android device) [the image is on the italian version of firefox]:

Note that this proxy server is a socks proxy not only an http proxy, so it can be used with all applications that support a socks proxy, not only for the web navigation.
Sometimes the application Socks Server Ultimate doen’t work, you have to restart it: use the Exit button and reopen it.

Information and Communications Technology

Evernote Importing from LG Memo and from ColorNote Android Apps

I switched from LG Memo and Colornote to Evernote.
The Evernote application imports the enex file format. I created two php scripts that export the notes from Colornote and from LG Memo.
For Colornote is required the file colornote.db that is only visible on rooted devices. For LG Memo the note database is inside the backup backup.nrt that can be created from LG Memo and rooting is not required.
This is lgmemo2enex.php:
and this is colornote2enex.php:
these scripts must be run in the same directory containing the files colornote.db or richnote. The scripts outputs the files lgmemo.enex and colornote.enex that could be imported in Evernote.

Information and Communications Technology

Turn on samsung android phone without using power button

To turn on a samsung android phone without using the power button follow these steps:

  1. Charge the phone if full discharged
  2. Remove charger
  3. Keeping pushed home button and volume down connect the charger until you see the download mode on the screen
  4. You will see below Volume down: Cancel (restart phone) [it’s what we need restart the phone]
  5. Release the buttons and disconnect the charger
  6. Push volume down
  7. Phone will restart, turning itself on