Titanium Backup + Dropbox HOWTO

I set this up today at long last (and assume most of it will apply to Box as well). Couldn’t find much use on how to actually make it sync, so here is a picture!

Go into your Preferences -> Cloud sync settings; and enable dropbox. You can go into Dropbox Settings to control stuff like what to sync and where to sync, etc. Then go to the “Schedules” tab and voila!

I don’t see what is so schedule about that, and I seem to remember reading that you have to do sync’s manually rather than on a schedule but whatever. Couldn’t find crap on Google, so I took a screenie ^_^.

The Big Android Browser Test

There have been a couple of things on the net about various browsers, I’m sure, but certainly nothing comprehensive that I have found. Like wise, over @XDA in the Transformer forums at least, things tend to get muddled up after awhile from all the commentary.

So I thought I would install a shit load of browsers and do some testing! My test procedures can be found here.

It will take a while to do in my off hours and I doubt I’m going to get much done today, stuck home with the parental unit sick, so, I’m pretty much on butler call all day :-/. I’d rather be getting work done, like debugging yesterdays crap near interrupt free.

How to make your own buttonhook cheap

When working a while back on my private tactics compendium, I summised that we probably call the Button-hook technique after the use of a real buttonhook. Well, my new work shirts are a pain in the ass to button at the collar, so on the way to the office this morning, I thought about how to make one. Yes I’m cheap and I like solving problems here and there lol.

Unfold a paper clip like so:

And you have yourself a buttonhook for like a penny versus $5-$15 out of a store!

Plus if you push the little end closed, you have an ear clip just like my father would make. Those are the most awesome way to clean ear wax out of your ears—qtips are no good.

My summery of Android versions

  • 1.0.
    • September of 2008.
  • 1.1.
    • February of 2009.
    • General software refinements, which I’ll usually omit below.
  • 1.5 Cupcake.
    • April of 2009.
    • Third party (custom) keyboards are now possible.
    • We got widgets!
    • Bluetooth A2DP and AVRCP profiles (think stereo).
  • 1.6 Donut.
    • September 2009.
    • Voice I/O.
      • Voice input (Speach to Text).
      • Multi-lingual voice output (Text to Speech)
    • Apps can make their data available to search results.
    • Better support for gestures.
  • 2.0 – 2.1 Eclair.
    • 2.0 in October of 2009, 2.0.1 in December of 2009, and 2.1 in January of 2010.
    • Support for multiple accounts in sync.
    • Exchange account support for email.
    • Camera app sucks much less.
  • 2.2 – 2.2.3 Froyo.
    • 2.2 in May of 2010, 2.2.1 and 2.2. in January of 2011, 2.2.3 in November of 2011.
    • Dalvik VM gains Just In Time (JIT) compilation.
    • Exchange support becomes USEFUL.
    • USB and WiFi tethering. (Use your phone as a bridge between your laptop and your data plan.)
    • Now have the option to DISABLE mobile data.
    • Apps can now be installed to external memory (e.g. MicroSD card).
  • 2.3 – 2.3.7 Gingerbread.
    • 2.3 in December of 2010, 2.3.3 in February of 2011, 2.3.4 in ???, 2.5 in July of 2011, 2.3.6 in September of 2011, and 2.3.7 in ???.
    • Native support for SIP VoIP.
    • Selecting text to cut/copy/paste actually works.
    • Text input cursor can now be precisely positioned.
    • Ext4 replaces YAFFS(2) as standard file system.
    • Native support for more sensors; gyroscopes, barometers, etc.
    • NFC support.
  • 3.0 – 3.2.2 Honeycomb
    • 3.0 in February of 2011, 3.1 in May of 2011, 3.2 in July of 2011, 3.2.1 in September of 2011, 3.2.2 in August of 2011.
    • Notification bar moved from top of screen to bottom corner.
    • On screen software buttons (back, home, multi-task, menu, …) and the action bar.
    • View of recent apps can be snap shots (multi-task button) or existing icon view (long press physical home button).
    • Browser UI becomes more like Google Chrome.
    • Browser can now sync bookmarks with Google Chrome.
    • Apps are now commonly multi-pane, e.g. message list and message body on one screen.
    • More hardware acceleration.
    • Support for multi-core CPUs.
    • Encrypting user data.
    • USB devices now work as expected, e.g. flash drives, game pads.
    • Proper support for Bluetooth keyboards, gamepads, etc.
    • Stock launcher now allows widgets to be resized.
    • WiFi performance can be maintained when screen is off (WiFi locking).
    • Apps designed for small screens can be zoomed or stretched to fit.
      • this Android 2.2 feature is a really good thing and makes many reviewer’s complaints about Honeycomb less of a big deal for normal people.
    • Screenshots (or was this just a TF101 thang?).
      • Previously required a custom ROM like Cyanogen Mod.
    • Pasting integrated with 2.3.x selection UI.
  • 4.0.1 – Ice Cream Sandwich.
    • 4.0.1 in October of 2011, 4.0.2 in November of 2011, 4.0.3 in December of 2011.
    • Small screens get traditional (1.0-2.3.x) UI, large screens get tablet style (3.x) UI from Honeycomb.
    • On screen software buttons (from 3.x) now work on phones.
    • Stock launcher catches up to common features of custom launchers.
    • Access apps from lock screen.
      • Previously required custom ROM/UI (e.g. Sense; Cyanogen Mod).
    • Unlock your phone by taking a picture of your face.
    • New Roboto font.
    • Can now monitor data usage without requiring third party apps (or custom ROMs).
    • Camera app sucks less.
    • Basic photo-editing.
    • Much stronger NFC integration, alternative to Bluetooth data transfer.
    • Yet more work on hardware acceleration.
    • WiFi Direct, a form of Ad-hoc WiFi networking and bridging.

