Archive for February, 2011

Unpack, Change and Repack Android Apps

Sunday, February 27th, 2011

Some time ago, I read Lock down your Android APK permissions by benn from Intrepidus Group.

I decided to automate the whole procedure, at least the unpacking, signing and repacking. Each app has to have it’s own key (lest the apps signed with the same key can access each others ressources!) which was the thing that most needed automation.

So I wrote some shell-scripts. The scripts are not only useful for changing the permissions of an app from any source (unpack, edit AndroidManifest.xml, resign), but also for android developers themselves. it’s much easier to manage keys and sign different apps with them.

So here they are:

  • android-unpack Stupid script to decode .apk-files, all of those in a directory, actually.
  • android-resign Script to pack .apk-files, and sign them. Each project with it’s own key.

Of course, if you re-sign foreign apps with your own key, they won’t be the same ones as on the Android Market, and thus not automatically upgradeable and will not use the same configuration.

Android, Updates and Backups

Sunday, February 27th, 2011

I’ve got a n LG GW620. I chose this because it a) runs android and not some more stupid operating system b) it has a keyboard and c) it’s supported by an open project, namely OpenEtna, which among other things provides an updated operating system with a bash and a root-shell.

Now, I’m not the guy who stores anything on “The Cloud”. If there is anything out there that I deliberately store data on, it’s my own server, my own cloud.

So before upgrading I naturally decided to do a Backup, and of course I decided to use the software which advertised to Backup Everything. As it turned out, it doesn’t.

First off, the upgrade didn’t go very smoothly. After not having wiped cache and userdata, the Phone refused to continue at the “Welcome to GW620” screen. After wiping and flashing again, this worked.

Of course, all the settings were lost, and all the apps. So clearly, just put the backup-software onto the phone, and restore them. Turns out, the settings for going to the Android Market are lost as well, AND the friggin idiots only let you download the App from the Market! Thank you very much, you stupid twits. So make a backup of the apk-file onto your SD-card or harddisk before relying on it…

After having found some old version of “Backup Everything” which was thankfully downloadable with something other than the phone itself, I was able to restore “something” or “a bit”. SMS-archive, caller logs, access points, all there. Applications, Contacts, WLAN-credentials missing. It tried to reinstall some applications, but that mostly failed. At least it has a list of applications which you then can click on individually which opens a search on the Marketplace and install them.

The contacts I had to restore from an adressbook vcf from my harddisk (kaddressbook can export the addresses you choose to a vcf), but doubtless, some are missing. I only realized afterward that the android provides an “export contacts to SD-card” option by itself. But then, I didn’t expect “Backup Everything” not to backup everything.

I’m pretty sure some configuration-options of android itself, and also of applications are still wrong or missing. We’ll see.

An Intellectual Poverty Law

Saturday, February 19th, 2011

Upon my research on 18th and early 19th century England, I stumbled upon a process that was taking place from the 16th to the 19th century in rural England.

It’s enclosure.

Basically, the medieval system is, that a village has, in addition to the fields of the individual farmers, a large commons, where all the inhabitants of that village can gather wood, graze livestock and so on.

This commons was now more and more split up amongst the villagers, with wealthier people buying land of the less wealthy ones, making subsistence-farming more and more impossible, and finally leading to widespread poverty in the 19th century.

And this is exactly the same process that’s happening since about 250 years with our intellectual commons.

Copyright, which was initially just that, a “right to make copies” and sell them, and which lasted 14 years from the publication of a work, became extended to “70 years after the death of the author” and incorporated more and more provisions for the copyright-holder.

Other laws wrapped under “intellectual property” are also working in the same spirit, none more so than patents, which provides not a monopoly on “being allowed to do something” (as copyright does) but a right of “prohibiting others to do something”. Which is of course much more far-reaching.

Trademarks also play a part in this, disallowing references to trademarks not only on ground of competition (as initially meant), but with any spurious explanation the trademark-holder can come up with to quash criticism, satire, art, history and everything else related to that trademark.

The theory, and thus the title, is of course, that these intellectual property laws are the equivalent of enclosures, and will lead to very much the same outcome in another dimension: poverty of intellectual capital and depredation of culture.

And with rows and hedges (read “technical measures”) to keep the now-inclosed commons in private hands, this will only get worse as the century wears on.

Competing against illegal copies

Sunday, February 13th, 2011

I was somewhat baffled about the success of Apples iTunes-Store.

As I detailed in an earlier article Schwarzkopien und Marktwirtschaft in german, illegal providers of copies of works are effectively a competition to legitimate providers. In principle, they offer the same product for less money. Market says, in that case, people will acquire the cheaper product. However, there are some factors which can change the outcome in different ways.

