Skip to main content

Posts

Showing posts from March, 2009

Android: make tinyshell work

get tinyshell from http://groups.google.com/group/tinypy/browse_thread/thread/27a28294314abdb5 it is built from rev 98 svn --revision 98 checkout http://tinypy.googlecode.com/svn/trunk/ tinypy-read-only bc.c get from building the new version svn checkout http://tinypy.googlecode.com/svn/trunk/ tinypy-read-only #Android.mk for tinypy. #gcc -O3 tinyshell.c -I ../build/ -lm -o ../build/tinyshell ifneq ($(TARGET_SIMULATOR),true) LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_SRC_FILES:= tinyshell.c LOCAL_MODULE:= tinyshell LOCAL_CFLAGS += -I $(LOCAL_PATH)/build/ LOCAL_CFLAGS += -lm include $(BUILD_EXECUTABLE) endif

Android: setup android

# edit your ~/.bash_profile export PATH=${PATH}: /tools # Wipe your emulator data emulator -wipe-data #create SD card mksdcard 512M sdcard.iso #set emulator -system /path in eclipse Run -> Run Configuration -> Target -> Additional Emulator Command Line option "-system /path -sdcard /path/sdimg.iso " or run in shell like "emulator.exe -system /path -sdcard /path/sdimg.iso " #put the file in the sdcard adb push hello.py sdcard/hello.py or adb push hello.py data/hello.py Test tinypy adb push hello.py sdcard/hello.py adb shell tinypy sdcard/hello.py or  adb push hello.py data/hello.py adb shell tinypy data/hello.py

Android: adb command

Source:  http://developer.android.com/guide/developing/tools/adb.html adb install adb pull adb push  e.g. adb push foo.txt /sdcard/foo.txt adb shell Source: http://en.androidwiki.com/wiki/ADB_Shell_Command_Reference telnet localhost 5554 help|h|? print a list of commands event simulate hardware events geo Geo-location commands gsm GSM related commands kill kill the emulator instance network manage network settings power power related commands quit|exit quit control session redir manage port redirections sms SMS related commands vm manager virtual machine state window manage emulator window

Android: Install Samplejni

JNI Example This sample shows how to build a native code library, package it into an APK, and call it using JNI. Prerequesites You must install the Android SDK in order to build the Java APK. The Android SDK can be downloaded from http://code.google.com/android/download.html Build Steps: 1) Create an Eclipse project to for the Java code. Launch Eclipse Choose File : New : Project... Choose Android : Android Project Choose Next Enter "JNIExample" into the Project name: field. Choose "Create project from existing source" Click the Browse button and browse to the ndk/samplejni directory Click Finish 2) Build the Eclipse Project Select the JNIExample project in the Package Explorer Make sure that the menu item Project:Build Automatically is not checked Choose Project:Build The resulting apk file ends up in bin/full/JNIExample.apk 2) Build the shared library, insert the shared library into the APK file and resign thee shared library. ANDROID_SDK_BASE= make Install

TCWiki: How to make Tomcat know updated servlet

Hi all, I recently noticed that every time I make a single change to a servlet, I have to stop Tomcat and start it again so that the change is applied. I tried clearing the browser's cache but it didn't work. Well, I have just had Tomcat running with Apache for a few weeks but I don't remember Tomcat behaved like this before. Does anyone have any idea what is going on? I appreciate any help or suggestion. Thanks  Answer: Set reloadable to be true in context.xml "<"Context path="/tcwiki" docBase="tcwiki"    crossContext="true" reloadable="true" debug="1"">"     "<"!-- Default set of monitored resources --">"     "<"WatchedResource">"WEB-INF/web.xml"<"/WatchedResource">" "<"/Context">" or you can reload manually running http://localhost:8080/manager/reload?path=/tcwiki

Android: Integrate tinypy into android

Integrate tinypy into Android For this project you will integrate a stripped down version of Python into the Android distribution. You can find tinypy here: http://code.google.com/p/tinypy/ # Non-members may check out a read-only working copy anonymously over HTTP. svn checkout http://tinypy.googlecode.com/svn/trunk/ tinypy-read-only /tinypy$ python setup.py tinypy boot math pygame In addition, to getting tinypy running in the emulator, you will write a small application that allows you to execute small python scripts using tinypy. luwa - The idea is making Android be able to run python source code . - Create GUI for accepting an input (some URLs) to run python. - Clusternode for Jaa => bass17 ssh steelhead, ssh bass7 /home2/pyoophoon/myandroid #root for the src of everything time make # make file and you also see the elapse time on making make -j is run faster????? test it  - The project/open source can be drop into the distribution tree - /tools in sdk which is subset of too