How to get around the dreaded "This app is incompatible with your ..." message in Google Play Store

Let me warn you in advance: this is not going to be easy. If you're afraid you might brick your phone/tablet, don't even start. That said, it's really not too hard either. Smile You just have to be the tinkering type and it doesn't hurt if you already know your way around flashing a custom recovery ROM, using ADB, etc.

How to view the HTML source of a page in Chrome for Android

Save the following JavaScript as a bookmark (ie. bookmarklet):'view-source:' + location.href)

To use it, load the website of your choice, then start typing the name of the bookmarklet in the address bar and click it once the full name appears (via autocomplete).

The problem with Android and MTP

It's no news that USB mass storage support got stripped from Android (I'm not quite sure ... either in 3.* or in 4.* versions). This change introduced a number of advantages over the old way, but at the same time a quite serious and longstanding bug surfaced with it: sometimes (or whenever ...) you change something in the filesystem on your phone, the change will not be reflected on your computer when you connect the phone via USB. The problem is obvious, the solution is apparently not. This bug has been annoying users for years and is still not fixed. Since Google focuses on developing the "next big thing" Smile, many serious bugs take a very long time to get fixed. Obviously these bugs affect only a minority of the Android userbase ... but it's usually the more advanced (or geeky) smartphone owners who "pay the price".

Filenames and Pathnames in Shell: How to do it correctly

A pretty interesting writeup. A must-read if you don't know how to handle filenames with control characters (eg. newline) in them correctly. David wrote another (even longer Smile ) article on how to fix the problem of handling filenames by changing standards, operating systems and/or tools.

My choice from the proposed solutions is this one:
find . -print0 | while IFS="" read -r -d "" file; do
  COMMAND "$file"

How to print/verify the signatures (and/or certificates) of an Android package (APK file)

First extract the contents of the APK. This is easy since an APK is essentially a ZIP archive. If you don't know any better way, you can always rename the APK to a ZIP extension and extract it's contents the same way you'd extract a ZIP. On a Unix/Linux box you can use unzip:
mkdir Example
cd Example
unzip ../Example.apk

How to emulate Unix’ getent with MacOSX’s dscl

I've used dscl before, but since I use it at most once a year, I already forgot about it. It's time to write it down ... maybe it'll stick in my mind for longer this way. Smile
To look up a user by UID:
dscl . -search /Users UniqueID [uid number]
To read a users properties/attributes (like HOME dir, shell, etc.):
dscl . -read /Users/[username]

Some Best Practices for Web App Authentication

I probably couldn't have written it any better, so it's worth to be shared. Smile

How to block HTTP requests based on HTTP header fields using iptables

The trick is to:
  • filter the right TCP packet (not just process all packets going to/from the webserver's port ... that'd be a serious waste of CPU power) ... in this task the "Recent" match module can be of great help
  • use the "String" match module to seach the first couple of bytes of the targeted packet for a string match

The htp.p procedure in Oracle RDBMS does not work (well) with multibyte charactersets

A long time ago I wrote my own framework for PL/SQL projects and one of the first things I did was to create a proper alternative to the builtin htp package. The Oracle supplied variant has lots of limitations and a few bugs/problems too. Since I worked for years on systems that had only English speaking users, I never faced the problem of htp.p (or htp.prn or htp.print) with multibyte characterset databases/strings. The code snippet written by amber.jah demonstrates the problem quite well.

Cloning an OEM Windows 7 installation

First of all: Microsoft's licensing does not permit this. The "Unsupported Sysprep scenarios" document tells you this clearly:

Microsoft does not support the use of Sysprep to create a new image of a system that was originally created by using a custom OEM installation image or by using OEM installation media. Microsoft only supports such an image if the image was created by the OEM manufacturer. For more information see the following licensing brief on Reimaging Rights.

Don't get fooled by the "supports" or "is supported" terms in the above paragraph. The the referenced "Reimaging Rights" document they make a clear statement:

OEM Specific Information:
  • Organizations do not have the right to reimage by using OEM media.
  • An OEM image can only be preloaded on a PC by the OEM during manufacturing. An image can be individually recovered by the organization (or a service provider they choose) by using the Recovery Media. The OEM recovery media should match the product version originally preinstalled on the system; no other image may be used to restore the system to its original state.

However there's a method to clone an OEM Windows 7 instance and change the product key afterwards. But legally you're on your own.

Syndicate content