<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1884167058420913203</id><updated>2011-07-28T09:11:07.695-07:00</updated><category term='windows 7 free legal'/><category term='android jni sdk 1.5 tutorial example'/><category term='Android JNI Benchmark'/><title type='text'>public static final String BLOG = "</title><subtitle type='html'>Yes it's a terrible name, I'll get there eventually</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://gavaiken.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1884167058420913203/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://gavaiken.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Gav</name><uri>http://www.blogger.com/profile/07723997544013267386</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1884167058420913203.post-5989465677804457792</id><published>2009-08-26T02:18:00.000-07:00</published><updated>2009-08-26T02:30:48.118-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows 7 free legal'/><title type='text'>Windows 7 free legally via MSDNAA - Download Today!</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: arial; border-collapse: collapse; font-size: 13px; "&gt;Windows 7 is available for free via the &lt;a href="http://www-elms.doc.ic.ac.uk/" target="_blank" style="color: rgb(7, 77, 143); "&gt;MSDNAA&lt;/a&gt;.&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"   style="font-family:arial;font-size:100%;"&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial; border-collapse: collapse; font-size: 13px; "&gt;The MSDNAA (&lt;a href="http://en.wikipedia.org/wiki/MSDN_Academic_Alliance"&gt;wiki&lt;/a&gt;) provides students with free MS software, I'm not sure how widespread access is. I have an account&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial; border-collapse: collapse; font-size: 13px; "&gt;as a student of Imperial College London's Computer Science depatrment. I would be interested to know if you have to be a CS student, whether it's just in the UK and just Univesity etc.&lt;br /&gt;&lt;br /&gt;I am not advocating this as your main OS just yet (I haven't even installed it). However, it would be naive to underestimate the impact of the software on our industry, you should at least try it if you get it free!&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial; border-collapse: collapse; font-size: 13px; "&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial; border-collapse: collapse; font-size: 13px; "&gt;If the industry reviews are anything to go by then MS have certainly righted some wrongs with this iteration - let me know what you think and how widespread availability is.&lt;/span&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: arial; border-collapse: collapse; font-size: 13px; "&gt;&lt;br /&gt;&lt;div&gt;Hope you're all having a great summer!&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1884167058420913203-5989465677804457792?l=gavaiken.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gavaiken.blogspot.com/feeds/5989465677804457792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://gavaiken.blogspot.com/2009/08/windows-7-free-legally-via-msdnaa.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1884167058420913203/posts/default/5989465677804457792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1884167058420913203/posts/default/5989465677804457792'/><link rel='alternate' type='text/html' href='http://gavaiken.blogspot.com/2009/08/windows-7-free-legally-via-msdnaa.html' title='Windows 7 free legally via MSDNAA - Download Today!'/><author><name>Gav</name><uri>http://www.blogger.com/profile/07723997544013267386</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1884167058420913203.post-6285661330266313366</id><published>2009-06-07T06:51:00.000-07:00</published><updated>2009-06-07T06:53:30.385-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Android JNI Benchmark'/><title type='text'>Android Native Code Benchmarks</title><content type='html'>I have setup some basic tests to compare the runtime of algorithms on&lt;br /&gt;Dalvik Vs those run Natively on a G1.&lt;br /&gt;&lt;br /&gt;The tests can be found here;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/android-benchmarks/" target="_blank"&gt;http://code.google.com/p/&lt;wbr&gt;android-benchmarks/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Go to 'source' and checkout with SVN.&lt;br /&gt;&lt;br /&gt;There are a bunch of links at the bottom of this page for those that&lt;br /&gt;are interested in trying JNI;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.android-internals.org/index.php?title=Main_Page" target="_blank"&gt;http://www.android-internals.&lt;wbr&gt;org/index.php?title=Main_Page&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Although officially it's not supported there is an NDK planned for the&lt;br /&gt;near future (End of 2009);&lt;br /&gt;&lt;br /&gt;&lt;a href="http://groups.google.com/group/android-ndk" target="_blank"&gt;http://groups.google.com/&lt;wbr&gt;group/android-ndk&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My preliminary results show that quick sort is vastly slower than&lt;br /&gt;native code on the G1 whereas the Sun JVM versus native code (gcc -O2)&lt;br /&gt;are essentially the same on a desktop.&lt;br /&gt;&lt;br /&gt;I'm not saying it's groundbreaking info but it's nice to have some&lt;br /&gt;hard statistics. You'll have to change the output log file names to&lt;br /&gt;run this and have the Code Sourcery compiler installed.&lt;br /&gt;&lt;br /&gt;I hope to stick some graphs up soon!&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;&lt;span style="color:#888888;"&gt;&lt;br /&gt;Gav&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1884167058420913203-6285661330266313366?l=gavaiken.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gavaiken.blogspot.com/feeds/6285661330266313366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://gavaiken.blogspot.com/2009/06/android-native-code-benchmarks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1884167058420913203/posts/default/6285661330266313366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1884167058420913203/posts/default/6285661330266313366'/><link rel='alternate' type='text/html' href='http://gavaiken.blogspot.com/2009/06/android-native-code-benchmarks.html' title='Android Native Code Benchmarks'/><author><name>Gav</name><uri>http://www.blogger.com/profile/07723997544013267386</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1884167058420913203.post-5500629327723236031</id><published>2009-05-23T16:44:00.000-07:00</published><updated>2009-06-07T06:51:16.088-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='android jni sdk 1.5 tutorial example'/><title type='text'>Android 1.5 and JNI - Basic Example</title><content type='html'>I have adapted a tutorial written by &lt;a href="http://davanum.wordpress.com/2007/12/09/android-invoke-jni-based-methods-bridging-cc-and-java/"&gt;&lt;span style="font-size:100%;"&gt;Davanum Srinivas&lt;/span&gt;&lt;/a&gt; in 2007, I give &lt;span style="font-weight: bold;"&gt;all&lt;/span&gt; credit to him, I merely updated some stuff for &lt;a href="http://code.google.com/p/android/issues/detail?id=2556"&gt;Android 1.5&lt;/a&gt;. While we wait for the &lt;a href="http://groups.google.com/group/android-ndk"&gt;android-ndk&lt;/a&gt; for those of you that get a thrill calling a C library from an android application here's an updated run down.&lt;br /&gt;&lt;br /&gt;Requirements&lt;br /&gt;&lt;br /&gt;- Dev phone (Hopefully I'll create a better version soon)&lt;br /&gt;- Android SDK 1.5&lt;br /&gt;- &lt;a href="http://www.codesourcery.com/sgpp/lite/arm/portal/subscription?@template=lite"&gt;Sourcery G++ Lite 2009q1-176&lt;/a&gt; (It's the one I used although EABI might be correct)&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Create a new Android project in eclipse&lt;/li&gt;&lt;li&gt;Create an empty folder (native) in the root of the project&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Setup your &lt;a href="http://code.google.com/p/miffed/source/browse/MiffedJNI/src/uk/ac/ic/doc/gea05/miffedjni/MiffedPlusPlus.java"&gt;main activity&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Setup your &lt;a href="http://code.google.com/p/miffed/source/browse/MiffedJNI/src/uk/ac/ic/doc/gea05/miffedjni/nativewrappers/NativeAdd.java"&gt;static java class&lt;/a&gt; to call your native library&lt;/li&gt;&lt;li&gt;Generate &lt;a href="http://code.google.com/p/miffed/source/browse/MiffedJNI/native/uk_ac_ic_doc_gea05_miffedjni_nativewrappers_NativeAdd.h"&gt;header files&lt;/a&gt; as per any JNI project&lt;/li&gt;&lt;ul&gt;&lt;li&gt;cd /path-to-android-project/native/&lt;/li&gt;&lt;li&gt;javah -classpath /path-to-sdk&lt;path-to-sdk&gt;/platforms/android-1.5/android.jar:../bin/ com.example.StaticNativeWrapper&lt;/path-to-sdk&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Write your &lt;a href="http://code.google.com/p/miffed/source/browse/MiffedJNI/native/uk_ac_ic_doc_gea05_miffedjni_nativewrappers_NativeAdd.c"&gt;native file&lt;/a&gt; to match the header file generated&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Copy the modified &lt;a href="http://code.google.com/p/miffed/source/browse/MiffedJNI/native/armelf_linux_eabi.xsc"&gt;armelf_linux_eabi.xsc&lt;/a&gt; to your 'native' folder to find out how and why it's modified check out &lt;a href="http://honeypod.blogspot.com/2007/12/shared-library-hello-world-for-android.html"&gt;motz diary&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Compile and link the headers from step 5 and the native code from step 6&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;arm-none-linux-gnueabi-gcc  -I/usr/lib/jvm/java-6-sun/include -I/usr/lib/jvm/java-6-sun/include/linux  -fpic -c uk_ac_ic_doc_gea05_miffedjni_nativewrappers_NativeAdd.c&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;arm-none-linux-gnueabi-ld -T armelf_linux_eabi.xsc -shared -o libNativeAdd.so uk_ac_ic_doc_gea05_miffedjni_nativewrappers_NativeAdd.o&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Put the library on your sdcard and put it in the data for your application;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;adb push libNativeAdd.so /sdcard/native/libNativeAdd.so&lt;/li&gt;&lt;li&gt;adb shell&lt;/li&gt;&lt;ul&gt;&lt;li&gt;# cat /sdcard/native/libNativeAdd.so &gt;/data/data/com.example.application/libNativeAdd.so&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Install your application and enjoy!&lt;/li&gt;&lt;ul&gt;&lt;li&gt;adb install ../bin/Application.apk&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;Hopefully this works for you. I'm just trying to work out how to change step 8 so that the library is an asset that's loaded to /data/ on install. If anyone can help I think all the info is in the penultimate paragraph of &lt;a href="http://www.koushikdutta.com/2009/01/jni-in-android-and-foreword-of-why-jni.html"&gt;koushik's blog&lt;/a&gt; I just don't have time to look at it right now.&lt;br /&gt;&lt;br /&gt;Feel free to&lt;a href="http://code.google.com/p/miffed/source/checkout"&gt; check out my project&lt;/a&gt; over svn and play around with it.&lt;br /&gt;&lt;br /&gt;Have fun!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1884167058420913203-5500629327723236031?l=gavaiken.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://gavaiken.blogspot.com/feeds/5500629327723236031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://gavaiken.blogspot.com/2009/05/android-15-and-jni-basic-example.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1884167058420913203/posts/default/5500629327723236031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1884167058420913203/posts/default/5500629327723236031'/><link rel='alternate' type='text/html' href='http://gavaiken.blogspot.com/2009/05/android-15-and-jni-basic-example.html' title='Android 1.5 and JNI - Basic Example'/><author><name>Gav</name><uri>http://www.blogger.com/profile/07723997544013267386</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry></feed>