Attempting to fix my ASUS Transformer TF101’s blank screen

Been a while but finally I’ve got a moment to update my journal, lol. Saturday night, Andera (my TF101-B1) slid off the mattress and ended up with a blank screen, and briefly some green garbles. The backlight was still working and my tablets survived the same and worse landings unscratched so, plus I know what kind of guts these things are made out of, so I knew it couldn’t possibly be hardware failure. The photo’s I took are all captioned and in an Album here.

Determined, on Sunday I went out in search of a torx screwdriver. As it happens, Fry’s didn’t have any T5’s left, just T6’s and the threads over at xda-developers said T5. So I spent the worst $10 of my life, on one of these. It’s a real piece of shit beyond the driver bits. Turns out though that some joker decided to stuff a Phillips PH000 in place of a Torx T5, and not include the T5 anywhere o/. Fucking bastards! But on the upside that was the right size for the Phillips screws I had to work with.

So I ended up undoing the torxex on the bottom (by the docking port) with a T6, and left one of them stripped by the time I was done. After that it was time to pry off the bezel, which I did a dandy number on; when putting it back on resulted in a barely working power button,I pryed it  up and used gravity to fix the power button before snapping it back in. What I found was that it’s a lot easier to pry off from the back end, YouTubest be damned.

There are three screws on top and bottom, and two on each side. I kinda missed the top three taking off the back plate so it might be good that it’s just cheap plastic.

Getting the base plate on/off was easy. Also under the metal plate that goes over the battery, is an empty space that looks like it is where you would install the 3G modem on a TF101-G.

Most of the connectors are the ugly ribbon goes into stupid pin slot with flip holder kind of Flexible Flat Cable thingy. I hate those and don’t know why they are so popular, but alas, I didn’t build the darn thing or design it. So next up I had to figure out which one is the one I needed, I tried all of them that were readily accessible just to be safe (bad idea).

In my poking around xda-developer’s I found a link to somewhere that sells replacement screens, that told me where to find it. There is even a YouTube video on the whole procedure (I’ll edit in a link from my browser history later). I personally found it easier to remove the power connector so I could access the video FFC better:

To be sure I was right or would more likely figure out what it does (in case of gross ID10T error on my part), I pulled it and reseated it very firmly.

Fired it up and voila! The touch screen was working. So I studied how much I fractured my bezel and put it back together, note carefully that the holes nearest the docking port are for the TORX screws that go in LAST!

On boot up, everything went perfectly well until I noticed that back and home didn’t work. A little bit of testing showed that entire portion of the touch screen is not getting any touch events :'(. I’m not sure if it’s another ribbon out of place or just that I missed a couple screws on the back plate (d’oh). But since I  have the dock, I’m pretty much able to use it. The one torx is now too stripped to drive, so until I figure out a solution to that, Andera is missing touch input on the left most (view able) inch of the screen.

