<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>and thus goes by another day &#187; Blog</title>
	<atom:link href="http://hex.ro/wp/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://hex.ro/wp</link>
	<description>wondering</description>
	<lastBuildDate>Sat, 12 May 2012 19:15:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>nginx on Android!</title>
		<link>http://hex.ro/wp/blog/nginx-on-android/</link>
		<comments>http://hex.ro/wp/blog/nginx-on-android/#comments</comments>
		<pubDate>Sat, 12 May 2012 19:13:05 +0000</pubDate>
		<dc:creator>viulian</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://hex.ro/wp/?p=1242</guid>
		<description><![CDATA[I have finally got nginx statically compiled for ARMv5 platforms (version 0.7.69). It was difficult because linking with libz statically posed some issues and also because it needs large file system support which my toolchain did not have. One observation: nginx doesn&#8217;t want to start without /etc/passwd and /etc/group and without strace &#8211; it was [...]]]></description>
			<content:encoded><![CDATA[<p>I have finally got nginx statically compiled for ARMv5 platforms (version 0.7.69).</p>
<p>It was difficult because linking with libz statically posed some issues and also because it needs large file system support which my toolchain did not have. </p>
<p>One observation: nginx doesn&#8217;t want to start without /etc/passwd and /etc/group and without strace &#8211; it was easy to spot that the error is the same unless both the files are there:</p>
<pre class="brush: bash; title: ; notranslate">[root@arc]/usr/local/nginx/conf# nginx
[emerg]: getpwnam(&quot;nobody&quot;) failed (2: No such file or directory)</pre>
<p>1. readelf 2.20.1.20100303 output:</p>
<pre class="brush: bash; title: ; notranslate">[root@arc]/system/xbin# readelf -A nginx
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: &quot;XSCALE&quot;
  Tag_CPU_arch: v5TE
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-1
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align8_needed: Yes
  Tag_ABI_enum_size: int
</pre>
<p>2. ldd reports it as static:</p>
<pre class="brush: bash; title: ; notranslate">
[root@arc]/system/xbin# ldd nginx
        not a dynamic executable
</pre>
<p>For now I can only see the error page since I did not yet configure it with PHP-CGI:</p>
<div id="attachment_1243" class="wp-caption aligncenter" style="width: 490px"><a href="http://hex.ro/wp/wp-content/uploads/2012/05/screenshot_2012-05-12_2111.png"><img src="http://hex.ro/wp/wp-content/uploads/2012/05/screenshot_2012-05-12_2111.png" alt="nginx on Android" title="nginx on Android" width="480" height="854" class="size-full wp-image-1243" /></a><p class="wp-caption-text">nginx on Android</p></div>
<p>The more the merrier !</p>
]]></content:encoded>
			<wfw:commentRss>http://hex.ro/wp/blog/nginx-on-android/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mysql running on Android</title>
		<link>http://hex.ro/wp/blog/mysql-running-on-android/</link>
		<comments>http://hex.ro/wp/blog/mysql-running-on-android/#comments</comments>
		<pubDate>Thu, 10 May 2012 22:31:46 +0000</pubDate>
		<dc:creator>viulian</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://hex.ro/wp/?p=1236</guid>
		<description><![CDATA[Another sneak preview &#8211; mysql 5.1 running on Android phone:]]></description>
			<content:encoded><![CDATA[<p>Another sneak preview &#8211; mysql 5.1 running on Android phone:</p>
<div id="attachment_1237" class="wp-caption aligncenter" style="width: 310px"><a href="http://hex.ro/wp/wp-content/uploads/2012/05/mysqld-started.png"><img src="http://hex.ro/wp/wp-content/uploads/2012/05/mysqld-started-300x188.png" alt="mysqld / mysql on Android" title="mysqld / mysql on Android" width="300" height="188" class="size-medium wp-image-1237" /></a><p class="wp-caption-text">mysqld / mysql on Android</p></div>
]]></content:encoded>
			<wfw:commentRss>http://hex.ro/wp/blog/mysql-running-on-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compile native directly on Android phone</title>
		<link>http://hex.ro/wp/blog/compile-native-directly-on-android-phone/</link>
		<comments>http://hex.ro/wp/blog/compile-native-directly-on-android-phone/#comments</comments>
		<pubDate>Wed, 09 May 2012 06:29:02 +0000</pubDate>
		<dc:creator>viulian</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://hex.ro/wp/?p=1220</guid>
		<description><![CDATA[This is just a small sneak preview &#8211; but it will take a bit to release the whole thing. I have managed to cross-compile gcc-4.3.5 (and dependencies) for ARM platforms &#8211; which allow to directly compile C code on the any ARMv5 (or newer) Android phone. It is based on buildroot environment and no library [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a small sneak preview &#8211; but it will take a bit to release the whole thing.</p>
<p>I have managed to cross-compile gcc-4.3.5 (and dependencies) for ARM platforms &#8211; which allow to directly compile C code on the any ARMv5 (or newer) Android phone.</p>
<p>It is based on buildroot environment and no library dependency exists between it and Android libs. It also uses its own ld.so preloader, meaning that in the future, I would like to have a bunch of Linux tools running directly on the phone, but without the need to have the dependencies statically linked into each environment.</p>
<p>Some outputs:</p>
<p>* Compiling Hello World using the native compiler:</p>
<div id="attachment_1226" class="wp-caption aligncenter" style="width: 310px"><a href="http://hex.ro/wp/wp-content/uploads/2012/05/ldd.png"><img src="http://hex.ro/wp/wp-content/uploads/2012/05/ldd-300x188.png" alt="Compiling and ldd command on Android phone" title="Compiling and ldd command on Android phone" width="300" height="188" class="size-medium wp-image-1226" /></a><p class="wp-caption-text">Compiling and ldd command on Android phone</p></div>
<p>* <code>readelf -A</code> on the native compiler</p>
<div id="attachment_1227" class="wp-caption aligncenter" style="width: 310px"><a href="http://hex.ro/wp/wp-content/uploads/2012/05/readelf.png"><img class="size-medium wp-image-1227" title="readelf -A gcc on Android phone" src="http://hex.ro/wp/wp-content/uploads/2012/05/readelf-300x188.png" alt="readelf -A gcc on Android phone" width="300" height="188" /></a><p class="wp-caption-text">readelf -A gcc on Android phone</p></div>
<p>* Output of <code>gcc -v</code></p>
<pre class="brush: bash; title: ; notranslate">
[root@arc]/sdcard# gcc -v
Using built-in specs.
Target: arm-unknown-linux-uclibcgnueabi
Configured with: /home/viulian/buildroot-2010.08/output/toolchain/gcc-4.3.5/configure --prefix=/usr --build=i686-pc-linux-gnu --host=arm-unknown-linux-uclibcgnueabi --target=arm-unknown-linux-uclibcgnueabi --enable-languages=c --with-gxx-include-dir=/usr/include/c++ --disable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --disable-tls --enable-shared --enable-threads --disable-decimal-float --with-float=soft --with-abi=aapcs-linux --with-arch=armv5te --with-tune=xscale --disable-largefile --with-pkgversion='Buildroot 2010.08' --with-bugurl=http://bugs.buildroot.net/ : (reconfigured) /home/viulian/buildroot-2010.08/output/toolchain/gcc-4.3.5/configure --prefix=/usr --build=i686-pc-linux-gnu --host=arm-unknown-linux-uclibcgnueabi --target=arm-unknown-linux-uclibcgnueabi --enable-languages=c --with-gxx-include-dir=/usr/include/c++ --disable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --disable-tls --enable-shared --enable-threads --disable-decimal-float --with-float=soft --with-abi=aapcs-linux --with-arch=armv5te --with-tune=xscale --disable-largefile --with-pkgversion='Buildroot 2010.08' --with-bugurl=http://bugs.buildroot.net/
Thread model: posix
gcc version 4.3.5 (Buildroot 2010.08)
</pre>
<p>* Compiling &#8220;Hello World&#8221; on the phone itself and showing the <code>ldd</code> command executed on the native executable:</p>
<pre class="brush: bash; title: ; notranslate">
[root@arc]/sdcard/work/test# cat hello.c
#include

int main(int argc, char** argv) {
        printf(&quot;Hello world!\n&quot;);
}
[root@arc]/sdcard/work/test# time gcc hello.c -o /system/var/hello

real    0m0.227s
user    0m0.110s
sys     0m0.060s
[root@arc]/sdcard/work/test# /system/var/hello
Hello world!
[root@arc]/sdcard/work/test# ldd /system/var/hello
        libc.so.0 =&gt; /lib/libc.so.0 (0x2aab9000)
        ld-uClibc.so.0 =&gt; /lib/ld-uClibc.so.0 (0x2aaab000)
[root@arc]/sdcard/work/test#
</pre>
<p>I am still testing it, and will release it when ready!</p>
]]></content:encoded>
			<wfw:commentRss>http://hex.ro/wp/blog/compile-native-directly-on-android-phone/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Light-bulb Aquarium</title>
		<link>http://hex.ro/wp/blog/light-bulb-aquarium/</link>
		<comments>http://hex.ro/wp/blog/light-bulb-aquarium/#comments</comments>
		<pubDate>Sun, 29 Apr 2012 21:29:36 +0000</pubDate>
		<dc:creator>viulian</dc:creator>
				<category><![CDATA[Aquariums]]></category>

		<guid isPermaLink="false">http://hex.ro/wp/?p=1200</guid>
		<description><![CDATA[I named this aquarium Fundamentalis &#8211; Electric Aquarium. I did it just to &#8216;win&#8217; a small &#8216;competition&#8217; I had with another member on an aquarium website (http://acvariu.ro) but it ended up nice and thus I&#8217;ll describe it here. Specs: Volume: 90ml Fertile substrate: Dennerle DeponitMix Inert substrate: quartz Decor: Mopani wood Plants: Micranthemum Umbrosum Light: [...]]]></description>
			<content:encoded><![CDATA[<p>I named this aquarium Fundamentalis &#8211; Electric Aquarium.</p>
<p>I did it just to &#8216;win&#8217; a small &#8216;competition&#8217; I had with another member on an aquarium website (http://acvariu.ro) but it ended up nice and thus I&#8217;ll describe it here.</p>
<p><img src="http://hex.ro/photogallery/image.php?width=480&#038;image=/photogallery/pictures/IMG_8433.JPG" alt="End result." /></p>
<p>Specs:</p>
<p>Volume: 90ml<br />
Fertile substrate: Dennerle DeponitMix<br />
Inert substrate: quartz<br />
Decor: Mopani wood<br />
Plants: Micranthemum Umbrosum<br />
Light: indirect 18W<br />
Ferts: EasyCarbo<br />
Filtration: -<br />
Heating: indirect</p>
<p>Below are some photos while creating it:</p>
<p>Materials:</p>
<p><img src="http://hex.ro/photogallery/image.php?width=480&#038;image=/photogallery/pictures/IMG_2907.JPG" alt="Materials" /></p>
<p>Adding fertile substrate:</p>
<p><img src="http://hex.ro/photogallery/image.php?width=480&#038;image=/photogallery/pictures/IMG_2934.JPG" alt="Adding substrate" /></p>
<p>Decoration:</p>
<p><img src="http://hex.ro/photogallery/image.php?width=480&#038;image=/photogallery/pictures/IMG_2941.JPG" alt="Mopani wood" /></p>
<p>Another angle:</p>
<p><img src="http://hex.ro/photogallery/image.php?width=480&#038;image=/photogallery/pictures/IMG_8431.JPG" alt="Final product" /></p>
<p>Please leave a comment if you like it <img src='http://hex.ro/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://hex.ro/wp/blog/light-bulb-aquarium/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cheapest Android 4.0 phone</title>
		<link>http://hex.ro/wp/blog/cheapest-android-4-0-phone/</link>
		<comments>http://hex.ro/wp/blog/cheapest-android-4-0-phone/#comments</comments>
		<pubDate>Sun, 15 Apr 2012 22:22:40 +0000</pubDate>
		<dc:creator>viulian</dc:creator>
				<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://hex.ro/wp/?p=1195</guid>
		<description><![CDATA[Since I did not want to pay 500+ Euros just to have some manufacturing defective phone (there are issues reported with all new Android phones) I decided to give it a try and install an Android 4.0 ROM on a cheap Android phone. Enter Samsung Galaxy Mini, for which I&#8217;ve payed 99 euros and spent [...]]]></description>
			<content:encoded><![CDATA[<p>Since I did not want to pay 500+ Euros just to have some manufacturing defective phone (there are issues reported with all new Android phones) I decided to give it a try and install an Android 4.0 ROM on a cheap Android phone.</p>
<p>Enter Samsung Galaxy Mini, for which I&#8217;ve payed 99 euros and spent 1 hour customising it:</p>
<div id="attachment_1196" class="wp-caption aligncenter" style="width: 235px"><a href="http://hex.ro/wp/wp-content/uploads/2012/04/DSC_0849.jpg"><img src="http://hex.ro/wp/wp-content/uploads/2012/04/DSC_0849-225x300.jpg" alt="S5570 Galaxy Mini Custom ICS ROM" title="S5570 Galaxy Mini Custom ICS ROM" width="225" height="300" class="size-medium wp-image-1196" /></a><p class="wp-caption-text">S5570 Galaxy Mini Custom ICS ROM</p></div>
<p>It had firmware 2.2.1, and there are some steps to be followed to have ICS on it.<br />
To be able to load a custom ROM, you need a custom rom manager / recovery menu to allow loading these roms. To have custom recovery menu, you need a custom 2.3 firmware (Gingerbread). Then you need to flash the recovery menu, then you need to use it to install the additional ROM, namely ICS.</p>
<p>Not a straight forward process, but at least now I can test my software on Android 4.0 with 99 euros, instead of 500+.</p>
]]></content:encoded>
			<wfw:commentRss>http://hex.ro/wp/blog/cheapest-android-4-0-phone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing UbuntuOne from Ubuntu 12.04</title>
		<link>http://hex.ro/wp/blog/removing-ubuntuone-from-ubuntu-12-04/</link>
		<comments>http://hex.ro/wp/blog/removing-ubuntuone-from-ubuntu-12-04/#comments</comments>
		<pubDate>Sun, 01 Apr 2012 09:49:29 +0000</pubDate>
		<dc:creator>viulian</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://hex.ro/wp/?p=1184</guid>
		<description><![CDATA[How come these days everybody wants your data in their cloud ? To remove it you need to first remove the client, by following the instructions here: https://answers.launchpad.net/ubuntuone-client/+faq/778 1. Quit the Ubuntu One client 2. $ sudo rm -rf ~/.local/share/ubuntuone 3. $ rm -rf ~/.cache/ubuntuone 4. $ rm -rf ~/.config/ubuntuone 5. $ mv ~/Ubuntu\ One/ [...]]]></description>
			<content:encoded><![CDATA[<p>How come these days everybody wants your data in their cloud ?</p>
<p>To remove it you need to first remove the client, by following the instructions here: <a href="https://answers.launchpad.net/ubuntuone-client/+faq/778">https://answers.launchpad.net/ubuntuone-client/+faq/778</a></p>
<blockquote><p>1. Quit the Ubuntu One client<br />
2. $ sudo rm -rf ~/.local/share/ubuntuone<br />
3. $ rm -rf ~/.cache/ubuntuone<br />
4. $ rm -rf ~/.config/ubuntuone<br />
5. $ mv ~/Ubuntu\ One/ ~/Ubuntu\ One_old/<br />
6. Open Applications->Accessories->Passwords and Encryption Keys, go to the Passwords tab, delete the Ubuntu One token<br />
7. $ sudo apt-get purge ubuntuone-client* python-ubuntuone-storage*</p></blockquote>
<p>However, there&#8217;s one step not listed there and you will notice since the UbuntuOne icon will still remain visible in your launch bar. </p>
<p>That&#8217;s the installer which also needs to be removed:</p>
<pre class="brush: bash; title: ; notranslate">
sudo apt-get purge ubuntuone-installer*
</pre>
<p>There will still be some leftovers which you can find using <code>sudo updatedb; locate ubuntuone</code> but to me they seem ok not to spend time to remove them (images, documentation and a python package related to ubuntuone-uploader).</p>
<p>Just to make another thorough check:</p>
<pre class="brush: bash; title: ; notranslate">
sudo apt-get purge ubuntuone*
....
0 upgraded, 0 newly installed, 0 to remove and 322 not upgraded.
</pre>
<p>Enjoy your Ubuntu!</p>
<p>Later edit:</p>
<p>Ubuntu 12.04 is still extremly slow on my netbook (EeePC 1005px). While checking the output of the top command, I noticed another &#8216;one&#8217; related service that was using a lot of my CPU (not constantly).</p>
<p><code>oneconf-service</code></p>
<p>A quick:</p>
<pre class="brush: bash; title: ; notranslate">sudo apt-get purge oneconf*</pre>
<p>got rid of if, but apparently, it is linked to <code>software-center</code> too, and thus, it also removes Software Center. I&#8217;ve tried reinstalling Software Center, but it wants to bring back oneconf. So NOPE.</p>
<p>Since I disliked Software Center &#8211; it was offering the payed things first &#8211; I agreed with uninstall.</p>
]]></content:encoded>
			<wfw:commentRss>http://hex.ro/wp/blog/removing-ubuntuone-from-ubuntu-12-04/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>cannot find the slot &#8211; why am I still using Ubuntu ?</title>
		<link>http://hex.ro/wp/blog/cannot-find-the-slot-why-am-i-still-using-ubuntu/</link>
		<comments>http://hex.ro/wp/blog/cannot-find-the-slot-why-am-i-still-using-ubuntu/#comments</comments>
		<pubDate>Fri, 23 Mar 2012 23:02:18 +0000</pubDate>
		<dc:creator>viulian</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://hex.ro/wp/?p=1177</guid>
		<description><![CDATA[I probably use it since I have no time to upgrade it to a more sane distribution. Do you remember the days of IRQ conflicts when a random ISA board could break the functionality of an unrelated one just because of a misplaced jumper ? That&#8217;s Ubuntu status now. New video board breaks line-out of [...]]]></description>
			<content:encoded><![CDATA[<p>I probably use it since I have no time to upgrade it to a more sane distribution.</p>
<p>Do you remember the days of IRQ conflicts when a random ISA board could break the functionality of an unrelated one just because of a misplaced jumper ? That&#8217;s Ubuntu status now. New video board breaks line-out of the TV tuner. The whole story unraveled below:</p>
<p>So I discovered that I have lost the sound to my TV tuner &#8211; I could not stream anymore and the configuration I&#8217;ve been using for a long time doesn&#8217;t work.</p>
<p>The details:</p>
<p>1. vlc fails to start streaming, since the input-slave=alsa://hw:1,0 is not available anymore. However, for 1 year at least, the hw:1.0 was actually the saa7134_alsa (the audio module of my tuner).</p>
<p>2. checking the alsa modules &#8211; surprise surprise:</p>
<pre class="brush: bash; title: ; notranslate">
root@adevaraciune:/var/log# cat /proc/asound/modules
0 snd_hda_intel
1 snd_hda_intel
2 snd_emu10k1
</pre>
<p>Checking with aplay -l, I can see that the first board is the onboard one the second board is some audio of my <strong>new</strong> NVidia card and then the Soundblaster Live 5+1 board.<br />
So where&#8217;s my saa7134 audio ??<br />
Let&#8217;s bring it back:</p>
<p>3. modprobe saa7134_alsa index=0</p>
<pre class="brush: bash; title: ; notranslate">
Mar 23 23:45:40 adevaraciune kernel: [291137.902328] saa7134 ALSA driver for DMA sound loaded
Mar 23 23:45:40 adevaraciune kernel: [291137.902334] cannot find the slot for index 0 (range 0-2), error: -16
</pre>
<p>Ahaaa</p>
<p>Aparently no place for the sound module / board, no resources for it! You know, in 2012, with GB of RAM, super-fast CPUs, and my Ubuntu system has no place for some buffers ?</p>
<p>I decided that I don&#8217;t want to loose time anymore with it. Since I&#8217;m not using the onboard sound nor the HDMI of the video board, I&#8217;ve blacklisted the intel module by modifying /etc/modprobe.d/blacklist.conf by adding the line:</p>
<pre class="brush: bash; title: ; notranslate"># viulian -&gt; http://www.hydrus.org.uk/journal/ati-card.html
blacklist snd_hda_intel</pre>
<p>Now finally I got my card back &#8230;.. and I can watch TV. I will never upgrade this Ubuntu.</p>
<pre class="brush: bash; title: ; notranslate">root@adevaraciune:/var/log# cat /proc/asound/modules
0 snd_emu10k1
1 saa7134_alsa</pre>
]]></content:encoded>
			<wfw:commentRss>http://hex.ro/wp/blog/cannot-find-the-slot-why-am-i-still-using-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pseudomugil Furcatus Breeding.</title>
		<link>http://hex.ro/wp/blog/pseudomugil-furcatus-breeding/</link>
		<comments>http://hex.ro/wp/blog/pseudomugil-furcatus-breeding/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 23:05:57 +0000</pubDate>
		<dc:creator>viulian</dc:creator>
				<category><![CDATA[Aquariums]]></category>

		<guid isPermaLink="false">http://hex.ro/wp/?p=1168</guid>
		<description><![CDATA[I liked the fish the first time I saw them, and after three months in my aquarium, I was able to record them breeding! At around time 0m44s the egg appears on the right hand side of the video, and eventually lands into a bush of Lilaeopsis Brasiliensis. The female produces 1 egg per day, [...]]]></description>
			<content:encoded><![CDATA[<p>I liked the fish the first time I saw them, and after three months in my aquarium, I was able to record them breeding!</p>
<p><iframe width="500" height="281" src="http://www.youtube.com/embed/aUzTMLIM1bI?fs=1&#038;feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>At around time 0m44s the egg appears on the right hand side of the video, and eventually lands into a bush of Lilaeopsis Brasiliensis. The female produces 1 egg per day, sometimes more.</p>
<p>The male is the yellow finned one.</p>
<p>Music by http://www.pacdv.com/sounds/<br />
Aquarium: 30L, Light 30 W/L, pH 7.2, kH 14, gH 7, pressurized CO2 at 30ppm, Dennerle A1/E15/V30 as fertilizer.<br />
Recording equipment: Canon 7D + Canon EF100 Macro Lens<br />
Software: Handbrake (to convert the video to mkv format) then mkvmerge GUI to replace the soundtrack of the mkv video.</p>
]]></content:encoded>
			<wfw:commentRss>http://hex.ro/wp/blog/pseudomugil-furcatus-breeding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>shellinabox for Android</title>
		<link>http://hex.ro/wp/blog/shellinabox-for-android/</link>
		<comments>http://hex.ro/wp/blog/shellinabox-for-android/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 21:36:34 +0000</pubDate>
		<dc:creator>viulian</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[IT]]></category>

		<guid isPermaLink="false">http://hex.ro/wp/?p=1150</guid>
		<description><![CDATA[Introduction After fighting with many bugs to get everything to run, I finally got shellinabox to run on my Android phone! Steps I will probably post an updated article related on the exact steps on how to build (or just provide the executables) but the main issues were: a) compile openssl so that libcrypto.a could [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>After fighting with many bugs to get everything to run, I finally got shellinabox to run on my Android phone!</p>
<div id="attachment_1151" class="wp-caption aligncenter" style="width: 310px"><a href="http://hex.ro/wp/wp-content/uploads/2011/10/shellinabox_android.png"><img src="http://hex.ro/wp/wp-content/uploads/2011/10/shellinabox_android-300x242.png" alt="shellinabox on android" title="shellinabox on android" width="300" height="242" class="size-medium wp-image-1151" /></a><p class="wp-caption-text">shellinabox on android</p></div>
<p><strong>Steps</strong></p>
<p>I will probably post an updated article related on the exact steps on how to build (or just provide the executables) but the main issues were:</p>
<p>a) compile <strong>openssl</strong> so that libcrypto.a could be built with <code>no-dso</code> option (to avoid references to <code>dlopen</code> / etc calls which forced the Android executable to try to use bionic at runtime). Default Makefile is almost ok for static build, just CC / RUNLIB / AR need to be updated to point to arm-eabi equivalents.</p>
<p>b) compile <strong>openssh</strong> as Android doesn&#8217;t have <code>/bin/login</code>, and shellinabox would require SSH connection. Using LDFLAGS=&#8221;-static&#8221; created the static build.</p>
<p>c)compile <strong>shellinaboxd</strong> statically. It was difficult, as the configuration script, even if it does have options to try to create it statically, it fails and there are still references to libc.so.0. You need to statically link against libc, avoid the duplicates with warn method (between libc and launcher.c).</p>
<p>d) create fake <code>/etc/passwd</code> and <code>/etc/group</code> files, and use busybox&#8217;s <code>passwd</code> to create a root password for the phone (which is the same as the password for DroidSSHd server running already on the phone).</p>
<p>e) patch <code>launcher.c</code> to include also <code>/system/xbin</code> as member of <code>PATH</code> environment variable &#8211; I&#8217;ve submitted a bug report here: <a href="http://code.google.com/p/shellinabox/issues/detail?id=143">http://code.google.com/p/shellinabox/issues/detail?id=143</a></p>
<p>It works <img src='http://hex.ro/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  for now but only plain HTTP connection, I will attempt to setup HTTPS whenever I find the next free timeslot.</p>
]]></content:encoded>
			<wfw:commentRss>http://hex.ro/wp/blog/shellinabox-for-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP and Lighttpd for Android</title>
		<link>http://hex.ro/wp/blog/php-and-lighttpd-for-android/</link>
		<comments>http://hex.ro/wp/blog/php-and-lighttpd-for-android/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 18:07:37 +0000</pubDate>
		<dc:creator>viulian</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[IT]]></category>

		<guid isPermaLink="false">http://hex.ro/wp/?p=1121</guid>
		<description><![CDATA[Update 7 May 2012: New version released, containing PHP 5.4.2 version (CGI only). It now contains openssl / curl / SQLite modules statically linked within php-cgi executable and thus curlssl works! Beside the version number, all installation instructions below still apply. If you are already using PHP 5.3.8, just grab the php-cgi file from the [...]]]></description>
			<content:encoded><![CDATA[<p><em>Update 7 May 2012</em>: New version released, containing PHP 5.4.2 version (CGI only). It now contains <strong>openssl</strong> / <strong>curl</strong> / <strong>SQLite</strong> modules statically linked within php-cgi executable and thus curlssl works! Beside the version number, all installation instructions below still apply.</p>
<p>If you are already using PHP 5.3.8, just grab the <code>php-cgi</code> file from the 5.4.2 archive <code>system/xbin</code> folder and replace the <code>/system/xbin/php-cgi</code> on the device.</p>
<p><strong>Introduction</strong></p>
<p>Below you can find an bundle of PHP 5.3.8 (CGI only) and Lighttpd 1.4.29 (FastCGI module included) which are cross compiled for ARMv5 CPUs (Android platforms mainly).</p>
<p>As you mail well know, both PHP and Lighttpd offer modules that could be loaded at run-time based on settings within configuration files. The bundle doesn&#8217;t include all modules, due to difficulties encountered when compiling for ARM platforms. Those modules that are included are statically linked in the executables (so no additional files are needed) nor configuration files need to be updated to load them.</p>
<p><strong>Screenshots</strong></p>
<p>Below you can see screenshots with the phone browser opening localhost address. Once you unpack the archive, there&#8217;s an index.php file which just calls phpinfo() to show the details about the build.</p>
<p>Of course, you can remove the file and put your own scripts <img src='http://hex.ro/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div id="attachment_1139" class="wp-caption aligncenter" style="width: 490px"><a href="http://hex.ro/wp/wp-content/uploads/2011/09/arc_phpinfo.png"><img class="size-full wp-image-1139" title="phpinfo() on Sony Arc" src="http://hex.ro/wp/wp-content/uploads/2011/09/arc_phpinfo.png" alt="phpinfo() on Sony Arc" width="480" height="854" /></a><p class="wp-caption-text">phpinfo() on Sony Arc</p></div>
<div id="attachment_1140" class="wp-caption aligncenter" style="width: 250px"><a href="http://hex.ro/wp/wp-content/uploads/2011/09/x10_mini_phpinfo.png"><img class="size-full wp-image-1140" title="phpinfo() on Sony X10 Mini" src="http://hex.ro/wp/wp-content/uploads/2011/09/x10_mini_phpinfo.png" alt="phpinfo() on Sony X10 Mini" width="240" height="320" /></a><p class="wp-caption-text">phpinfo() on Sony X10 Mini</p></div>
<p><strong>PHP Modules</strong></p>
<p>The list of PHP modules that are statically linked:</p>
<pre class="brush: bash; title: ; notranslate">[root@arc]/sdcard# php -m
[PHP Modules]
cgi-fcgi
Core
ctype
date
dom
ereg
fileinfo
filter
ftp
gd
hash
iconv
json
libxml
pcre
PDO
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
soap
sockets
SPL
SQLite
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
zlib

[Zend Modules]
</pre>
<p><strong>Lighttpd Modules</strong></p>
<pre class="brush: bash; title: ; notranslate">
mod_indexfile
mod_userdir
mod_dirlisting
mod_status
mod_simple_vhost
mod_evhost
mod_secdownload
mod_cgi
mod_fastcgi
mod_scgi
mod_ssi
mod_proxy
mod_staticfile
mod_evasive
mod_compress
mod_usertrack
mod_expire
mod_accesslog
</pre>
<p><strong>Download</strong></p>
<p><span style="color: #ff0000;">This comes with NO WARRANTY. Use it at your own risk!</span></p>
<p><a href="http://hex.ro/tracker/EasyTracker.php?id=53">php-5.4.2_lighttpd_1.4.29_armv5.tar.gz</a></p>
<p><a href="http://hex.ro/tracker/EasyTracker.php?id=42">php-5.3.8_lighttpd_1.4.29_armv5.tar.gz</a></p>
<p><strong>License</strong></p>
<p>Please check README.txt file found in /system/README.txt within the bundle.</p>
<p>PHP executable is offered under PHP license, Lighttpd executable under Lighttpd license, all other files in the bundle are offered under New BSD License (3 clause BSD license).</p>
<p><strong>Installing</strong></p>
<p>The bundle tries to mimic as much as possible the layout of a Debian installation of the two files. However, due to file system layout on Android phones (binaries under <code>/system</code> folder), the folders are one step down, under <code>/system</code> folder:</p>
<pre class="brush: bash; title: ; notranslate">
`-- system
    |-- bin
    |   |-- lighttpd -&gt; /system/xbin/lighttpd-static
    |   `-- php -&gt; /system/xbin/php-cgi
    |-- etc
    |   |-- lighttpd
    |   |   `-- lighttpd.conf
    |   `-- php
    |       `-- php.ini
    |-- var
    |   |-- log
    |   `-- www
    |       `-- index.php
    `-- xbin
        |-- fcgiserver
        |-- lighttpd-static
        |-- php-cgi
        |-- reload_fcgi.sh
        `-- reload_lighttpd.sh
</pre>
<p>Prerequisites:</p>
<ul>
<li>rooted phone with busybox installed.</li>
<li>mount the /system partition as RW.</li>
</ul>
<p>Using <a href="http://code.google.com/p/droidsshd/">DroidSSHd</a> on the phone and connecting with Putty (or equivalent) makes the whole process faster.</p>
<p>After you copy the archive above into the root of your SD Card, installation is easy:</p>
<pre class="brush: bash; title: ; notranslate">
cd /
tar xf /sdcard/php-5.3.8_lighttpd_1.4.29_armv5.tar.gz
reload-fcgi.sh
reload-lighttpd.sh
</pre>
<p>You might notice that the owner / group of the files is 1000:1000. Ignore that, as long as you execute them as root, there&#8217;s no issue (those are the IDs of my username on the PC I created the tar.gz archive and tar tries to conserve the user / creation time / etc from when the archive was created).</p>
<p>The last two commands start the FCGI server (PHP with 4 children processes), and then launch lighttpd server as daemon.</p>
<p>The default port is 80.<br />
Default htdocs folder is <code>/system/var/www</code>.</p>
<p>The configuration files are under <code>/system/etc/lighttpd/lighttpd.conf</code> and <code>/system/etc/php/php.ini</code>. To restart either PHP or Lighttpd, please use one of the commands above.</p>
<p><strong>It is mandatory</strong> that you are on the root folder when you extract the archive. tar will take care of creating all the missing folders, creating the links, etc, as long as you are on the root folder.</p>
<p>You can now open the phone&#8217;s browser and point it at <code>localhost</code> <img src='http://hex.ro/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  and the <code>phpinfo()</code> page should appear.</p>
<p><strong>Example usage</strong></p>
<p><em>Installing Simple Machines Forum 2.0.1 on Android</em></p>
<p>Before executing the commands below, you need the &#8220;Full Install&#8221; <a href="http://download.simplemachines.org/">smf_2-0-1_install.tar.gz</a> archive downloaded from SMF and then copied onto your /sdcard root folder.</p>
<pre class="brush: bash; title: ; notranslate">
# cd /system/var/www
# ls
index.php
# mkdir forum
# cd forum
# tar xf /sdcard/smf_2-0-1_install.tar.gz
# reload_fcgi.sh
# reload_lighttpd.sh
</pre>
<p>Last two commands are optional, if you already started the FastCGI server as well as lighttpd.</p>
<p>You should now connect to <code>http://localhost/forum</code> and finish installation of the forum.</p>
<p>Enjoy <img src='http://hex.ro/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://hex.ro/wp/blog/php-and-lighttpd-for-android/feed/</wfw:commentRss>
		<slash:comments>61</slash:comments>
		</item>
	</channel>
</rss>

