jhl::mafipulation |
||||||||
Sun, 28 Jul 2013Virtual maildirs in mutt If you have an external search tool - like find or notmuch - you can easily produce a Maildir full of symlinks to real messages. But if you change message flags, or try and move or delete messages, the original message is unaffected; only the symlink changes. Here's a simple script that, given a Maildir of symlinks (all in cur/, please), runs a program for you; after the program has run, it checks for any changes to the mails, corresponding to flag changes or deletion, and them applies them to the original messages. I use this to view all the emails I have flagged, for example: #!/bin/sh MAILDIR="$HOME/mail/" # path to all your mail FLAGGED="${MAILDIR}/flagged" # path to your flagged maildir set -e mkdir -p $FLAGGED/{cur,new,tmp} || true rm -f ${FLAGGED}/cur/* || true find ${MAILDIR} -regextype posix-extended -regex '.*,[^,]*F[^,]*$' -print0 \ | xargs -0 ln -s -t ${FLAGGED}/cur echo -n "flagged messages: " ls ${FLAGGED}/cur | wc -l vmutt ${FLAGGED} "mutt -f ${FLAGGED}"Now when I change a mail in this view and then quit Mutt, the original mail is affected correctly. posted at: 11:25 | path: | permanent link to this entry Wed, 03 Jul 2013Japanese data SIM adventures I was pretty grumpy at having a non-returnable $30 SIM I can't use. So I booted my phone into baseband mode (where the baseband IC presents itself directly on the phone's USB port, allowing me to send it AT commands). Checking the network registration with AT+CREG yields 3 - registration denied. But the GPRS registration, AT+CGREG, is valid! Evidently not a situation the phone's designers considered. But how do we use it? The answer is to use the +CGDATA command, which opens a connection we can use for PPP. Now you just need to set up PPP... update: there is a super neat solution by Josua Dietze, check the bottom of this post for the link! Setting up PPP on AndroidTo make this work, you need a rooted phone with direct access to your baseband's AT-style port. On my Droid 4 this is /dev/ttyUSB4. If you don't know what this means, stop reading here.I had to build chat and ended up building my own pppd because the Android one logs to the Android logs (duh), so here they are as binaries for you: chat, and pppd. I put them in /system/xbin. You then need to write the following files: /etc/ppp/options.mobile, changing ttyUSB4 for your tty: ttyUSB4 modem passive novj defaultroute noipdefault usepeerdns persist holdoff 10 maxfail 0 noauth nodetach debugYou will probably want to remove nodetach and/or debug once you have it working, depending on how you run it. /etc/ppp/peers/mobile, changing (or removing) the user/password lines: file /etc/ppp/options.mobile user "bmobile@fr" password "bmobile" connect "/system/xbin/chat -v -t15 -f /etc/ppp/chat.mobile" Now for /etc/ppp/chat.mobile, where you must replace bmobile.ne.jp with your APN: TIMEOUT 10 ABORT 'ERROR' ABORT 'BUSY' ABORT 'NO CARRIER' '' ATZ OK 'AT+CGDCONT=1,"IP","bmobile.ne.jp"' OK AT+CGDATA="PPP",1 CONNECT Finally, /etc/ppp/ip-up, which you must then chmod 755: #!/system/bin/sh ip route add default via $4 setprop net.dns1 $DNS1 setprop net.dns2 $DNS2You should now be able to run the whole shebang with: /system/xbin/pppd call mobileIf it runs all the way to printing you some IP addresses and running the ip-up script, you are a winner. Note that it may not replace the default route if you already have one (if you're on wifi, for example). Of course, apps which use the Android network manager to decide if they're connected will still refuse to work - Google Maps won't let you search, for example. Any suggestions for tricking the manager? The right and obvious answerThe amazing Josua Dietze has already done all this, wrapped it into an app, and sorted out all the network manager issues. Amazing! Get it from the Play Store.posted at: 11:30 | path: | permanent link to this entry Mon, 25 Mar 20132013 appears
Shairport
Linux on GK802
So far I've managed to port u-boot, and together with the squad in #imx6-dongle on Freenode IRC, the kernel is looking very healthy too. For more information, check out the project's github page. Support for getting started can be found on IRC. Tue, 04 Sep 2012Drag'n'Derp gets its own site Sun, 08 Jul 2012xfv-4-intel: an Intel .BIO extractor Anyway, I found Christoph Pfisterer's xfv tool, which unpacks EFI firmware volumes and capsules. It was missing a couple of features I needed, like decompression of Intel's "custom" compression mode (actually LZMA), so here is a version suitable for dumping Intel BIOS files:
This makes it trivial to recover irreplaceable pieces like the VGA BIOS, as well as useful information like the static ACPI tables. Sun, 01 Apr 2012Drag'n'Derp: coming soon to an internet near you! Tue, 08 Nov 2011Resetting middle-aged Volvo service lights Here's how to do it with an ELM327 or compatible OBD-II interface. You will need a terminal emulator such as minicom (Mac/Linux) or HyperTerminal (Windows). Hit enter after each command. Connect to the port, turn your ignition to II, and make sure linefeeds are on: > AT L1Now set up your address as 0x13: > AT RA 13And since you are talking to the instrument cluster (0x51), set the message header and target address: > AT SH 83 51 15 > AT IIA 51You can now wake up the cluster controller: > AT SIYou should see BUS INIT...OKIf so, issue the reset command: > B0 30If you're not sure it's communicating properly, you can try a gauge test - all the needles are moved to full scale and back: > B0 31You can reissue AT SIto restart communication at any time. Make sure you issue the reset within a couple of seconds of ATSI finishing, as the controller seems to go back to sleep pretty quickly. I'd be interested to hear from anyone who knows how to extract the odometer data from one of these - I've had no luck with commands A5, A7 or B9 (read data by offset/address, or read data block). posted at: 02:24 | path: /reversing/volvo | permanent link to this entry Mon, 26 Sep 2011Motorola Atrix: Ubuntu Webtop Construction Kit I have built a chroot filesystem based on NVIDIA's last Linux for Tegra release. Unfortunately, LfT has two serious incompatibilities with Android: Xorg hangs, and most binaries (including ls and mount) segfault on startup. The former problem is fairly simple to solve - Xorg hangs after submitting a command buffer to the rendering manager, so it looks like the channel mutex system is incompatible between the Android and Xorg libraries. Cribbing the relevant libraries from the original Webtop filesystem fixes that. Crashing binaries is more puzzling. It turns out that recent Android kernels for Tegra (including that used in the CM7 beta) include a hardware bug workaround that needs corresponding workaround in userspace/libc, or else it crashes. This is worked around by downgrading libc to version 2.12.1, which is not affected. The issue is described in more detail here. This tarball includes a complete root filesystem. It has no dependency on the original webtop files; you can install it to /osh, or to an SD card partition. It's pretty small (under 200MB), and you'll need to set up your own X environment. A 'go' script is included to mount the needful and chroot from an Android root shell. An advantage of the updated Tegra driver is that you no longer need a crufty binary to change res - use xrandr instead. You will need to issue xrandr --display DSI-1 --offto turn off the overlay on the phone screen when X starts up, though. This is not intended for end users. It is intended to help developers interested in building their own webtop replacements. It does not include the "android-in-window" binaries from the original webtop - all the headers you need are in /usr/include, so feel free to write your own! I'm not liable if it eats your cornflakes or puts gaffer tape on your cat, but here it is: natty-base.tar.gz - 73MB Update 26/9/11: I built eglibc 2.13 with -mtp=softto work around the issue. Binaries here, updated tarball is base+glibc.tar.gz - 73MB. posted at: 12:14 | path: /linux/atrix | permanent link to this entry Sat, 30 Jul 2011I'm Not Dead Wed, 11 May 2011Drag and Drop? posted at: 12:55 | path: /gameboy | permanent link to this entry Mon, 09 May 2011Cart Sneak Peek Drag'n'Derp lives! What is it? I'm building a new Gameboy cartridge. Not GBA, not DS, original Gameboy. Why? Because a lot of people still use them, in particular for creating music with software like Johan Kotlinski's LSDj. And to do this, you need a flashable cartridge. Why? Currently available carts need custom drivers to talk to a computer, and for many types, a cart reader device. This limits their compatibility, and the drivers tend to be poorly maintained after release, too. Another issue is that all current carts use battery-backed RAM to save user data to - read: music that artists have spent many hours on. These batteries can last ten years in a well-designed system - from the date of manufacture, putting a lifespan on the cartridge and leading to scary reliability issues as they age. Features:
So some prototypes are up, and being tested; this cart is real, and it is coming. posted at: 03:42 | path: /gameboy | permanent link to this entry Thu, 07 Apr 2011ShairPort 0.05 released
So, here is ShairPort, an open-source (Perl/C) replacement.
Update: 2013 Fri, 04 Mar 2011WM8505 state of play - March 2011 General stuffHardware noteA number of WM8505 netbooks have a hardware bug where the sense line of the MMC/SD slot's write protect switch is reversed. These will sense unprotected SD cards as protected and vice versa. You will not be able to live-boot Bento Linux from a write-protected SD; it will hang when trying to mount the root filesystem, and consequently not load the framebuffer driver, and nothing will appear to happen.Bento LinuxBento was released with a kernel stolen from an Android device, as that was the only way to get Linux running initially on the 8505 devices. Now that the source has been released, we can change the shortcomings of this kernel, namely compiling in framebuffer console, and removing the Android security model code. Nobody has done this yet (and rereleased the bento fatpart).Linux kernelsVIA's source releaseVIA released some source code for these tablets. A slightly cleaned-up version of the VIA tree has been published by Angus Gratton here. This needs configuring to work properly. Key variable for video is GE_BUFFER_SIZE or similar. A working config is available here (for netbook).Open source reimplementationA completely open-source effort is underway to get a WM850x port into Linux mainline. This port is spearheaded by Alexey Charkov; its base is here. At this point, in addition to basic booting and serial, it supports video, RTC, keyboard. Tony Prisk has been working on MMC/SD patches, and there are also Ethernet support patches on the mailing list.Development discussion takes place on a mailing list (here) - this group is for development discussion, not help requests, please! HelpThe most active place for general help seems to beposted at: 15:19 | path: /linux/wm8505 | permanent link to this entry Sat, 29 Nov 1969
posted at: 14:00 | path: | permanent link to this entry |
||||||||