I don’t have a drill or I would just hit the hardware store for a drill bit to get the sucker out, and trust me,  my trusty awl doesn’t seem to one to carve a slot in it. Don’t have any rubber bands good enough to try, so I’m thinking about grabbing a tube of epoxy on the way home from work and see what happens….if I can fix it, I’m gonna fucking fix it! In the mean time, I’ve ordered a Transformer Prime / TF201-B1, because the best I can get here is a TF101-A1; and I’m already using over 10GB on my TF101-B1, so $400+whatever memory card Best Buy has, is not worth it. Like wise, if I’m getting stuck spending so much money, may as well buy the prime instead of a later version of TF101-B1 (mines a B50 with no Q/C issues). I’m very partial to my mid-generation TF101….

Oh, btw don’t forget to put the screws in the back plate if you try this at home.

Dropbox 2.0 for Android: fixing your folder

I don’t get why so many people are pissed at this. The old folder location was at ${sdcard}/dropbox. This is really good for an app like Dropbox and I wish they would have kept it, but to be honest, it does technically belong in the new location of ${sdcard}/Android/data/com.dropbox.android/files/scratch. Although I would’ve used dropbox or cache instead of scratch but whatever.

Don’t like it? Well guess what, fix it yourself. Open a terminal emulator [0] [1] and do the following:

example# ln -s /mnt/sdcard/Android/data/com.dropbox.android/files/scratch /mnt/sdcard/dropbox

If you get an error about no ln command being found, you should install busybox and add it to your $PATH.

If you’ve got a real MicroSD card, you may get an error about the operation being unsupported (etc). In which case you either need root or you need to use a file system that supports symlinks. Which means probably reformatting your memory card as NTFS, or EXT4, or YAFFS2. Whatever your shit can read, because FAT32 is probably not going to support symlinks.

If you’ve got a device like my Transformer, that has an internal memory on /mnt/sdcard (${sdcard}), odds are the actual data is somewhere behind a FUSE shim, and is really stored at something like /data/media on an ext4fs partition. Easy symlinkage!

If none of the above makes any sense, you only no one tenth the power of Android and should have learned more about unix and Android, or maybe have bought an iPhone.

Thoughts on Android development *ON* Android

I’m crazy enough for it, after all BTEP+{bash,vim,coreutils,etc} on the TF101 is about as pleasant as on a netbook. The difference between BTEP and XTerm, makes something like Screen or TMUX a necessity IMHO and I favour the latter. Also copying and pasting from vim to Android apps is different. Without vim’s X support, a temp file is the best solution until BTEP gains real support for text selections.

My point being, if you can use a netbook and a command line environment, doing it on Android is no different. Hell you could even SSH into a phone from a PC if you lack a Transformer or a tablet+Bluetooth keyboard setup. Only people that _require_ something like Eclipse or Visual Studio are seriously impacted, and emacs and vim are good tools when combined with GNU tools (BusyBox a bit less so).  I have the equal of Debian without X.Org running on my transformer, a decent terminal emulator, and a real keyboard. So I am well equipped.

Now, the sticky part is actually being able to compile and run Android Java programs. You can write the code on a napkin if you want but that doesn’t work with your devices CPU quite so easily.

Android developers should already know the compilation model:

        *.java -> *.class -> *.dex -> classes.dex

A compiler is used to convert the source code into Java bytecode. This technically means that any language that you can get running on a JVM, and interface with Java code, you can probably use for Android development; in practice I’m sure there are more devils in the finer details.

After we get the Java bytecode, we have to convert it into a format for the Davlik VM to run. That’s where the dx program comes in. It translates Java to Davlik.

Because applications are rarely composed of pure source code, especially Android ones, things get slightly more complicated to create a .apk file you can install. The packaging tool aapt, apkbuilder, and aidl programs join javac and dx in creating the .apk file, the end goal of our the toolchain. In practice: .apk is pretty much .jar, which is pretty much .zip. Only classes.dex is used instead of a .class file per class in your code, and something I wonder why Sun never thought of!

Now, the issue is obviously how to run all this shit on an Android device, like my Transformer.

Google only publishes SDKs for Windows, Linux, and OS X systems on x86, Linux+ARM isn’t supported, sadly. Installing an x86 emulator and a mini distro with Java  and ssh is over kill, even for my Debian chroot loving self! BUT most of the SDK is in Java or BASH!

Java runs on Debian/ARM, so we can install a JDK and JRE, and thus get access to the Java side. Bash is already available for Android, let along Debian/ARM. So! The point of concern becomes x86 binaries. That seems to amount to most programs in platform-tools/ and tools, but what do we /actually/ need? Well guess what Jack, if we’re doing development on device, we don’t need the emulator! AFAIK the tools we do need are:  apkbuilder, dx, javac, probably jarsigner. The aapt and android programs being good to have, ditto for ant I’m sure.

