Skip to content

[Titanium] Unable to find Android SDK tools: zipalign

I recently upgraded Titanium, and possibly also my Android SDK (this is getting a bit messy, with the old SDK, used by Titanium, living along with the new SDK brought by the new, beta, Android Studio). And when compiling an app for Android, which I hadn’t done in a long while, I encountered this error:

[ERROR] : Unable to find Android SDK tools: zipalign.
[ERROR] : You have an incomplete or out-of-date installation.
[ERROR] : Verify your Android SDK packages or reinstall the Android SDK by running titanium setup android or manually downloading from

I opened the Android SDK manager, but no obvious package seemed to be missing. Finally, I found someone suggesting to move around that “zipalign” tool itself. So, I eventually found zipalign.exe in adt-bundle-windows-x86_64\sdk\build-tools\android-4.4W, and copied it into adt-bundle-windows-x86_64\sdk\tools. Success! :)

Also, thanks very much to the guy who posted a close enough answer there: Too bad his answer wasn’t marked as the proper solution, the chosen one is rubbish…

Posted in programming.

Tagged with .

How to back up freenet download list

Freenet has the annoying habit of corrupting its download database on a fairly regular basis, even when you don’t encrypt said database, and even when you run it from a very fast drive (even a RAM disk…). On top of that, it doesn’t provide an obvious feature to back up the download list. And as you probably have noticed, once the database is corrupted you can’t even show the list of downloads. So, what we need is an easy way to back up said list, easy enough to be run proactively on a regular basis without being much trouble.
It turns out there is an easy way, apart from the fact that it’s not shown on the Freenet interface. The list of current downloads can simply be obtained from

Posted in software.

How to disable GZIP compression in Firefox

Sometimes, when debugging websites, it can be useful to use Wireshark to observe their network traffic. The only problem with that is that it doesn’t work with encrypted traffic, of course, but also it doesn’t work with compressed traffic. Gladly, Firefox can be configured to tell website that it will not to accept compressed web pages. For this you simply need to remove/empty the “accept-encoding” HTTP header:
– Go to about:config
– search for network.http.accept-encoding
– and empty it (default is gzip, deflate)

Et voilà, Firefox will now receive web pages without GZIP compression.

Posted in Firefox, web development.

Oops, they killed Gallery 3. Now what?

I’ve been neglecting my picture gallery lately. And when I finally found the time to upload a great, long overdue gym picture (I’m sure you’ll like it even if you don’t go to the gym ^^), I also took the time to have a look at the administration panel, particularly at the update section. And I quickly noticed the latest Gallery news, “Gallery is going into hibernation“, which sadly means the project is abandoned. Not much of a surprise, since development had been really slow, and Gallery 3, although it still seemed to me like the best choice, never really felt finish.

Gallery is GPL, which means that anyone with skill and time could take over, but it’s not enough to make sure a project continues, particularly when there are quite many alternatives – and even if those aren’t as good. Wikipedia has a list of photo gallery software, which seems quite exhaustive, except maybe it misses Zenphoto, which is kind of an intermediate between a gallery and a whole CMS.

After a brief overview of this list, and of the comments on the Gallery closure announcement, it seems to me that the best alternatives would be either Coppermine Gallery or Piwigo. What I like about Coppermine is that it keeps it simple and doesn’t overuse JavaScript. But the design feels really quite old, and hard to browse (notably, there doesn’t seem to be proper support for tags). So I’ll probably go for Piwigo. I read somewhere that they recently created a migration plugin to convert a Gallery 3 gallery into Piwigo, so when the time comes hopefully it won’t be too hard to migrate.

Final note: here’s a demo gallery using Coppermine, and one using Piwigo.

Posted in multimedia, open source.

aToaD #12: KeePass and KeePassX

If you follow the IT news closely enough, not a week goes by without a story of compromised credentials. For instance, a recent, really big one was reported there on Hold Security, with more than a billion credentials stolen from various vulnerable websites. Security being a race between those who make it and those who break it, I think we’ll always see such kind of news. Maybe fewer as website operators grow more careful, but still some.
Meanwhile, the impact of such hacks can be minimized by following trivial recommendations you probably read about many times already: use strong and unique passwords. Strong so that they can’t be bruteforced even if the site didn’t hash them very strongly (like, md5 with no salt), and unique so that even if the hacker eventually managed to get the clear-text version (non hashed storage – bad but still occurs more often than you think -, or if the server was compromised enough to capture passwords as people logged in), then it will only let them steal one account of yours, not all of them.

