Friday, October 29, 2010

Running Android Native Code in your Android app





Just came over a post asking for Android's Logging Best Practices that took me to android log collector. Delving more deeper into log collector's code I got the below code to executes the specified command and its arguments in a separate native process.

All you need is just below code
String myStringArray[]= {"logcat","-d"};
Process process = Runtime.getRuntime().exec(myStringArray);
Setup the permissions for the required operation & you r done!Enjoy

But keep in mind Use Native Methods Judiciously & do check jon oberheide's Android Hax
And thanks to android-log-colllector team for the code.


Though the post describes a way of dropping a shell command from an app , check this for more ways to run shell commands from your app.
And also this  & I have heard MarketEnabler source offers a nice ShellInterface class.
So go get your app runnning!
See ya there at ./a.in

Friday, October 22, 2010

Stacks OverFlowing..



profile for Saurabh at Stack Overflow, Q&A for professional and enthusiast programmers

See ya there at ./a.in

Saturday, July 31, 2010

We live in a beautiful world :):):)

We live in a beautiful world, 

Yeah we do, yeah we do, 

We live in a beautiful world,


:):):)
:):):):):):)
:):):):):):):):):)
:):):):):):):):):):):):)

Monday, March 22, 2010

Issue with mkinitrd when compilin 2.6.32 kernel in Fedora





I installed Fedora 12 on my System recently, downloaded the latest kernel 2.6.32. Compiled the kernel in the standard procedure. On the last step, after make modules_install make install - ends up in following an error message:
sh /usr/src/linux-2.6.32.8/arch/x86/boot/install.sh 2.6.32.8 arch/x86/boot/bzImage System.map "\boot" /sbin/new-kernel-pkg: line 277: /sbin/mkinitrd: No such file or directory mkinitrd failed

Googled a lot and finally got the solution by anonymous here.
here is the solution for all those ppl who got struck in a similar situation.
Open /sbin/new-kernel-pkg in vim and go to line 277. Right before      
"[ -n "$verbose" ] ..." add
tool="/sbin/dracut -f $initrdfile $version" (this line is just copy and pasted from a few lines up)
 100rabh: )

See ya there at ./a.in

Saturday, February 27, 2010

Open Sourcing the smart(phone) world : )

Nokia announced a partnership with Intel.the two companies are merging their odd, half-finished, Linux-based OSs into one crazy little package called... MeeGo.
The formula goes like this
maemo + moblin=MeeGo:)
The MeeGo software platform will be hosted by the Linux Foundation as a fully open source project, encouraging community participation in line with the best practices of the open source development model. Intel and Nokia invite the respective members of Maemo.org and Moblin.org to join the combined community at MeeGo.com, as well as encouraging wider participation from the communications, computing and related industries. Developers can begin writing applications for MeeGo in Qt immediately. The first release of MeeGo is targeted for the second quarter of this year.

Well ,it has opened challenge for Google's Android.MeeGo will be a "software platform that will support multiple hardware architectures across the broadest range of device segments, including pocketable mobile computers, netbooks, tablets, mediaphones, connected TVs and in-vehicle infotainment systems."
With these open source smartOSs hitting the market high (with samsung Bada,AAVA's first open hanset etc etc) they are clearly Open Sourcing the smart(phone) world : )
& Lets not forget to mention Symbian being open source & its poster saying we are now open source.

See ya there at ./a.in

Friday, January 29, 2010

Back with slackk13 ;)

I recently installed the Slackware 13 (as my Slackware 12.2 failed to resist my experiments :) ).Though the installation went easy but the successful run of the Slackware 13 was not easy.When the installation was complete first problem I encountered was startx showed me my XFCE screen & then hangs.The reason was that intel 82865 chipset does not work with standard Slackware 13.0 .So everyone out there with Intel 8 series graphics dont leave Slackware 13 cause you can’t run X within it.You just need to follow the post instructions(OR better update your system with current).

The solution is to compile a stable kernel.I used 2.6.32-rc5 and 2.6.32 and zen kernel patches(version mentioned in the post).
The kernel 2.6.32-rc5 showed errors regarding kthread.c.it had element ‘rt’ undefined in method kthread_bind() did a lot of reverse engineering and came to the conclusion that kernel 2.6.32.rc5 is buggy & then used a stable kernel 2.6.32 which ran successfully.
After all done I started X using startx I get Qt errors gooogling gave me reasons about that too.I found Qt too needs to be upgraded to Qt-4.5.
The best solution being the upgrade-all packages:

do slackpkg update
slackpkg install-new
slackpkg upgrade-all
slackpkg clean-system
check and make sure that kernel 2.6.32-5-smp is installed along with kernel firmware kernel modules kernel headers and kernel sourc

Have fun! :^) I hope you find Slackware to be useful.
Saurabh Nigam

Wednesday, September 16, 2009

Open Source Maemo

So here is one of a very strong mobile platform

Maemo

Maemo has utilized various open source projects such as the Linux kernel, Debian, and GNOME.
It derives its UI from GNOME
& lastly it is an open source mobile platform by
NOKIA!!!