aapt is a binary, so at best it would have to be natively or cross compiled, and much like make in C country, we can probably do it another way. The source is probably in the Android Open Source Project (AOSP) somewhere, which would make this easier.

android, apkbuilder, and dx are bash scripts.

android sets up an invocation of the Java VM (java) with tools/lib/sdkmanager.jar and a suitable SWT JAR and runs the program. I don’t know if SWT needs to be in the classpath when running it in command line mode, but hell, Debian/ARM = SWT deb somewhere.

dx is similar but uses platform-tools/lib/dx.jar.

ditto for apkbuilder, but using tools/lib/sdklib.jar

In looking at the manifests, a suitable Java execution environment is all that is needed for the serious leg work. That surely can be done using the JRE and/or JDK debs. Hoorah! And obviously the point of the “platforms/android-*” stuff is for javac and the emulator to work, android.jar in particular is our interest.

One downside, dealing with Renderscript or NDK stuff is another delema as obviously those rely on binary stuffs that are not Java, and AFAIK the toolchain for Renderscript depends on an LLVM frontend, so idk how to deal with that yet, but I’m not worried about it — most applications shouldn’t be using renderscript, unless maybe you’re making Modern Warfare 4 on Android >_<.

So I think, I is in business.

PostScript: I am aware of the Terminal IDE app but prefer to be closer to the official SDK and I would rather stick closer to my Debian chroot, especially because BTEP+tmux is a better place for using VIM with a real keyboard.

Understanding Twitter

Newsgroups, forums, blogging, Facebook, Google+, etc are all things that I understand fairly well. Twitter less so for me, as it’s not a service that I ‘use’. Some people I know use Twitter but mostly it’s just businesses and marketing, and I don’t care about any of the businesses I like that much to listen; so I’ve little use for the service.

Viewing someone’s tweets reads off like a list of short messages, similar to the blog model (e.g. like a Wall post on Facebook) which almost everyone understands these days. But it includes the users comments inline, along with their comments (replies) on other peoples posts (tweets). In a way, it is coser to the newgroup/forum model where in you have a node that fits into a ‘thread’, yet the head of the thread is just a normal post (node). In the blogging model, it’s somewhat different because of the emphasis on the blog comment.

This makes it rather disconcerting to look at tweets for the initiated. From first glance, it’s like listening to a twittering bird that not only talks to the open air (hello you Facebook mob!) but also to its imaginary friends. By clicking the tweet (look for the icon top right) you can see the thread and explore the relationship between tweets. It’s a decentralized version of how forums work; instead of defaulting to viewing by topical thread, your default view is by the user.

If that last paragraph makes sense, particularlly the last sentence: you now understand Twitter. Or I’m missing something lol.

What remains to be seen until the course of history has advanced much further, is whether or not any given model (newsgroup, blog, twitter) will become the universally accepted model of communication on the internet. Twitter is a leg up over using a mail client that doesn’t do threads (eww) but I personally prefer the newsgroup model, but profese, twitter is an interesting data model for machine processing to whatever corporations will do to profit from that data model.


Newsgroup model
Someone starts a topic, other people reply; replies and topic starts are all the same thing (posts) but things are usually collated into “Threads”. Examples include USENET, mailing lists, and forums.
Blog model
Someone blogs an article, other people comment; comments are distinct from the content and may be deemphasized depending on the platform. Examples include Blogging and Facebook.
Twitter model
Someone tweets a short message, other people may publically or privately reply . All nodes are equal and connected as in a shared thread, but are collated by “Users” rather than threads.

I guess like many, this morning I learned that the world recently lost one of it’s biggest contributors. I do not mean Steve Jobs, a man with his own important legacy. Dennis MacAlistair Ritchie has died, he was more commonly known as ‘DMR’ or just ‘Dennis Ritchie’. A G+ entry by Rob Pike is the earliest reporting I’m aware of, but I can’t say I expect this sad news to be found on TV.

Dennis Ritchie has a place in history that few men have ever achieved, because his work helped change the world. I am a young man compared to the late DMR but I does have an interest in history. If it wasn’t for this mans work, I doubt that I could be writing this journal entry, because he helped to enable so many elements that make it possible.

His most famous programming language, C, was so pervasively popular, that I knew of it before I learned to program. My first programming language (C++) was derived from it. A big part of how I fell so deep insane with computers was learning about how C and Unix became self hosting. That  means you could make C and Unix using C and Unix, in laymans terms. Back then that was  almost like revolutionary – today it’s like sliced bread. We take it for granted but someone had to help show us the way; then people started to use it everywhere.

