<?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:blogger='http://schemas.google.com/blogger/2008' 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-1695208298020614094</id><updated>2026-10-18T15:50:49.250-04:00</updated><category term="Android"/><category term="ARM"/><category term="Python"/><category term="x86"/><category term="Linux"/><category term="Apple"/><category term="GNU"/><category term="Arduino"/><category term="CentOS"/><category term="DHCP"/><category term="Fortran"/><category term="GPON"/><category term="Javascript"/><category term="MacOSX"/><category term="Mips"/><category term="Network"/><category term="Router"/><category term="UNIX"/><category term="Windows"/><category term="busybox"/><category term="iMac"/><category term="ksh"/><title type='text'>Danilo&#39;s Tech Blog</title><subtitle type='html'>After many years of searching the web for tips and tricks about computers, operating systems and programming languages, it&#39;s finally time to give back and post solutions to common problems I&#39;m dealing  with.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-5846559290803550</id><published>2026-10-18T15:50:49.249-04:00</published><updated>2026-10-18T15:50:49.250-04:00</updated><title type='text'>This blog has moved!</title><content type='html'>&lt;p&gt;All my posts, plus new ones, now live at &lt;strong&gt;&lt;a href=&quot;https://giulianelli.com/notebook/&quot;&gt;giulianelli.com/notebook&lt;/a&gt;&lt;/strong&gt;. You’ll also find my Bell Labs-era career, patents and 3D-printing projects there. Thanks for reading! — Danilo&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/5846559290803550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2026/10/this-blog-has-moved.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/5846559290803550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/5846559290803550'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2026/10/this-blog-has-moved.html' title='This blog has moved!'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-4127282831643746122</id><published>2015-06-01T22:23:00.000-04:00</published><updated>2015-06-01T22:23:30.599-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="ARM"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Simplified script to cross-compile Python-4-Android for both ARM NEON and x86</title><content type='html'>I&#39;ve created a simple script to cross-compile Python-4-Android for both the ARM NEON AND x86 architectures. This script only works with the patched Python-4-Android archive you can download from this post. I successfully ran the script on a Ubuntu 13.04 machine using the Android NDK version r9c.&lt;br /&gt;
&lt;br /&gt;
First download both the make.sh script and python-for-android.tar.bz2 files in the same directory:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://sites.google.com/site/dgtechblogscripts/python-for-android.tar.bz2&quot;&gt;python-for-android.tar.bz2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://sites.google.com/site/dgtechblogscripts/make.sh&quot;&gt;make.sh&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Cross-compiling Python-4-Android for ARM NEON&lt;/h2&gt;
To cross-compile for ARM NEON, run &lt;i&gt;make.sh&lt;/i&gt; with the following options:&lt;br /&gt;
&lt;br /&gt;
$&amp;nbsp;make.sh -x -n /path/to/android-ndk-r9c -a armeabi-v7a-NEON -t arm-linux-androideabi-4.8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Cross-compiling Python-4-Android for x86&lt;/h2&gt;
To cross-compile for x86, run&amp;nbsp;&lt;i&gt;make.sh&lt;/i&gt;&amp;nbsp;with the following options:&lt;br /&gt;
&lt;br /&gt;
$&amp;nbsp;make.sh -x -n /path/to/android-ndk-r9c -a x86 -t x86-4.6</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/4127282831643746122/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2015/06/simplified-script-to-cross-compile.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/4127282831643746122'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/4127282831643746122'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2015/06/simplified-script-to-cross-compile.html' title='Simplified script to cross-compile Python-4-Android for both ARM NEON and x86'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-2953835940245971851</id><published>2014-02-27T11:44:00.000-05:00</published><updated>2014-02-27T11:44:05.811-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="ARM"/><title type='text'>ndk-gdb error: Could not extract package&#39;s data directory. Are you sure that your installed application is debuggable?</title><content type='html'>&lt;h2&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The Problem &lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;You have a phone running Android 4.3 and you are trying to debug your native C++ application using the Android NDK version r9c with ndk-gdb.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;When you enter the ndk-gdb command you get the error:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;$ ndk-gdb&amp;nbsp;&amp;nbsp; &lt;br /&gt;ERROR: Could not extract package&#39;s data directory. Are you sure that&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; your installed application is debuggable?&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;You can find a description of this problem in Android Issue number &lt;a href=&quot;https://code.google.com/p/android/issues/detail?id=58373&quot;&gt;58373.&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;I encountered this problem with a Samsung Galaxy S4 running Android 4.3.&amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The Solution &lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The easiest solution for me was to root the device and change the permissions of the &lt;i&gt;run-as&lt;/i&gt; command to run as root. You can achieve this by running the following commands using the ADB shell:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;$ su -&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;# chmod 4750 /system/bin/run-as &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;# mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt; &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/2953835940245971851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2014/02/ndk-gdb-error-could-not-extract.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/2953835940245971851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/2953835940245971851'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2014/02/ndk-gdb-error-could-not-extract.html' title='ndk-gdb error: Could not extract package&#39;s data directory. Are you sure that your installed application is debuggable?'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-6714029989516549163</id><published>2013-10-10T10:17:00.001-04:00</published><updated>2014-03-14T20:54:53.114-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ksh"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>Once upon a time there were Bell Labs...</title><content type='html'>Today is another step closer to the end of an era for the old AT&amp;amp;T Bell Labs (now called AT&amp;amp;T Labs). Our valued colleague David Korn (inventor of the famous Korn Shell - ksh) is leaving the labs, and he sent us the following farewell message in a form of (what else?) a Korn Shell script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre wrap=&quot;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;cd /tmp&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;if [[ $(print hello) != hello ]] 2&amp;gt; /dev/null&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;then echo &#39;You should use ksh&#39;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; alias print=echo&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;fi&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;trap &#39;rm mvs2*&#39; EXIT&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;trap &#39;print &quot;$year: dgk raptured to dgk@xxxxxxxxx&quot;&#39; TERM&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;for x in 76 78 80 81 83 86 87 88 89 90 91 93 95 99 100 103 107 108 110 112 113&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;do case $((year=1900+x)) in&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 1976) print &quot;$year: Hello Bell Telephone Labs, Holmdel; Goodbye NYU&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 1978) print &quot;$year: create &#39;formshell&#39; for RBCS from Bourne shell&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 1980) print &quot;$year: leave Bell Telephone Labs and return to NYU&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 1981) print &quot;$year: return to Bell Telephone Labs Murray Hill Bldg 5&quot;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;  print &quot;$year: meet erg north dgb and kpv&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 1983) print &quot;$year: first version of ksh with editing and job control&quot;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;  print &quot;$year: dgb becomes my supervisor&quot;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;  print &quot;$year: UNIX for apollo with erg and ed fisher&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 1986) print &quot;$year: compete with kpv for best malloc library&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 1987) print &quot;$year: win best one liner in obfuscated C contest&quot;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;  print &quot;$year: began long and continuing collaboration with gsf&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 1988) print &quot;$year: KornShell 88 book published&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 1989) print &quot;$year: 3d file system with gsf and ekrell&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 1990) print &quot;$year: sfio with kpv&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 1991) print &quot;$year: begin ast library with gsf&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 1993) print &quot;$year: first version of ksh93&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 1995) print &quot;$year: 1993 KornShell book published&quot;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;  print &quot;$year: first version of UWIN&quot;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;  print &quot;$year: Bell Labs split to AT&amp;amp;T Labs and Lucent&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 1997) print &quot;$year: move to Florham Park&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 1999) print &quot;$year: y2k testing software created&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 2000)  print &quot;$year: ast software becomes self documenting&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 2003) &amp;gt; mvs2pc; print &quot;$year: create mvs2pc&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 2007) print &quot;$year: Universal Biller invoicing runs with msv2pc&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 2008) print &quot;$year: UWIN merged into VizGems written in ksh by Dr. ek&quot;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;  print &quot;$year: merged mfcobol compiler into mvs2pc&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 2010) print &quot;$year: distributed shell using coshell&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 2012) mv mvs2pc mvs2cloud; print &quot;$year: rename mvs2pc to mvs2cloud&quot;;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; 2013) kill -TERM $$;;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; esac&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;done&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;exit&lt;/span&gt;
&lt;/span&gt;


&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/6714029989516549163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/10/once-upon-time-there-were-bell-labs.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/6714029989516549163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/6714029989516549163'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/10/once-upon-time-there-were-bell-labs.html' title='Once upon a time there were Bell Labs...'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-8150740088724205151</id><published>2013-08-22T09:29:00.001-04:00</published><updated>2014-01-26T11:14:46.359-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="ARM"/><title type='text'>How to debug Android Native Code with Eclipse</title><content type='html'>This blog summarizes the steps needed to set-up your Eclipse environment
 to support the debugging of an Android native application written in 
C/C++. It&#39;s taken from an old Carlos Suoto&#39;s web page that doesn&#39;t seem to exist anymore.&lt;br /&gt;
&lt;h2 id=&quot;Pre-Requisites&quot;&gt;
1. Pre-Requisites&lt;/h2&gt;
&lt;span class=&quot;anchor&quot; id=&quot;line-9&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Make sure you compile your C/C++ with the &quot;-g&quot; option (or use -DCMAKE_BUILD_TYPE:STRING=&quot;Debug&quot; if you use cmake). &lt;span class=&quot;anchor&quot; id=&quot;line-10&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Make sure  APP_OPTIM is set to &quot;APP_OPTIM:=debug&quot; in Android.mk and Application.mk.&lt;span class=&quot;anchor&quot; id=&quot;line-11&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Make sure build/core/build-binary.mk in Android NDK doesn&#39;t strip executables. For example patch android-ndk-r8e/build/core/build-binary.mk to the following:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;--- build/core/build-binary.mk.orig&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-08-21 11:06:39.818329442 -0400&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+++ build/core/build-binary.mk&amp;nbsp; 2013-08-21 11:13:11.877214361 -0400&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -485,10 +485,16 @@ $(LOCAL_INSTALLED): PRIVATE_DST&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :=&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;$(LOCAL_INSTALLED): PRIVATE_STRIP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; := $(TARGET_STRIP)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;$(LOCAL_INSTALLED): PRIVATE_STRIP_CMD := $(call cmd-strip, $(PRIVATE_DST))&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+ifeq ($(APP_OPTIM),debug)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+$(LOCAL_INSTALLED): $(LOCAL_BUILT_MODULE) clean-installed-binaries&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @$(HOST_ECHO) &quot;Install&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : $(PRIVATE_NAME) =&amp;gt; $(call pretty-dir,$(PRIVATE_DST))&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(hide) $(call host-install,$(PRIVATE_SRC),$(PRIVATE_DST))&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+else&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;$(LOCAL_INSTALLED): $(LOCAL_BUILT_MODULE) clean-installed-binaries&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @$(HOST_ECHO) &quot;Install&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : $(PRIVATE_NAME) =&amp;gt; $(call pretty-dir,$(PRIVATE_DST))&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(hide) $(call host-install,$(PRIVATE_SRC),$(PRIVATE_DST))&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(hide) $(PRIVATE_STRIP_CMD)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+endif&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;line867&quot;&gt;
&lt;/div&gt;
&lt;h4 id=&quot;Install_the_Eclipse_Sequoyah_plugin&quot;&gt;
1.1. Install the Eclipse Sequoyah plugin&lt;/h4&gt;
&lt;span class=&quot;anchor&quot; id=&quot;line-14&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;&lt;div class=&quot;line862&quot;&gt;
In Eclipse go to Help -&amp;gt; Install New Software &lt;span class=&quot;anchor&quot; id=&quot;line-15&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Click on the Add button &lt;span class=&quot;anchor&quot; id=&quot;line-16&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Enter &#39;Sequoyah Metadata Repository&#39; in the Name field &lt;span class=&quot;anchor&quot; id=&quot;line-17&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;line862&quot;&gt;
Enter &#39;&lt;a class=&quot;http&quot; href=&quot;http://download.eclipse.org/sequoyah/updates/2.0/&quot;&gt;http://download.eclipse.org/sequoyah/updates/2.0/&lt;/a&gt;&#39; in the Location field &lt;span class=&quot;anchor&quot; id=&quot;line-18&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;If you still see the &quot;There are no categorized items&quot; message, uncheck the &quot;Group items by category&quot; radio button &lt;span class=&quot;anchor&quot; id=&quot;line-19&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Select &quot;Sequoyah Android Native Code Support&quot; and install the plugin &lt;span class=&quot;anchor&quot; id=&quot;line-20&quot;&gt;&lt;/span&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-21&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;line867&quot;&gt;
&lt;/div&gt;
&lt;h4 id=&quot;Convert_The_Android_Java_Application_into_C.2BAC8-C.2B-.2B-_Project&quot;&gt;
1.2. Convert The Android Java Application into C/C++ Project&lt;/h4&gt;
&lt;span class=&quot;anchor&quot; id=&quot;line-22&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;line874&quot;&gt;
You must 
convert your Java project to C/C++ using the Sequoyah plugin or else you
 won&#39;t be able to see the configuration options to set the proper 
debugger settings. &lt;span class=&quot;anchor&quot; id=&quot;line-23&quot;&gt;&lt;/span&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-24&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;In Eclipse select the Android Java project you need to convert &lt;span class=&quot;anchor&quot; id=&quot;line-25&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;line862&quot;&gt;
Right click with the mouse and select Android Tools -&amp;gt; Add Native Support &lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;Other_Pre-Requisites&quot;&gt;
1.3. Other Pre-Requisites&lt;/h4&gt;
&lt;span class=&quot;anchor&quot; id=&quot;line-28&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;The platform must be Android 2.2 (android-8) or later &lt;span class=&quot;anchor&quot; id=&quot;line-29&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;The ndk version must be r4b (it contains bugfixes to ndk-gdb that are necessary) or later &lt;span class=&quot;anchor&quot; id=&quot;line-30&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Eclipse CDT 7.0 or newer must be installed &lt;span class=&quot;anchor&quot; id=&quot;line-31&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;line862&quot;&gt;
The &lt;a class=&quot;nonexistent&quot; href=&quot;http://watson.research.att.com/wikidocs/AndroidManifest&quot;&gt;AndroidManifest&lt;/a&gt;.xml must have the property of the application node android:debuggable=&quot;true&quot; &lt;span class=&quot;anchor&quot; id=&quot;line-32&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;The build must have been done with the ndk-build (if using the Sequoyah Android components, it will be automatic) &lt;span class=&quot;anchor&quot; id=&quot;line-33&quot;&gt;&lt;/span&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-34&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;line867&quot;&gt;
&lt;/div&gt;
&lt;h2 id=&quot;Configurations&quot;&gt;
2. Configurations&lt;/h2&gt;
&lt;span class=&quot;anchor&quot; id=&quot;line-35&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;01) Create a debug configuration for an Android application (can be done with Eclipse or MOTODEV Studio) &lt;span class=&quot;anchor&quot; id=&quot;line-36&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;02) Create a debug configuration for a C/C++ application &lt;span class=&quot;anchor&quot; id=&quot;line-37&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;line862&quot;&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
03) Set the following properties:                            &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNoBPY-wqs15ypa_lXJKyhivkKQ7D_3oWL17GXVSqnL1RdBZ3hkANW-rTgjd79O_sKTWmOp5OJfL0TlsiKsRo87I_owolbOpF_jvSVNMABBlkDdSWes4eJT8P9SYPWg5LHmHRH3wwPXlU/s1600/how2debug1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNoBPY-wqs15ypa_lXJKyhivkKQ7D_3oWL17GXVSqnL1RdBZ3hkANW-rTgjd79O_sKTWmOp5OJfL0TlsiKsRo87I_owolbOpF_jvSVNMABBlkDdSWes4eJT8P9SYPWg5LHmHRH3wwPXlU/s1600/how2debug1.png&quot; height=&quot;241&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;04) The process launcher must be the Standard Process Launcher. This is selected at the bottom of the Main tab:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAG50gR1SApxqHro7nyATr5QGy744Pcw4uANRnQzm2iCvwJzzXBOZ3DgwvI9EZw2IHPqnPzoYHx2N0bwohIDR5XjH8CsZms74kG6sIwZzrahgFYfKs1xHBaW8oqd7strxWH0HuN-TELIU/s1600/how2debug2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAG50gR1SApxqHro7nyATr5QGy744Pcw4uANRnQzm2iCvwJzzXBOZ3DgwvI9EZw2IHPqnPzoYHx2N0bwohIDR5XjH8CsZms74kG6sIwZzrahgFYfKs1xHBaW8oqd7strxWH0HuN-TELIU/s1600/how2debug2.png&quot; height=&quot;180&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipU7Qk8CsoFwn81ypsX0wCCGbQNmK8s7j11x58gDpcrGbtzHSOdb-vfmW9g-puaJquzguyTPt4U21GyogLQgunXjHNiupLhZ-UQf4wrH59Ia8jty8Ea8dfBiRmpUQryca2-dM03QE8ZlA/s1600/how2debug3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipU7Qk8CsoFwn81ypsX0wCCGbQNmK8s7j11x58gDpcrGbtzHSOdb-vfmW9g-puaJquzguyTPt4U21GyogLQgunXjHNiupLhZ-UQf4wrH59Ia8jty8Ea8dfBiRmpUQryca2-dM03QE8ZlA/s1600/how2debug3.png&quot; height=&quot;320&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;line862&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;div class=&quot;line862&quot;&gt;
05) On the &quot;Main&quot; tab: &lt;br /&gt;
the Field C/C++ Application: $PROJECT_PATH/obj/local/armeabi/app_process &lt;span class=&quot;anchor&quot; id=&quot;line-40&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbOZpPmsyeTqE6XUPt-OYKOzC7DRprKm4ks3wpsjrAUcx8j9Fhdyww3oj4FGCh6dutFylM6BmBtfYF7X-Anj-6Ga-pMA6tP61bzNKN-VPEZQOAw_GaqcMti02iRqFqbIcnxLc0rgM4-go/s1600/how2debug4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbOZpPmsyeTqE6XUPt-OYKOzC7DRprKm4ks3wpsjrAUcx8j9Fhdyww3oj4FGCh6dutFylM6BmBtfYF7X-Anj-6Ga-pMA6tP61bzNKN-VPEZQOAw_GaqcMti02iRqFqbIcnxLc0rgM4-go/s1600/how2debug4.png&quot; height=&quot;180&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;line862&quot;&gt;
06) On the &quot;Debugger&quot; tab: &lt;br /&gt;
&lt;span class=&quot;anchor&quot; id=&quot;line-41&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;field Debugger: gdbserver &lt;span class=&quot;anchor&quot; id=&quot;line-42&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEIqMlbZz77oSlYP7BpsJpHdH5r50bYV55NKg2IyxfTN4sFk1LcSCoxtC4saRSRYLNgPumjp4T6OodVw50ep-4arV-cgtHUf0sEvq15DtbsW0GHu_3dXsMKCwtCYvD9Uz3ApKmhUEncI8/s1600/how2debug5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEIqMlbZz77oSlYP7BpsJpHdH5r50bYV55NKg2IyxfTN4sFk1LcSCoxtC4saRSRYLNgPumjp4T6OodVw50ep-4arV-cgtHUf0sEvq15DtbsW0GHu_3dXsMKCwtCYvD9Uz3ApKmhUEncI8/s1600/how2debug5.png&quot; height=&quot;173&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;line862&quot;&gt;
On the &quot;Main&quot; subtab:                                               &lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;07) GDB debugger: $NDK_PATH/build/prebuilt/$ARCH/arm-eabi-$GCC_VERSION/bin/arm-eabi-gdb &lt;span class=&quot;anchor&quot; id=&quot;line-44&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;line862&quot;&gt;
08) GDB command file: $PROJECT_PATH/obj/local/armeabi/gdb2.setup&lt;br /&gt;
[Windows users] 
Uncheck the &quot;Use full file path to set breakpoints&quot; option &lt;span class=&quot;anchor&quot; id=&quot;line-45&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;line862&quot;&gt;
On the &quot;Connection&quot; subtab:                                                 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMohMGuAC9tCLgvDALzMWYknJkSffcsvmE9bX0uSxq6QHcfmmjn1Ftgesyo6sLbuEoIC8FwfQ1nSDTr8Xtv1G7uE2VxVzZMJrCCkXAUdQMMgWDgLrMoi9JpUILkIBRfMrmSHE6vwZoO2A/s1600/how2debug6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMohMGuAC9tCLgvDALzMWYknJkSffcsvmE9bX0uSxq6QHcfmmjn1Ftgesyo6sLbuEoIC8FwfQ1nSDTr8Xtv1G7uE2VxVzZMJrCCkXAUdQMMgWDgLrMoi9JpUILkIBRfMrmSHE6vwZoO2A/s1600/how2debug6.png&quot; height=&quot;173&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;09) Type: TCP &lt;span class=&quot;anchor&quot; id=&quot;line-47&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;10) Hostname or IP address: localhost &lt;span class=&quot;anchor&quot; id=&quot;line-48&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;11) Port number: 5039&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h2 id=&quot;Instructions&quot;&gt;
3. Instructions&lt;/h2&gt;
&lt;span class=&quot;anchor&quot; id=&quot;line-51&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Open the 
ndk-gdb script that came with the android NDK and comment the last line 
(we are not calling the usual gdb client, but we will attach an Eclipse 
gdb session instead): &lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-52&quot;&gt;&lt;/span&gt;&lt;ul&gt;
&lt;li style=&quot;list-style-type: none;&quot;&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-53&quot;&gt;&lt;/span&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-54&quot;&gt;&lt;/span&gt;&lt;pre&gt;    &lt;span style=&quot;font-size: small;&quot;&gt;# $GDBCLIENT -x $GDBSETUP -e $APP_PROCESS&lt;/span&gt;
&lt;/pre&gt;
&lt;span class=&quot;anchor&quot; id=&quot;line-55&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Insert
 a breakpoint in your Java code, preferably after all 
