André’s Cookbook

Changing Android system options via adb shell

While setting up an unattended testing environment which uses Android emulators, I’ve run into difficulties with the default system settings. An Android Virtual Device – like any freshly-installed Android device – is created with default settings which are not very friendly for a testing environment, namely: the lock screen is active, and shows up when […]

The "make yourself at home" screen. Known internally as "cling" screen.

Python – importing bash environment variables

I’ve run into situations where it was necessary to read the values of bash environment variables defined in a file into a python script. Something like that is achieved in bash simply by doing: source env.vars or . env.vars Where the content of env.vars could be something like this: BASE=/home/user/scripts BIN_DIR=$BASE/bin VAR1=xxxxx VAR2=yyyy The solutions […]


Perl Config::General setup and usage

Few libraries have been as useful to me over the years as Perl’s Config::General. It gives us a simple way to create configurable scripts with minimal code, in a syntax-light configuration file format. The configuration file format is similar to apache’s, and the module can parse native apache configuration files. How to start using it: use Config::General; […]