The works itself

  • Digital Restrictions Management (DRM). This will somewhat alleviate the availability of people illegally giving out copies; on the other hand, it effectively punishes people buying from the legitimate vendor. It decreases the value of the legally obtained product.
  • Metadata. This increases the value of products, especially if every product of this type supports the same metadata, ordered the same way. If I can offer 100’000 works, all tagged the same way, I have a distinctive advantage over people offering illegal copies, because those copies will not adhere to any common standard where metadata is concerned, as a result of the very fragmented nature of that “market”.
  • Quality. This is another thing that increases the value of the product, and also something that can work in favor of the legitimate vendor, because here too, he can offer products of consistent quality all over the whole portfolio. Of course, if your quality is lower than the average quality of illegally offered works, you’re going to loose.
  • Usability. This is on one hand related to DRM (which decreases usability by placing restrictions on what one can do; but also trough the demands of the DRM-system itself, i.e. the 50% increase in processing power needed by the Content Scrambling System of the DVD), but on the other hand also determined by other factors, like interoperability (can I access the work from different devices and operating systems), availability of software that can manage and/or process the work, bandwidth needed to transfer the work and processing power needed (which can be unrelated to DRM. For instance, compression needs processing power too). It’s a bit difficult to tell who can achieve an edge here, but generally, widely used and patent-unencumbered standards will have an edge here, because they attract programmers and manufacturers to produce software and devices designed to work with the content.


These all apply to the works itself. But there are other factors which seem to make a crucial difference to shift the advantage towards the legitimate provider, and we can see that most prominently in the case of iTunes.

  • Availability. How easy is it to get the desired works? And here, legitimate providers can really ramp up, in ways people offering illegally the same products can’t compete.
  • Other competition. Actually, all works are in competition to each other. There are more works on this planet than anyone will ever be able to listen to, to read or to watch ever in his lifetime. This doesn’t affect people who illegally provide works; but it very much afflicts legitimate providers, insofar one can sell somebody only a limited amount of works. Since the body of works is so much bigger than anyone can consume, and there are even a great many works available legally for free, so apart from advertising and trend-setting, it can only mean one thing: Price.
  • Price. On the outset, it looks like you can’t compete with a price-tag of “zero”. However, as it turns out, combined with easy ways to access and pay for the works, there is a price that is “low enough”. There are of course challenges for a legitimate provider to achieve this price, because historical precedents (i.e. “a book on paper was always this expensive”) and grown structures (like the byzantine ways of music- and movie-distributions) tend to get in the way. Right now, people illegally offering copies have the edge, but by abolishing of price fixing and radically re-structuring collecting agencies this could be fixed.


And with “collecting agencies” and “byzantine distribution channels” we arrived at another very different factor influencing the competition between legitimate and illegitimate providers of works: The law

This is actually a bit hard to dissect, since it not only covers the relation between the creator and the final recipient of a work, but it also rules the relation between intermediaries and sometimes even institutes them.

  • Acceptance. Right now, the law is not working in favor of the legitimate provider of works, although it was written by them, and designed to grant them rents. Which is precisely one of the problems, because nobody respects the law anymore, after all, it’s just right-holders giving themselves more and more rights to allow them to collects rents.
  • Complications. The structure of how works should be distributed and the return-paths of payments have been cemented in by laws, sometimes instituting collection agencies who should work on behalf of rights-holders, and making it generally very difficult for someone who wants to re-sell works.
  • Unknown rights. A further problem induced by law, is that for a large body of works, the right-holders are unknown (orphaned works), impossible to get (because they were split amongst heirs) or very difficult to get (because of byzantine machinations of right-holder cartels sanctioned by law, e.g. right-holders representatives differing regionally, making it impossible to (re-)sell a work in an international market).
  • Outlawing tools. This is a bit nonsensical. A solution looking for a problem. The idea is to outlaw tools which can be used to break DRM systems. However, apart from decreasing acceptance of the law, it also produces problems regarding accessibility, and reliance on it might lead to very grave problems in the future, for instance with archival. Right now, it does not help legitimate vendors and is mainly used to quench competition in fields unrelated to illegal copying.

Final notes

Finally, a lot hinges on the law.

Ideally, you want to have rights to a lot of works, in order to make them easily available in high quality with consistent meta-data and no DRM for a low price. This will allow you to compete successfully against copies offered illegally, which are more or less tedious to get, of wildly varying quality, have inconsistent meta-data, but no DRM and a price-tag of zero.

To get that body of works, the law isn’t helping you right now, it’s hindering you in various ways. Also, the sheer land-grab by previous generations of right-holders has left the general public with disdain and with no respect for copyright.

There will always be people illegally offering works, but the point is that this phenomenon should be relegated to a small percentage of the market. Because it should be easier for you to legally publish works, and easier for the public to acquire such works, leaving only people who really can’t afford even to pay very low prices to need to revert to illegally offered copies.


I’ve written a lot about these issues. So if you think there is too little evidence presented, or would like to have addressed some issues a bit more in-depth, here’s the other things I’ve written:

Lies, Damned Lies and Propaganda

Wednesday, February 2nd, 2011

Propaganda trumps scientific evidence everytime.

