Android Hints – building specific platform components

When debugging on android , or hacking elements that don’t exist in the NDK, it might be necessary to just build individual software components to assist in debug or investigation. While the entire OS can be built with a single command, it can take many hours to completely build.What if you don’t need to build everything!?

Android components are built using a vast system of nested makefiles called Android.mk, typically one per folder. The makefile will either set up variables for source code to be processed from that directory level, or contain one or two lines which just identify and call any sub-folders which require processing.

Something which isn’t so obvious, is that every contained software module, be it library, apk, or executatble, has a unique name identifying it in its appropriate makefile. For example, building the AudioFlinger component  can be acheived by running the command “build libaudioflinger” from the root directory.

This is because the Android.mk file for this component has a tag called LOCAL_MODULE which a value representing the name for the component. Passing this name as the target to make will request that the make system searches for, and then builds this competent. The resulting component is then copied to <root>/out/target/platform/….. depending on the type of component being built (.so,.apk.exe)

Not logged into Facebook? It might be changing how other pages look!

I know that parts of this info has been around for some time, but I didn’t realise that choosing to allow or dis-allow Facebook connections would alter my other worldly browsing experience! My friend asked myself and others to help promote his art via a website called artistswanted.com. His instructions were simply go to his artistswanted.com page via the link he posted on facebook, and then to press the “collect me” button on the website. As the dutiful friend, I followed his instructions, but I was left perplexed as after pressing the button, the page failed to load correctly, only the website banner would appear, nothing else. I tried a different browser (I’d been using Opera), but chrome gave me the same result. I use the Ghostery plugin in all my browsers, and I noticed that ‘Facebook Connect’ was being blocked (as per how I set it up). Seen as I was coming directly from Facebook, could this be the problem?

Ghostery is a simply tool which allows you to control which 3rd party scripts on a website you visit are either blocked or allowed to run. It basically prevents large cross domain advertisers from tracking your browsing habits across sites. In this instance, Ghostery was preventing the ‘Facebook Connect’ script from running, thereby essentially making is appear to the website that I was not logged into Facebook! Facebook offer an API called Facebook connect [1] [2] While I have no direct development experience with it, it’s hard not to notice what is becoming ubiquitous use of it. I first remember going to wired.com and noticing that in the comments section, there was a picture of me, and an empty comment box just waiting for my input! But wait? I haven’t logged into wired? Or cnn.com, or any of the countless otherwebsites that offer something similar. Also, they had no problem at the time showing me which of friends had “liked” the article. (wired have long since changed their implementation, it almost looks like a native comments section ;) )

It’s a very interesting assumption that websites are making these days, as evidenced by artistswanted.com. You must have,indeed it’s imply assumed that you do, have and are logged into Facebook! If you log out of Facebook, the same thing happens too, the page fails to load with even so much as a error message. A quick comparison of the source from the working and non-working version shows very little difference (perhaps an iFrame or similar isn’t getting loaded or a style sheet visibility paramater isn’t being set). It’s also one of the oldest sofware development ‘bugs’ – assumption. What about you? Have you noticed any websites who offer different (or broken) content depending on whether you’re logged into Facebook?

Hello Internets!

Seen as updating my database code on my website to allow dynamic content and comments etc is taking so long, I’ve decided to install wordpress to allow me create posts in the mean time! (If writing software has thought me anything, seen as I’ve now installed wordpress, I will never replace it ;)  )