Through C, we gained countless programs. Most Unix operating systems are written in C, most other operating systems are written in C or finally grown from one that was. Unix, DOS, Windows, Linux, OSX, your iPod, your iPhone, your iPad, our Android. None of it would exist just like it does. Most of the stuff we do every day involves C programs, be that reading e-mail, playing games, surfing the web. It is even normal for other programming languages to be implemented in C. The defacto standard Perl, Python, and Ruby included. It is so normal that writing a language implementation in itself is not so big anymore. C is so pervasive that it is also inescapable in other languages: their is almost always a way and a need to interface with C code. Hell, today you might even have C code involved in your toaster. It is that important a programming language. If you ever used a computer or an embedded system, you have probably used software written in C, or are old enough to remember what it was like before punch cards.

C is perhaps the single most important language since programmer’s stopped writing in raw machine code. In fact, sometime after that we stopped writing in assembly and I know no one who goes lower level than reading the machine code. A common portion of C syntax is practically our linga franca—even if C is not a shared language, the syntax (which grew from prior languages) is also widely used and an alternative to pure pseudo code.

Maybe a lot of young programmers don’t know C, or skip it. I love it. It is one of the most beautiful languages that I know, despite it’s trappings. Perhaps some of the greatest lessons I learned about my craft, was that learned from C. Perhaps another was the humility of it’s creator.

Somehow, I doubt his other works will ever be as well known as C, or things he was a big part of (like Unix), but maybe people will study them and see what they can learn from the work of a legendary hacker, like Dennis Ritchie.

Web apps or native apps?

On the desktop, I will generally opt for using a web site over an application where possible, except when an application is seriously more convenient. For example, at home I typically rely on webmail and forgo using a local client; at work the inverse is true. GMail is one of the best ways to do e-mail :-).

When it comes to e.g. Android, I will often opt in favour of a decent app, over the web version. Apps generally have less overhead then rendering a desktop-oriented website, heavy on JS and meant for the mouse, yet mobile apps sometimes suck compared to websites; mobile or web version. When it comes to Google stuff, I use the apps. The mobile versions (at least on my TF101) are fairly similar to the mobile apps. The desktop *<b>web</b>* versions are best, but the Android apps are O.K. Contrast: the Facebook app has always been crap, compared to either version of the website.

The advantage of going web with it, is that the cloud auto-magically can solve a lot of little logistical problems. Like keeping data in reasonable sync, favouring search over storage, and removing the issue of “Maintance” — all you need to keep up to date is usually your web browser, once in a blue moon. It is even possible to have web applications that are aware of one another, although this is sorely under-utilized in reality, versus what can be done. Facebook stuff is probably at the forefront, in more ways then one (but not all of them awesome).

When it comes to using an App, you gain hopefully better Native Integration. On the desktop, not so much in my experience: stuff like Mozilla Prism and Chromes app mode just don’t cut it just yet, nor does the whole add-on/extension crapola. I’m talking a *<b>Real</b>* native application. Thunderbird versus GMail. Thunderbird will always have better integration with today’s PC environments than the GMail’s web app. Well, knowing Moldy old Mozilla maybe not always, but you get the point ^_^. The few exceptions that I’ve seen are products like Dropbox, where the native application _is_ the major selling point of the experience, and thus makes the cloud go round. It just happens to have a useful web user interface to boot.

Native applications open up a whole world for interesting savings and mangles. A good example, using an Android phone, you can have device local, mobile carrier, MS Exchange, Google, and Facebook contacts all synced even though they come from seperate providers; anyone could extend their service like this, fundimentally. That’s how stuff should be done. In some cases (Google, Exchange) it is even possible to have calendar data synced. The downside is that doesn’t get merged back into the Google-cloud, and that is probably a Good Thing(tm) even if I and others might like the option of it.

I think the web is one of the better interfaces for creating applications, if you want a UI that isn’t better mapped to command line programs. Android offers quite a nice programming model, and I assume that iOS and BlackBerry-land offer something sufficent. The world of PCs not as good.

Personally, I think in the future, we will see the evolving “Mobile” experience rise up and destroy both the PC and Web 2.0. The difference is, it will be Mobile 3.0 :-). Then this will all fade away until such a millienia that notions like PC, Mac; Desktop, Laptop, Phone; all of it fades away into being about as interesting as using cornkobs to whipe your ass instead of the three sea shells.

Given the choice, it’s obvious where I stand. But the real question is, does it run unix? 😛