Monday, June 14, 2010

Android Build: Tips and Tricks


All below build steps are trivial, but i took like a week to get a grip of..  just documenting to be handy.

$MYDROID is root of your android source directory.

Quick Incremental Build
Setup the environment for your build setup, go to moudle's directory with Android.mk and build.
`source $MYDROID/build/envsetup.sh`
`cd ./hardware/ti/omap3/liboverlay`
`mm`

Note: `mm -B` will clean build all the libraries under a subdirectory.

Package build
Building .apk in android SDK. No need of eclipse or PDK.
`source $MYDROID/build/envsetup.sh`
`mmm <path-to-package> `
(say #mmm $MYDROID/packages/gallery)

Selective Clean
`make clean-<modulename>`
(eg. #make clean-libomxcommon )

Complete clean 
`make clean`  works but, "rm -rf ./out" is faster

Display full commands
`make showcommands`

Number of parallel threads
This is same as GNU make, and chose it based on number of cpu cores available.
`make -j<number-of-parallel-jobs>`

Btw, complete android build guide is available at http://pdk.android.com/online-pdk/guide/build_system.html

Saturday, June 12, 2010

GreaseMonkey Scripts Usage: especially how get 1080p videos from youtube :) and more.,



My FireFox usage has been definitely improved after installing greasemonkey scripts., various sites, custom options, readily avialable 1000s of scripts, and you can write your own like a simple one in 5 minutes.

i mostly use it for autologin purpose or adding extra menu to regular pages.., a handy use is grabbing youtube videos (legally i guess ;>  'm not breaking into youtube's content server, just using the browser's video handle)

I used to grab youtube videos for offline usage and my ipod, mostly with with tools which are either trial versions or adwares.., sometimes used on-the-go javascripts to grab video link, and again it will be made obselete by youtube in 2 days, and wont work anymore.. now its just a click away.

How GreaseMonkey Works? 
Once you install GreaseMonkey extension, when a webpage loads, firefox is capable of running offline scripts installed by the user. Say you install few scripts for gmail.com, and on any page from "*gmail.com*", the script will be executed..

Simple Steps - How to get? 
Here are simple steps, on how to get YouTube videos (just clicks)


Here's a sample screenshot.. (you can see newly added 'Download' menu, and GreaseMonkey running in bottom right)

YouTube grab is just a sample and simple usage of GreaseMonkey, and its powerful,userful beyond that.. Visit http://www.userscripts.org to get readily available scripts for 1000s of sites (gmail, facebook, twitter,...), and you can write your own autologin scripts, or skip scripts.. 


Links
- Youtube Video Download user-script from userscripts.org
 
Copyright 2009 dev.blog. Powered by Blogger. Statistics