I forgot to mention this here, but I released some ROMs for the Samsung Galaxy Gio GT-S5660 over on Particle Android. Check it out for the details.
Tuesday, November 1. 2011
Custom ROMs for Samsung Galaxy Gio
Sound on Samsung X125 using Linux
Finally got around to fixing sound on my Samsung X125 when using Linux. Text-book basics apparently, add the following to /etc/modprobe.d/alsa.conf (or create that if it doesn’t exist):
options snd-hda-intel model=laptop
And don’t forget to set the volume of the ‘Speaker’ channel.
Friday, August 26. 2011
ClockworkMod Recovery for Samsung Galaxy Gio
I just released the first version of my ClockworkMod Recovery port for the Samsung Galaxy Gio GT-S5660 on Particle Android.
Porting it was fairly trivial thanks to Samsung releasing the source code for the Linux kernel used on the device and the Galaxy Ace cyanogenmod device profile by ilarrain.
I’ll document the kernel changes I’ve made soonish.
Sunday, August 7. 2011
CRT and custom boot animations on the Samsung Galaxy Gio S5660
Disclaimer:
Following this procedure may result in your phone not starting up or working properly any more. Usually, you can recover it using ODIN. I cannot be held responsible for what happens to your device. By following these instructions, you agree to take full responsibility.
Introduction
Here’s what I did to enable the infamous Gingerbread CRT and custom boot animations on my Samsung Galaxy Gio S5660. This procedure is based on various hints and posts by other people on various forums.
These instructions are based on a rooted S5660XXKQ6 rom (Android 2.3.4), it should work on any rooted Android 2.3.3 rom for the Gio though.
- You can download the S5660XXKQ6 rom over at SamFirmware (free registration required), follow the instructions on how to use ODIN to flash the rom.
- To root this rom (or any stock Gingerbread rom for the Samsung Gio), follow these instruction on the XDA developers forum.
Requirements
- I use the EStrongs File Explorer in root explorer mode with / and /system mounted as read-write (check the ES File Explorer settings). If you prefer using Root Explorer or adb, feel free to do so.
- Install Samsung KIES so you have the necessary drivers to access your phone’s SD card when you connect it.
- Get yourself a decent archiver like 7-zip, jZip or PowerArchiver.
- Download and unpack apktool. You’ll need
apktool-install-windows-r04-brut1.tar.bz2andapktool1.4.1.tar.bz2(latest version while writing this guide, newer versions should also work), extract both of them to a new directory. Note that apktool depends on the Java Runtime Environment. - A 320×480
bootanimation.zipfile on your SD card. You can find a couple of them here (these were made by Dysgenic).
CRT animation
This is the hardest part of this guide, I’ll try to describe it as clearly as I can. Also, these instructions are based on using a Windows 7 host.
- Start ES File Explorer and navigate to
/system, locate thebuild.propfile and open it in the ES File Explorer editor. - Remove the line that reads
debug.sf.hw=1. - Save and close.
- Use ES File Explorer to copy
/system/framework/framework-res.apkto your SD card. - Connect your phone to your PC and enable USB storage.
- Copy the
framework-res.apkfile from the SD card to the folder where you extracted apktool. - Open a command prompts (
cmd.exe) and change to the directory where you extracted apktool using thecdcommand. - Extract
framework-res.apk:apktool d framework-res.apk - Open the file
framework-res/res/values/bools.xmlin your favorite text editor and change the line<bool name="config_animateScreenLights">true</bool>to<bool name="config_animateScreenLights">false</bool>. - Go back to the command prompt and rebuild the apk file:
apktool b framework-res framework-res-crt.apk. - Now open both
framework-res.apkandframework-res-crt.apkin your archiver and copyresources.arscfrom the newly created apk file to the original apk file. Make sure the file doesn’t get compressed (use the ‘Store’ compression method)! - Copy the
framework-res.apkfile back to your SD card. - Safely remove the SD card from Windows and disable USB storage on your phone.
- Use ES File Explorer to copy
framework-res.apkfrom the SD card back to the/system/frameworkfolder. - Reboot your phone. You’ll notice the boot animation disappeared and is now a completely white screen which is where part 2 of this guide comes in.
Custom boot animation
- Start ES File Explorer and navigate to
/system/bin. - Delete or rename
samsungani. - Rename
bootanimationtosamsungani. - Copy the 320×480
bootanimation.zipfrom your SD card to/system/media. - Reboot your phone. You should now see your new boot animation.
Questions and comments
If you have any questions or comments feel free to leave a comment below.
Friday, April 22. 2011
Broken static page pretty urls
Somehow the pretty URLs to static pages on this s9y install stopped working (returning a 404) and I have no idea why.
It does work when I redirect the pretty URLs to the not-so-pretty URL, but somehow it doesn’t work if I let nginx rewrite it internally.
So I’m currently using this:
location / {
index index.php;
rewrite ^(/pages/.*\.html)$ /index.php?$1 redirect;
try_files $uri $uri/ /index.php?$uri;
}
Could this be a bug in s9y’s static page plugin where it doesn’t parse the passed URL correctly?
Thursday, March 10. 2011
Online, Thomson SpeedTouch 546 en een wireless router
Note: This entry is in Dutch because it concerns an ADSL setup that’s pretty specific to a Dutch internet provider. If you’re interested in an English translation, feel free to leave a comment.
Hier in Zoetermeer hebben we een ADSL verbinding van Online en hebben daarbij een Thomson SpeedTouch 546 modem gekregen. Prima modem/router maar vanwege het configuratieprofiel dat Online standaard levert ontbreken er een aantal instellingen: Er is geen root of SuperUser account aanwezig, alleen een gebruikersaccount en een TechSupport account.
Nou is het zo dat er achter de modem een Linksys WRT350N v2 router hangt voor de draadloze verbinding. Dit leidt ertoe dat port forwards dubbel moesten worden ingesteld. Nu zul je denken, dan stel je op de modem toch gewoon de DMZ in. En ja, dat zou mogelijk zijn ware het niet dat dit een van de opties is die niet bereikbaar is.
Er zijn diverse opties om dit probleem te omzeilen. Het is mogelijk de Linksys alleen als switch te gebruiken door de modem in een van de LAN poorten van de router te steken en DHCP op de router uit te schakelen. Zonde van de routing functionaliteiten van de router, hadden we net zo goed een accesspoint kunnen kopen. Een andere optie is het standaard account aan te passen door de configuratie te downloaden, de rol van de standaardgebruiker aan te passen en de aangepaste configuratie weer te uploaden (dit is een populaire methode voor bijvoorbeeld de SpeedTouch 706). Dit kreeg ik echter niet voor elkaar.
Derde optie, en de optie waar ik voor gekozen heb is om de modem alleen als bridge te laten fungeren en niet als router. Dit is erg makkelijk aangezien Online ADSL levert middels ETHoA (Ethernet over ATM) (aka RF1483 in bridged modus of LLC). Het enige wat de router dan hoeft te doen is via DHCP een IP adres opvragen en alles werkt. Dit moet herkenbaar zijn als je ooit kabelinternet hebt gehad. De meeste kabelmodems werken ook niet als router.
Het instellen van deze modus is simpel: ga met je webbrowser naar http://10.0.0.138 en kies in het SpeedTouch menu de optie “Configuratie”. Klik vervolgens op de “Instellingen” link en er presenteert zich een wizard. Aan het begin van deze wizard kun je kiezen tussen 3 profielen: bridged, Online ADSL en routed. Kies hier voor bridged en doorloop de wizard. Kies als VC/MUX 8.35, dit was bij mij ook de standaardinstelling (waarschijnlijk omdat dit al stond ingesteld).
Reboot vervolgens de router en controleer of deze een publiek IP adres krijgt. Klaar is kees.
Mocht je weer bij de configuratie van de SpeedTouch willen komen moet je een apparaat een vast IP adres geven in de 10.0.0.0/24 reeks en rechtstreeks aansluiten op een van de LAN poorten van de modem. Surf vervolgens weer naar http://10.0.0.138 en je krijgt de configuratie te zien. Alternatief hiervoor: Reset de router volledig met behulp van een pennetje / paperclip en het welbekende verzonken resetknopje. Reboot hierna de router weer en de router zou weer een IP adres uit de 10.0.0.0/24 moeten krijgen waarna je ook weer toegang hebt tot de configuratiepagina.
Wednesday, February 16. 2011
More new stuff!
- Got a free iPad (WiFi, 16GB) for recommending someone for a job opening.
- Got a free QNAP TS-119P+ (with 1TB disk) for helping someone with his server.
Exciting times! ![]()
Thursday, February 10. 2011
Samsung X125 linux kernel module
After installing Arch Linux on my new Samsung X125 laptop I noticed that there were quite a few knobs I couldn’t turn when using just the drivers that come with the linux kernel. Most notably, I couldn’t toggle the ‘hardware’ wireless kill switch (it’s actually just a BIOS setting, but disabling Wifi this way does seem to conserve some of the power the little battery holds) or change the performance mode (aka ‘silent mode’).
I did however stumble upon the easy-slow-down-manager driver. It’s not part of the kernel and doesn’t use the regular facilities for controlling the wifi kill switch (‘rfkill’) but instead uses some /proc entries.
Seeing how similar it was to the samsung-laptop platform driver already available in the linux kernel I decided to adapt that to suit my purposes. It wasn’t that hard really. I contacted Greg Kroah-Hartman (maintainer of the samsung-laptop driver) and asked him what I needed to do to get the X125 support merged into the kernel. He told me that if I was able to extend the existing driver to support the other BIOS flavor, he’d merge it.
So I did just that. The code has trickled upwards to linux-next and should be part of 2.6.39. [link]
The driver currently implements the following functionality:
- rfkill using the native linux rfkill infrastructure.
- backlight control (brightness and power toggle) using the native linux backlight infrastructure.
- retrieve/change the performance level (‘silent’, ‘normal’ or ‘overclock’) through a knob in /sys/devices/platform/samsung/performance_level.
I’ll see if I can also implement the manipulating the maximum charge level of the battery, the ‘Chargeable USB’ functionality and maybe even Samsung’s fastboot functionality.
It was great fun to do some kernel hacking again
It’s been quite a while (I once implemented ISA-PNP for the OPL3SA2 and gamepad drivers, that never got merged though).
Now, the beauty is that this kernel module will not only work for my Samsung X125, but also for various other Samsung netbooks like the Samsung NC-10, NP-Q45, X360, R518, N150, N210, N220, R530, R730, NF110, NF120, NF130 and quite possibly others. If the driver can’t match your Samsung laptop, you can use the force=1 module parameter (‘modprobe samsung-laptop force=1’) to skip the DMI check and probe the BIOS directly. Don’t forget to contact Greg if it does work so he can add the hardware IDs to the driver.
Wednesday, February 9. 2011
Samsung X125 review
I just published an initial version of my review of my new subnotebook / mini-laptop / whatever it’s called: Samsung X125 review.
Soon, I’ll publish at least one more article about this subnotebook: Installing Arch Linux on the Samsung X125. And maybe another article about how to get the “F4” recovery functionality working again after you’ve accidentally overwritten the MBR (why yes of course I broke it by installing GRUB on the MBR).
Saturday, December 18. 2010
'Ethisch Hacken'
Zaterdag (2010-12-18) ben ik (met Tommy) naar Revelation Space in Den Haag geweest. Hier was een bijeenkomst met lezingen over ‘Ethisch Hacken’ (link). Geweldig interessant om de recente gebeurtenissen vanuit meerdere perspectieven te zien.
De hele opzet kwam echter een beetje over als een paniekreactie van een hackercommunity op de recente DDoS aanvallen op MasterCard / Visa / etc. om schade aan het imago van hackers te beperken. Niet dat dat echt nodig is, het imago onder de gemiddelde nederlander is mijnsinziens al behoorlijk belabberd (om de woorden van mijn vriendin aan te halen: ‘mensen denken dat hackers die irritante jochies aan de overkant zijn die je computer overnemen en de boel doen ontploffen.’, zij deelt deze mening overigens absoluut niet). Imagoverbetering kan wellicht niet veel kwaad. Het aanwezige publiek kwam denk ik ook niet helemaal overeen met het beoogde publiek: het heeft niet bijzonder veel zin om aan hackers en anderen die al erg bekend zijn met technologie (zo’n 90% van het publiek gok ik) uit te leggen dat hackers geen kwade bedoelingen hebben, dat weten ze al. Maar wellicht dat de aanwezige pers (oa. pow!) iets uitzendt / publiceert dat de moeite waard is.
Hoewel de website de indruk gaf dat er ook workshops zouden zijn waren er alleen lezingen (wel met ruimte tot publieksparticipatie door middel van vragen) en een paneldiscussie ter afsluiting. Het niveau van de lezingen was goed en ook goed te volgen als je geen hacker bent.
Bij elk onderdeel geef ik een link waarop je de betreffende lezing kan beluisteren. Deze geluidsbestanden worden beschikbaar gesteld door hackerspaces | signal. Dank hiervoor.
De bijeenkomst werd geopend met een inleidend praatje van Barry van Kampen (beluisteren) met daarin een opiniepeiling verwerkt. De stellingen waaren dusdanig breed dat een concreet ja of nee in veel gevallen moeilijk te geven was (bijvoorbeeld: ‘is een DDoS aanval ethisch’ of ‘overheden mogen geen geheimen hebben, burgers wel’). Deze vragen waren later ook de leidraad van de paneldiscussie. Ook hier merkte je dat er weinig te discussieren viel over de meeste van de stellingen. De stellingen gaven hier echter wel inspiratie tot afdwalen waarbij er meer te vertellen viel.
Daarna vertelde Brenno de Winter (beluisteren) over de aanleiding van de bijeenkomst. WikiLeaks, cables, etc. Wat ik echter interessanter vond waren zijn inspanningen om de overheid transparanter te krijgen door middel van Wob (wet openbaarheid van bestuur) verzoeken te sturen en de tegenwerking die hij hierin van de overheid ondervindt. Blijf kritisch en eis transparantie.
Hans van de Looy (beluisteren) schetste een beeld van de hackerethiek en de mediaopinie door de jaren heen. Veel voorbeelden van oa. de Chaos Computer Club. Leuk om te zien en te horen. Grappig om dingen uit de oude doos te herkennen.
Amelia Andersdotter (beluisteren) gaf wat ik persoonlijk de meest indrukwekkende lezing van de dag vond. Een zweedse politica die deel uitmaakt van het europees parlement. Zij benaderde de recente DDoS aanvallen niet door te kijken naar de actie of het resultaat van deze aanvallen zelf maar door te benadrukken dat dit een signaal was van een groep jongeren die wel stemgerechtigd is maar een lage opkomst vertoont bij verkiezingen, dat ze het niet eens zijn met de manier waarop dingen gaan. Door de actie te laten voor wat het is en meer naar dit signaal te kijken verdraai je daarmee de hele discussie. Het maakt niet uit of deze mensen hackers zijn of niet, het zijn jongeren die hun onvrede met de handelswijze van diverse bedrijven en instanties uiten. Aangenomen dat je dit niet 3x per week doet, hoeft een DDoS aanval dus helemaal geen slecht iets te zijn: het is een duidelijk zichtbaar signaal. Overheden: Doe daar wat mee.
Ot van Dalen van Bits of Freedom (beluisteren) had het over Bits of Freedom en online protesteren en de effectiviteit van de diverse protestwijzen. Interessante opening: Gandi, de protesten van de onderdrukte Afro-Amerikanen: Vreedzaam protest.
Jurre van Bergen (beluisteren) sprak over zijn ervaringen met het hacken van overheidssites om de veiligheid voor burgers te verhogen, zijn ervaringen met GovCert, zijn onvrede met hun werkwijze en wat hij gaat doen om dit te verbeteren.
Toen volgde de laatste lezing, die van Arnoud Engelfriet (beluisteren). Hij had het over legaliteit van hacken: wat mag volgens de wet wel, wat niet en waarover zijn nog geen uitspraken gedaan. Voor informatievergaring (journalistiek) is het reeel dat een rechter geen straf op legt als je de wet een stukje overtreedt om de waarheid boven tafel te krijgen. Waarom ‘jeroenz0r’ tot 6 jaar celstraf veroordeeld kan worden terwijl de maximale straf op computervredebreuk maar 1 jaar is. Bijzonder praktische informatie en ook zeker de moeite waard.
Als laatste vond de eerder genoemde paneldiscussie plaats (beluisteren).
Wednesday, October 27. 2010
PHP's max_post_size
When trying to set up a Zenphoto gallery on blurringexistence.net I needed to upload a rather large zip archive (1.4GB) containing quite a few 6MP photo’s to Zenphoto. Obviously, PHP wasn’t configured to accept such large POST requests and rejected the request.
So I increased the post_max_size and upload_max_filesize to something that suited the large file. Uploading the file seemed to work now. Except that it didn’t do anything with the file I uploaded which I guessed was because the processing of the zip archive took too long and was aborted.
After that however, the entire Zenphoto instance refused to work properly. Maybe something broke while processing the file? Since the Zenphoto instance was nearly empty anyway, I tried to reinstall it. Which worked up to the point of entering the MySQL settings and credentials. They just wouldn’t stick and return a very non-descriptive message (something along the lines of ‘query error’, I don’t remember the exact message). PHP still worked, the serendipity instance still seemed to work. No strange errors or warnings any of my log files.
After a bit of debugging, the reason everything broke was that the PHP variable $_POST was always empty. I figured that something that fundamental shouldn’t break by itself so it was probably something I did which led me to removing the post_max_size and upload_max_filesize options and everything started working again.
There are several warnings in the PHP documentation about post_max_size: If PHP is compiled with memory_limit support, memory_limit should be larger than post_max_size and the one I broke:
PHP allows shortcuts for bit values, including K (kilo), M (mega) and G (giga). PHP will do the conversions automatically if you use any of these. Be careful not to exceed the 32 bit signed integer limit (if you’re using 32bit versions) as it will cause your script to fail.
Another couple of hours wasted because I didn’t RTFM :-/
Wednesday, September 22. 2010
Partially broken HTC Hero
The digitizer (touchscreen) of my HTC Hero broke partially: Most of the time, the bottom row is very unresponsive, sometimes the entire touchscreen doesn’t respond and at other times the input’s just really weird, random and jumpy.
Now, since the phone is still under warranty (only 10 months old) I have a couple of options:
1) Return my phone under warranty. If HTC’s local repair partner decides I dropped my phone one too many time or that there’s waterdamage, I pay nothing to have it recycled or I pay 50 euro for their conclusion and sending me back my Hero unrepaired or I pay about 140 euro for the repairs. If they judge me innocent, the repair’s free. Now, to be honest I did drop my phone a couple of times, but this defect didn’t occur after dropping it.
2) Buy a new digitizer / broken Hero on eBay and install that myself. Costs me about 45 euro, might not actually fix the problem and the only guarantee I have is that the warranty will be voided.
3) Buy a second hand HTC Hero. Costs me about 100-120 euro.
4) Live with it.
Especially the uncertainty of the first option is slowing my decision down a lot… What would you do?
Tuesday, September 21. 2010
CSS3 fluff and clouds
Added some CSS3 fluff to pretty-up Blurring Existence, also changed the horrible purple color scheme to blue. Works properly with Firefox 3.6 and Chrome. Internet Explorer 8 fails big time (no rgba color selector for the transparent backgrounds), Internet Explorer 9 works a lot better but seems to have a problem with the background-size: cover attribute: a white bar appears on the right of the background image. CSS3 features used: the background-size attribute to scale the background image and rgba color selectors to make some panels semi-translucent.
Now I just need to replace the header logo. Ditched header logo altogether.
I made the background picture when I was at Bospop 2010 (Weert, The Netherlands) with Naomi. The aquarelle rainbow-like effect in the center of that image was actually visible when looking at the sky while wearing sunglasses. Which explains why the overall colors of the image are a bit off and darkish: i was using my sunglasses as a filter for my camera. It’s actually part of a series of three pictures: 1, 2 (Naomi’s purple sunglasses), 3.
Update: I capitulated and switched to using PNGs with an alpha channel as background images instead of using rgba color selectors.
Tuesday, July 27. 2010
Serendipity, nginx and php-fpm
Arch Linux (the linux distribution I use) updated PHP to 5.3.3 yesterday and added the php-fpm package so I decided to switch to using that instead of a hacked up spawn-fcgi and my own process launcher (Servitor).
I didn’t have to change anything in the nginx configuration file, but here’s the php-fpm configuration recipe:
[blurringexistence_net]
listen = /srv/http/fastcgi/blurringexistence_net-php.sock
listen.owner = http
listen.group = http
listen.mode = 0600
user = blurringexistence_net
group = blurringexistence_net
pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 2
pm.max_spare_servers = 35
pm.max_requests = 500
chdir = /srv/http/vhosts/blurringexistence_net/public_html/
php_flag[output_buffering] = off
php_admin_value[open_basedir] = /srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/bin/
php_admin_value[post_max_size] = 32M
php_admin_value[upload_max_filesize] = 32M
I also moved the php.ini changes into the php-fpm configuration file as I found no way to tell php-fpm to load a different php.ini file for a specific instance but that’s a probably a good thing as it decreases maintanance efforts when the ini file changes after an update of php.
Now all that’s left is setting up php-fpm’s chroot feature and / or getting rid of /usr/bin/ in open_basedir.
Wednesday, July 21. 2010
nginx and StartSSL
If you get a (free) SSL certificate and key from StartSSL it might not be obvious how to install use them properly in nginx. nginx doesn’t automatically chain certificates like f.e. Apache does so you’ll have to do that yourself.
First, use the StartSSL website to create an SSL key and certificate and transfer them to your server. Then execute the following steps (if you use a class 2 certificate replace class1 by class2 in the instructions below):
- Decrypt the private key using the password you entered when you created your key:
openssl rsa -in ssl.key -out /etc/nginx/conf/ssl.key
- Protect your key from prying eyes:
chmod 600 /etc/nginx/conf/ssl.key
- Fetch StartSSL’s root CA and class 1 intermediate server CA certificates:
wget http://www.startssl.com/certs/ca.pemwget http://www.startssl.com/certs/sub.class1.server.ca.pem
- Create a unified certificate from your certificate and the CA certificates:
cat ssl.crt sub.class1.server.ca.pem ca.pem > /etc/nginx/conf/ssl-unified.crt
- Configure your nginx server to use the new key and certificate (in the global settings or a
serversection):
ssl on;ssl_certificate /etc/nginx/conf/ssl-unified.crt;ssl_certificate_key /etc/nginx/conf/ssl.key;
- Tell nginx to reload its configuration:
killall -HUP nginx
And you’re done!