Those recommendations are trivial, yet many people know them but still don’t follow them. And if you’re one of those people, I suppose you know why: it’s just impossible to remember so many passwords. As I’m writing those line, my password database contains over 500 credentials… There’s just no way to remember that. The solution resides then in… a password manager. The concept is simple: put all your unique passwords into a database, and encrypt it with a single, very strong password which you must not forget. Down from 500+ to only one big password to remember, sounds like a good deal.

Many services provide that. You probably heard of LastPass, maybe also RoboForm. Those are close source (you usually want to avoid that in cryptography), commercial solutions. I’m not sure about RoboForm, but LastPass is cloud-based and when they have an outage you lose access to your passwords (happened about a week ago).
My personal favorite is KeePass, which is free and open source, and stores things locally, not in the cloud (you can should then back up the KeePass database using your favorite backup service(s) – possibly SpiderOak?). Unfortunately, it only works natively on Windows (although it should work on Linux and Mac OS via Mono). If you want a native solution under Linux, a possibility is then KeePassX, which is sadly still in alpha stages (although it worked pretty fine last time I tried it, it mostly lacks polishing and richer features).

For an extra layer of security, you can also configure your firewall to prevent KeePass from accessing the network. And each KeePass release is signed with the OpenGPG key of one of the developers, you can check that signature too (see this old post if you have no clue about OpenPGP).

Update (2014-08-21)

Well, as I was saying as an introduction, if you follow the IT news, you see those database hacks on a regular basis. Here’s one which hit the news just today: Data breach at UPS Stores in 24 states (CNN).

Posted in A Tool A Day, security.

How to give different headers to different pages in LibreOffice

Following my previous adventures with LibreOffice, I wanted to place chapter names in headers, which means different pages would have different headers… which doesn’t seem to have an obvious solution, since the way headers (and footers) usually work is “same stuff for every page” (even though this can mean same automatic field with a different value on every page).

Anyway, LibreOffice provides a way to set different headers via page styles. The “Style and Formatting” dialog (accessible via F11), which you probably already use to format text at the character or paragraph level, also contains a “Page Styles” part. When you edit page styles, you can set specific headers, but also footers, margins, and even paper format.

The way I worked was to create one chapter per file, then combine all files manually. In each file, I defined a chapter-specific page style (like you would define any other style), which I then imported into the merged file (in the “Style and Formatting” dialog, top-right menu button them “Load styles” and import from file – don’t forget to check “Pages”), before copy/pasting the content. I’m not sure if there’s a better way or not, but to switch between different page styles in the global document, I used page breaks (Insert → Manual break), where you can specify the page style to be used after the break (default value being “[none]“).

Useful information on the LibreOffice wiki too: Defining Different Headers and Footers

Posted in LibreOffice & OpenOffice.

[R] How to fix package installation failure on “checking for xml2-config”

I’ve recently had to set up a secondary computation server running R-project. Unfortunately, like all my servers, it runs under Linux, and R is a PITA to run under Linux. Notably, packages must be compiled on the machine: not only this is long, but also it requires tons of programming-related dependencies (GCC and such), and, well, it tends to fail sometimes.

While I’m at it, here are the repositories to be added to /etc/apt/sources.list in Debian 7:

deb wheezy-cran3/
deb-src wheezy-cran3/

So, I wanted to install a few packages from Bioconductor, notably the “GOSim” package. But installation failed on the “XML” package dependency (yes, it’s a package named “XML”), with the following apparent issues:
checking for pkg-config... no
checking for xml2-config... no

So apparently, some dependencies were missing despite that infamous package manager system which I seem to be the only one to hate. The first dependency was trivial to fix:
apt-get install pkg-config
But for the second one, that trick didn’t work.

I eventually found on some Stackoverflow page that the relevant package is libxml2-dev, so:
apt-get install libxml2-dev

And that’s it, you should now be able to install your package… or move to the next missing dependency :-p

Posted in R (R-project).

How to avoid landing (too much) in spam folder when using Postfix: customize your hostname

Now that I changed e-mail provider for Fastmail, I have to deal with a more traditional anti-spam protection. Basically, SpamAssassin with quite default features. This is a bad thing because that piece of software just doesn’t seem to learn properly. Notably, the Bayes filter is totally underpowered, as even when fully trained it can’t decrease the score by more than 1.9, which isn’t even as high as some basic violations like CK_HELO_DYNAMIC_SPLIT_IP (1.499) or HELO_DYNAMIC_IPADDR2 (3.607). But this is also a good thing, because it forces me to actually look into the problems instead of just having them “fixed” by pushing the “not spam” button a few times to teach Hotmail or Gmail not to send those e-mails to the spam folder.