Face it, there is nothing like propaganda, backed by some hearsay evidence and a few vivid examples. And science cannot offer anything to counter that.

It used to be “Statistics” in that title-phrase, but that’s not true anymore, if it ever was. You don’t need statistics to make people believe global warming isn’t happening. You don’t need statistics to convince a nation that some other nation has “Weapons of Mass Destruction”. You don’t need statistics to convince an entire world that monopolies are good for it. Nobody except scientists bother with statistics if they want to convince you of something.

Statistics aren’t appealing to your gut-feeling, examples are. No matter how scarce and how much the result of some other unknown influence they are, examples is what relates to the public, and also what causes fear and anxiety. It doesn’t matter if a few hundred-thousand people get killed in some faraway land. But if something happens to a person you know, no matter how faintly you know the person, or maybe you only read of it, this is obviously evidence for whatever malfaisance or problem-du-jour exists, and is a big problem. A freak accident gets a “security problem” with something, a robbery a “crime problem”, somebody killing himself a “suicide wave” and so on. It does not matter if said accident is the only in the world that ever happened with that specific device, your crime-rate is the lowest on the planet, and the suicide-rate the second lowest. You may now be convinced that this specific thing is a huge problem which must be addressed immediately. Of course, you probably don’t get the idea that there might be a problem yourself, so that’s why we’ve got propaganda.

Or to put the other way: People doing propaganda will use exactly that mechanism, that we tend to believe in examples and not in statistics, to convince you their lies are the truth.

Alright, some of the examples initially used are pretty far off, you you might think that you’re not afflicted with believing such lies. I’ll give you some examples (ha! See?) of things you might believe in, that have no scientific evidence whatsoever:

  • In the middle ages, people thought the world was flat — That’s actually a fairy tale from the 1830ies. Since at least Aristotle nobody believed in a flat earth. Certainly not people in the middle ages who revered Aristotle as the greatest philosopher of all.
  • Copyright is necessary for the compensation of the efforts of creators of works and to ensure that they will produce more. — You should have told that Shakespeare and Beethoven
  • Patents are necessary for innovation — There is absolutely no scientific study which can prove that patents are in any way beneficial to innovation. There are however studies proving monopolies are always inhibiting innovation.
  • Patents are at least necessary recouping costs of research and development — Well, Ciba, Sandoz, Novartis and so on didn’t need them until 1954. And they where already huge multinationals then.
  • Harsh weapon laws reduce crime — No, they don’t. There’s no correlation between the availability of weapons and violence. In some places there is, but this is most probably a coincidence, resulting from some other reason.
  • Knife-bans will reduce violent crime — Scissors get lumped into the same category as knifes in criminal statistics. Now guess what’s actually used most often?
  • Data retention helps to reduce crime — No, it actually produces crime. Not the same ones it tries to address, but things like fraud, extortion, theft of services, privacy breaches, stalking etc.

And this goes on and on. For all of above mentioned things we hold for self-evident, there is either no scientific data backing them up, or even data refuting them. But most of those are actually the result of propaganda, the result of someone trying to get its agenda accepted. Even the flat earth is the result of (in that case anti-clerical) propaganda.

Of course, asking “cui bono” (who benefits) will often yield interesting questions about such a belief in the first place, but often might be misleading as well. Usually it boils down to “who benefits more”. More often, trying to get hard scientific data — statistics or better the raw data of the statistics — supporting your belief will immediately tell you if what you think is true really is. Because typically, you won’t find any.

The search for a flat earth in medieval sources turns up nothing — but pictures of round earths. My request for data and methodology regarding so-called “software-piracy” (a propagandist term, of course, we’re actually talking of “copyright infringement”) from the Business Software Alliance turned up only some vague statements about “estimations regarding past sales and sold hardware”, but not a shred of hard data. My quest for evidence of innovation-fostering of the patent-system turned up loads of citations of people iterating a mantra, and one paper; the paper coming to the conclusion that “there is no evidence”.

My impression is, that scientists, and scientific methods, and data, gets completely overwhelmed by propaganda. A spectacle orchestrated by propagandists to further their agenda, and also by unwittingly victims of that propaganda. It’s actually hard to believe that somebody does not have an agenda, but somehow, some scientists gave me the impression that they don’t really have an agenda — and furthermore, that they do not understand why somebody could consider the results of their work not desirable. And it’s clear, if you don’t understand why you’ve got enemies, and what they are using, you’re going to loose.

I don’t have any solution to this, apart from educations, but it’s terribly hard to get people to get themselves informed when everyone is surrounded by propaganda and propaganda-induced misconceptions daily spewed by mass-media and repeated by websites every day. And, most of the above propaganda is actively backed by powerful interests in economy and politics.

I didn’t include any links to research in this post, but you’re welcome to do your research on these topics yourself. Otherwise, you’ll also find some posts on this blog which sum up some of the topics mentioned and link to further articles and research.