System.loadLibrary() calls. (To make sure that the debugger is correctly
 attached to the Java process) &lt;span class=&quot;anchor&quot; id=&quot;line-56&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Launch the android debug and wait for it to reach the breakpoint &lt;span class=&quot;anchor&quot; id=&quot;line-57&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;From
 a Terminal session, in the project folder, run the modified ndk-gdb 
command. It should not attach to an gdb client, but call the gdbserver 
on the emulator and open a TCP port for connection (or in alternative if you have an Android device connected to your USB port, the ndk-gdb script will run gdbserver on the device itself). &lt;/li&gt;
&lt;li&gt;In
 the $PROJECT_PATH/obj/local/armeabi/, modify the gdb.setup file, 
removing the target remote:5039 statement. (For some reason, the Eclipse
 GDB session does not like this statement being done in the commands 
file). Rename this new file to gdb2.setup. This step need to be run just
 once, on the first debug session. &lt;span class=&quot;anchor&quot; id=&quot;line-59&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Launch the C/C++ Application debug and wait for the Eclipse GDB session to fully connect to the emulator&#39;s gdbserver instance. &lt;span class=&quot;anchor&quot; id=&quot;line-60&quot;&gt;&lt;/span&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-61&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
After
 following these steps, one can continue to debug the application as 