So, I had those 2 violations HELO_DYNAMIC_IPADDR2 and CK_HELO_DYNAMIC_SPLIT_IP, which I hadn’t had before at my previous hosts. After a quick search, it seemed that this was caused by my hostname looking too much like the one of an ISP. For instance, my ISP gives reverse DNS looking like, and my server host gives, well pretty much the same. Like For SpamAssassin, this looks too much the same: the HELO address,, seems like a residential, end-user computer, not like a proper server.

The fix to this is simple: configure your hostname so that it’s not your host’s default anymore (and make sure your new name doesn’t look like an IP either). I suggest simply taking one of the domain names already hosted on your server (you have to make sure that the relationship IP < -> domain name works in both directions). For instance, I set mine to Probably even better (more convenient for migrations) would be to had a third level domain name assigned to it, like

To configure postfix to use the new hostname, change that in /etc/mailname. (don’t forget to postfix reload or postfix stop and postfix start to apply changes).
You should also be able to configure the reverse DNS associated to your server in your host’s control panel. You’ll then have to wait for it to propagate, however you should also be able to quickly see the change with some specific tools like DomainToosl, for instance: (the hostname is indicated as “Resolve Host”).
I’m not 100% sure both parts are useful, yet I think it’s a good idea to make sure the Postfix HELO address matches the server’s reverse DNS.

Edit: actually, the most important part seems to be the myhostname = line in /etc/postfix/

Posted in Linux, postfix, servers.

Tips to captioning figures and tables in LibreOffice

I’ve recently had the need to write in a format close to a scientific article within LibreOffice. However, I quickly encountered 2 issues related to figures and tables:

  1. When adding/inserting a caption for an image, there’s no “Figure” category
  2. When adding/inserting a caption for a table, I didn’t find it obvious to place the caption above the table.

First thing first, to add a caption for a picture or a table, just right-click on it (might take a bit of try and error for table) an select “Caption” in the context menu.

About point 1), bug reports are in the work (cf my first link), but meanwhile it’s possible to simply create a custom type that you’ll call “Figure” (you can manually edit the item in the “category” drop-down list).
Dialog box for caption creation
This manually-created type will then be available for auto-index creation (Insert → Indexes and Tables → Indexes and Tables):
Dialog box for figures index creation

About point 2), well maybe you already noticed it in my first screenshot: in the caption creation dialog, you have, as the last option (the one just above the preview), a “position” item, which can be either “below” (default) or “above”. Note however that “above” is a bit bugged at the moment: the text below your table will be moved upwards by as much pixels as the space taken by the caption. The workaround is simply to add an appropriate amount of line breaks after your captioned table.

Posted in LibreOffice & OpenOffice.

Mac OS – Solving can’t install Titanium CLI & Alloy (Invalid password)

Titanium is this thing, which allows for cross-OS mobile development. I recently had to compile an application written in Titanium for iOS. I’ll skip the highly weird “installation” method for Titanium (the installer itself unpacks some stuff and asks you to manually drag and drop it into the application folder). When running Titanium for the first time, it will try to update as well as to install dependencies. To do so, it will ask for your account password. And if you’re unlucky like me, your proper account password won’t work. The issue was reported there, but they only provided various workarounds which I don’t find very satisfying (notably due to their lack of simplicity).

First, a more accurate description: when your Mac gives you a password prompt, normally your name appears as “FirstName LastName”. In the case of this issue, my name would appear as my login, ie “lastnamefirstname”. I observed that on 3 machines: the 2 where the issue occurred had “lastnamefirstname”, the one where it worked had “FirstName LastName”. The accounts with or without the issue all apparently had full admin permissions (according to Apple → System Preference → Users & Groups).

Now, the solution for me was to set up the root password. That password isn’t set by default (or at least it’s unknown). And funny thing, this was just like setting the root password on any Linux distribution (I think I made a post about that for Ubuntu or Debian a while ago). Basically:
– open terminal (search “terminal”)
– type “sudo passwd”
– then enter your current (admin) user password, then enter the new root password (twice)
And voilà. On a side note, you can now use “su”. But more importantly, if you try to run those Titanium Updates/Additional package installs again, and enter the root password, it should work (NB: in my case, I chose the same password for both su and my admin user).

Posted in Uncategorized.

Tagged with .