usual, using the &quot;continue&quot; option to let the execution flow until the 
next breakpoint is hit or by using the usual &quot;step-in&quot; to execute each 
statement individually. Setting a breakpoint on a Java statement that 
calls a native function through JNI and stepping into will place the 
user at the beginning of the native code.&lt;br /&gt;
Another way to set breakpoints in the C/C++ code is from Eclipse to click on File -&amp;gt; Open File and browse to the location of your source code. Then double-click on the line where you want to set the breakpoint.</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/8150740088724205151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/08/how-to-debug-android-native-code-with.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/8150740088724205151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/8150740088724205151'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/08/how-to-debug-android-native-code-with.html' title='How to debug Android Native Code with Eclipse'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNoBPY-wqs15ypa_lXJKyhivkKQ7D_3oWL17GXVSqnL1RdBZ3hkANW-rTgjd79O_sKTWmOp5OJfL0TlsiKsRo87I_owolbOpF_jvSVNMABBlkDdSWes4eJT8P9SYPWg5LHmHRH3wwPXlU/s72-c/how2debug1.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-8650290391477997343</id><published>2013-05-09T15:04:00.001-04:00</published><updated>2013-05-09T15:04:52.383-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>How to compile libogg for Android</title><content type='html'>To compile libogg for Android, you just need to create an appropriate jni/Android.mk makefile with the minimum set of files and options needed to compile libogg for Android.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Download ogg from http://downloads.xiph.org/releases/ogg/ (for example I downloaded libogg-1.1.4.tar.gz)&lt;/li&gt;
&lt;li&gt;untar the file in your local directory:&lt;br /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ tar zxf libogg-1.1.4.tar.gz&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;create a jni directory and put the following text into a file named jni/Android.mk:&lt;br /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; LOCAL_PATH := $(call my-dir)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;include $(CLEAR_VARS)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;LOCAL_MODULE&amp;nbsp;&amp;nbsp;&amp;nbsp; := ogg&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;LOCAL_CFLAGS&amp;nbsp;&amp;nbsp;&amp;nbsp; := \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -DFIXED_POINT -DUSE_KISS_FFT -DEXPORT=&quot;&quot; -UHAVE_CONFIG_H \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -D_ANDROID&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;LOCAL_C_INCLUDES := \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ../libogg-1.1.4/include&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;LOCAL_SRC_FILES := \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ../libogg-1.1.4/src/bitwise.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ../libogg-1.1.4/src/framing.c &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;include $(BUILD_SHARED_LIBRARY)&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp;Now your directory should look like the following:&lt;br /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ ls&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;jni/&amp;nbsp; libogg-1.1.4/&amp;nbsp; libogg-1.1.4.tar.gz&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;change directory to jni and run ndk-build:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ cd jni; ndk-build V=1&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
That should do it. </content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/8650290391477997343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/05/how-to-compile-libogg-for-android.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/8650290391477997343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/8650290391477997343'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/05/how-to-compile-libogg-for-android.html' title='How to compile libogg for Android'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-297191468997554336</id><published>2013-02-20T22:56:00.001-05:00</published><updated>2013-10-23T09:47:24.013-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="ARM"/><category scheme="http://www.blogger.com/atom/ns#" term="busybox"/><category scheme="http://www.blogger.com/atom/ns#" term="Mips"/><category scheme="http://www.blogger.com/atom/ns#" term="x86"/><title type='text'>How to compile busybox with Android NDK for both ARM and x86 architectures</title><content type='html'>I was looking for a way to run &lt;a href=&quot;http://www.busybox.net/&quot;&gt;busybox&lt;/a&gt; on a Motorola RAZRi with an x86 Intel Atom processor but I couldn&#39;t find any Android app from the Google play market that was running on the phone (when running any busybox command nothing happened and I was immediately getting the prompt back).&lt;br /&gt;
So I decided to cross-compile busybox for Android myself. Now you will find other posts claiming to have done so by downloading an ARM-cross compiler from codesourcery.com but I had two problems with that approach:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;I needed an x86 cross-compiler and,&lt;/li&gt;
&lt;li&gt;I read various complaints of people not being able to run various busybox commands with this method.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;h2&gt;
Cross-compiling busybox with the Android NDK&lt;/h2&gt;
My only option was to use the Android NDK itself, since it comes with full support of the ARM, x86, and MIPS architectures. I ended up manually configuring busybox by eliminating any module that would not cross-compile due to missing header files and/or libraries in the Android NDK.&lt;br /&gt;
To cut the story short, I managed to cross-compile busybox using the Android NDK compilers for both ARM and x86 architectures (I didn&#39;t try MIPS since I don&#39;t have a device with a MIPS processor to test the resulting binaries).&lt;br /&gt;
To build busybox yourself, download the &lt;a href=&quot;https://sites.google.com/site/dgtechblogscripts/busybox-android.patch&quot;&gt;busybox-android.patch&lt;/a&gt;, &lt;a href=&quot;https://sites.google.com/site/dgtechblogscripts/busybox-android.config&quot;&gt;busybox-android.config&lt;/a&gt;, and&amp;nbsp;&lt;a href=&quot;https://sites.google.com/site/dgtechblogscripts/build.sh&quot;&gt;build.sh&lt;/a&gt; script and run the latter with the following options:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;$ build.sh &amp;lt;android NDK dir&amp;gt; &amp;lt;NDK toolchain&amp;gt; &amp;lt;Android ABI&amp;gt; &amp;lt;Toolchain compiler version&amp;gt; &amp;lt;Android Native API Level&amp;gt; &amp;lt;Install prefix&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The script will download the busybox version 1.21.0 source code, apply the busybox-android.patch and configure busybox for the right architecture.&lt;br /&gt;
For example if you have your Android NDK installed under /home/android/android-ndk-r8d, to build busybox for the Intel x86 architecture call the build.sh script like the following:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$ build.sh /home/android/android-ndk-r8d x86-4.7 x86 4.7 android-14 /home/android/busybox-x86&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
and the cross-compiled busybox binaries will be installed under &amp;nbsp;the&amp;nbsp;&amp;nbsp;/home/android/busybox-x86 directory. Similarly if you want to build busybox for the ARM processor, run the following:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;$&amp;nbsp;build.sh /home/android/android-ndk-r8d arm-linux-androideabi-4.7 armeabi-v7a &amp;nbsp;4.7 android-14 /home/android/busybox-arm&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Download busybox binaries&lt;/h2&gt;
&lt;div&gt;
The busybox binaries for x86 (compiled using the above procedure), can be found &lt;a href=&quot;https://sites.google.com/site/dgtechblogscripts/busybox&quot;&gt;here&lt;/a&gt;.&lt;/div&gt;
&lt;h2&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Installing busybox&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;The above procedure was tested with release r8d of the Android NDK and for both ARM and x86 devices.&lt;/span&gt;&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Pre-requisites&lt;/span&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Your phone must be rooted (for example check out my blog &lt;a href=&quot;http://danilogiulianelli.blogspot.com/2013/02/how-to-root-motorola-razri-xt890.html&quot;&gt;How to root Motorola RAZRi XT890 running Android 4.0.4&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;You must activate USB debugging mode on your device by going to Settings -&amp;gt; Developer Options -&amp;gt; USB Debugging and selecting the corresponding check box.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Installation Procedure&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;To install busybox on an x86 Android (rooted) device, I run the following commands with the phone connected to the computer via USB:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
# logon to the phone and become root to mount the /system file system read/write&lt;br /&gt;

&lt;span style=&quot;font-family: Helvetica;&quot;&gt;$ adb shell&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ $ su -&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ #&amp;nbsp;mount -o rw,remount -t ext4 /dev/block/system /system&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ #&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Helvetica;&quot;&gt;chmod 0777 /system/xbin&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ # exit&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ $ exit&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;$&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;then change directory to the location of the busybox binary file and push it to the phone:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;$ adb push busybox /system/xbin/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;log back on as root and change permissions appropriately:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;$ adb shell&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ $ su -&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ #&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Helvetica;&quot;&gt;chmod 755 /system/xbin/busybox&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ #&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Helvetica;&quot;&gt;chmod 0755 /system/xbin&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ # exit&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ $ exit&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;$&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;Installing busybox on an ARM Android device is very similar, only the mounting instruction line changes:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;$ adb shell&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ $ su -&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ #&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ #&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Helvetica;&quot;&gt;chmod 0777 /system/xbin&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ # exit&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ $ exit&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;$&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;$ adb push busybox /system/xbin/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;$ adb shell&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ $ su -&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ #&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Helvetica;&quot;&gt;chmod 755 /system/xbin/busybox&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ #&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Helvetica;&quot;&gt;chmod 0755 /system/xbin&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ # exit&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;shell@android:/ $ exit&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;$&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/297191468997554336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/02/how-to-compile-busybox-with-android-ndk.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/297191468997554336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/297191468997554336'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/02/how-to-compile-busybox-with-android-ndk.html' title='How to compile busybox with Android NDK for both ARM and x86 architectures'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-952749715364098515</id><published>2013-02-12T10:09:00.000-05:00</published><updated>2013-08-30T14:05:30.124-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="ARM"/><category scheme="http://www.blogger.com/atom/ns#" term="Fortran"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="x86"/><title type='text'>How to build the gcc Fortran cross-compiler for Android (ARM and x86)</title><content type='html'>If you need to cross-compile for Android a program written in Fortran, you know already that the official Android NDK does not come with the gfortran compiler, and if like me you need to port to Android code that depends on Fortran (such as the &lt;i&gt;lapack&lt;/i&gt; libraries), you are out of luck.&lt;br /&gt;
Fortunately I managed to compile the gcc Fortran cross-compiler with the help of&amp;nbsp; &lt;a href=&quot;http://specificimpulses.blogspot.com/2011/10/android-fortran-step-by-step-part-2.html&quot;&gt;Mike Long&#39;s blog&lt;/a&gt;. As an added bonus, I managed to build gfortran 4.8.0 not only for the ARM but also for the x86 toolchain, as well as update the script to the latest Android NDK (currently r8d).&lt;br /&gt;
What you need to do is the following:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;download the &lt;a href=&quot;https://sites.google.com/site/dgtechblogscripts/fortran4android&quot;&gt;fortran4android&lt;/a&gt; shell script.&lt;/li&gt;
&lt;li&gt;download the &lt;a href=&quot;https://sites.google.com/site/dgtechblogscripts/ndk-r8d-fortran.patch&quot;&gt;ndk-r8d fortran patch&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;run the script in your directory:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ fortran4android&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;wait, wait, wait, ... and you will see in the android-ndk-r8d/toolchains directory two new toolchains called arm-linux-androideabi-4.8.0 and x86-4.8.0&lt;/li&gt;
&lt;li&gt;Enjoy your new gfortran compiler.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
Note that I&#39;ve successfully tested the script only on Ubuntu 12.04.&lt;br /&gt;
&lt;h3&gt;
Addendum of August 30, 2013&lt;/h3&gt;
I now have available a patch for the newer android-ndk-r9. To use this instead of the patch above:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;download the &lt;a href=&quot;https://sites.google.com/site/dgtechblogscripts/ndk-r9-fortran.patch&quot;&gt;ndk-r9-fortran-patch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;change the fortran4android script by replacing &quot;r8d&quot; with &quot;r9&quot; everywhere&lt;/li&gt;
&lt;li&gt;run the fortran4android script in your directory.&lt;/li&gt;
&lt;/ol&gt;
&amp;nbsp;Note that r9 of the NDK already comes with a 4.8 gcc toolchain and to keep it separated, the fortran4android script will still generate in output a &quot;4.8.0&quot; toolchain. </content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/952749715364098515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/02/how-to-build-gcc-fortran-cross-compiler.html#comment-form' title='30 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/952749715364098515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/952749715364098515'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/02/how-to-build-gcc-fortran-cross-compiler.html' title='How to build the gcc Fortran cross-compiler for Android (ARM and x86)'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>30</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-4730375201555400665</id><published>2013-02-11T15:47:00.000-05:00</published><updated>2013-02-11T15:47:16.879-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><category scheme="http://www.blogger.com/atom/ns#" term="x86"/><title type='text'>How to root Motorola RAZRi XT890 running Android 4.0.4</title><content type='html'>This procedure is only valid for Motorola RAZRi model XT890 (Intel inside) running Android 4.0.4 (system version 81.5.39001.XT890.Retail.en.GB). The following instructions refer to rooting the RAZRi from a Windows 7 PC.&lt;br /&gt;
&lt;h3&gt;
You need to download the Android SDK&amp;nbsp;&lt;/h3&gt;
&lt;div&gt;
Go to the Android Developer web site and download the &lt;a href=&quot;http://developer.android.com/sdk/index.html#download&quot;&gt;Android SDK for Windows&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;
Make sure you then set the PATH environment variable to the &amp;lt;sdk&amp;gt;\platform-tools directory where all the tools can be found from the command line.&lt;/div&gt;
&lt;h3&gt;
Install the latest Motorola USB drivers for you phone&lt;/h3&gt;
Install the latest Motorola USB Drivers. &lt;a href=&quot;http://www.motorola.com/Support/US-EN/Support-Homepage/Software_and_Drivers/USB-and-PC-Charging-Drivers&quot;&gt;Get them here.&lt;/a&gt;&lt;h3&gt;
Your phone should be factory unlocked&lt;/h3&gt;
This is a must or else rooting the device will fail with the phone stuck on the bootloader. Go to the&amp;nbsp;&lt;a href=&quot;https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-b&quot;&gt;Motorola Web site&lt;/a&gt;&amp;nbsp;and follow the step by step instructions. Basically open a Command Prompt window and get your Device ID by running the &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;fastboot &lt;/span&gt;command. The instructions from Motorola are the following:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;background-color: white; font-family: Arial, helvetica, sans-serif; font-size: 12px; line-height: 15px; list-style: none; margin: 0px; padding: 0px;&quot;&gt;
&lt;li style=&quot;list-style: decimal outside; margin: 0px 0px 0px 1.6em; padding: 0px 0px 5px;&quot;&gt;Put your device in fastboot mode (press the power button and volume down button at the same time and connect your device to your computer with a USB cable).&lt;/li&gt;
&lt;li style=&quot;list-style: decimal outside; margin: 0px 0px 0px 1.6em; padding: 0px 0px 5px;&quot;&gt;On your computer, open a command prompt or Terminal session.&lt;/li&gt;
&lt;li style=&quot;list-style: decimal outside; margin: 0px 0px 0px 1.6em; padding: 0px 0px 5px;&quot;&gt;Go to the Directory where you installed the Android SDK tools, and type:&lt;span class=&quot;terminal&quot; style=&quot;display: block; font-family: &#39;Courier new&#39;; font-size: 1.2em; line-height: 1.4em; list-style-type: none; padding: 12px 10px 20px 30px; word-wrap: break-word;&quot;&gt;$ fastboot oem get_unlock_data&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;list-style: decimal outside; margin: 0px 0px 0px 1.6em; padding: 0px 0px 5px;&quot;&gt;This fastboot command will return a character string. This is the Device ID which you will be using to generate your unique unlock key.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Example Device ID (PC User)&lt;/b&gt;&lt;span class=&quot;terminal&quot; style=&quot;display: block; font-family: &#39;Courier new&#39;; font-size: 1.2em; line-height: 1.4em; list-style-type: none; padding: 12px 10px 20px 30px; word-wrap: break-word;&quot;&gt;$ fastboot oem get_unlock_data&lt;br /&gt;(bootloader) 0A40040192024205#4C4D3556313230&lt;br /&gt;(bootloader) 30373731363031303332323239#BD00&lt;br /&gt;(bootloader) 8A672BA4746C2CE02328A2AC0C39F95&lt;br /&gt;(bootloader) 1A3E5#1F53280002000000000000000&lt;br /&gt;(bootloader) 0000000&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
At this point if you submit the device ID to the web form, Motorola will send you the unlock code via e-mail (after warning you that the warranty will be void if you do so).&lt;br /&gt;
To unlock the device:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;background-color: white; font-family: Arial, helvetica, sans-serif; font-size: 12px; line-height: 15px; list-style: none; margin: 0px; padding: 0px;&quot;&gt;
&lt;li style=&quot;list-style: decimal outside; margin: 0px 0px 0px 1.6em; padding: 0px 0px 5px;&quot;&gt;Turn off your device.&lt;/li&gt;
&lt;li style=&quot;list-style: decimal outside; margin: 0px 0px 0px 1.6em; padding: 0px 0px 5px;&quot;&gt;Start your device in fastboot mode. To do this on most Motorola devices, push and hold the power and volume down at the same time, release the power button then release volume down. The device will power up in fastboot mode&lt;/li&gt;
&lt;li style=&quot;list-style: decimal outside; margin: 0px 0px 0px 1.6em; padding: 0px 0px 5px;&quot;&gt;Connect the device to the computer with a USB cable. You&#39;ll get a confirmation message on the device will indicate that it&#39;s connected.&lt;/li&gt;
&lt;li style=&quot;list-style: decimal outside; margin: 0px 0px 0px 1.6em; padding: 0px 0px 5px;&quot;&gt;Open a command window or terminal on your computer.&lt;/li&gt;
&lt;li style=&quot;list-style: decimal outside; margin: 0px 0px 0px 1.6em; padding: 0px 0px 5px;&quot;&gt;Change field to show the path to the tools folder within the Android SDK folder.&lt;/li&gt;
&lt;li style=&quot;list-style: decimal outside; margin: 0px 0px 0px 1.6em; padding: 0px 0px 5px;&quot;&gt;Verify that the desktop and device are connected by entering the following in the command field:&lt;span class=&quot;terminal&quot; style=&quot;display: block; font-family: &#39;Courier new&#39;; font-size: 1.2em; line-height: 1.4em; list-style-type: none; padding: 12px 10px 20px 30px; word-wrap: break-word;&quot;&gt;$ fastboot devices&lt;/span&gt;You should see that your device is connected.&lt;/li&gt;
&lt;li style=&quot;list-style: decimal outside; margin: 0px 0px 0px 1.6em; padding: 0px 0px 5px;&quot;&gt;Now you will unlock the bootloader. Simply enter the following in the command line:&lt;span class=&quot;terminal&quot; style=&quot;display: block; font-family: &#39;Courier new&#39;; font-size: 1.2em; line-height: 1.4em; list-style-type: none; padding: 12px 10px 20px 30px; word-wrap: break-word;&quot;&gt;$ fastboot oem unlock UNIQUE_KEY&lt;/span&gt;The UNIQUE_KEY is the code you received in the email. It is case-sensitive.&lt;/li&gt;
&lt;li style=&quot;list-style: decimal outside; margin: 0px 0px 0px 1.6em; padding: 0px 0px 5px;&quot;&gt;If the line was entered correctly, your device&#39;s screen will confirm that your device is unlocked. You have just unlocked your device&#39;s bootloader.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Root the device&lt;/h3&gt;
Get the RAZRi rooting utility for Windows. &lt;a href=&quot;http://174.132.194.66/~batakang//ftp/RAZRi/RootUtility/RAZRi_Root_Windows.zip&quot;&gt;Get it here&lt;/a&gt;.&lt;br /&gt;
Extract the zipped files and from a Command Prompt or terminal window, change directory to the location of the utility. Make sure your RAZRi is connected to your Windows PC via the USB cable. Finally run the Root.bat command, follow the instructions, and cross your fingers.&lt;br /&gt;
After rebooting at least three times the phone should be rooted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/4730375201555400665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/02/how-to-root-motorola-razri-xt890.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/4730375201555400665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/4730375201555400665'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/02/how-to-root-motorola-razri-xt890.html' title='How to root Motorola RAZRi XT890 running Android 4.0.4'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-2699496027883448427</id><published>2013-01-31T18:09:00.003-05:00</published><updated>2013-01-31T18:09:57.571-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="ARM"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>How to build Python-4-Android for the ARM Neon</title><content type='html'>
&lt;div class=&quot;post-header&quot;&gt;

&lt;/div&gt;
Currently the Py4A project does not compile for the ARM Neon architecture. If you try to run ndk-build on the project by setting the APP_ABI to &lt;b&gt;&lt;i&gt;armeabi-v7a&lt;/i&gt;&lt;/b&gt; and setting the LOCAL_ARM_NEON variable to true, you get the following error:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;libffi/src/arm/sysv.S: Assembler messages:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;libffi/src/arm/sysv.S:203: Error: selected processor does not support ARM mode `stfeqs f0,[r2]&#39;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;libffi/src/arm/sysv.S:208: Error: selected processor does not support ARM mode `stfeqd f0,[r2]&#39;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;libffi/src/arm/sysv.S:283: Error: selected processor does not support ARM mode `ldfs f0,[sp]&#39;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;libffi/src/arm/sysv.S:286: Error: selected processor does not support ARM mode `ldfd f0,[sp]&#39;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;libffi/src/arm/sysv.S:289: Error: selected processor does not support ARM mode `ldfd f0,[sp]&#39;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;make: *** [obj/local/armeabi-v7a/objs/ffi/src/arm/sysv.o] Error 1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The following patch for the &lt;i&gt;python-build/libffi/src/asm/sysv.S&lt;/i&gt; file allows you to 
cross-compile Py4A for the &lt;b&gt;&lt;i&gt;armeabi-v7a&lt;/i&gt;&lt;/b&gt; ABI and also for the Neon instruction set. The patch consists in appropriately changing the conditionals containing __SOFTFP__ and adding __SOFTFP__ || __ARM_EABI__.&lt;br /&gt;
For example to build for the ARM Neon instruction set, the ndk-build command line in build.sh should be the following:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;ndk-build APP_ABI:=armeabi-v7a LOCAL_ARM_NEON:=true&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;--- libffi/src/arm/a/sysv.S&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-01-30 14:49:29.711595414 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+++ libffi/src/arm/sysv.S&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-01-31 18:05:07.376178842 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -189,7 +189,7 @@ ARM_FUNC_START ffi_call_SYSV&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;@ return INT&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmp&amp;nbsp;&amp;nbsp;&amp;nbsp; r3, #FFI_TYPE_INT&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-#ifdef __SOFTFP__&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#if defined(__SOFTFP__) || defined(__ARM_EABI__)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmpne&amp;nbsp;&amp;nbsp;&amp;nbsp; r3, #FFI_TYPE_FLOAT&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;#endif&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; streq&amp;nbsp;&amp;nbsp;&amp;nbsp; r0, [r2]&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -197,12 +197,12 @@ ARM_FUNC_START ffi_call_SYSV&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @ return INT64&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmp&amp;nbsp;&amp;nbsp;&amp;nbsp; r3, #FFI_TYPE_SINT64&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-#ifdef __SOFTFP__&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#if defined(__SOFTFP__) || defined(__ARM_EABI__)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmpne&amp;nbsp;&amp;nbsp;&amp;nbsp; r3, #FFI_TYPE_DOUBLE&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;#endif&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; stmeqia&amp;nbsp;&amp;nbsp;&amp;nbsp; r2, {r0, r1}&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-#ifndef __SOFTFP__&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#if !defined(__SOFTFP__) &amp;amp;&amp;amp; !defined(__ARM_EABI__)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; beq&amp;nbsp;&amp;nbsp;&amp;nbsp; LSYM(Lepilogue)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;@ return FLOAT&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -245,21 +245,21 @@ ARM_FUNC_START ffi_closure_SYSV&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; beq&amp;nbsp;&amp;nbsp;&amp;nbsp; .Lretint&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmp&amp;nbsp;&amp;nbsp;&amp;nbsp; r0, #FFI_TYPE_FLOAT&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-#ifdef __SOFTFP__&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#if defined(__SOFTFP__) || defined(__ARM_EABI__)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; beq&amp;nbsp;&amp;nbsp;&amp;nbsp; .Lretint&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;#else&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; beq&amp;nbsp;&amp;nbsp;&amp;nbsp; .Lretfloat&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;#endif&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmp&amp;nbsp;&amp;nbsp;&amp;nbsp; r0, #FFI_TYPE_DOUBLE&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-#ifdef __SOFTFP__&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#if defined(__SOFTFP__) || defined(__ARM_EABI__)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; beq&amp;nbsp;&amp;nbsp;&amp;nbsp; .Lretlonglong&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;#else&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; beq&amp;nbsp;&amp;nbsp;&amp;nbsp; .Lretdouble&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;#endif&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmp&amp;nbsp;&amp;nbsp;&amp;nbsp; r0, #FFI_TYPE_LONGDOUBLE&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-#ifdef __SOFTFP__&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#if defined(__SOFTFP__) || defined(__ARM_EABI__)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; beq&amp;nbsp;&amp;nbsp;&amp;nbsp; .Lretlonglong&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;#else&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; beq&amp;nbsp;&amp;nbsp;&amp;nbsp; .Lretlongdouble&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -278,7 +278,7 @@ ARM_FUNC_START ffi_closure_SYSV&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldr&amp;nbsp;&amp;nbsp;&amp;nbsp; r1, [sp, #4]&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b&amp;nbsp;&amp;nbsp;&amp;nbsp; .Lclosure_epilogue&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-#ifndef __SOFTFP__&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#if !defined(__SOFTFP__) &amp;amp;&amp;amp; !defined(__ARM_EABI__)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;.Lretfloat:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ldfs&amp;nbsp;&amp;nbsp;&amp;nbsp; f0, [sp]&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b&amp;nbsp;&amp;nbsp;&amp;nbsp; .Lclosure_epilogue&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/2699496027883448427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/01/how-to-build-python-4-android-for-arm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/2699496027883448427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/2699496027883448427'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/01/how-to-build-python-4-android-for-arm.html' title='How to build Python-4-Android for the ARM Neon'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-4700336380257096439</id><published>2013-01-29T15:57:00.001-05:00</published><updated>2013-09-01T17:43:41.492-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="x86"/><title type='text'>How to build Python-4-Android for the x86</title><content type='html'>Currently the Py4A project only compiles for the ARM architecture.&lt;br /&gt;
&lt;br /&gt;
The following patch for the python-build sub-directory allows you to cross-compile Py4A for the x86 architecture. The patch consists in:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Adding a set of new files to support the x86 architecture (including creating a new &lt;i&gt;libffi/linux-x86/&lt;/i&gt; directory):&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;libffi/linux-x86/ffi.h&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;libffi/linux-x86/fficonfig.h&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;setup-x86.cfg&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;changing the &lt;i&gt;build.sh&lt;/i&gt; script to accept a new parameter - the Android ABI (for example &#39;armeabi&#39; or &#39;x86&#39;) - so that the script can call &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;ndk-build APP_ABI:=x86&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;to trigger the cross-compilation for the x86 processor;&lt;/li&gt;
&lt;li&gt;changing the &lt;i&gt;build.py&lt;/i&gt; script to parametrize the GCC strip command and the selection of the &lt;i&gt;setup.cfg&lt;/i&gt; configuration file based on the input ABI;&lt;/li&gt;
&lt;li&gt;changing the &lt;i&gt;libffi/Android.mk&lt;/i&gt; makefile to select the right set of source files based on the input ABI;&lt;/li&gt;
&lt;li&gt;changing the &lt;i&gt;libffi/include/ffi_real.h&lt;/i&gt; header file to redefine FFI_TYPE_LONGDOUBLE to 4;&lt;/li&gt;
&lt;li&gt;changing the &lt;i&gt;openssl/crypto/Android.mk&lt;/i&gt; and &lt;i&gt;openssl/ssl/Android.mk&lt;/i&gt; makefiles to strip down the openssl library with only the bare minimum set that allows you to cross-compile the source code;&lt;/li&gt;
&lt;li&gt;changing the&amp;nbsp; &lt;i&gt;python/jni/modules.mk&lt;/i&gt; makefile to add the &lt;b&gt;-fno-stack-protector&lt;/b&gt; compiler and linker option when building the &lt;i&gt;_socket&lt;/i&gt; module and exclude the &lt;i&gt;openssl&lt;/i&gt; module.&lt;/li&gt;
&lt;/ol&gt;
After applying the patch, to cross-compile Py4A for the x86 architecture you should run the following:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
$ cd python-build&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ ./build.sh x86 &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: inherit;&quot;&gt;Binaries for the x86 can be downloaded here:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://sites.google.com/site/dgtechblogscripts/python_extras_r14.zip&quot;&gt;python_extras_r14.zip&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://sites.google.com/site/dgtechblogscripts/python-lib_r16.zip&quot;&gt;python-lib_r16.zip&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://sites.google.com/site/dgtechblogscripts/python_r16.zip&quot;&gt;python_r16.zip&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://sites.google.com/site/dgtechblogscripts/python_scripts_r13.zip&quot;&gt;python_scripts_r13.zip&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;--- orig/python/jni/modules.mk&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-01-21 14:39:56.000000000 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+++ python/jni/modules.mk&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-01-29 14:58:52.922096000 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -58,7 +58,7 @@ $(call build-module,&amp;nbsp; syslog ,&amp;nbsp; Modules/&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;$(call build-module,&amp;nbsp; audioop ,&amp;nbsp; Modules/audioop.c )&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;$(call build-module,&amp;nbsp; imageop ,&amp;nbsp; Modules/imageop.c )&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;$(call build-module,&amp;nbsp; _csv ,&amp;nbsp; Modules/_csv.c )&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-$(call build-module,&amp;nbsp; _socket ,&amp;nbsp; Modules/socketmodule.c, libc, -lc, -nostdlib )&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+$(call build-module,&amp;nbsp; _socket ,&amp;nbsp; Modules/socketmodule.c, libc, -lc -fno-stack-protector, -nostdlib -fno-stack-protector )&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;$(call build-module,&amp;nbsp; _sha ,&amp;nbsp; Modules/shamodule.c )&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;$(call build-module,&amp;nbsp; _md5 ,&amp;nbsp; Modules/md5module.c Modules/md5.c )&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;$(call build-module,&amp;nbsp; _sha256 ,&amp;nbsp; Modules/sha256module.c )&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -125,6 +125,7 @@ include $(BUILD_SHARED_LIBRARY)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;#$(call build-module,&amp;nbsp; _ssl ,&amp;nbsp; Modules/_ssl.c, ssl crypto )&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+ifneq ($(APP_ABI), x86)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;$(call import-module, openssl)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;LOCAL_PATH :=&amp;nbsp; $(PYTHON_SRC_PATH)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;LOCAL_C_INCLUDES += $(PYTHON_SRC_PATH) $(PYTHON_SRC_PATH)/Include $(OPENSSL)/include $(OPENSSL)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -133,6 +134,7 @@ LOCAL_MODULE_FILENAME := _ssl&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;LOCAL_SRC_FILES := Modules/_ssl.c &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;LOCAL_SHARED_LIBRARIES := libpython2.6 libcrypto libssl&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;include $(BUILD_SHARED_LIBRARY)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+endif&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;$(call import-module, libffi)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;--- orig/setup-x86.cfg&amp;nbsp;&amp;nbsp;&amp;nbsp; 1969-12-31 19:00:00.000000000 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+++ setup-x86.cfg&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-01-28 16:09:49.004463929 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -0,0 +1,2 @@&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+[bdist_egg]&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+plat-name=linux-x86&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;--- orig/openssl/ssl/Android.mk&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-01-21 14:42:17.000000000 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+++ openssl/ssl/Android.mk&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-01-28 16:33:35.563643087 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -7,6 +7,10 @@ local_c_includes := \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;include $(CLEAR_VARS)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+ifeq ($(APP_ABI), x86)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+LOCAL_SRC_FILES:= \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; kssl.c&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+else&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;LOCAL_SRC_FILES:= \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s2_meth.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s2_srvr.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -45,6 +49,7 @@ LOCAL_SRC_FILES:= \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bio_ssl.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ssl_err.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; kssl.c&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+endif&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;include $(LOCAL_PATH)/../android-config.mk&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;--- orig/openssl/crypto/Android.mk&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-01-21 14:42:08.000000000 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+++ openssl/crypto/Android.mk&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-01-29 14:49:00.334324159 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -2,27 +2,17 @@ LOCAL_PATH:= $(call my-dir)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;include $(CLEAR_VARS)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;LOCAL_CFLAGS += -DOPENSSL_BN_ASM_MONT -DAES_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DOPENSSL_NO_STATIC_ENGINE&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+ifneq ($(APP_ABI), x86)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;LOCAL_SRC_FILES:= 0.9.9-dev/bn/armv4-mont.s \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.9.9-dev/aes/aes-armv4.s \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.9.9-dev/sha/sha1-armv4-large.s \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.9.9-dev/sha/sha256-armv4.s \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.9.9-dev/sha/sha512-armv4.s&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;LOCAL_SRC_FILES+= \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; cryptlib.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; mem.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; mem_clr.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mem_dbg.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; cversion.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dyn_lck.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ex_data.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; tmdiff.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpt_err.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; ebcdic.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; uid.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; o_time.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; o_str.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; o_dir.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; aes/aes_misc.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; aes/aes_ecb.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; aes/aes_cbc.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -474,6 +464,19 @@ LOCAL_SRC_FILES+= \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ripemd/rmd_dgst.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ripemd/rmd_one.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; evp/m_ripemd.c&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+endif&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+LOCAL_SRC_FILES+= \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; cryptlib.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; mem.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; mem_clr.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; cversion.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; tmdiff.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; ebcdic.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; uid.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; o_time.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; o_str.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; o_dir.c &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;LOCAL_CFLAGS += -DNO_WINDOWS_BRAINDEATH&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;--- orig/build.py&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-01-21 14:44:17.000000000 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+++ build.py&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-01-28 16:19:35.088015089 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -82,6 +82,10 @@ def rm(path):&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;def strip(path):&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp; if len(sys.argv) &amp;gt; 1:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; if sys.argv[1] == &quot;x86&quot;:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run(&#39;i686-linux-android-strip %s&#39; % path)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; run(&#39;arm-linux-androideabi-strip %s&#39; % path)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -153,6 +157,12 @@ map(rm, find(&#39;output.temp/usr/lib/python&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;map(rm, find(&#39;output.temp&#39;, &#39;python$&#39;, exclude=[&#39;setuptools&#39;, &#39;distutils&#39;])[0])&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;run(&quot;mkdir python&quot;, cwd=&quot;output.temp/usr&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;run(&quot;cp -r %s/python-libs/py4a python&quot; % pwd, cwd=&quot;output.temp/usr&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+if len(sys.argv) &amp;gt; 1:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; if sys.argv[1] == &quot;x86&quot;:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run(&quot;cp %s/setup-x86.cfg .&quot; % pwd, cwd=&quot;output.temp/usr&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run(&quot;cp %s/setup.cfg .&quot; % pwd, cwd=&quot;output.temp/usr&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+else:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;run(&quot;cp %s/setup.cfg .&quot; % pwd, cwd=&quot;output.temp/usr&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;run(&quot;cp %s/prepare_setuptools.sh setup.sh&quot; % pwd, cwd=&quot;output.temp/usr&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;run(&quot;cp %s/standalone_python.sh python.sh&quot; % pwd, cwd=&quot;output.temp/usr&quot;)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;--- orig/libffi/include/ffi_real.h&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-01-21 14:42:35.000000000 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+++ libffi/include/ffi_real.h&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-01-29 10:27:30.664550823 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -371,8 +371,12 @@ void ffi_call(ffi_cif *cif,&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;#if CONF_HAVE_LONG_DOUBLE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // android changed&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;#define FFI_TYPE_LONGDOUBLE 4&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;#else&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#ifdef x86&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define FFI_TYPE_LONGDOUBLE 4&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#else&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;#endif&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#endif&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;#define FFI_TYPE_UINT8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;#define FFI_TYPE_SINT8&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;#define FFI_TYPE_UINT16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7 &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;--- orig/libffi/Android.mk&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-01-21 14:42:42.000000000 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+++ libffi/Android.mk&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-01-28 17:00:21.190897854 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -21,6 +21,17 @@ include $(CLEAR_VARS)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;LOCAL_MODULE := ffi&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;LOCAL_MODULE_FILENAME := &lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+ifeq ($(APP_ABI), x86)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; LOCAL_SRC_FILES := src/x86/sysv.S \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; src/x86/ffi.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; src/debug.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; src/java_raw_api.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; src/prep_cif.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; src/raw_api.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; src/types.c&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/linux-x86&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+else&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;LOCAL_SRC_FILES := src/arm/sysv.S \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; src/arm/ffi.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; src/debug.c \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -30,6 +41,7 @@ LOCAL_SRC_FILES := src/arm/sysv.S \&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; src/types.c&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/linux-arm&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+endif&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;$(call __ndk_info, Building libffi)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;--- orig/libffi/linux-x86/ffi.h&amp;nbsp;&amp;nbsp;&amp;nbsp; 1969-12-31 19:00:00.000000000 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+++ libffi/linux-x86/ffi.h&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-01-28 16:24:28.975890002 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -0,0 +1,10 @@&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/*&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+ * Copyright 2008 The Android Open Source Project&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+ */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#ifndef LIBFFI_H&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define x86&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#include &quot;../src/x86/ffitarget.h&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#include &quot;../include/ffi_real.h&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#endif&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;--- orig/libffi/linux-x86/fficonfig.h&amp;nbsp;&amp;nbsp;&amp;nbsp; 1969-12-31 19:00:00.000000000 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+++ libffi/linux-x86/fficonfig.h&amp;nbsp;&amp;nbsp;&amp;nbsp; 2013-01-28 16:23:04.047926730 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -0,0 +1,160 @@&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* fficonfig.h.in.&amp;nbsp; Generated from configure.ac by autoheader.&amp;nbsp; */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to one of `_getb67&#39;, `GETB67&#39;, `getb67&#39; for Cray-2 and Cray-YMP&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp; systems. This function is required for `alloca.c&#39; support on those systems.&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp; */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef CRAY_STACKSEG_END&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if using `alloca.c&#39;. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef C_ALLOCA&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to the flags needed for the .section .eh_frame directive. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define EH_FRAME_FLAGS &quot;aw&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define this if you want extra debugging. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef FFI_DEBUG&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define this is you do not want support for the raw API. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef FFI_NO_RAW_API&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define this is you do not want support for aggregate types. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef FFI_NO_STRUCTS&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if you have `alloca&#39;, as a function or macro. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define HAVE_ALLOCA 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if you have &amp;lt;alloca.h&amp;gt; and it should be used (not on Ultrix).&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp; */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define HAVE_ALLOCA_H 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define if your assembler supports .cfi_* directives. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef HAVE_AS_CFI_PSEUDO_OP&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define if your assembler supports .register. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef HAVE_AS_REGISTER_PSEUDO_OP&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define if your assembler and linker support unaligned PC relative relocs.&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp; */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef HAVE_AS_SPARC_UA_PCREL&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if you have the &amp;lt;dlfcn.h&amp;gt; header file. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define HAVE_DLFCN_H 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define if __attribute__((visibility(&quot;hidden&quot;))) is supported. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if you have the &amp;lt;inttypes.h&amp;gt; header file. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define HAVE_INTTYPES_H 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define if you have the long double type and it is bigger than a double */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef HAVE_LONG_DOUBLE&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if you have the `memcpy&#39; function. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define HAVE_MEMCPY 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if you have the &amp;lt;memory.h&amp;gt; header file. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define HAVE_MEMORY_H 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if you have the `mmap&#39; function. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define HAVE_MMAP 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define if mmap with MAP_ANON(YMOUS) works. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define HAVE_MMAP_ANON 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define if mmap of /dev/zero works. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define HAVE_MMAP_DEV_ZERO 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define if read-only mmap of a plain file works. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define HAVE_MMAP_FILE 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define if .eh_frame sections should be read-only. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef HAVE_RO_EH_FRAME&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if you have the &amp;lt;stdint.h&amp;gt; header file. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define HAVE_STDINT_H 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if you have the &amp;lt;stdlib.h&amp;gt; header file. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define HAVE_STDLIB_H 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if you have the &amp;lt;strings.h&amp;gt; header file. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef HAVE_STRINGS_H&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if you have the &amp;lt;string.h&amp;gt; header file. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define HAVE_STRING_H 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if you have the &amp;lt;sys/mman.h&amp;gt; header file. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define HAVE_SYS_MMAN_H 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if you have the &amp;lt;sys/stat.h&amp;gt; header file. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define HAVE_SYS_STAT_H 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if you have the &amp;lt;sys/types.h&amp;gt; header file. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define HAVE_SYS_TYPES_H 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if you have the &amp;lt;unistd.h&amp;gt; header file. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define HAVE_UNISTD_H 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if your C compiler doesn&#39;t accept -c and -o together. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef NO_MINUS_C_MINUS_O&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Name of package */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define PACKAGE &quot;libffi&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to the address where bug reports for this package should be sent. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef PACKAGE_BUGREPORT&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to the full name of this package. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef PACKAGE_NAME&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to the full name and version of this package. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef PACKAGE_STRING&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to the one symbol short name of this package. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef PACKAGE_TARNAME&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to the version of this package. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef PACKAGE_VERSION&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* The size of `double&#39;, as computed by sizeof. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define SIZEOF_DOUBLE 8&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* The size of `long double&#39;, as computed by sizeof. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef SIZEOF_LONG_DOUBLE&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* If using the C implementation of alloca, define if you know the&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp; direction of stack growth for your system; otherwise it will be&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp; automatically deduced at runtime.&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; STACK_DIRECTION &amp;gt; 0 =&amp;gt; grows toward higher addresses&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; STACK_DIRECTION &amp;lt; 0 =&amp;gt; grows toward lower addresses&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; STACK_DIRECTION = 0 =&amp;gt; direction of growth unknown */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef STACK_DIRECTION&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if you have the ANSI C header files. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define STDC_HEADERS 1&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define this if you are using Purify and want to suppress spurious messages.&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp; */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef USING_PURIFY&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Version number of package */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef VERSION&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+/* Define to 1 if your processor stores words with the most significant byte&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp; first (like Motorola and SPARC, unlike Intel and VAX). */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#undef WORDS_BIGENDIAN&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#ifdef LIBFFI_ASM&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define FFI_HIDDEN(name) .hidden name&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#else&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define FFI_HIDDEN __attribute__ ((visibility (&quot;hidden&quot;)))&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#endif&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#else&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#ifdef LIBFFI_ASM&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define FFI_HIDDEN(name)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#else&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#define FFI_HIDDEN&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#endif&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#endif&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;--- build.sh&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;(orig/build.sh)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;+++ build.sh&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;(build.sh)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;@@ -5,6 +5,7 @@&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;set -ex&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;CWD=$(pwd)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;DEBUG=no&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;+android_abi=&quot;$1&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;RELEASE_VERSION=$(cat LATEST_VERSION)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;echo &quot;Building Python VM For Android Release ${RELEASE_VERSION}&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;@@ -78,12 +79,12 @@&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;${CWD}/host/pgen ${CWD}/python-src/Grammar/Grammar \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;${CWD}/python-src/Include/graminit.h \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;${CWD}/python-src/Python/graminit.c&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;-ndk-build&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;+ndk-build APP_ABI:=$android_abi&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;# copy out all the needed files&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;-mv obj/local/armeabi/python&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;${OUT}/usr/bin&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;-mv obj/local/armeabi/lib*.so&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;${OUT}/usr/lib&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;-mv obj/local/armeabi/*.so&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;${OUT}/usr/lib/python2.6/lib-dynload&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;+mv obj/local/$android_abi/python&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;${OUT}/usr/bin&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;+mv obj/local/$android_abi/lib*.so&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;${OUT}/usr/lib&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;+mv obj/local/$android_abi/*.so&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;${OUT}/usr/lib/python2.6/lib-dynload&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;popd&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;pushd ${CWD}/python-libs&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;@@ -91,7 +92,7 @@&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;popd&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;${CWD}/host/bin/python ${OUT}/usr/lib/python2.6/compileall.py ${OUT}/usr/lib/python2.6&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;-${CWD}/host/bin/python build.py&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;+${CWD}/host/bin/python build.py $android_abi&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp;if [ &quot;$DEBUG&quot; != &quot;yes&quot; ]; then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;rm -rf output*&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/4700336380257096439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/01/how-to-build-python-4-android-for-x86.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/4700336380257096439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/4700336380257096439'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/01/how-to-build-python-4-android-for-x86.html' title='How to build Python-4-Android for the x86'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-1072270879941312156</id><published>2013-01-24T10:25:00.000-05:00</published><updated>2013-01-24T13:22:22.246-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="x86"/><title type='text'>Android: Trying to load native library results in a process terminated by signal (11)</title><content type='html'>&lt;h2&gt;
Symptoms&lt;/h2&gt;
You are trying to load your native C/C++ library in an Android application and when at runtime your app calls the System.loadLibrary() function - for example: &lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
static {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.loadLibrary(&quot;mynativelib&quot;);&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
}&lt;/div&gt;
&lt;br /&gt;
the application dies without core dumping, and the only message you see in LogCat is something like the following:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;01-23 19:58:08.699: D/dalvikvm(4146): Trying to load lib /data/data/com.example.myapp/lib/libmynativelib.so 0x42341a50&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;01-23 19:58:08.709: I/ActivityManager(340): Process com.example.myapp (pid 4146) has died.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;01-23 19:58:08.709: W/ActivityManager(340): Force removing ActivityRecord{211d37d0 com.example.myapp/.MyActivity}: app died, no saved state&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;01-23 19:58:08.719: D/Zygote(188): Process 4146 terminated by signal (11)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;
Causes&lt;/h2&gt;
You native library is probably trying to dynamically load another library it depends upon.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Solution &lt;/h2&gt;
Use the GCC readelf for your ABI to dump the dynamic section of your native library and find out which libraries it depends upon. For example if you are compiling for the x86 ABI: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;$ android-ndk-r8d/toolchains/x86-4.7/prebuilt/linux-x86/bin/i686-linux-android-readelf -d libmynativelib.so | grep NEEDED&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;&amp;nbsp;0x00000001 (NEEDED)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Shared library: [libgnustl_shared.so]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;&amp;nbsp;0x00000001 (NEEDED)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Shared library: [libiconv.so]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;&amp;nbsp;0x00000001 (NEEDED)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Shared library: [libdl.so]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;&amp;nbsp;0x00000001 (NEEDED)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Shared library: [libstdc++.so]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;&amp;nbsp;0x00000001 (NEEDED)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Shared library: [libm.so]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: x-small;&quot;&gt;&amp;nbsp;0x00000001 (NEEDED)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Shared library: [libc.so]&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example you only need to load libgnustl_shared.so and libiconv.so &lt;b&gt;&lt;i&gt;before&lt;/i&gt;&lt;/b&gt; your libmynativelib.so to resolve the dependencies and make the System.loadLibrary() function call happy (the other standard libraries are already preloaded for you by Android). In your static section you will then include the following lines:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
static {&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.loadLibrary(&quot;gnustl_shared&quot;);&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.loadLibrary(&quot;iconv&quot;);&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; System.loadLibrary(&quot;mynativelib&quot;);&lt;/div&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
}&lt;/div&gt;
&lt;br /&gt;
This should solve the problem.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/1072270879941312156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/01/android-trying-to-load-native-library.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/1072270879941312156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/1072270879941312156'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/01/android-trying-to-load-native-library.html' title='Android: Trying to load native library results in a process terminated by signal (11)'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-1361973471440719357</id><published>2013-01-10T10:47:00.001-05:00</published><updated>2013-01-10T10:53:27.454-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="GNU"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>How to port Mozilla SpiderMonkey 1.7 to Android</title><content type='html'>Another third-party package I needed to cross-compile for Android was Mozilla&#39;s SpiderMonkey 1.7 Javascript engine. I found two issues here:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;When configuring SpiderMonkey the makefile tries to build two executables (&lt;i&gt;jscpucfg&lt;/i&gt; and &lt;i&gt;jskwgen&lt;/i&gt;) and then runs them to generate two&amp;nbsp; configuration header files (&lt;i&gt;jsautocfg.h&lt;/i&gt; and &lt;i&gt;jsautokw.h&lt;/i&gt;, respectively). The problem when using the Android NDK cross-compiler is that these two executables can only be run on the Android target (for example an ARM processor), while I&#39;m cross-compiling my build from a Linux Ubuntu 12.04 machine with an x86_64 processor architecture. So you get an error that you cannot execute these files on the host machine.&lt;br /&gt;I solved this problem by copying the two executables to an Android device (Samsung Galaxy S III) using &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;scp&lt;/span&gt; and the SSHDroid application, and generating the two header files there:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ jscpucfg &amp;gt; jsautocfg.h&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ jskwgen &amp;gt; jsautokw.h&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;then I copied the two files back to my node on my Ubuntu machine and saved in the source trunk under the config sub-directory. Then I changed the makefile to skip generating these two header files when cross-compiling for Android and get them instead from the config sub-directory. &lt;/li&gt;
&lt;li&gt;The SpiderMonkey &lt;i&gt;jsnum.c&lt;/i&gt; file generates the following error when cross-compiled for Android:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;js-1.7/jsnum.c: In function &#39;js_InitRuntimeNumberState&#39;:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;js-1.7/jsnum.c:578: error: &#39;struct lconv&#39; has no member named &#39;thousands_sep&#39;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;js-1.7/jsnum.c:578: error: &#39;struct lconv&#39; has no member named &#39;thousands_sep&#39;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;js-1.7/jsnum.c:580: error: &#39;struct lconv&#39; has no member named &#39;decimal_point&#39;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;js-1.7/jsnum.c:580: error: &#39;struct lconv&#39; has no member named &#39;decimal_point&#39;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;js-1.7/jsnum.c:582: error: &#39;struct lconv&#39; has no member named &#39;grouping&#39;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;js-1.7/jsnum.c:582: error: &#39;struct lconv&#39; has no member named &#39;grouping&#39;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;gmake[2]: *** [js-1.7.dir/jsnum.c.o] Error 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is caused by the fact that the lconv structure in locale.h shipped with the Android NDK is stubbed with the following comment: &lt;br /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#if 1 /* MISSING FROM BIONIC - DEFINED TO MAKE libstdc++-v3 happy */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;struct lconv { };&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;struct lconv *localeconv(void);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;#endif /* MISSING */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To solve this problem I applied the following patch to &lt;i&gt;jsnum.c&lt;/i&gt; and I was able to successfully cross-compile SpiderMonkey 1.7 for Android.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;--- a/jsnum.c&amp;nbsp;&amp;nbsp; 2013-01-10 10:37:54.413800695 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+++ b/jsnum.c&amp;nbsp;&amp;nbsp; 2013-01-10 10:06:49.432752061 -0500&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;@@ -573,13 +573,28 @@ js_InitRuntimeNumberState(JSContext *cx)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; u.s.lo = 1;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; number_constants[NC_MIN_VALUE].dval = u.d;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; locale = localeconv();&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; rt-&amp;gt;thousandsSeparator =&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JS_strdup(cx, locale-&amp;gt;thousands_sep ? locale-&amp;gt;thousands_sep : &quot;&#39;&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; rt-&amp;gt;decimalSeparator =&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JS_strdup(cx, locale-&amp;gt;decimal_point ? locale-&amp;gt;decimal_point : &quot;.&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp; rt-&amp;gt;numGrouping =&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JS_strdup(cx, locale-&amp;gt;grouping ? locale-&amp;gt;grouping : &quot;\3\0&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Copy locale-specific separators into the runtime strings. */&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; const char *thousandsSeparator, *decimalPoint, *grouping;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#ifdef HAVE_LOCALECONV&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; locale = localeconv();&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; thousandsSeparator = locale-&amp;gt;thousands_sep;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; decimalPoint = locale-&amp;gt;decimal_point;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; grouping = locale-&amp;gt;grouping;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#else&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; thousandsSeparator = getenv(&quot;LOCALE_THOUSANDS_SEP&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; decimalPoint = getenv(&quot;LOCALE_DECIMAL_POINT&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; grouping = getenv(&quot;LOCALE_GROUPING&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+#endif&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!thousandsSeparator)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; thousandsSeparator = &quot;&#39;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!decimalPoint)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; decimalPoint = &quot;.&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!grouping)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; grouping = &quot;\3\0&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; rt-&amp;gt;thousandsSeparator = JS_strdup(cx, thousandsSeparator);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; rt-&amp;gt;decimalSeparator = JS_strdup(cx, decimalPoint);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp; rt-&amp;gt;numGrouping = JS_strdup(cx, grouping);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return rt-&amp;gt;thousandsSeparator &amp;amp;&amp;amp; rt-&amp;gt;decimalSeparator &amp;amp;&amp;amp; rt-&amp;gt;numGrouping;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Of course you would define &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;HAVE_LOCALECONV&lt;/span&gt; only for regular builds but not for Android cross-compilations, so that you could either pass your own definitions for the locale thousands separator, decimal point or locale grouping via environment variables, or use the above defaults.&lt;br /&gt;&lt;/li&gt;
&lt;/ol&gt;
</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/1361973471440719357/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/01/how-to-port-mozilla-spidermonkey-17-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/1361973471440719357'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/1361973471440719357'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/01/how-to-port-mozilla-spidermonkey-17-to.html' title='How to port Mozilla SpiderMonkey 1.7 to Android'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-5442819136775777121</id><published>2013-01-09T15:04:00.000-05:00</published><updated>2013-01-09T15:04:07.270-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GNU"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>How to inspect expanded C macros with gcc/gcc+</title><content type='html'>Sometimes you get compilation errors in gcc/g++ and you&#39;d like to inspect the output from the C compiler pre-processor to figure out why certain macros were expanded in such as way to cause an error.&lt;br /&gt;
The solution is simply to remove the -o and -c options from your gcc/g++ command line and replace it with&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: center;&quot;&gt;
gcc/g++ -E -dD&lt;/div&gt;
&lt;br /&gt;
this will generate on your terminal only the C pre-processor output that is eventually fed to the C/C++ compiler.&lt;br /&gt;
&lt;br /&gt;
For example you are trying to compile Mozilla SpiderMonkey 1.7 and one of&amp;nbsp; the compiler lines is the following:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
/usr/bin/gcc&amp;nbsp; -Djs_1_7_EXPORTS -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R -DX86_LINUX -D_IEEE_LIBM -DJS_EDITLINE -DEDITLINE -DHAVE_VA_COPY -DVA_COPY=va_copy -DPIC -DANSI_ARROWS -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT -DSYS_UNIX -DHAVE_STDLIB -DUNIQUE_HISTORY -O3 -DNDEBUG -fPIC -I../js-1.7&amp;nbsp; -fPIC -o CMakeFiles/js-1.7.dir/jsarena.c.o&amp;nbsp;&amp;nbsp; -c js-1.7/jsarena.c&lt;/div&gt;
&lt;br /&gt;
To see the expanded C macros run the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;/usr/bin/gcc&amp;nbsp; -E -dD -Djs_1_7_EXPORTS -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE 
-DPOSIX_SOURCE -DHAVE_LOCALTIME_R -DX86_LINUX -D_IEEE_LIBM -DJS_EDITLINE
 -DEDITLINE -DHAVE_VA_COPY -DVA_COPY=va_copy -DPIC -DANSI_ARROWS 
-DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT -DSYS_UNIX -DHAVE_STDLIB 
-DUNIQUE_HISTORY -O3 -DNDEBUG -fPIC -I../js-1.7&amp;nbsp; -fPIC&amp;nbsp; js-1.7/jsarena.c&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/5442819136775777121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/01/how-to-inspect-expanded-c-macros-with.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/5442819136775777121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/5442819136775777121'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/01/how-to-inspect-expanded-c-macros-with.html' title='How to inspect expanded C macros with gcc/gcc+'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-2360156271386159544</id><published>2013-01-06T21:40:00.001-05:00</published><updated>2013-11-30T10:01:29.745-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apple"/><category scheme="http://www.blogger.com/atom/ns#" term="iMac"/><category scheme="http://www.blogger.com/atom/ns#" term="MacOSX"/><title type='text'>Upgrading mid-2007 24in iMac with an SSD and a 2.5in HDD in the optical bay </title><content type='html'>I own a mid-2007 24in iMac with a 2.4 GHz Intel Core 2 Duo processor, 4GB of DDR2 DRAM, running Mac OS Mountain Lion, and for the past few months the computer was getting slower and slower, and when I was running Windows XP in VMWare Fusion, the machine was often swapping, bringing the iMac to a crawl.&amp;nbsp;Finally I decided to upgrade my iMac by installing an SSD.&amp;nbsp;Two years ago I replaced the Western Digital 500 GB hard drive (that failed on me one day by giving me the gray screen of death at boot time), with a 1 TB WD caviar green which I almost filled since then (about 750 GB used).&lt;br /&gt;
So I wanted the fast SSD drive but also to maintain the 1 TB of space available. The solution I adopted (found on several posts on the internet) was to replace the existing SATA HDD with an SSD, and replace the optical drive with a PATA to SATA adapter hosting a 2.5in HDD. To avoid the swapping I also replaced one of the 2 GB memory modules with a new OWC 4GB module, bringing the total available memory to 6GB.&lt;br /&gt;
&lt;h2&gt;
Hardware Parts&lt;/h2&gt;
This is the list of hardware components I ended up buying for this upgrade:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.newegg.com/Product/Product.aspx?Item=N82E16820148441&quot;&gt;Crucial M4 CT064M4SSD2 2.5&quot; 64GB SATA III MLC Internal Solid State Drive (SSD)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.newegg.com/Product/Product.aspx?Item=N82E16817997007&quot;&gt;SilverStone SDP08 2 x 2.5&quot; to 3.5&quot; Bay Converter&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.newegg.com/Product/Product.aspx?Item=N82E16822236288&quot;&gt;Western Digital Scorpio Blue WDBABC0010BNC-NRSN 1 TB 2.5&#39; Internal Hard Drive&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://store.mcetech.com/Merchant2/merchant.mvc?Screen=PROD&amp;amp;Product_Code=OBSXGB-IMAC&amp;amp;Category_Code=STORHDOPTIBAY&amp;amp;Product_Count=4&quot;&gt;MCE OptiBay Enclosure for SATA Hard Drive for iMac&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;a href=&quot;http://eshop.macsales.com/item/OWC/5300DDR2S4GB/&quot;&gt;4.0GB PC-5300 DDR2 667MHz SO-DIMM 200 Pin Memory Upgrade Module&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h2&gt;
Hardware Installation&lt;/h2&gt;
Here is the picture of the tools I used to perform the upgrade (grounding wrist band, 6 Pc. mini torx screwdriver set, spudgers, vacuum cups, philips screwdriver.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8O7W-kaGmeg6gDtp-5iXWotDf5KMSjtH33GLGjWxm56RcpDsTX7Q7uwVqP_JZ-jxnmdSInt8-d6R1DiWS-5GPZ4HB5uQAhk8ubHoK4M2biD6i9EeMwNMrzU9eXeScQYgZeAHtISVOT0M/s1600/DSCN1636.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8O7W-kaGmeg6gDtp-5iXWotDf5KMSjtH33GLGjWxm56RcpDsTX7Q7uwVqP_JZ-jxnmdSInt8-d6R1DiWS-5GPZ4HB5uQAhk8ubHoK4M2biD6i9EeMwNMrzU9eXeScQYgZeAHtISVOT0M/s320/DSCN1636.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I followed the instructions to replace the hard drive and the optical bay from the &lt;a href=&quot;http://www.ifixit.com/Device/iMac_Intel_24%22_EMC_2134_and_2211&quot;&gt;iFixit web site&lt;/a&gt;.&lt;br /&gt;
The following picture shows the iMac internal components.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDG3oLx6ZQyTq3tqovwnivFn9-6H6WT1SU8fmu9yKC-QQ9xQgEsU84TD6bZdA1DfNVS_td1eric6DnKN8sm8XCSlKVa-vP5LuEH4SmkSgPnUanN2shw270Q1jTsR0wdHJajATyRxSRXDo/s1600/DSCN1649.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDG3oLx6ZQyTq3tqovwnivFn9-6H6WT1SU8fmu9yKC-QQ9xQgEsU84TD6bZdA1DfNVS_td1eric6DnKN8sm8XCSlKVa-vP5LuEH4SmkSgPnUanN2shw270Q1jTsR0wdHJajATyRxSRXDo/s320/DSCN1649.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The old 1TB caviar green HDD is shown in the following picture. The idea was to replace it with the SSD mounted on the 2.5&#39;&#39; to 3.5&#39;&#39; bay converter.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU6P8yG30q2CCWfkyvGSgf6PlSwX6g7LYvzR3MHfIzyxRSdk2FAPMU3sdHxZNdmb78vaN45xsuxw5Vl_CPATL_3yuajFbRAC9LVgY8INiz13ZYVHbpynQGMu3KdsfIMtv8Cu2xV1bVB1c/s1600/DSCN1650.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU6P8yG30q2CCWfkyvGSgf6PlSwX6g7LYvzR3MHfIzyxRSdk2FAPMU3sdHxZNdmb78vaN45xsuxw5Vl_CPATL_3yuajFbRAC9LVgY8INiz13ZYVHbpynQGMu3KdsfIMtv8Cu2xV1bVB1c/s320/DSCN1650.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
This picture shows instead the Apple optical drive (superdrive).&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_K-JuX8K0EI8jUslDSV-LmaLKWQ1Slj-Ludckb5pV9TeFSvzV0P1CIU9R6pGXNNNqQiQRxYzhbd1EiQCnnB3ElfcJShW85t9BftwmjBJ7jwaunnrkE_F2U3BAnaRMWO3L7ImyBQIiS78/s1600/DSCN1651.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_K-JuX8K0EI8jUslDSV-LmaLKWQ1Slj-Ludckb5pV9TeFSvzV0P1CIU9R6pGXNNNqQiQRxYzhbd1EiQCnnB3ElfcJShW85t9BftwmjBJ7jwaunnrkE_F2U3BAnaRMWO3L7ImyBQIiS78/s320/DSCN1651.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
I removed the optical drive and replaced it with the 1TB WD Blue HDD mounted on the MCE OptiBay enclosure as shown in the following picture. I also put a piece of foam in the enclosure gap (top of picture) to prevent the HDD from moving.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXl-uzqUUujVxx5NrCpZq8FrjrTIiG5iM4D1EUoxX73l3fcb1SMSMSVFHwz4caq8lKw8zRNe9kHV6RLV4h19VJ3u1EToH3c9qDNTzLPHAO-GucLGy1o8F8gBdUXRGF-k0vKc7qqi17bGo/s1600/DSCN1654.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXl-uzqUUujVxx5NrCpZq8FrjrTIiG5iM4D1EUoxX73l3fcb1SMSMSVFHwz4caq8lKw8zRNe9kHV6RLV4h19VJ3u1EToH3c9qDNTzLPHAO-GucLGy1o8F8gBdUXRGF-k0vKc7qqi17bGo/s320/DSCN1654.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Then I installed the Crucial M4 SSD inside the&amp;nbsp;SilverStone 2.5&quot; to 3.5&quot; Bay Converter in the bottom position (there is room to install two SSD or two 2.5&#39;&#39; HDD), in order to align the SATA and power connectors with the iMac motherboard.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuPD_YS6PMwOa6ql3R9te2FqNSbRLu5p6acfaLbI4-zZbmDxoZ_lrkbEYTD_HsyI-mHpMQX4iE2EY3QEtDHiLl5lDhvT_o6aVDkHbEjpsCxM-mWe8XZSfUsi9Rv1cwDzwHw_c10roGhms/s1600/DSCN1655.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhuPD_YS6PMwOa6ql3R9te2FqNSbRLu5p6acfaLbI4-zZbmDxoZ_lrkbEYTD_HsyI-mHpMQX4iE2EY3QEtDHiLl5lDhvT_o6aVDkHbEjpsCxM-mWe8XZSfUsi9Rv1cwDzwHw_c10roGhms/s320/DSCN1655.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5piLqs_AzvLApuCsudQLd6jekaaFCfZxY5ZRYXMZm8PFh5d2OYiZjoQWql5lGJtvUm3IIyo4sTRgwD5VHG_yrjb80cIDV4eifwhC4neWURJpVNWQ53QohkJPiU3DBsk1D-KYPa0SOzp4/s1600/DSCN1656.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5piLqs_AzvLApuCsudQLd6jekaaFCfZxY5ZRYXMZm8PFh5d2OYiZjoQWql5lGJtvUm3IIyo4sTRgwD5VHG_yrjb80cIDV4eifwhC4neWURJpVNWQ53QohkJPiU3DBsk1D-KYPa0SOzp4/s320/DSCN1656.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The following picture shows the newly installed SSD on the top left, and the WD Blue HDD inside the OptiBay enclosure on the bottom right. Notice I attached the thermal sensor for the SSD directly on the metal frame of the bay converter, and used tape to make sure it stays in position.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgau-pmYoYb76VNR-OutNsHMhK_01fJwrzqzyEQ3TxSOMm_02ys0PoHMrP09TYLP3qyns2entBBI726YSloa33Fv9_73E3D5xIpOAlOhRZvBdvczVmKqMkJ7SeF9ju_LzO8gMTHslNZpp4/s1600/DSCN1658.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgau-pmYoYb76VNR-OutNsHMhK_01fJwrzqzyEQ3TxSOMm_02ys0PoHMrP09TYLP3qyns2entBBI726YSloa33Fv9_73E3D5xIpOAlOhRZvBdvczVmKqMkJ7SeF9ju_LzO8gMTHslNZpp4/s320/DSCN1658.JPG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
All the hardware parts described above fitted perfectly in my iMac and I didn&#39;t have to do anything special to install them except for adding the piece of foam in the OptiBay enclosure to prevent the HDD from moving around.&lt;br /&gt;
&lt;h2&gt;
Software Configuration&lt;/h2&gt;
&lt;div&gt;
At this point my iMac had two new unformatted disk drives and my original HDD was sitting on my desk. What I had in mind was to install Mac OS on the Crucial M4 SSD, and put the users on the WD Blue HDD. In fact 64 GB are not enough to store the users directories where for example pictures and movies take a lot of disk space. To restore the system I then followed this procedure.&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;I took the original WD caviar green HDD and installed it in a Rosewill external SATA enclosure I had laying around. Then I connected the external SATA enclosure to the iMac via an USB cable.&lt;/li&gt;
&lt;li&gt;I powered up the iMac holding the &lt;i&gt;option&lt;/i&gt; button. This gave me the option to boot into Mountain Lion from the external WD Caviar Green HDD (volume name Macintosh HD).&lt;/li&gt;
&lt;li&gt;I logged in and opened the Disk Utility application. Selected the Crucial M4 disk, clicked on the Erase tab and formatted the disk by selecting the Mac OS Extended (journaled) format and naming the volume &lt;i&gt;Macintosh SSD&lt;/i&gt;.&lt;/li&gt;
&lt;li&gt;In a similar way I erased the WD Blue HD disk and named the volume &lt;i&gt;Macintosh HD Users&lt;/i&gt;. At the end of this procedure, Disk Utility showed the following on the screen:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiadCwo1B2MoCCow3zHF01XxWVb65fYTHqqAWm0huylhNF194daIECqnmQxEWKN2zOPLfeDvzxcFVJvw_AKMCu02rznPgKxNyKVtht7TgcR_bDgUKfOuGFjfcF1tesaHi78-gtxlvGGy-g/s1600/du.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;198&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiadCwo1B2MoCCow3zHF01XxWVb65fYTHqqAWm0huylhNF194daIECqnmQxEWKN2zOPLfeDvzxcFVJvw_AKMCu02rznPgKxNyKVtht7TgcR_bDgUKfOuGFjfcF1tesaHi78-gtxlvGGy-g/s320/du.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Then I ran &lt;a href=&quot;http://www.bombich.com/&quot;&gt;Carbon Copy Cloner&lt;/a&gt; and copied all directories from the external Macintosh HD except the /Users directory to the Crucial M4 on volume Macintosh SSD (it is simple to do this since Carbon Copy Cloner allows you to select individual directories to copy from the source). I ended up copying about 32 GB to the Macintosh SSD volume, which took about 1 hour.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;I ran Carbon Copy Cloner again but this time for source I selected the /Users directory only from the external Macintosh HD, and Macintosh HD Users for destination. To copy 693 GB Carbon Copy Cloner took about 7 hours and 47 minutes.&lt;/li&gt;
&lt;li&gt;(If you don&#39;t want to use Carbon Copy Cloner, you can copy the files directly using the&amp;nbsp;&lt;i&gt;ditto&lt;/i&gt;&amp;nbsp;command. For example to clone the /Users directory:&amp;nbsp;&lt;/li&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# sudo ditto&amp;nbsp;/Volumes/Macintosh\ HD/Users&amp;nbsp;/Volumes/Macintosh\ HD\ Users/Users/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;li&gt;I then opened the Terminal app, logged in as root and created a symbolic link to the new location of the /Users directory:&lt;/li&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# sudo su -&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# cd /Volumes/Macintosh\ SSD&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#&amp;nbsp;ln -s /Volumes/Macintosh\ HD\ Users/Users/ Users&lt;/span&gt;&lt;/div&gt;
&lt;/ul&gt;
At this point I rebooted the iMac and when it came back all my original logins with their setting were magically preserved. MacOSX now boots in 13 seconds, and opening applications is almost instantaneous. Now I still had to do some tweaks to make the new setup even better. I followed the suggestion from Martin&#39;s blog (&lt;a href=&quot;http://blog.alutam.com/2012/04/01/optimizing-macos-x-lion-for-ssd/&quot;&gt;Optimizing MacOS X Lion for SSD&lt;/a&gt;).&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;I went to System Preferences, clicked on Users &amp;amp; Groups, clicked the lock icon to unlock the advanced editing. Once unlocked, I right-clicked on each user account and chose Advanced Options from the pop-up menu. Once in the Advanced Options dialog, I changed the Home directory of the user from &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/Users/user-name&lt;/span&gt; to the new location (&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;/Volumes/Macintosh\ HD\ Users/Users/user-name&lt;/span&gt;).&lt;/li&gt;
&lt;li&gt;I installed and enabled TrimEnabler from &lt;a href=&quot;http://www.groths.org/software/trimenabler/&quot;&gt;this web site&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;I set the &lt;i&gt;noatime&lt;/i&gt; flag to prevent MacOS from updating the SSD file system every time a file is accessed.&lt;/li&gt;
&lt;li&gt;I used the WD Blue HDD for temporary files.&lt;br /&gt;&lt;span style=&quot;background-color: #eaeaea; color: #4d4d4d; font-family: Consolas, Monaco, monospace; font-size: 0.9em; line-height: 20px; text-align: left;&quot;&gt;&lt;br /&gt;sudo ditto /private/tmp &lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small; line-height: normal; text-align: -webkit-auto;&quot;&gt;/Volumes/Macintosh\ HD\ Users&lt;/span&gt;/private/tmp&lt;/span&gt;&lt;span style=&quot;background-color: #eaeaea; color: #4d4d4d; font-family: Consolas, Monaco, monospace; font-size: 0.9em; line-height: 20px; text-align: left;&quot;&gt;sudo rm -rf /private/tmp&lt;/span&gt;&lt;span style=&quot;background-color: #eaeaea; color: #4d4d4d; font-family: Consolas, Monaco, monospace; font-size: 0.9em; line-height: 20px; text-align: left;&quot;&gt;sudo ln -s &lt;span style=&quot;color: black; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: small; line-height: normal; text-align: -webkit-auto;&quot;&gt;/Volumes/Macintosh\ HD\ Users/&lt;/span&gt;/private/tmp /private/tmp&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
I rebooted the iMac another time and verified that Trim was working, the root file system was mounted with the &lt;i&gt;noatime&lt;/i&gt; flag and that temporary files were going to the HDD drive instead of the SSD.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
Given new life to an old machine. I&#39;m pretty happy now.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/2360156271386159544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/01/upgrading-mid-2007-24in-imac-with-ssd.html#comment-form' title='54 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/2360156271386159544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/2360156271386159544'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2013/01/upgrading-mid-2007-24in-imac-with-ssd.html' title='Upgrading mid-2007 24in iMac with an SSD and a 2.5in HDD in the optical bay '/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8O7W-kaGmeg6gDtp-5iXWotDf5KMSjtH33GLGjWxm56RcpDsTX7Q7uwVqP_JZ-jxnmdSInt8-d6R1DiWS-5GPZ4HB5uQAhk8ubHoK4M2biD6i9EeMwNMrzU9eXeScQYgZeAHtISVOT0M/s72-c/DSCN1636.JPG" height="72" width="72"/><thr:total>54</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-7849376033485346351</id><published>2012-12-18T14:57:00.003-05:00</published><updated>2015-05-30T12:00:16.268-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>How to Cross-Compile libiconv for Android</title><content type='html'>If your legacy C/C++ code includes &amp;lt;iconv.h&amp;gt; to convert the encoding of characters from one coded character set to another, and you need to cross-compile it with the Android NDK, you will get the following error:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&amp;nbsp;&amp;nbsp; error: iconv.h: No such file or directory&lt;/div&gt;
&lt;br /&gt;
In fact there is currently no iconv.h available in the Android NDK and you will have to port libiconv to Android yourself.&lt;br /&gt;
I successfully used the following instructions to cross-compile libiconv.so for Android.&lt;br /&gt;
&lt;br /&gt;
Get the source code for libconv-1.13.1:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&amp;nbsp;&amp;nbsp; $ wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;
Unzip and untar the file:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&amp;nbsp;&amp;nbsp; $ tar zxvf&lt;code&gt; libiconv-1.13.1.tar.gz&lt;/code&gt;

&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;
Patch localcharset.c using the following patch file (or else you will get another error: : langinfo.h: No such file or directory) :

&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&amp;nbsp;&amp;nbsp; $ echo &quot;diff --ignore-file-name-case -wuprN libiconv-1.13.1.orig/libcharset/lib/localcharset.c libiconv-1.13.1/libcharset/lib/localcharset.c&lt;br /&gt;
--- libiconv-1.13.1.orig/libcharset/lib/localcharset.c&amp;nbsp; 2009-06-21 07:17:33.000000000 -0400&lt;br /&gt;
+++ libiconv-1.13.1/libcharset/lib/localcharset.c&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2012-12-18 10:20:27.000000000 -0500&lt;br /&gt;
@@ -44,7 +44,7 @@&lt;br /&gt;
&amp;nbsp;# endif&lt;br /&gt;
&amp;nbsp;#endif&lt;br /&gt;
&lt;br /&gt;
-#if !defined WIN32_NATIVE&lt;br /&gt;
+#if !defined(WIN32_NATIVE) &amp;amp;&amp;amp; !defined(__ANDROID__)&lt;br /&gt;
&amp;nbsp;# if HAVE_LANGINFO_CODESET&lt;br /&gt;
&amp;nbsp;#&amp;nbsp; include &amp;lt;langinfo.h&amp;gt;&lt;br /&gt;
&amp;nbsp;# else&lt;br /&gt;
@@ -328,7 +328,7 @@ locale_charset (void)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; const char *codeset;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; const char *aliases;&lt;br /&gt;
&lt;br /&gt;
-#if !(defined WIN32_NATIVE || defined OS2)&lt;br /&gt;
+#if !(defined WIN32_NATIVE || defined OS2 || defined __ANDROID__)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;# if HAVE_LANGINFO_CODESET &quot; &amp;gt; iconv.patch&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; $ patch -b -p0 &amp;lt; ./iconv.patch&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
Run the configure script and generate iconv.h:
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&amp;nbsp;&amp;nbsp; $ cd libiconv-1.13.1&lt;br /&gt;
&amp;nbsp;&amp;nbsp; $ ./configure&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
Create a jni sub-directory:

&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
$ mkdir jni&lt;/div&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
And save the following lines in jni/Android.mk:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&lt;pre&gt;LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
TARGET_ARCH_ABI := armeabi-v7a
LOCAL_MODULE    := iconv
LOCAL_CFLAGS    := \
    -Wno-multichar \
    -D_ANDROID \
    -DLIBDIR=&quot;\&quot;c\&quot;&quot; \
    -DBUILDING_LIBICONV \
    -DIN_LIBRARY
LOCAL_C_INCLUDES := \
    ../libiconv-1.13.1 \
    ../libiconv-1.13.1/include \
    ../libiconv-1.13.1/lib \
    ../libiconv-1.13.1/libcharset/include
LOCAL_SRC_FILES := \
    ../libiconv-1.13.1/lib/iconv.c \
    ../libiconv-1.13.1/lib/relocatable.c \
    ../libiconv-1.13.1/libcharset/lib/localcharset.c
include $(BUILD_SHARED_LIBRARY)
&lt;/pre&gt;
&lt;/div&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;
Finally cross-compile iconv using the ndk-build tool:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&amp;nbsp;&amp;nbsp; $ cd jni&lt;br /&gt;
&amp;nbsp;&amp;nbsp; $ ndk-build V=1&lt;/div&gt;
If everything goes well, you will find iconv.h under libiconv-1.13.1/include and libiconv.so under libs/armeabi.
</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/7849376033485346351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/12/how-to-cross-compile-libiconv-for.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/7849376033485346351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/7849376033485346351'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/12/how-to-cross-compile-libiconv-for.html' title='How to Cross-Compile libiconv for Android'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-2970614610170007725</id><published>2012-12-04T22:51:00.004-05:00</published><updated>2013-01-19T12:26:55.685-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apple"/><category scheme="http://www.blogger.com/atom/ns#" term="DHCP"/><category scheme="http://www.blogger.com/atom/ns#" term="GPON"/><category scheme="http://www.blogger.com/atom/ns#" term="Network"/><category scheme="http://www.blogger.com/atom/ns#" term="Router"/><title type='text'>Configuring the Apple Airport Extreme with Verizon FIOS</title><content type='html'>&lt;span style=&quot;font-family: Helvetica;&quot;&gt;I have Verizon FIOS triple-play service and I love the TV picture quality and internet speed and reliability, but I don&#39;t like Verizon&#39;s solution to my Parental Control needs.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;So I&#39;ve decided to buy an Airport Extreme Base Station (AEBS) from Apple, but when I went to set it up, it configured itself for bridged mode since the Verizon modem is also a router and the Airport Utility decided not to have a double NAT configuration. Anyway by doing so you loose the capability of having a guest network with the Airport Extreme since it dummies itself down from a full fledged router to a simple level-2 switch.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;So I managed to manually set it up in DHCP/NAT mode even though it is initially complaining about a double NAT configuration (one from the Verizon router and one from the AEBS), but least I gained my guest network back (at the time of this post it is not possible to configure a guest network with the Verizon router).&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;Hardware Configuration&lt;/span&gt;&lt;/h3&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXMBPBncLnUMQhwEovdUfPkCpE5YGylP5IWaDfMlF9JSg0IygXjGqWvgwlUp31kfoXrNA6ix7GpwnR2nihglZQ_-TQKSzv-Nqw3f5Dg7oD2GdvqQ_9ptsaZEywhngMpNqLtByzfV18prg/s1600/MC340.jpeg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXMBPBncLnUMQhwEovdUfPkCpE5YGylP5IWaDfMlF9JSg0IygXjGqWvgwlUp31kfoXrNA6ix7GpwnR2nihglZQ_-TQKSzv-Nqw3f5Dg7oD2GdvqQ_9ptsaZEywhngMpNqLtByzfV18prg/s320/MC340.jpeg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;Apple Router: AirPort Extreme Base Station,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: inherit; text-align: -webkit-auto;&quot;&gt;Part Number: MD031LL/A&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: inherit; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: inherit; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqRYMJQ980zGfMEnv2bOzaWXTP4xcqCGVtEAJ9T4BXVD1QYoU-Vw64yu_h4lfhOsGxgDyLLu59YTbwxpeEcsftOO6w_BqwJ40rI5G3yCnZyFfotz-_lJ1_ocfBdGzouMW3WCjCd5HGK90/s1600/gige.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqRYMJQ980zGfMEnv2bOzaWXTP4xcqCGVtEAJ9T4BXVD1QYoU-Vw64yu_h4lfhOsGxgDyLLu59YTbwxpeEcsftOO6w_BqwJ40rI5G3yCnZyFfotz-_lJ1_ocfBdGzouMW3WCjCd5HGK90/s1600/gige.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Verizon Modem/Router: Actiontec MI424WR Rev. I&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;I used a CAT6 Patch cable to connect the AEBS Internet WAN port to Ethernet Port 1 of the Actiontec. This setting allows the two routers to communicate at wire speed of up to 1 GB per second.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;Software Configuration&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;Here is the step by step procedure to set up the Airport Extreme I ran from an iMac running Mountain Lion.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DXOWnGAgBuNElETBQperIxBv5ExHqw8YA6X6ABLEbEUSbZmAlqzjTTruBUF5-7dau9Q938g3QEEzlrPpDAfUVOkDjFcdeUASGrTupTz0aKkGpQWXf8xLUbJhEgCaksrXVJ2b1yw8XsU/s1600/airportextreme.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;306&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0DXOWnGAgBuNElETBQperIxBv5ExHqw8YA6X6ABLEbEUSbZmAlqzjTTruBUF5-7dau9Q938g3QEEzlrPpDAfUVOkDjFcdeUASGrTupTz0aKkGpQWXf8xLUbJhEgCaksrXVJ2b1yw8XsU/s320/airportextreme.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Helvetica;&quot;&gt;Click on the picture of the Airport Extreme base station: a popup window will show an &lt;i&gt;Edit&lt;/i&gt; button&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Helvetica;&quot;&gt;Click on the &lt;i&gt;Edit&lt;/i&gt; button&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Helvetica;&quot;&gt;Click on the &lt;i&gt;Network&lt;/i&gt; tab and select &quot;DHCP and NAT&quot; from the &lt;i&gt;Router Mode&lt;/i&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Helvetica;&quot;&gt;Click on the &lt;i&gt;Network Options&lt;/i&gt; button and select &quot;10.0&quot; for the &lt;i&gt;IPv4 DHCP Range&lt;/i&gt;, and &quot;172.16&quot; for the &lt;i&gt;Guest IPv4 DHCP Range&lt;/i&gt;. Click on the &lt;i&gt;Save&lt;/i&gt; button (see picture below)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_xyN96WCJJ3K9wiZTY4tq9yPHynSwZC4aPQAESHEbKkDetuc7JKdksyWqLTqd1Z0J1ooQsz-uO3_omWCeJBHz2Y8sa4oxNxw3ciCEwIkDmqOGi3wkSTJn_X2pwtYi47FUqo5tTAsRmrc/s1600/network_options.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;306&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_xyN96WCJJ3K9wiZTY4tq9yPHynSwZC4aPQAESHEbKkDetuc7JKdksyWqLTqd1Z0J1ooQsz-uO3_omWCeJBHz2Y8sa4oxNxw3ciCEwIkDmqOGi3wkSTJn_X2pwtYi47FUqo5tTAsRmrc/s320/network_options.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Helvetica;&quot;&gt;Click on the &lt;i&gt;Update&lt;/i&gt; button: this will reset the AEBS and cause a solid yellow light with a status of Double NAT. The AEBS will advise you to switch back to &lt;i&gt;bridge&lt;/i&gt; mode&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Helvetica;&quot;&gt;Click on the Double NAT &lt;i&gt;Status&lt;/i&gt; pull-down menu and select Ignore: after another reboot the AEBS should come up with a solid green color&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;Regarding the Actiontec configuration, I left it as is, except for disabling the wireless mode to avoid interference with the AEBS.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Helvetica;&quot;&gt;With an internet browser log on to &lt;i&gt;http://192.168.1.1&lt;/i&gt; using the login and password printed on the bottom of the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-align: center;&quot;&gt;MI424WR modem/router.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-align: center;&quot;&gt;Click on the &lt;i&gt;Wireless Settings&lt;/i&gt; icon:&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw5PgtV-SYKaUhr9PjkkVPLb5kLq4ZJTWFmkjJjQqLCO35i9Fdw1ZygpDSTmyH55OEG3WmuCK45lnKgPuhS23lYrDbLNfm3fQLIv0AGFZxkIjn4GILAx5Vn0uIceXea95pQpnb5v7_-tw/s1600/actiontec_topbar_wireless_lit.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhw5PgtV-SYKaUhr9PjkkVPLb5kLq4ZJTWFmkjJjQqLCO35i9Fdw1ZygpDSTmyH55OEG3WmuCK45lnKgPuhS23lYrDbLNfm3fQLIv0AGFZxkIjn4GILAx5Vn0uIceXea95pQpnb5v7_-tw/s1600/actiontec_topbar_wireless_lit.gif&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Wireless&lt;br /&gt;
Settings&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;text-align: center;&quot;&gt;Click on &lt;i&gt;Basic Security Settings&lt;/i&gt; from the left panel&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-align: center;&quot;&gt;Click on &lt;i&gt;Off&lt;/i&gt; from the &lt;i&gt;1. Turn Wireless ON&lt;/i&gt; form entry&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;text-align: center;&quot;&gt;Click on the &lt;i&gt;Apply&lt;/i&gt; button to disable wireless&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;Considerations&lt;/span&gt;&lt;/h3&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;Having the Verizon DHCP server using the 198.168.1.xxx IP addresses range and the AEBS the 10.0.1.xxx range will keep you sane and prevent confusions in your mind about which sub-network you are connected to.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;In any case these two sub-networks are completely separated and invisible from the Internet and you cannot have a device connected to one subnet talk to another device on the other subnet (unless you start configuring forwarding ports on the AEBS of course). This is OK since I plan to keep all of my computers and devices on the subnet controlled by the AEBS in order to have access control over each device.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;To my disappointment the Airport Utility version 6.1 used to configure the AEBS is probably one the worst application I ever used to set up a router. It&#39;s not intuitive and worst of all it doesn&#39;t show who&#39;s connected to your network (or at least it doesn&#39;t show all the connected devices). In fact it only shows wireless clients in a weird fashion (by hovering over the base station picture), but no sign of any device connected through the Gigabit ethernet ports. By the way the list of wireless client is dynamic and you cannot even copy/paste the MAC addresses to add later to the access control table. I ended up switching to the previous version of Airport Utility (version 5.6 - as suggested by several people on the Internet) since with that you can still get a list of &lt;i&gt;all&lt;/i&gt; devices connected to the AEBS from the Advanced-&amp;gt;Logs and Statistics-&amp;gt;DHCP Clients tab.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica;&quot;&gt;Still for parental control AEBS only has a time-based table where you can setup a schedule on a per MAC address basis. So I still had to resolve the problem of preventing my kids from hitting questionable web sites. I solved that by setting the &lt;a href=&quot;http://www.opendns.com/&quot;&gt;OpenDNS&lt;/a&gt; servers for primary and secondary DNS servers in my Verizon router. OpenDNS offer a basic parental control filter based on categories. But I found that is is adequate for my needs.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/2970614610170007725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/12/configuring-apple-airport-extreme-with.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/2970614610170007725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/2970614610170007725'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/12/configuring-apple-airport-extreme-with.html' title='Configuring the Apple Airport Extreme with Verizon FIOS'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXMBPBncLnUMQhwEovdUfPkCpE5YGylP5IWaDfMlF9JSg0IygXjGqWvgwlUp31kfoXrNA6ix7GpwnR2nihglZQ_-TQKSzv-Nqw3f5Dg7oD2GdvqQ_9ptsaZEywhngMpNqLtByzfV18prg/s72-c/MC340.jpeg" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-3983765173777144739</id><published>2012-11-20T10:01:00.002-05:00</published><updated>2012-11-20T10:01:49.430-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Python For Android (Py4A)</title><content type='html'>A better solution for cross-compiling Python for Android is to use the Py4A project which is made to be used together with SL4A (Scripting Layer For Android). If you are only interested in the Python interpreter and the runtime Python library, you can also use it standalone.&lt;br /&gt;
Get a local copy of the source code using&amp;nbsp; the following command:&lt;br /&gt;
&lt;br /&gt;
&lt;tt id=&quot;checkoutcmd&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/tt&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$ hg clone https://code.google.com/p/python-for-android/&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Just focus on the &lt;b&gt;python-build&lt;/b&gt; subdirectory and make sure the&amp;nbsp; python-build/python-src subdirectory is not present (remove it if it came with the Mercurial repository, or else the compilation will fail).&lt;br /&gt;
Set up your environment so that the python-for-android build script can pick up the ndk-build script from the Android NDK:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; $ export ANDROID_NDK_ROOT=/home/&amp;lt;your-directory&amp;gt;/android-ndk-r8&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; $ export PATH=$ANDROID_NDK_ROOT:$PATH&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Finally build Python for Android by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&amp;nbsp; $ cd python-for-android/python-build&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; $ rm -rf python-src&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; $ bash build.sh&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Note that on my Ubuntu 12.04 machine I had initially the following compilation error:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;Traceback (most recent call last):&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; File &quot;build.py&quot;, line 161, in &amp;lt;module&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; os.path.join(pwd, &#39;output.temp&#39;, &#39;usr&#39;))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; File &quot;build.py&quot;, line 89, in zipup&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; zip_file = zipfile.ZipFile(out_path, &#39;w&#39;, compression=zipfile.ZIP_DEFLATED)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; File &quot;/home/danilo/python-for-android/python-build/host/lib/python2.6/zipfile.py&quot;, line 660, in __init__&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;Compression requires the (missing) zlib module&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;RuntimeError: Compression requires the (missing) zlib module&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I identified the problem in having the zlib library in my system installed under /lib/x86_64-linux-gnu/ instead of one of the traditional lib directories covered by the Python setup.py script. Also on my system I only had libz.so.1 and not libz.so. So to fix both problems I just created a symlink in the standard /usr/lib directory as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;
&amp;nbsp; $ cd /usr/lib&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; $ sudo ln -s /lib/x86_64-linux-gnu/libz.so.1 libz.so&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
With this fix the build.sh script was able to successfully build the zlib module for the host environment and create the following zipped files:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;python_extras_r14.zip&lt;/li&gt;
&lt;li&gt;python-lib_r16.zip&lt;/li&gt;
&lt;li&gt;python_r16.zip&lt;/li&gt;
&lt;li&gt;python_scripts_r13.zip&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Of these I only used the &lt;i&gt;python_r16.zip&lt;/i&gt; which contains the stripped python interpreter and the runtime libraries, and the &lt;i&gt;python-lib_r16.zip&lt;/i&gt; which contains the include header files such as Python.h that can be used to compile Python bindings at development time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/3983765173777144739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/11/python-for-android-py4a.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/3983765173777144739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/3983765173777144739'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/11/python-for-android-py4a.html' title='Python For Android (Py4A)'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-3678473941250894171</id><published>2012-11-05T17:16:00.000-05:00</published><updated>2014-01-26T10:43:38.009-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arduino"/><title type='text'>Arduino and 7-segment LED counter driven by two tactile switches </title><content type='html'>I have posted on YouTube a couple of videos about a project I made 
with the Arduino prototype board. The circuit uses an Arduino mini and 
has a simple gear counter based on a 7-segment LED and controlled by two
 switches. It can be mounted on your bike and used for example to 
visualize which gear you are in at any&amp;nbsp;time.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/N-dIwVE73ng?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;object class=&quot;BLOGGER-youtube-video&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot; data-thumbnail-src=&quot;http://i.ytimg.com/vi/hUbtLPL_rb0/0.jpg&quot; height=&quot;266&quot; width=&quot;320&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/hUbtLPL_rb0?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata&quot; /&gt;&lt;param name=&quot;bgcolor&quot; value=&quot;#FFFFFF&quot; /&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot; /&gt;&lt;embed width=&quot;320&quot; height=&quot;266&quot;  src=&quot;http://www.youtube.com/v/hUbtLPL_rb0?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;
&lt;br /&gt;
If you are interested in the schematics I have the PCB Artist version downloadable here:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://sites.google.com/site/dgtechblogscripts/SevenLedCounter.sch&quot;&gt;SevenLedCounter.sch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://sites.google.com/site/dgtechblogscripts/SevenLedCounter12V.sch&quot;&gt;SevenLedCounter12V.sch&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
The Arduino code is instead available below.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;/*
  Blink
 
 Turns on an LED on for one second, then off for one second, repeatedly.
 
 The circuit:
 * LED connected from digital pin 13 to ground.
 
 * Note: On most Arduino boards, there is already an LED on the board
 connected to pin 13, so you don&#39;t need any extra components for this example.
 
 
 Created 1 June 2005
 By David Cuartielles
 
 http://arduino.cc/en/Tutorial/Blink
 
 based on an orginal by H. Barragan for the Wiring i/o board
 
 */

#define BUTTON_DOWN 10
#define BUTTON_UP 12

int ledPinA =  6;    // LED connected to digital pin 3
int ledPinB =  9;    // LED connected to digital pin 4
int ledPinC =  4;    // LED connected to digital pin 5
int ledPinD =  3;    // LED connected to digital pin 6
int ledPinE =  2;    // LED connected to digital pin 7
int ledPinF =  7;    // LED connected to digital pin 8
int ledPinG =  8;    // LED connected to digital pin 9
int ledPinDP =  5;   // LED connected to digital pin 10

int val_down = 0;
int old_val_down = 0;
int val_up = 0;
int old_val_up = 0;
int state = 0;
int gear = 1;

// The setup() method runs once, when the sketch starts

void setup()   {             
  pinMode(BUTTON_DOWN, INPUT);
  pinMode(BUTTON_UP, INPUT);
  
  // initialize the digital pin as an output:
  pinMode(ledPinA, OUTPUT);
  pinMode(ledPinB, OUTPUT);
  pinMode(ledPinC, OUTPUT);
  pinMode(ledPinD, OUTPUT);
  pinMode(ledPinE, OUTPUT);
  pinMode(ledPinF, OUTPUT);
  pinMode(ledPinG, OUTPUT);  
  pinMode(ledPinDP, OUTPUT);
  
  // initialize serial communication:
  Serial.begin(9600);
}

void led0()
{
  digitalWrite(ledPinA, LOW);
  digitalWrite(ledPinB, LOW);
  digitalWrite(ledPinC, LOW);
  digitalWrite(ledPinD, LOW);
  digitalWrite(ledPinE, LOW);  
  digitalWrite(ledPinF, LOW);  
  digitalWrite(ledPinG, HIGH); 
  digitalWrite(ledPinDP, HIGH);
}

void led1()
{
  digitalWrite(ledPinA, HIGH);
  digitalWrite(ledPinB, LOW);
  digitalWrite(ledPinC, LOW);
  digitalWrite(ledPinD, HIGH);
  digitalWrite(ledPinE, HIGH);  
  digitalWrite(ledPinF, HIGH);  
  digitalWrite(ledPinG, HIGH); 
  digitalWrite(ledPinDP, HIGH);
}

void led2()
{
  digitalWrite(ledPinA, LOW);
  digitalWrite(ledPinB, LOW);
  digitalWrite(ledPinC, HIGH);
  digitalWrite(ledPinD, LOW);
  digitalWrite(ledPinE, LOW);  
  digitalWrite(ledPinF, HIGH);  
  digitalWrite(ledPinG, LOW); 
  digitalWrite(ledPinDP, HIGH);
}

void led3()
{
  digitalWrite(ledPinA, LOW);
  digitalWrite(ledPinB, LOW);
  digitalWrite(ledPinC, LOW);
  digitalWrite(ledPinD, LOW);
  digitalWrite(ledPinE, HIGH);  
  digitalWrite(ledPinF, HIGH);  
  digitalWrite(ledPinG, LOW); 
  digitalWrite(ledPinDP, HIGH);
}

void led4()
{
  digitalWrite(ledPinA, HIGH);
  digitalWrite(ledPinB, LOW);
  digitalWrite(ledPinC, LOW);
  digitalWrite(ledPinD, HIGH);
  digitalWrite(ledPinE, HIGH);  
  digitalWrite(ledPinF, LOW);  
  digitalWrite(ledPinG, LOW); 
  digitalWrite(ledPinDP, HIGH);
} 

void led5()
{
  digitalWrite(ledPinA, LOW);
  digitalWrite(ledPinB, HIGH);
  digitalWrite(ledPinC, LOW);
  digitalWrite(ledPinD, LOW);
  digitalWrite(ledPinE, HIGH);  
  digitalWrite(ledPinF, LOW);  
  digitalWrite(ledPinG, LOW); 
  digitalWrite(ledPinDP, HIGH);
} 

void led6()
{
  digitalWrite(ledPinA, LOW);
  digitalWrite(ledPinB, HIGH);
  digitalWrite(ledPinC, LOW);
  digitalWrite(ledPinD, LOW);
  digitalWrite(ledPinE, LOW);  
  digitalWrite(ledPinF, LOW);  
  digitalWrite(ledPinG, LOW); 
  digitalWrite(ledPinDP, HIGH);
} 

void led7()
{
  digitalWrite(ledPinA, LOW);
  digitalWrite(ledPinB, LOW);
  digitalWrite(ledPinC, LOW);
  digitalWrite(ledPinD, HIGH);
  digitalWrite(ledPinE, HIGH);  
  digitalWrite(ledPinF, HIGH);  
  digitalWrite(ledPinG, HIGH); 
  digitalWrite(ledPinDP, HIGH);
} 

void led8()
{
  digitalWrite(ledPinA, LOW);
  digitalWrite(ledPinB, LOW);
  digitalWrite(ledPinC, LOW);
  digitalWrite(ledPinD, LOW);
  digitalWrite(ledPinE, LOW);  
  digitalWrite(ledPinF, LOW);  
  digitalWrite(ledPinG, LOW); 
  digitalWrite(ledPinDP, HIGH);
} 

void led9()
{
  digitalWrite(ledPinA, LOW);
  digitalWrite(ledPinB, LOW);
  digitalWrite(ledPinC, LOW);
  digitalWrite(ledPinD, LOW);
  digitalWrite(ledPinE, HIGH);  
  digitalWrite(ledPinF, LOW);  
  digitalWrite(ledPinG, LOW); 
  digitalWrite(ledPinDP, HIGH);
} 

void ledDP()
{
  digitalWrite(ledPinA, HIGH);
  digitalWrite(ledPinB, HIGH);
  digitalWrite(ledPinC, HIGH);
  digitalWrite(ledPinD, HIGH);
  digitalWrite(ledPinE, HIGH);  
  digitalWrite(ledPinF, HIGH);  
  digitalWrite(ledPinG, HIGH); 
  digitalWrite(ledPinDP, LOW);
} 

void setLed(int number)
{
  switch (number) {
    case 0:  
      ledDP();
      break;
    case 1:  
      led1();
      break;
    case 2:  
      led2();
      break;
    case 3:  
      led3();
      break;
    case 4:  
      led4();
      break;
    case 5:  
      led5();
      break;
    case 6:  
      led6();
      break;
    case 7:  
      led7();
      break;
    case 8:  
      led8();
      break;
    case 9:  
      led9();
      break;
  }
}
              
// the loop() method runs over and over again,
// as long as the Arduino has power

void oldloop()                     
{
  ledDP();
  delay(1000);                  // wait for a second
  led0();
  delay(1000);                  // wait for a second
  led1();
  delay(1000);                  // wait for a second
  led2();
  delay(1000);                  // wait for a second
  led3();
  delay(1000);                  // wait for a second
  led4();
  delay(1000);                  // wait for a second
  led5();
  delay(1000);                  // wait for a second
  led6();
  delay(1000);                  // wait for a second
  led7();
  delay(1000);                  // wait for a second
  led8();
  delay(1000);                  // wait for a second
  led9();
  delay(1000);                  // wait for a second
}

void loop()
{
    val_up = digitalRead(BUTTON_UP);
    if ((val_up == HIGH) &amp;amp;&amp;amp; (old_val_up == LOW)) {
      gear += 1;
      Serial.print(&quot;gear number:  &quot;);
      Serial.println(gear, DEC);
      delay(100);
    }
    old_val_up = val_up;
 
    val_down = digitalRead(BUTTON_DOWN);
    if ((val_down == HIGH) &amp;amp;&amp;amp; (old_val_down == LOW)) {
      gear -= 1;
      Serial.print(&quot;gear number:  &quot;);
      Serial.println(gear, DEC);
      delay(100);
    }
    old_val_down = val_down;
    
    if (gear &amp;gt;= 6) {
      gear = 6;
    }
    if (gear &amp;lt;= 1) {
      gear = 1;
    }
    
    setLed(gear);
}

&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/3678473941250894171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/11/arduino-and-7-segment-led-counter.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/3678473941250894171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/3678473941250894171'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/11/arduino-and-7-segment-led-counter.html' title='Arduino and 7-segment LED counter driven by two tactile switches '/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-6369024361484621789</id><published>2012-10-26T10:51:00.000-04:00</published><updated>2013-08-26T21:15:20.073-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>How to cross-compile Python for Android</title><content type='html'>When it comes to cross-compiling Python for Android, I&#39;ve followed Gabriel&#39;s blog post @ &lt;a href=&quot;http://mdqinc.com/blog/2011/09/cross-compiling-python-for-android/&quot;&gt;http://mdqinc.com/blog/2011/09/cross-compiling-python-for-android/&lt;/a&gt; and I was successful in creating an Arm-based Python executable (and related libraries) in little or no time.&lt;br /&gt;
Gabriel has a lot of the initial steps just verbally described, but I&#39;ve come up with a shell script that allows you to automate the entire process. Of course you need to replace &amp;lt;path-to-android-ndk&amp;gt; with the directory where you have installed the NDK.&lt;br /&gt;
Here it goes.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;ANDROID_NDK=&amp;lt;path-to-android-ndk&amp;gt;&lt;br /&gt;ANDROID_ABI=&quot;armeabi-v7a&quot;&lt;br /&gt;ANDROID_NATIVE_API_LEVEL=&quot;android-8&quot;&lt;br /&gt;PYTHON_VERSION=&quot;2.6.2&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;output_dir=$1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;mkdir -p $output_dir&lt;br /&gt;cd $output_dir&lt;br /&gt;# get Python source tarball&lt;br /&gt;wget http://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz&lt;br /&gt;&lt;br /&gt;# create Python Host version &lt;br /&gt;tar zxvf Python-$PYTHON_VERSION.tgz&lt;br /&gt;mv Python-$PYTHON_VERSION Host-Python-$PYTHON_VERSION-src&lt;br /&gt;cd Host-Python-$PYTHON_VERSION-src &lt;br /&gt;./configure --prefix=$output_dir/Host-Python-$PYTHON_VERSION&lt;br /&gt;make&lt;br /&gt;make install&lt;br /&gt;&lt;br /&gt;cd $output_dir&lt;br /&gt;# create Python Cross-compiled version for Android&lt;br /&gt;tar zxvf Python-$PYTHON_VERSION.tgz&lt;br /&gt;mv Python-$PYTHON_VERSION Android-Python-$PYTHON_VERSION-src&lt;br /&gt;cd Android-Python-$PYTHON_VERSION-src &lt;br /&gt;&lt;br /&gt;# get and apply Python patch&lt;br /&gt;wget -o&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Python-2.6.2-android.patch&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;https://sites.google.com/site/dgtechblogscripts/Python-2.6.2-android.patch&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;patch -p0 &amp;lt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Python-2.6.2-android.patch&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&lt;br /&gt;# fix setup.py&lt;br /&gt;mv setup.py setup.py.orig&lt;br /&gt;cat setup.py.orig | awk &#39;{ if (NR==316) {print &quot;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot; $0} else {print $0}}&#39; &amp;gt; setup.py&lt;br /&gt;&lt;br /&gt;MY_HOSTPYTHON=$output_dir/Host-Python-$PYTHON_VERSION/bin/python&lt;br /&gt;MY_HOSTPGEN=$output_dir/Host-Python-$PYTHON_VERSION-src/Parser/pgen&lt;br /&gt;&lt;br /&gt;export ANDROID_NDK&lt;br /&gt;export PATH=&quot;$ANDROID_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/:$ANDROID_NDK:$ANDROID_NDK/tools:/usr/local/bin:/usr/bin:/bin&quot;&lt;br /&gt;export ARCH=$ANDROID_ABI&lt;br /&gt;export CFLAGS=&quot;-DANDROID -mandroid -fomit-frame-pointer --sysroot $ANDROID_NDK/platforms/$ANDROID_NATIVE_API_LEVEL/arch-arm&quot;&lt;br /&gt;export CXXFLAGS=&quot;$CFLAGS&quot;&lt;br /&gt;export CC=&quot;arm-linux-androideabi-gcc $CFLAGS&quot;&lt;br /&gt;export CXX=&quot;arm-linux-androideabi-g++ $CXXFLAGS&quot;&lt;br /&gt;export AR=&quot;arm-linux-androideabi-ar&quot;&lt;br /&gt;export RANLIB=&quot;arm-linux-androideabi-ranlib&quot;&lt;br /&gt;export STRIP=&quot;arm-linux-androideabi-strip --strip-unneeded&quot;&lt;br /&gt;export MAKE=&quot;make -j4 install HOSTPYTHON=$MY_HOSTPYTHON HOSTPGEN=$MY_HOSTPGEN CROSS_COMPILE=arm-eabi- CROSS_COMPILE_TARGET=yes&quot;&lt;br /&gt;&lt;br /&gt;./configure LDFLAGS=&quot;-Wl,--allow-shlib-undefined&quot; CFLAGS=&quot;-mandroid -fomit-frame-pointer --sysroot $ANDROID_NDK/platforms/$ANDROID_NATIVE_API_LEVEL/arch-arm&quot; HOSTPYTHON=$MY_HOSTPYTHON HOSTPGEN=$MY_HOSTPGEN --host=arm-eabi --build=i686-pc-linux-gnu --enable-shared --prefix=&quot;$output_dir/Android-Python-$PYTHON_VERSION&quot;&lt;br /&gt;sed -i &quot;s|^INSTSONAME=\(.*.so\).*|INSTSONAME=\\1|g&quot; Makefile&lt;br /&gt;$MAKE &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/6369024361484621789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/10/how-to-cross-compile-python-for-android.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/6369024361484621789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/6369024361484621789'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/10/how-to-cross-compile-python-for-android.html' title='How to cross-compile Python for Android'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-715717901825048235</id><published>2012-10-26T10:36:00.000-04:00</published><updated>2012-10-26T10:36:10.233-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Installing the Android NDK</title><content type='html'>These instructions refer to a Ubuntu 12.04.1 LTS system running on an Intel processor.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Head to the&amp;nbsp;&lt;a href=&quot;http://developer.android.com/tools/sdk/ndk/index.html&quot;&gt;http://developer.android.com/tools/sdk/ndk/index.html&lt;/a&gt; web site and download the latest version of the Android NDK for Linux (release r8b for example):&lt;br /&gt;&lt;pre style=&quot;background-color: #f0f0f7; border: 1pt solid rgb(187, 187, 187); font-family: courier, monospace; font-size: 0.92em; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;$ wget http://dl.google.com/android/ndk/android-ndk-r8b-linux-x86.tar.bz2&lt;/pre&gt;
&lt;br /&gt;&lt;a href=&quot;http://dl.google.com/android/android-sdk_r20.0.3-linux.tgz&quot;&gt; &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Unzip and untar the downloaded file in your preferred directory: &lt;pre style=&quot;background-color: #f0f0f7; border: 1pt solid rgb(187, 187, 187); font-family: courier, monospace; font-size: 0.92em; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;$ bunzip2 android-ndk-r8b-linux-x86.tar.bz2
$ tar zxvf android-sdk_r20.0.3-linux.tgz&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
You should now have a directory called&amp;nbsp; &lt;b&gt;android-ndk-r8b&lt;/b&gt; containing release 8b of the Android NDK.
</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/715717901825048235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/10/installing-android-ndk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/715717901825048235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/715717901825048235'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/10/installing-android-ndk.html' title='Installing the Android NDK'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-5563412884244628212</id><published>2012-10-11T14:50:00.001-04:00</published><updated>2012-10-11T14:50:35.591-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Problems with new version of rpmbuild</title><content type='html'>&lt;h2&gt;
The Problem &lt;/h2&gt;
With the new version of rpmbuild installed on CentOS 6.x, if you try to use an old RPM spec file, you will get an error like the following:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: large;&quot;&gt;error: File not found: &amp;lt;path&amp;gt;/BUILDROOT/&amp;lt;product&amp;gt;-6.7.x86_64/&amp;lt;filename&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
Previously rpmbuild would install and look for files under the rpm_top/BUILD directory, while now it looks under the new BUILDROOT directory.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
The Solution&lt;/h2&gt;
This is what I ended up doing to solve the problem. When I call rpmbuild I now define a new variable, for example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: large;&quot;&gt;$ centos_release=$(lsb_release -rs | sed &#39;s/\.//&#39;)&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: large;&quot;&gt;$ rpmbuild --define &quot;&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;centos_release&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt; $&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;centos_release&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&quot; ... -bb specfile &lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
then I changed my spec file to contain something like the following:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: large;&quot;&gt;%if %{&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;centos_release&lt;/span&gt;&lt;span style=&quot;font-size: large;&quot;&gt;} &amp;gt;= 60&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: large;&quot;&gt;
%setup -q -c -n %{buildroot}/usr/local/ 
cp -a -r %{buildroot}/usr/local/ /usr/
&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: large;&quot;&gt;%else
&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: large;&quot;&gt;%setup -q -c -n usr/local/
%install
cp -a -r $PWD /usr/
&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: large;&quot;&gt;%endif&lt;/span&gt;&lt;/pre&gt;
&lt;h2&gt;
Another related problem&lt;/h2&gt;
Suppose you have a single tar ball and you want to create two or more RPMs using different spec files. The new version of rpmbuild automatically cleans the BUILDROOT directory after completing the targets for a given spec file. If you want to save time and have the second spec file just look for the BUILDROOT created by the first spec it won&#39;t find it because of the automatic clean. So it seems like you are forced to untar and install under the BUILDROOT your file over and over again.&lt;br /&gt;
A simple solution to this problem is to add a %clean directive to your spec file and do nothing to disable to automatic cleaning done by rpmbuild. Add the following line at the bottom of your spec file:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: large;&quot;&gt;%clean&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/5563412884244628212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/10/problems-with-new-version-of-rpmbuild.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/5563412884244628212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/5563412884244628212'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/10/problems-with-new-version-of-rpmbuild.html' title='Problems with new version of rpmbuild'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-1003166391447243977</id><published>2012-10-08T16:16:00.001-04:00</published><updated>2012-10-08T16:20:38.854-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Installing the Android SDK</title><content type='html'>These instructions refer to a Ubuntu 12.04.1 LTS system running on an Intel processor.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Head to the &lt;a href=&quot;http://developer.android.com/&quot;&gt;developer.android.com&lt;/a&gt; web site and download the latest version of the Android SDK for Linux (release 20.0.3 for example): &lt;a href=&quot;http://dl.google.com/android/android-sdk_r20.0.3-linux.tgz&quot;&gt;http://dl.google.com/android/android-sdk_r20.0.3-linux.tgz&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Untar the downloaded file in your preferred directory: &lt;pre style=&quot;background-color: #f0f0f7; border: 1pt solid rgb(187, 187, 187); font-family: courier, monospace; font-size: 0.92em; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;$ tar zxvf android-sdk_r20.0.3-linux.tgz&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
You should now have a directory called&amp;nbsp; &lt;b&gt;android-sdk-linux&lt;/b&gt; containing release 20.0.3 of the Android SDK.</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/1003166391447243977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/10/installing-android-sdk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/1003166391447243977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/1003166391447243977'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/10/installing-android-sdk.html' title='Installing the Android SDK'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-1771030736133117322</id><published>2012-10-06T20:49:00.000-04:00</published><updated>2012-10-07T20:18:26.306-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Porting your Legacy C/C++ project to Android</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPJVx7wxcozoMAalYnWC-L3YF9p8_vcTqQhyphenhyphen0c-rco3N2ZBgT83aOLL0Dh9pjn9oLCbSTWVrndKu43HQ7WHXhOxHyfpnVAfdnCDd7xd8V_Y4nhJRzqHaS2fwyb0cbhBuaKLuZOBYLcXTw/s1600/android.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;br /&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPJVx7wxcozoMAalYnWC-L3YF9p8_vcTqQhyphenhyphen0c-rco3N2ZBgT83aOLL0Dh9pjn9oLCbSTWVrndKu43HQ7WHXhOxHyfpnVAfdnCDd7xd8V_Y4nhJRzqHaS2fwyb0cbhBuaKLuZOBYLcXTw/s200/android.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
This is a recurring problem people have often: trying to port a big C/C++ project to the Android platform. You have thousands of lines of tested and working C/C++ code that you want to reuse and access from your Android application. So far Android only provides an SDK for Java applications, only supports devices with ARM, MIPS and x86 architectures, and several steps are necessary if you want to port your code and call it from Java as a library. By large the biggest deployment is for ARM processor devices, so we are initially focused on porting our code to this architecture.
&lt;br /&gt;
Porting your C/C++ project to the Android platform entails then the following steps:&lt;span class=&quot;anchor&quot; id=&quot;line-16&quot;&gt;&lt;/span&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-17&quot;&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Cross-compile the C/C++ code for the ARM processor (or any other supported) architecture.&lt;span class=&quot;anchor&quot; id=&quot;line-18&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Develop a JNI module allowing an Android application to natively call the C/C++ code from Java.&lt;span class=&quot;anchor&quot; id=&quot;line-19&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Develop an Android application using the JNI module.&lt;span class=&quot;anchor&quot; id=&quot;line-20&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Run and debug the app on an Android device.&lt;span class=&quot;anchor&quot; id=&quot;line-22&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;line874&quot;&gt;
Developing an Android application requires the Android Software Development Kit (SDK), while cross-compiling your C/C++ code and developing the JNI module for Android requires the Android Native Development Kit (NDK). Both these kits run on Windows XP/Win7, Mac OS 10.5.8 or later (Intel), or Ubuntu Linux 8.04 or later.&lt;span class=&quot;anchor&quot; id=&quot;line-23&quot;&gt;&lt;/span&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-24&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line874&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
My intention is to publish on this blog several posts with detailed instructions on how to accomplish the above mentioned steps. The instructions are based on other posts you can search on the internet and on my experience with Android. All the instructions are based on the development and testing environments described below.
&lt;br /&gt;
&lt;div class=&quot;line874&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Development Environment&lt;/h3&gt;
&lt;div class=&quot;line874&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Processor: Intel(R) Core(TM) 2 Duo CPU &amp;nbsp; &amp;nbsp; E8600 &amp;nbsp;@ 3.33GHz&lt;/li&gt;
&lt;li&gt;RAM: 4GB DDR2 SDRAM DIMM 240-pin&lt;/li&gt;
&lt;li&gt;OS: Ubuntu Linux 12.04&lt;/li&gt;
&lt;li&gt;Eclipse IDE Juno&lt;/li&gt;
&lt;li&gt;Android SDK r20&lt;/li&gt;
&lt;li&gt;Android NDK r8&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Testing Environment&lt;/h3&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;LG Thrill 4G - Android 2.2&lt;span class=&quot;anchor&quot; id=&quot;line-137&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Samsung Galaxy Tab 8.9 - Android 3.2&lt;span class=&quot;anchor&quot; id=&quot;line-138&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Samsung Galaxy Tab 2 7.0 - Android 4.01&lt;/li&gt;
&lt;li&gt;Samsung Galaxy S III - Android 4.0.4&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/1771030736133117322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/10/porting-your-legacy-cc-project-to.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/1771030736133117322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/1771030736133117322'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/10/porting-your-legacy-cc-project-to.html' title='Porting your Legacy C/C++ project to Android'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPJVx7wxcozoMAalYnWC-L3YF9p8_vcTqQhyphenhyphen0c-rco3N2ZBgT83aOLL0Dh9pjn9oLCbSTWVrndKu43HQ7WHXhOxHyfpnVAfdnCDd7xd8V_Y4nhJRzqHaS2fwyb0cbhBuaKLuZOBYLcXTw/s72-c/android.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1695208298020614094.post-4617081272362104601</id><published>2012-10-06T12:32:00.002-04:00</published><updated>2012-10-07T17:06:13.886-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Transferring Files from a computer to your Android device</title><content type='html'>&lt;span style=&quot;font-family: Arial, &#39;Lucida Grande&#39;, sans-serif; font-size: 15px;&quot;&gt;Android devices have file systems similar to regular computers. Subject to permissions restrictions, we can transfer files from a computer to a device (connected to the computer by USB) or emulator, or from the device or emulator to the computer. There are several ways to transfer files to an Android device:&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;line874&quot; style=&quot;font-family: Arial, &#39;Lucida Grande&#39;, sans-serif; font-size: 15px;&quot;&gt;
&lt;span class=&quot;anchor&quot; id=&quot;line-163&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ol style=&quot;font-family: Arial, &#39;Lucida Grande&#39;, sans-serif; font-size: 15px;&quot; type=&quot;1&quot;&gt;
&lt;li&gt;&lt;div class=&quot;line862&quot; style=&quot;margin-bottom: 0.25em; margin-top: 0.25em;&quot;&gt;
Using Eclipse&lt;br /&gt;
Select the DDMS perspective for Eclipse and use the File Explorer tab to select the directory where you want to tranfer a file to (a drawback of using this method is that you can only tranfer one file at a time).&lt;span class=&quot;anchor&quot; id=&quot;line-164&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;line862&quot; style=&quot;margin-bottom: 0.25em; margin-top: 0.25em;&quot;&gt;
Using the ADB&lt;br /&gt;
You can tranfer entire directories using the ADB command line interface. For example to transfer the entire content of a director to an Android device connected to a Ubuntu computer via the USB port:&lt;br /&gt;
&lt;span class=&quot;anchor&quot; id=&quot;line-165&quot;&gt;&lt;/span&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-166&quot;&gt;&lt;/span&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-167&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #f0f0f7; border: 1pt solid rgb(187, 187, 187); font-family: courier, monospace; font-size: 0.92em; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;$ adb push &amp;lt;path to directory to copy&amp;gt; /mnt/sdcard/&amp;lt;target directory&amp;gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;line862&quot;&gt;
Install an ssh daemon on the Android device and then use sftp from your workstation. For example you can download the free&amp;nbsp;&lt;a class=&quot;https&quot; href=&quot;https://play.google.com/store/apps/details?id=berserker.android.apps.sshdroid&amp;amp;hl=en&quot; style=&quot;border: 0px; color: blue; text-decoration: none;&quot;&gt;SSHDroid&lt;/a&gt;&amp;nbsp;app from the Google market and install it on your device, run the app an find out about the IP address to connect to. Then from a terminal window in Linux you can connect like this (works on Ubuntu 12.04):&lt;span class=&quot;anchor&quot; id=&quot;line-170&quot;&gt;&lt;/span&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-171&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;line867&quot;&gt;
&lt;span class=&quot;anchor&quot; id=&quot;line-172&quot;&gt;&lt;/span&gt;&lt;span class=&quot;anchor&quot; id=&quot;line-173&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: #f0f0f7; border: 1pt solid rgb(187, 187, 187); font-family: courier, monospace; font-size: 0.92em; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;$ ssh -p 2222 root@ip-address-mentioned-in-SSHDroid&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span class=&quot;anchor&quot; id=&quot;line-174&quot;&gt;&lt;/span&gt;&lt;div class=&quot;line867&quot;&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
</content><link rel='replies' type='application/atom+xml' href='http://danilogiulianelli.blogspot.com/feeds/4617081272362104601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/10/transferring-files-from-computer-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/4617081272362104601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1695208298020614094/posts/default/4617081272362104601'/><link rel='alternate' type='text/html' href='http://danilogiulianelli.blogspot.com/2012/10/transferring-files-from-computer-to.html' title='Transferring Files from a computer to your Android device'/><author><name>dg</name><uri>http://www.blogger.com/profile/14186971032974107585</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>