<?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>lyncd</title> <atom:link href="http://lyncd.com/feed/" rel="self" type="application/rss+xml" /><link>http://lyncd.com</link> <description></description> <lastBuildDate>Wed, 20 Apr 2011 02:17:12 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.2.1</generator> <item><title>Overclocked Android kernel for Optimus V</title><link>http://lyncd.com/2011/04/overclock-kernel-optimus-v/</link> <comments>http://lyncd.com/2011/04/overclock-kernel-optimus-v/#comments</comments> <pubDate>Wed, 20 Apr 2011 02:12:33 +0000</pubDate> <dc:creator>sticks</dc:creator> <category><![CDATA[Code]]></category> <category><![CDATA[android]]></category> <category><![CDATA[kernel]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[optimus]]></category><guid
isPermaLink="false">http://lyncd.com/?p=425</guid> <description><![CDATA[Now that LG has corrected its source code, I&#8217;ve built my overclocked Android kernel for the Virgin Mobile Optimus V, a phone that&#8217;s nearly identical to my Sprint Optimus S and that also runs on Sprint&#8217;s 3G CDMA network. If your V needs a speed boost or extra driver support, keep reading! Before you install, [...]]]></description> <content:encoded><![CDATA[<p>Now that LG has <a
href="/2011/04/lg-fixes-bugs-kernel-source-optimus/">corrected its source code</a>, I&#8217;ve built my overclocked Android kernel for the Virgin Mobile Optimus V, a phone that&#8217;s nearly identical to my Sprint Optimus S and that also runs on Sprint&#8217;s 3G CDMA network. If your V needs a speed boost or extra driver support, keep reading!<span
id="more-425"></span></p><p>Before you install, you might want to read more about the kernel&#8217;s features and design goals in my <a
href="/2011/03/android-kernel-overclock-optimus/">post about the S kernel</a>. The Optimus V is not identical to the S (there are a couple of minor hardware differences between the phones, such as swapped Home and Menu buttons), but unlike some other kernels released for the V (such as ports of Xionia), mine is <em>not</em> a ported S kernel, it is a native V kernel. So, it is a drop-in replacement for the stock LG kernel.</p><p>If that didn&#8217;t make sense (&#8220;I thought you said to read about your kernel for the S, what gives?&#8221;), I&#8217;ll put it another way. Think of my kernel only as a changeset  to the original (add overclock, add interactive cpu scaling, add TUN/TAP network and EXT filesystem drivers as modules; subtract debugging, ethernet and other unnecessary bloat; build the whole thing with a better toolchain). The S kernel is that changeset applied to the official LS670 sources from LG. The V kernel is that changeset applied to the official VM670 sources.</p><p>The end result is a kernel that is perfect for your Optimus V running either the stock OS or any LG-based ROM &#8212; that means, at present, Android 2.2.x or Froyo-based ROMs. But <em>not</em> perfect for Cyanogen or other Gingerbread/Android 2.3-based OSes. Just like you shouldn&#8217;t run a Gingerbread/2.6.35.7 kernel on a Froyo-based OS, you shouldn&#8217;t run this Froyo/2.6.32.9 kernel on a Cyanogen-based OS. Got it?</p><p>Of course, that&#8217;s just for now. As soon as LG does its official release of Gingerbread/2.3 for these phones, I&#8217;ll update this kernel from the new official sources.</p><h4 id="getit">Get it</h4><p>This kernel has survived its <a
href="http://forum.androidcentral.com/optimus-v-rooting-roms-hacks/76953-kernel-picasticks-oc-kernel-built-lg-source-optimus-v.html">initial shakedown</a> on the Android Central forums, but if you choose to install it, the standard disclaimers apply: No warranties expressed or implied, it’s <strong>your responsibility</strong> to understand exactly what you’re doing, so if you kill your phone I assume no responsibility.</p><p><strong>Requirements:</strong> To start with, you’ll need to have rooted your phone. You&#8217;ll also need a custom recovery. I’ve used <a
href="https://github.com/koush/AnyKernel">koush’s AnyKernel</a> template to package the .zip, so you should be able to flash this kernel over top of the stock LG OS or any custom ROM.</p><p>So, if you understood all of that, the rest should be easy. Download picasticks kernel <a
href="http://www.mediafire.com/?udka5n87kpn234i">picasticks-07a.zip</a>, copy it to /sdcard/, reboot your phone to your custom recovery, and flash the .zip. Reboot and enjoy!</p><p><strong>Home and Menu keys:</strong> These hardware keys are mapped by the kernel, but the mappings can also be reassigned in the file <code>thunder_keypad.kl</code>. If you have previously installed a custom ROM/kernel on your V, chances are that it contained an incompletely ported S kernel with the keys swapped, and this bug &#8220;fixed&#8221; by reswapping the key assignments in the <code>thunder_keypad.kl</code> keymap. My kernel, built for the V, doesn&#8217;t require this hack. So, my .zip installer includes a script that checks for a swapped mapping, and if found, replaces your keymap file with an original, unmodified copy. It should <em>only</em> do this if it finds the Menu key (139) incorrectly mapped to Home, but ignore other custom key assignments. In any case, if you&#8217;re concerned about your customized <code>thunder_keypad.kl</code> being overwritten, just back it up before flashing the kernel.</p><h4 id="source">Source code</h4><p>As we have <a
href="/2011/04/lg-fixes-bugs-kernel-source-optimus/">learned from LG</a>, source code release is an important part of distributing software covered by the GPL!</p><p>I’m not going to publish a giant tarball (yet) since it’s 100% LG source + my changeset, which I&#8217;ve made into a single patch. Therefore, to duplicate my build source:</p><ol><li>LG source code is <a
href="http://www.lg.com/global/support/opensource/opensource.jsp">here</a> (search for “VM670″ to get Optimus V source).</li><li>Apply <a
href="/files/2011/03/kernel.diff">this patch</a> to the kernel tree, i.e.: <code>cd lg_kernel &#038;&#038; patch -p1 < kernel.diff</code></li></ol><p>And <a
href="/files/2011/03/config.diff">here</a> are my changes to the LG kernel configuration <code>.config</code>.</p><p>Both patches, by the way, are the same as the ones I'm using for the S, so these links are to the same files (that's what I meant earlier about applying the same changeset to both kernels!).</p><p>For more information and full credits, see my <a
href="/2011/03/android-kernel-overclock-optimus/#credits">original post</a>.</p><h4 id="changelog">Changelog</h4><dl><dt>07 released 2011-04-18</dt><dd>Adds ext2/ext3/ext4 filesystem drivers as modules. Includes original Optimus V keymap file <code>thunder_keypad.kl</code> and script to check the phone's current keymap for swapped Home/Menu keys and, if found, replace with the original.</dd><dt>06 released 2011-04-14</dt><dd>Initial public release for Optimus V (no known bugs or issues).</dd></dl> ]]></content:encoded> <wfw:commentRss>http://lyncd.com/2011/04/overclock-kernel-optimus-v/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Update: LG addresses bugs in kernel source for Optimus V</title><link>http://lyncd.com/2011/04/lg-fixes-bugs-kernel-source-optimus/</link> <comments>http://lyncd.com/2011/04/lg-fixes-bugs-kernel-source-optimus/#comments</comments> <pubDate>Wed, 13 Apr 2011 23:45:47 +0000</pubDate> <dc:creator>sticks</dc:creator> <category><![CDATA[Code]]></category> <category><![CDATA[android]]></category> <category><![CDATA[gpl]]></category> <category><![CDATA[kernel]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[optimus]]></category><guid
isPermaLink="false">http://lyncd.com/?p=421</guid> <description><![CDATA[Sweet victory! LG took quick action and wrote me yesterday to tell me they&#8217;d released an updated version of the source code for the Optimus V that fixes the bugs I identified over the weekend. So, all is well in this small corner of the open-source world. I&#8217;ve downloaded the new source code (labeled &#8220;LGVM670(Thunder) [...]]]></description> <content:encoded><![CDATA[<p>Sweet victory! LG took quick action and wrote me yesterday to tell me they&#8217;d released an updated version of the source code for the Optimus V that fixes <a
href="/2011/04/bugs-lg-kernel-source-optimus/">the bugs I identified</a> over the weekend.</p><p>So, all is well in this small corner of the open-source world. I&#8217;ve downloaded the new source code (labeled &#8220;LGVM670(Thunder) Android Froyo/kernel bugs were fixed&#8221; on LG&#8217;s <a
href="http://www.lg.com/global/support/opensource/opensource.jsp">download site</a>), and verified that the fixes were made and that the new code builds cleanly.</p><p>In case you&#8217;re interested in the differences between the Optimus S and Optimus V (LS670 and VM670, respectively), here&#8217;s a <a
href="/files/2011/04/vd_vm.diff.gz">diff of the kernel sources</a> that I&#8217;ve made.</p> ]]></content:encoded> <wfw:commentRss>http://lyncd.com/2011/04/lg-fixes-bugs-kernel-source-optimus/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Bugs in LG kernel source code for Optimus V</title><link>http://lyncd.com/2011/04/bugs-lg-kernel-source-optimus/</link> <comments>http://lyncd.com/2011/04/bugs-lg-kernel-source-optimus/#comments</comments> <pubDate>Sat, 09 Apr 2011 03:10:05 +0000</pubDate> <dc:creator>sticks</dc:creator> <category><![CDATA[Code]]></category> <category><![CDATA[android]]></category> <category><![CDATA[gpl]]></category> <category><![CDATA[kernel]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[optimus]]></category><guid
isPermaLink="false">http://lyncd.com/?p=409</guid> <description><![CDATA[I&#8217;ve discovered some bugs in the Linux kernel source code released by LG for the Virgin Mobile Optimus V, or VM670, a close CDMA twin to my Sprint Optimus S. It seems clear from the differences between the S and V source releases that LG has attempted to scrub code comments from the V source, [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;ve discovered some bugs in the Linux kernel source code released by LG for the Virgin Mobile Optimus V, or VM670, a close CDMA twin to my Sprint Optimus S. It seems clear from the differences between the S and V source releases that LG has attempted to scrub code comments from the V source, but in the process they&#8217;ve created at least two syntax errors that break the code and cause it not to build.</p><p>They&#8217;ve also left out 15 files that are part of the Linux kernel&#8217;s netfilter and needed to build the kernel as configured by LG.</p><p><strong>Update:</strong> LG has <a
href="/2011/04/lg-fixes-bugs-kernel-source-optimus/">fixed the bugs</a>, so keep reading only if you&#8217;re interested in the details.</p><p>I&#8217;ll detail the problems and explain how to (possibly) fix them below. However, the real issue is that the LG archive is broken as-is, so there&#8217;s no way it was used to build the actual Optimus V kernel. While I&#8217;m no GPL expert, it seems to me that LG is obligated to provide actual, working source code upon request, not an incomplete, broken fork. Let&#8217;s hope this was just an oversight, and one that LG will rectify.<span
id="more-409"></span></p><h4>What I found</h4><p>Basically, I downloaded the VM670 source from LG&#8217;s <a
href="http://www.lg.com/global/support/opensource/opensource.jsp">open source code distribution site</a> and tried to compile it, just as I have several times for the LS670. It&#8217;s worth noting here that, while the Optimus series is a popular model worldwide, with U.S. models including the T, U, M and Vortex, the S and V are particularly close because the V is based on the slightly older S, and both run on Sprint&#8217;s 3G network. They&#8217;re virtually identical, and it&#8217;s obvious from the source code that the VM670 code is derived from the LS670 code.</p><p>The first build error came on <code>drivers/net/wireless/bcm4325/src/dhd/sys/dhd_sdio.c</code>:</p><pre><code>  CC [M]  drivers/net/wireless/bcm4325/src/dhd/sys/dhd_sdio.o
cc1: warnings being treated as errors
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_sdio.c: In function 'dhdsdio_dpc':
drivers/net/wireless/bcm4325/src/dhd/sys/dhd_sdio.c:3997:1: error: ISO C90 forbids mixed declarations and code</code></pre><p>Check out <a
href="/files/2011/04/dhd_sdio.c.vd_to_vm670.diff">this diff</a> and LG&#8217;s comment-scrubbing is clear. The block at line 3933 is where they accidentally deleted a closing brace. Putting <a
href="/files/2011/04/dhd_sdio.c.diff">the brace back in</a> is easy enough.</p><p>Next:</p><pre><code>  CC [M]  drivers/net/wireless/bcm4325/src/bcmsdio/sys/bcmsdh_sdmmc_linux.o
drivers/net/wireless/bcm4325/src/bcmsdio/sys/bcmsdh_sdmmc_linux.c: In function 'dhd_register_hwakeup':
drivers/net/wireless/bcm4325/src/bcmsdio/sys/bcmsdh_sdmmc_linux.c:725:2: error: expected expression before 'if'</code></pre><p>Again, <a
href="/files/2011/04/bcmsdh_sdmmc_linux.c.vd_to_vm670.diff">code-comment scrubbing</a> caused an error. In the block at line 772, a function call spanning multiple lines is cut off. Again, easy enough to <a
href="/files/2011/04/bcmsdh_sdmmc_linux.c.diff">put back</a>.</p><p>Finally, these 15 files relating to the Linux kernel&#8217;s netfilter code were all missing (apparently because the source code archive was made on a case-insensitive filesystem) in the VM670 source code, each time causing the compile to fail:</p><pre><code>include/linux/netfilter/xt_connmark.h
include/linux/netfilter/xt_dscp.h
include/linux/netfilter/xt_MARK.h
include/linux/netfilter/xt_RATEEST.h
include/linux/netfilter/xt_tcpmss.h
include/linux/netfilter_ipv4/ipt_ECN.h
include/linux/netfilter_ipv4/ipt_TTL.h
include/linux/netfilter_ipv6/ip6t_HL.h
net/ipv4/netfilter/ipt_ecn.c
net/netfilter/xt_CONNMARK.c
net/netfilter/xt_dscp.c
net/netfilter/xt_hl.c
net/netfilter/xt_MARK.c
net/netfilter/xt_rateest.c
net/netfilter/xt_TCPMSS.c</code></pre><p>In the end, I was able to build the kernel by restoring these files from the LS670 source.</p><p>Unfortunately, even though it compiled, it&#8217;s quite possible that my kernel is not the same as the official kernel (if the VM670 netfilter code is different, or if other code is broken in a way that doesn&#8217;t raise an error). The only thing that is certain is that LG&#8217;s production kernel couldn&#8217;t have been compiled from this source code.</p><h4>Time to contact LG</h4><p>After I wrap this post up I&#8217;ll try to contact LG to see if they&#8217;ll fix the source code release, and report back here. (If you actually know anyone at LG who could help, please tell me!)</p><p>It&#8217;s worth saying here that LG isn&#8217;t under any obligation to provide end-user support, or to include their code comments. I don&#8217;t expect any of that (although they may find that it&#8217;s easier just to distribute the unmodified code, including comments, than to fix the bugs in their comment-scrubber). However, if they do strip code comments, they ought to have a build system that works like this:</p><blockquote><p>source code -> strip comments -> compile</p></blockquote><p>rather than:</p><blockquote><p>source code -> compile -> strip comments</p></blockquote><p>to ensure that they distribute correct source code. That way, LG wouldn&#8217;t even have to test the separate, comment-scrubbed branch to see if it works (which they clearly failed to do in this case), because they&#8217;re always building from that branch.</p><p>Obviously, LG isn&#8217;t fully complying with the <a
href="http://www.gnu.org/licenses/gpl-2.0.html">GPL</a> (version 2.0 of which covers the Linux kernel) by supplying wrong source code, but on the other hand, these errors are minor and appear to be unintentional. I&#8217;ve been <a
href="/2011/03/android-kernel-overclock-optimus/#credits">complimentary</a> of LG in the past, and hopefully this is just an oversight on their part. We&#8217;ll see if I get anywhere.</p><p><strong>Update:</strong> And <a
href="/2011/04/lg-fixes-bugs-kernel-source-optimus/">I did</a>, for once! Kudos to LG for addressing the issue so promptly.</p> ]]></content:encoded> <wfw:commentRss>http://lyncd.com/2011/04/bugs-lg-kernel-source-optimus/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Firefox 4 for PowerPC Macs: TenFourFox</title><link>http://lyncd.com/2011/04/firefox-4-ppc-mac-tenfourfox/</link> <comments>http://lyncd.com/2011/04/firefox-4-ppc-mac-tenfourfox/#comments</comments> <pubDate>Mon, 04 Apr 2011 05:04:01 +0000</pubDate> <dc:creator>sticks</dc:creator> <category><![CDATA[Reviews]]></category> <category><![CDATA[browsers]]></category> <category><![CDATA[mac]]></category> <category><![CDATA[technology]]></category><guid
isPermaLink="false">http://lyncd.com/?p=399</guid> <description><![CDATA[Mozilla hit me with a double whammy of &#8220;your hardware sucks&#8221; last week, when they released major new versions of Firefox 4 and mobile Firefox 4 for Android (the first!) &#8230; but left me out of both parties. My Android phone, the LG Optimus S, is only a few months old, but its ARMv6 processor [...]]]></description> <content:encoded><![CDATA[<p>Mozilla hit me with a double whammy of &#8220;your hardware sucks&#8221; last week, when they released major new versions of Firefox 4 and mobile Firefox 4 for Android (the first!) &#8230; but left me out of both parties.</p><p>My Android phone, the LG Optimus S, is only a few months old, but its ARMv6 processor isn&#8217;t supported. There&#8217;s a faint <a
href="https://wiki.mozilla.org/Mobile/Platforms/Android#ARMv6_.28experimental.29">glimmer of hope</a> there, but with the ARMv6 test builds already pulled, I&#8217;m not holding my breath. In the meantime, the stock Android browser and Opera Mobile are both great (Opera&#8217;s font rendering needs work in the hinting/character spacing department, but that&#8217;s it).</p><p>Meanwhile, my Powerbook G4 is still running happily along on OS X 10.4 Tiger, so I was happy to find the answer to my Firefox 4 woes in <a
href="http://www.floodgap.com/software/tenfourfox/">TenFourFox</a>, a Firefox fork with builds optimized for various G5, G4 and G3 processors. Here&#8217;s a mini-review of my impressions after a week, and a look at what&#8217;s coming up in browser-land for those of us clinging proudly to the last generation of PowerPC Macintosh computers.<span
id="more-399"></span></p><h4>Introducing TenFourFox</h4><p>First, let me point out that TenFourFox is a free, open-source project, and one unbacked by the deep pockets of the Mozilla Foundation and their Googlebucks, so let me thank the <a
href="http://tenfourfox.blogspot.com/">developer</a> for this volunteer effort.</p><p>The good news is, TenFourFox is a big upgrade over Firefox 3. (So if you&#8217;re a Firefox user, <a
href="http://www.floodgap.com/software/tenfourfox/">check it out!</a>) The two major complaints I have &#8212; UI tearing and crashes &#8212; are both caused by Adobe&#8217;s badly aging, abandonware Flash plugin for PowerPC. These are long-acknowledged issues, and the plan (partly forced because of upstream changes to Firefox) is to <a
href="http://code.google.com/p/tenfourfox/issues/detail?id=24">preference all plugins off by default</a> in the 4.1 version.</p><p>Also, I have to say, the name is terrible. I&#8217;d love SilverFox, tolerate OlderFox, and, honestly, even prefer the mocked <a
href="http://www.geticeweasel.org/">IceWeasel</a>.</p><p>Other than that, it&#8217;s all good news, and getting better in the short term. TenFourFox&#8217;s JavaScript performance tested 3x faster than Safari or Opera 10 on my Mac, thanks to a custom PPC-native JIT (see graph on the <a
href="http://www.floodgap.com/software/tenfourfox/">homepage</a> for full breakdown). All my Firefox 4-compatible extensions upgraded and worked flawlessly. Browser rendering and passes with flying colors. All of this, despite a number of not-insignificant <a
href="http://code.google.com/p/tenfourfox/wiki/TechnicalDifferences">architectural changes</a> under the hood to be Tiger-compatible.</p><p>Coming soon is AltiVec-accelerated WebM video, and it&#8217;s <a
href="http://tenfourfox.blogspot.com/2011/04/ruminations-on-mozilla-rapid-release.html">looking good</a> so far for TenFourFox to be able to keep up with Firefox&#8217;s new &#8220;rapid-release&#8221; schedule through at least the <a
href="http://www.conceivablytech.com/6581/products/firefox-5-social-sharing-home-tab-pdf-viewer-tab-apps">fully awesome</a> Firefox 5 this summer.</p><h4>What&#8217;s left for PowerPC Macs?</h4><p>There are still a couple of decent browser alternatives for the PPC faithful. <a
href="http://www.opera.com/docs/history/#o10">Opera 10</a> is only six months old, and it&#8217;s easily the next-best (or the best, if you&#8217;re a fan of Opera features like <a
href="http://unite.opera.com/overview/">Opera Unite</a>, syncing and long-beloved mouse gestures) and supports WebM and other emerging standards. Unfortunately, with the recent release of Opera 11, it joins Safari as abandonware for the PowerPC platform. Safari on PPC (along with its WebKit-bundling brethren iCab and OmniWeb) is usable at the moment, and it&#8217;s my browser du jour, but it&#8217;s in maintenance mode and goodies like WebKit2 aren&#8217;t in its future for PPC.</p><p>I&#8217;ve long been a fan and user of Camino, but it&#8217;s always badly lagged Firefox in terms of updating the underlying Gecko rendering engine. Version 2.1, due later this year, will bring it up to parity with Firefox 3.6, but with the end of Mozilla support for embedding Gecko, that&#8217;ll almost certainly <a
href="http://caminobrowser.org/blog/">be the end</a> of Camino on PPC Macs.</p><p>Long-term, all of these abandoned products will grow even more out of date and &#8212; even for those who can do without new features or support for new web standards &#8212; insecure as well. Already, Flash is a problem no matter what browser you use.</p><p>Even TenFourFox expects to face serious challenges building a browser from the Mozilla codebase as soon as later this year, depending on how quickly Mozilla drops support for old APIs like Carbon. But, the developer is <a
href="http://code.google.com/p/tenfourfox/wiki/SupportLevels">looking well ahead</a>, and hopes at minimum to backport security fixes going forward.</p><p>So, I encourage you to take a look at TenFourFox. If it isn&#8217;t already the best browser for PowerPC Macintosh, it soon will be.</p><p>We all know the end is coming for our Power Macs &#8212; you know, the day when you either realize you&#8217;re part of an old-computer cult like Amiga and 68k Mac fans, dump MacOS for PPC Linux, or just break down and buy a <a
href="http://www.amazon.com/gp/product/B0047DVVZO/ref=as_li_ss_tl?ie=UTF8&#038;tag=tennbook04-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B0047DVVZO">shiny new Mac</a> &#8212; but that doesn&#8217;t mean they have to go before their time is up.</p> ]]></content:encoded> <wfw:commentRss>http://lyncd.com/2011/04/firefox-4-ppc-mac-tenfourfox/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Simple overclocked Android kernel for Optimus S</title><link>http://lyncd.com/2011/03/android-kernel-overclock-optimus/</link> <comments>http://lyncd.com/2011/03/android-kernel-overclock-optimus/#comments</comments> <pubDate>Tue, 29 Mar 2011 09:26:39 +0000</pubDate> <dc:creator>sticks</dc:creator> <category><![CDATA[Code]]></category> <category><![CDATA[android]]></category> <category><![CDATA[kernel]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[optimus]]></category><guid
isPermaLink="false">http://lyncd.com/?p=367</guid> <description><![CDATA[If you&#8217;re looking to give your Sprint Optimus S a speed boost, I&#8217;ve got a kernel for you, compiled from official LG source code, that adds overclocking and removes unneeded debugging features for a leaner, meaner kernel. The basic idea behind this kernel build is &#8220;stable performance&#8221; &#8212; other devs are doing a great job [...]]]></description> <content:encoded><![CDATA[<p>If you&#8217;re looking to give your Sprint Optimus S a speed boost, I&#8217;ve got a kernel for you, compiled from official LG source code, that adds overclocking and removes unneeded debugging features for a leaner, meaner kernel.</p><p>The basic idea behind this kernel build is &#8220;stable performance&#8221; &#8212; other devs are doing a great job backporting the latest features from the mainline Android kernel and writing experimental patches. My goal is a lot less ambitious, but also less bleeding-edge: Build a kernel from official source, one that &#8220;just works&#8221; for me the user, but boost performance to get the most from the hardware.</p><p>I&#8217;ve also included the Linux TUN/TAP driver as a module, so that (among other things) you can use <a
href="/2011/01/openvpn-optimus-s/">OpenVPN with your Optimus</a>, if you like. Need some other module? Ask!<span
id="more-367"></span></p><h4 id="features">Features</h4><ul><li>Uses current (2.6.32.9 Linux kernel for Optimus S with VD baseband) <a
href="http://www.lg.com/global/support/opensource/opensource.jsp">LG source code</a> for simplicity and maximum compatibility. See &#8220;<a
href="#designgoals">design goals</a>,&#8221; below.</li><li>CPU frequency scaling beyond 600 MHz (i.e. overclocking). By default, I&#8217;ve upped the maximum clock speed to 748 MHz, but you can enable higher speeds (and test them) using trusty <a
href="http://www.setcpu.com/">SetCPU</a>. At 748 MHz, SetCPU benchmarks run 20% faster.</li><li>Adds the new &#8220;interactive&#8221; CPU <a
href="http://www.ibm.com/developerworks/linux/library/l-cpufreq-2/">frequency scaling governor</a> for a more responsive UI. (The easiest way to use it by default is to have SetCPU select it on boot &#8230; or you can edit <code>init.qcom.post_boot.sh</code> in your boot.img ramdisk.)</li><li>Removed a lot of unneeded debugging/development features, such as Ethernet, kernel debugging, debugfs etc. The end result is a kernel that&#8217;s 380K smaller than LG&#8217;s (2.2M vs. 2.6M).</li><li>Minor performance tweaks (removed highmem etc.).</li><li><code>tun.ko</code> compiled as a module, since I use it for <a
href="/2011/01/openvpn-optimus-s/">OpenVPN</a>. Version 07 adds Linux ext2/ext3/ext4 filesystem drivers as modules. Future releases can include additional drivers as modules, if there&#8217;s interest.</li></ul><h4 id="getit">Get it</h4><p>I&#8217;ve been running variants of this kernel for a couple of weeks, and it works for me (so far), but if you choose to install it, the standard disclaimers apply: No warranties expressed or implied, it&#8217;s <strong>your responsibility</strong> to understand exactly what you&#8217;re doing, so if you kill your phone I assume no responsibility.</p><p><strong>Requirements:</strong> To start with, you&#8217;ll need to have rooted your phone and installed a custom recovery. The kernel is compiled from LG&#8217;s LS670ZVD kernel source, so be sure your phone is updated to the VD baseband. I&#8217;ve used <a
href="https://github.com/koush/AnyKernel">koush&#8217;s AnyKernel</a> template to package the .zip, so you should be able to flash this kernel over top of the stock LG OS or any custom ROM.</p><p>So, if you understood all of that, the rest should be easy. Download picasticks kernel <a
href="http://www.mediafire.com/?vzzbbzl4dnzlnlr">picasticks-07.zip</a>, copy it to <code>/sdcard/</code>, reboot your phone to your custom recovery, and flash the .zip. Reboot and enjoy!</p><h4 id="designgoals">Design goals</h4><p>Over the years I&#8217;ve built many, many Linux kernels, but I&#8217;m new to the Android kernel. I started because I wanted to compile essentially a stock kernel, and add TUN/TAP support. Then, I found that LG&#8217;s developers had left behind unnecessary debugging and debug hardware support (i.e. Ethernet and serial consoles via USB) worth taking out. (Housecleaning is the inevitable result of &#8220;make menuconfig.&#8221;) Next, I decided to enable overclocking past 600 MHz, since it had worked fine for me with various versions of <a
href="http://forum.androidcentral.com/lg-optimus-s-rooting-roms-hacks/45401-rom-thunderom-v1-8-2-3-19-2011-a.html">ThundeROM</a> and the <a
href="https://github.com/zefie/thunderc_kernel_xionia">Xionia</a> kernel that supported it. Finally, I added the interactive CPU frequency scaling mode.</p><p>That leaves us with the following project principles:</p><ul><li>Build from the most current official LG source. Reliability and stability are the goals &#8212; I&#8217;ve had this phone for four months, and LG has updated the OS in three of them, so I don&#8217;t want to get into the maintenance nightmare that constantly remerging the latest upstream Android source would entail (for now). If you want to flash a new kernel every week, mine&#8217;s not for you, because I may not release again until LG does. So, I give up things like the BFQ scheduler (no biggie, Deadline is faster on Android) <del
datetime="2011-03-31T09:27:56+00:00">and interactive scaling (this one I miss, but ondemand is OK)</del> (Update: interactive scaling backported!). Likewise, in my kernel configuration I&#8217;m trying to only deviate from the LG config when it&#8217;s an obvious win. Another part of reliability and stability is, don&#8217;t expect me to push a new release the same day LG publishes updated source &#8212; it&#8217;ll be more like a week (you know, for testing). Think of me as somewhere in between Gentoo and Debian-stable.</li><li>Keep it small. Faster is better. That doesn&#8217;t mean I&#8217;ll be dumping SLAB for SLOB just to get a small binary, but my assumption is that you don&#8217;t need debugfs, or you&#8217;d be compiling your own kernel. I&#8217;m happy to add things as modules, so if you want CIFS or something to stream music off your LAN, let me know, but in general the simpler the better. (Personally, I want to get bluetooth HID, i.e. Apple bluetooth keyboard, working, but the userland part scares me, so I may have to give up my dream of typing 120 wpm in WordPerfect 5.1 on my phone, and go back to Angry Birds.)</li><li>Overclocking, since it seems to work well and my phone is pretty new, so I&#8217;ll be stuck with it for a while, but it isn&#8217;t exactly a screamer.</li></ul><h4 id="credits">Credits and source</h4><p>Many thanks to the Android hackers and developers who have come before me, for making my learning curve much easier.</p><p>Full credit on overclocking goes to <a
href="https://github.com/zefie/">zefie</a>. My patch to <code>arch/arm/mach-msm/acpuclock.c</code> is 99% cribbed from <a
href="https://github.com/zefie/thunderc_kernel_xionia/blob/sprint/arch/arm/mach-msm/acpuclock.c">his changes</a> to the LG V9 source.</p><p>Credit to Mike Chan (who&#8217;s since left Google) for <a
href="https://github.com/CyanogenMod/cm-kernel/commit/255f13bf41f368aa51638a854ed69cfc60f39120">backporting the interactive CPUFreq governor</a>.</p><p>Thanks to LG for not just publishing source code (GPL requirement) but also including docs and a build script. Unlike <em>another</em> phone OEM with a patent-encumbered fruit for a logo, LG you give me a happy feeling, and it is not just from your smiley logo. You could have published your readme in Korean (which would not have worked, I live in a Korean neighborhood!), but you chose not to.</p><p>For my source code release, I&#8217;m not going to publish a giant tarball (yet) since it&#8217;s 100% LG source + the aforementioned patches to enable overclocking and the interactive governor. Therefore, to duplicate my build source:</p><ol><li>LG source code is <a
href="http://www.lg.com/global/support/opensource/opensource.jsp">here</a> (search for &#8220;LS670&#8243; to get Optimus S source).</li><li>Apply <a
href="/files/2011/03/kernel.diff">this patch</a> to the kernel tree, i.e.: <code>cd lg_kernel &#038;&#038; patch -p1 &lt; kernel.diff</code></li></ol><p>And, in case you&#8217;re interested, here are <a
href="/files/2011/03/config.diff">my changes to the LG kernel configuration</a> <code>.config</code>.</p><h4 id="changelog">Changelog</h4><dl><dt>07 released 2011-04-18</dt><dd>Adds Linux ext2/ext3/ext4 filesystem drivers as modules.</dd><dt>06 released 2011-04-08</dt><dd>Code/config identical to 05. Recompiled with CodeSourcery toolchain including gcc 4.5.1. Improved DEFLATE compression using 7zip algorithm.</dd><dt>05 released 2011-04-03</dt><dd>Reverts RCU method to tree-based from preempt tree-based to fix lag issues with memory locking, for instance when network interfaces are brought up or down. Other minor regressions in kernel config.</dd><dt>04 released 2011-03-31</dt><dd>Initial public release using LG VD source.</dd></dl> ]]></content:encoded> <wfw:commentRss>http://lyncd.com/2011/03/android-kernel-overclock-optimus/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>A better way to losslessly join MP3 files</title><link>http://lyncd.com/2011/03/lossless-combine-mp3s/</link> <comments>http://lyncd.com/2011/03/lossless-combine-mp3s/#comments</comments> <pubDate>Thu, 17 Mar 2011 02:13:56 +0000</pubDate> <dc:creator>sticks</dc:creator> <category><![CDATA[Systems]]></category> <category><![CDATA[mp3]]></category> <category><![CDATA[unix]]></category><guid
isPermaLink="false">http://lyncd.com/?p=345</guid> <description><![CDATA[I recently revisited a previous how-to I wrote up two years ago, thinking that there must be a better way to losslessly combine multiple MP3 files than to use 3 separate utilities. The good news is, I think I&#8217;ve found the one true method. The bad news is, it still uses 3 programs. But, just [...]]]></description> <content:encoded><![CDATA[<p>I recently revisited a <a
title="How to losslessly concatenate / merge MP3 files" href="/2009/02/how-to-merge-mp3-files/">previous how-to</a> I wrote up two years ago, thinking that there must be a better way to losslessly combine multiple MP3 files than to use 3 separate utilities.</p><p>The good news is, I think I&#8217;ve found the one true method. The bad news is, it still uses 3 programs. But, just like last time, the commands are short and sweet, and it&#8217;s easy to throw them into a shell script.<span
id="more-345"></span></p><p>To summarize from before, we want to:</p><ul><li>Losslessly join multiple files together (no re-encoding).</li><li>Correctly copy metadata (ID3 tags, including cover art etc.) to the final file, while stripping the metadata of the other input files (i.e., we don&#8217;t want to just do <code>cat 1.mp3 2.mp3 > all.mp3</code> and end up with leftover tags in the middle of the MPEG data stream).</li><li>Either remove the VBR (aka Xing) header or else correct it so that file duration is correct and seeking works in iTunes and on iPods, among others.</li></ul><p>So, what&#8217;s new? The <a
href="/2009/02/how-to-merge-mp3-files/">old way</a> produces a file with no VBR header, while the new way <em>corrects</em> the VBR header. Should you care about this? Well, if you ask me, this Xing header should go the way of the company that spawned it back in the 1990s. But, until then &#8230; both files work the same in i(Tunes|Pod). There are some other programs (VLC is one) that display the wrong file duration with the old method, although playback and seeking aren&#8217;t affected.</p><p>I think the internals of the file created by the new method are cleaner, and including the VBR header can improve seek performance. But for you, the choice might only come down to which set of utility programs you&#8217;d rather use.</p><h4 id="instructions">The revised method</h4><p>First, we use <a
href="http://tomclegg.net/mp3cat">mp3cat</a>, which takes a bunch of mp3 files and joins their data frames together, dumping everything else. Then, like last time, we&#8217;ll use <code>id3cp</code> from <a
href="http://id3lib.sourceforge.net/">id3lib</a> to copy the metadata we want onto the joined file. Finally, <a
href="http://home.gna.org/vbrfix/">VBRFix</a> will re-sync the VBR header to the actual size of the resulting file.</p><p>In this example, <code>1.mp3</code> and <code>2.mp3</code> are merged into <code>all.mp3</code>, and metadata is copied from <code>1.mp3</code>:</p><pre><code>cat 1.mp3 2.mp3 | mp3cat - - > tmp.mp3
id3cp 1.mp3 tmp.mp3
vbrfixc --XingFrameCrcProtectIfCan tmp.mp3 all.mp3 &#038;&#038; rm tmp.mp3</code></pre><p>That&#8217;s it! I&#8217;ve tested this on both a Linux system and my trusty Powerbook, so it should work on any reasonable *nix.</p><p>Some tips: You can also use <code>mp3cat</code> to operate on a directory of files. The command-line version of VBRFix is a little hard to find (I did an <code>svn export</code> of the <a
href="https://gna.org/svn/?group=vbrfix">source</a>, then ran <code>setupNonQtBuild.sh</code>). I also tried <a
href="http://empeg-hijack.sourceforge.net/mp3tool.html">mp3tool</a> for this purpose, and while iTunes liked the result end, VLC displayed an incorrect file duration.</p><p>Let me know what you think.</p> ]]></content:encoded> <wfw:commentRss>http://lyncd.com/2011/03/lossless-combine-mp3s/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Android kernel: Find the base address to use with mkbootimg for your phone</title><link>http://lyncd.com/2011/03/android-kernel-mkbootimg-base/</link> <comments>http://lyncd.com/2011/03/android-kernel-mkbootimg-base/#comments</comments> <pubDate>Wed, 16 Mar 2011 00:15:47 +0000</pubDate> <dc:creator>sticks</dc:creator> <category><![CDATA[Systems]]></category> <category><![CDATA[android]]></category> <category><![CDATA[kernel]]></category> <category><![CDATA[optimus]]></category><guid
isPermaLink="false">http://lyncd.com/?p=333</guid> <description><![CDATA[This is old hat for serious Android hackers, but for me it took long enough to find (no help from Google or grep) that I&#8217;ll post it here. If you&#8217;re building your own Android kernel, the last step in the process is to pack the kernel binary and gzipped ramdisk together into a boot image [...]]]></description> <content:encoded><![CDATA[<p>This is old hat for serious Android hackers, but for me it took long enough to find (no help from Google or grep) that I&#8217;ll post it here. If you&#8217;re building your own Android kernel, the last step in the process is to pack the kernel binary and gzipped ramdisk together into a boot image with <code>mkbootimg</code>. Here&#8217;s where to find the base address to use for the &#8220;&#8211;base&#8221; parameter for your device.<span
id="more-333"></span></p><p>First, a few links: This is a good <a
href="http://marakana.com/forums/android/examples/111.html">intro to kernel building</a> (although you&#8217;ll want to get the kernel source code for your actual device, in my case <a
href="http://www.lg.com/global/support/opensource/opensource.jsp">from LG</a>). Here&#8217;s a great <a
href="http://forum.androidcentral.com/htc-hero-rooting-roms-hacks/8072-how-build-your-own-kernel-package-source.html">walkthrough of the entire process</a> of grabbing your device&#8217;s config, building and repacking (caveat: it&#8217;s for a specific device, so don&#8217;t use his <code>mtd</code> layout or base address setting without checking yours first). Finally, a better explanation of <a
href="http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images">unpacking and repacking boot images</a> that&#8217;ll clear up the aforementioned caveat.</p><p>Running <code>split_bootimg.pl</code> on a boot image pulled from your device will tell you what parameters to use with <code>mkbootimg</code>. But what about the base memory address? If you&#8217;re lucky, it&#8217;s in a technical spec or posted in a forum, and Google will turn it up, but for my device, that didn&#8217;t work (and if it had, forum posts that only say &#8220;use this number&#8221; would have left me wondering why).</p><h4>The answer</h4><p>The answer is going to be in the kernel source (either in the config, or hardcoded) for your device&#8217;s cpu. So, <code>arch/arm</code> is the place to look.</p><p>I&#8217;ll skip to the end: grep for <code>PHYS_OFFSET</code> and that should find your answer.</p><p>In my case, LG uses a kernel config variable, <code>CONFIG_PHYS_OFFSET</code>, to set <code>PHYS_OFFSET</code>. LG&#8217;s build system separates out various cpu- and model-specific kernel configuration parameters, which I found in <code>arch/arm/configs</code>. If you&#8217;ve got an LG device, your model-specific config is there.</p><p>LG&#8217;s README for my phone says to <code>make thunderc-sprint-perf_defconfig</code> before building the kernel (My phone, the Optimus S, is thunderc), so its config is in the matching <code>arch/arm/configs</code> file <code>thunderc-sprint-perf_defconfig</code>. And, that&#8217;s where the default value of <code>CONFIG_PHYS_OFFSET</code> for my phone is actually defined: <code>0x12200000</code>. Hooray!</p><p>Of course, I didn&#8217;t even know I was looking for <code>PHYS_OFFSET</code> at the time, I was just looking for anything that looked like a memory address. For you, it should be much easier, and it shouldn&#8217;t matter whether your kernel source is organized like LG&#8217;s or not. Just grep all of <code>arch/arm</code> for <code>PHYS_OFFSET</code> and that should lead you to your base address.</p><p>The best part is, once I had my answer, Googling for &#8220;12200000&#8243; returned all sorts of useful info, if I&#8217;d only had the solution to start with. The kicker is that, had I only read the <em>very same</em> forum thread I linked above all the way through, I would have found <a
href="http://forum.androidcentral.com/htc-hero-rooting-roms-hacks/8072-how-build-your-own-kernel-package-source-6.html">more than enough info</a> to track down the answer!</p><p>Sort of like, if you want to know the meaning of life and you Google for it, you turn up all sorts of garbage. But once you know the answer is 42, the question is easy to find.</p><p>Which, now that I think about it, is basically how <a
href="http://www.ibm.com/innovation/us/watson/">Watson</a> works. But that&#8217;s going <em>way</em> off topic.</p><h4>While we&#8217;re at it</h4><p>Can&#8217;t leave without mentioning one of my favorite hobbyhorses, compression. When you&#8217;re gzipping your ramdisk (or almost anything else you&#8217;re just zipping once like this), use &#8220;<code>gzip -9</code>&#8220;!</p><p>(And then, if you&#8217;re a nut like me, <code>advdef -z -4</code> to deflate the resulting file a few percent more.)</p><p>Not that it makes a huge difference in the case of the ramdisk (39K saved in my 863K gzipped ramdisk), but I&#8217;ve read umpteen posts on the subject in the 24 hours, and nobody does it. The &#8220;-9&#8243; is only 3 extra characters to type!</p><p>So many Android ROM packagers like to say how many megabytes they&#8217;ve shaved off the stock OS to free up space in <code>/data</code>, but then their APKs are all zipped with default settings.</p><p>I recompressed my APKs with the 7z deflate algorithm (either use 7z to make your .zips, or <code>advzip -z -4</code> them) and freed up 9 MB just in <code>/data/app</code> (or 12%, I started with 76 MB). That&#8217;s 9 MB for free, on my <code>/data</code> which had only 35 MB left.</p><p>Sure, anybody can do this, but it&#8217;s not the user&#8217;s job to re-zip their apps. Android developers, you can do better!</p> ]]></content:encoded> <wfw:commentRss>http://lyncd.com/2011/03/android-kernel-mkbootimg-base/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>I love my Android, but Android Market security is another story</title><link>http://lyncd.com/2011/03/android-market-security/</link> <comments>http://lyncd.com/2011/03/android-market-security/#comments</comments> <pubDate>Sun, 06 Mar 2011 23:47:34 +0000</pubDate> <dc:creator>sticks</dc:creator> <category><![CDATA[Technology]]></category> <category><![CDATA[android]]></category> <category><![CDATA[security]]></category> <category><![CDATA[technology]]></category><guid
isPermaLink="false">http://lyncd.com/?p=318</guid> <description><![CDATA[Yesterday, Google revealed that it had used its &#8220;security of last resort&#8221; remote removal feature this week to wipe 58 malicious applications from user&#8217;s devices. Google also removed the bad apps from the Android Market, contacted law enforcement, and is pushing a security update to protect devices&#8217; identification codes. Needless to say, these are all [...]]]></description> <content:encoded><![CDATA[<p>Yesterday, Google <a
href="http://googlemobile.blogspot.com/2011/03/update-on-android-market-security.html">revealed</a> that it had used its &#8220;security of last resort&#8221; remote removal feature this week to wipe 58 malicious applications from user&#8217;s devices.</p><p>Google also removed the bad apps from the Android Market, contacted law enforcement, and is pushing a security update to protect devices&#8217; identification codes. Needless to say, these are all good moves, and unlike some privacy advocates I&#8217;m not going to quibble with Google&#8217;s remote app removal power as long as it&#8217;s being used conservatively, in a security context, as in this case. Analogous to public health or combatting botnets, Google must be able to wipe malware from people&#8217;s phones to protect everyone, not just the infected.</p><p>What does bother me about <a
href="http://mobilized.allthingsd.com/20110303/droid-dream-malware-latest-sign-android-attacks-are-on-the-rise/">this news</a> is that these applications appeared in the Android Market at all, where they were available for some time before being reported to the Android security team. I&#8217;ve owned an Android phone for a couple of months now, so I thought I&#8217;d weigh in on one of the sad realities of the experience: I find myself increasingly worried about security, certainly more so than I have been about any personal computing device since the last time I ran a Windows PC 10 years ago.<span
id="more-318"></span></p><h4>An attacker&#8217;s dream</h4><p>Think about it from an attacker&#8217;s perspective: Any smartphone is a ripe target. Android has <em>built-in APIs</em> for accessing all of my contacts, email, call and text history, credit card and even physical location. That&#8217;s information I&#8217;ve never even stored on any computer or other device I&#8217;ve ever owned, let alone one that&#8217;s Internet-attached, and thinking about someone stealing it is pretty freaky.</p><p>There are a lot of reasons to hate Apple&#8217;s App Store, but having a manual app review process looks pretty good when you think about the security implications, and when you compare the App Store&#8217;s security record with Android Market. The way average people use the App Store, browsing and installing things like it&#8217;s a shopping mall, is just not safe or smart on the Android Market (which much more resembles a shopping street in a dicier part of town).</p><p>Instead, when searching for an Android app, I find myself approaching it with the same fear and trepidation I would when evaluating whether to install a program on my computer from the web, which I try not to do. I make sure it&#8217;s from a trusted source, and if it isn&#8217;t, I make sure to read about it on a couple of familiar sites to make sure it&#8217;s legit. That&#8217;s <em>still</em> no guarantee the software is benign, but sometimes it&#8217;s the best I can do. When you&#8217;re browsing the Android Market, having to step back and do all this background work before tapping &#8220;install&#8221; is a major pain. Do I enjoy it? No. And I&#8217;m sure that the vast majority of people out there don&#8217;t bother.</p><p>If Google isn&#8217;t going to do a seriously good job of security on Android Market, then the market in the end is a huge disservice to users, because you&#8217;re getting the Google seal of authenticity and easy one-tap install for things you shouldn&#8217;t be installing. You&#8217;d be better off with no app market, just browsing the web and deciding what to install on your own &#8212; at least then basic intuition (&#8220;nope, this looks shady, better ask my techie friend&#8221;) and phishing defenses like checking the browser address bar would kick in.</p><p>Yes, Google has done a much better job of sandboxing and creating a secure OS. Yes, I still prefer Android (recompiling the kernel, doing any Linux stuff I want, it&#8217;s awesome) to the alternatives. Yes, there haven&#8217;t been any serious infections in the wild and there isn&#8217;t a known propagation model for malware (elective downloads in the Android Market aren&#8217;t going to spread anything far before it&#8217;s discovered, as in this case). But, threat assessment and vulnerability assessment are two different things: Just because few attackers have bothered so far doesn&#8217;t mean the vulnerability isn&#8217;t there, and as Android&#8217;s install base grows the incentive to devise more ingenious attacks grows as well.</p><p>I haven&#8217;t put any active-monitoring security software on my phone &#8230; yet. But, I probably will, and eventually Google will come around as well. It&#8217;ll probably be something along the lines of what Microsoft has done with Windows Defender (signature-based antivirus and memory access monitoring). Encrypting sensitive data (both on disk and in RAM), or all data by default, would be another win. It&#8217;s easier said than done, because securely managing the keys is hard to do in a user-friendly way, but worth doing.</p><p>Just expecting users to &#8220;be careful&#8221; isn&#8217;t enough.</p><h4>What next?</h4><p>The first step is for Google to &#8220;fix&#8221; the Android Market &#8212; to do serious work on its automated app review. Google has the tools &#8212; I love <a
href="https://sites.google.com/a/chromium.org/dev/developers/design-documents/software-updates-courgette">Courgette</a>, which does binary diffs of partially disassembled binaries for updating Chrome &#8212; so they must be able to figure out a way to red-flag malware like this that is basically 95% a clone of an existing (legitimate) app. That would be an important anti-piracy measure as well. (Who knew you could just copy and republish an existing app the the market?)</p><p>I love that Android Market is more permissive than Apple&#8217;s App Store &#8212; what I don&#8217;t want is Apple-style censorship, for instance of apps that compete with Apple products &#8212; but a combination of better filtering and improved UI will add security without hurting users or developers. Crowdsourcing app review to users can work, but the bare-bones way Android Market uses and displays this data needs improvement.</p><p>Handset and other device manufacturers need to get on board as well, because Android device fragmentation has serious security implications. In this case, Google is pushing a security update to affected devices (Android versions prior to 2.2.2), but how many people with older phones will ever get it? And of those few who do, how long will it take for their handset&#8217;s manufacturer and wireless carrier to integrate and push the patch?</p><p>Microsoft and PC OEMs figured this out long ago: OEMs may add custom skins, application launchers, demos and other crapware to PCs, but the underlying OS is left alone and talks to Microsoft for updates. And Linux distributions have long since figured how to do the same thing, but on multiple architectures and with decentralized software mirrors &#8212; a great model for Android, its OEMs and carriers to follow.</p><p>Google and its OEMs need to address these problems sooner rather than later, because they&#8217;re playing with borrowed time. If users&#8217; first experiences with Android are bad, they&#8217;ll go back to Apple, webOS or Blackberry. Or if attackers hit on the right distribution mechanism &#8212; or adapt an old one, like &#8220;spam links to malware in the Android Market, take over an address book, and repeat&#8221; &#8212; the platform could be massively compromised.</p><p>For now, Android users like me will just have to be careful</p> ]]></content:encoded> <wfw:commentRss>http://lyncd.com/2011/03/android-market-security/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>OpenVPN on Sprint LG Optimus S</title><link>http://lyncd.com/2011/01/openvpn-optimus-s/</link> <comments>http://lyncd.com/2011/01/openvpn-optimus-s/#comments</comments> <pubDate>Mon, 24 Jan 2011 10:10:40 +0000</pubDate> <dc:creator>sticks</dc:creator> <category><![CDATA[Systems]]></category> <category><![CDATA[android]]></category> <category><![CDATA[openvpn]]></category> <category><![CDATA[optimus]]></category><guid
isPermaLink="false">http://lyncd.com/?p=300</guid> <description><![CDATA[Now that ThundeROM includes the Xionia kernel with the Linux TUN/TAP driver compiled as a module, it was downright easy to get OpenVPN working on my LG Optimus S. I didn&#8217;t even have to compile anything! Here&#8217;s a quick run-down of what I did. Now that you&#8217;ve got tun.ko I&#8217;m not going to get into [...]]]></description> <content:encoded><![CDATA[<p>Now that <a
href="http://forum.androidcentral.com/lg-optimus-s-rooting-roms-hacks/45401-rom-thunderom-v1-6-2-1-22-2011-a.html">ThundeROM</a> includes the <a
href="http://forum.androidcentral.com/lg-optimus-s-rooting-roms-hacks/46789-oc-kernel-xionia-kernel-2-6-32-26-a.html">Xionia</a> kernel with the Linux TUN/TAP driver compiled as a module, it was downright easy to get <a
href="http://openvpn.net">OpenVPN</a> working on my LG Optimus S. I didn&#8217;t even have to compile anything! Here&#8217;s a quick run-down of what I did.<span
id="more-300"></span></p><h4>Now that you&#8217;ve got tun.ko</h4><p>I&#8217;m not going to get into the basics, like installing the <a
href="http://developer.android.com/sdk/">Android SDK</a> on your computer, connecting via the <code>adb</code> shell, rooting your phone and flashing it with custom software. <a
href="http://falz.net/tech/lgoptimus-androidmod">Here&#8217;s a great guide</a> for that (pay attention when you do things like remounting the filesystem <code>rw</code>, because you&#8217;re going to have to do that before you can write to <code>/system</code>).</p><p>I started with my phone running ThundeROM 1.6 (already updated to 1.6.2 and probably updated again by the time you read this), the first version to include a recompiled kernel with <code>tun.ko</code>. (You could also choose to install just the Xionia kernel atop your stock software, compile your own kernel, or reflash with X or Y &#8230; but from here on out I&#8217;ll keep it simple and just diary what I did.)</p><p><strong>Update 2/2011:</strong> Having now repeated these steps for ThundeROM 1.6.2 and now <a
href="http://forum.androidcentral.com/lg-optimus-s-rooting-roms-hacks/58847-rom-vcrom-v007.html">VCRom</a> (which supports the Optimus updated to the VC baseband), you shouldn&#8217;t have any trouble following these directions with a slightly different configuration. One tip: When symlinking to <code>route</code> and <code>ifconfig</code> in the second step, be sure to symlink to wherever they actually are on your phone (VCRom puts them in <code>bin</code> instead of <code>xbin</code>).</p><h4>What I did</h4><ol><li>First, I installed two apps via the App Market that make it easy to install a precompiled <code>openvpn</code> binary on your phone and then manage your OpenVPN connections: <a
href="http://code.google.com/p/android-openvpn-installer/">OpenVPN Installer</a> and <a
href="http://code.google.com/p/android-openvpn-settings/">OpenVPN Settings</a>. I used the installer app to install the <code>openvpn</code> binary into <code>/system/xbin</code>.</li><li>Unfortunately, this binary has hardcoded paths to <code>route</code> and <code>ifconfig</code> (it expects them to be in <code>/system/xbin/bb</code>), and on my phone (ThundeROM 1.6) these commands are in <code>/system/xbin</code>. So, I worked around this with a couple of symlinks. Connect to your phone using <code>adb shell</code>, remount <code>/system</code> read-write, create the directory <code>/system/xbin/bb</code>, and create symlinks in it to your <code>route</code> and <code>ifconfig</code>. (If you skip this step, you&#8217;ll figure this out later the way I did: I ran <code>openvpn</code> via the shell and saw it connect happily to my VPN, but then fail to add any routes to the system.)</li><li>Next, you&#8217;ll need to copy your OpenVPN config file and keys onto your phone. I won&#8217;t go into configuring an OpenVPN connection here, but all I had to do was take a working client config file (the same standard config I&#8217;m also using on Linux, Windows and Mac machines), keys and CA and drop them into <code>/sdcard/openvpn</code>. So, if you&#8217;ve called your connection &#8220;client1,&#8221; you&#8217;d be copying <code>client1.conf</code>, <code>client1.crt</code>, <code>client1.key</code> and <code>ca.crt</code> into a folder called <code>openvpn</code> on your SD card.</li><li>If you like, <strong>you can skip</strong> this step. But, what I did next was connect via <code>adb shell</code> and test out my connection. First, I did <code>insmod /system/lib/modules/tun.ko</code> and then <code>lsmod</code> to make sure the TUN module loaded. Then I connected to my VPN:<pre><code>cd /sdcard/openvpn
/system/xbin/openvpn --config client1.conf</code></pre><p>Assuming it works, you should see lots of happy output. If you want, leave the connection open, connect via another shell, run <code>ifconfig</code> to verify that the TUN device has an IP address, and ping your VPN. Hit F4 to close the connection when you&#8217;re satisfied.</p></li><li>Last, you&#8217;ll want to set up OpenVPN Settings to manage your VPN connection so you won&#8217;t have to start/stop it from the shell. In my case, OpenVPN Settings auto-detected the VPN config I&#8217;d put in <code>/sdcard/openvpn</code>, but you can change this location through the Advanced settings if you need to. My settings are:<dl><dt>Load tun kernel module</dt><dd>checked</dd><dt>TUN module settings</dt><dd><dl><dt>Load module using</dt><dd>insmod</dd><dt>Path to tun module</dt><dd>/system/lib/modules/tun.ko</dd></dl></dd><dt>Path to configurations</dt><dd>/sdcard/openvpn</dd><dt>Path to openvpn binary</dt><dd>/system/xbin/openvpn</dd><dt>Fix HTC Routes</dt><dd>unchecked</dd><dt>Show Ads</dt><dd>checked</dd></dl></li></ol><p>From here, you should be good to go! Just tap your connection in OpenVPN Settings whenever you want to connect to your VPN.</p> ]]></content:encoded> <wfw:commentRss>http://lyncd.com/2011/01/openvpn-optimus-s/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Android SDK and NOEXEC tmp partition hint</title><link>http://lyncd.com/2011/01/android-sdk-noexec/</link> <comments>http://lyncd.com/2011/01/android-sdk-noexec/#comments</comments> <pubDate>Wed, 12 Jan 2011 21:52:43 +0000</pubDate> <dc:creator>sticks</dc:creator> <category><![CDATA[Systems]]></category> <category><![CDATA[android]]></category> <category><![CDATA[unix]]></category><guid
isPermaLink="false">http://lyncd.com/?p=288</guid> <description><![CDATA[If you&#8217;ve installed the Android SDK, but running the tools/android GUI fails with an error message when Java can&#8217;t find your SWT-GTK libraries, here&#8217;s a possible explanation: Your /tmp partition is mounted with the noexec option. The error message in question looks like this: [android-sdk-linux_86]$ tools/android Starting Android SDK and AVD Manager No command line [...]]]></description> <content:encoded><![CDATA[<p>If you&#8217;ve installed the <a
href="http://developer.android.com/sdk/">Android SDK</a>, but running the <code>tools/android</code> GUI fails with an error message when Java can&#8217;t find your SWT-GTK libraries, here&#8217;s a possible explanation: Your <code>/tmp</code> partition is mounted with the <code>noexec</code> option.<span
id="more-288"></span></p><p>The error message in question looks like this:</p><pre>[android-sdk-linux_86]$ tools/android
Starting Android SDK and AVD Manager
No command line parameters provided, launching UI.
See 'android --help' for operations from the command line.
Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-gtk-3550 or swt-gtk in swt.library.path, java.library.path or the jar file
	at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
	at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
	at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
	at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
	at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
	at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
	at com.android.sdkmanager.Main.showMainWindow(Main.java:292)
	at com.android.sdkmanager.Main.doAction(Main.java:276)
	at com.android.sdkmanager.Main.run(Main.java:99)
	at com.android.sdkmanager.Main.main(Main.java:88)</pre><p>There are lots of reasons you could be seeing this exception &#8212; such as not having SWT installed at all! In my case, Java wasn&#8217;t finding SWT even though I was 100% sure I had installed Eclipse, the JDK and all the SWT libs correctly.</p><p>It turned out that the SWT shared libs were being copied to <code>/tmp</code> but because I&#8217;d mounted <code>/tmp</code> to a separate partition that&#8217;s mounted <code>noexec,nosuid,nodev</code> (an age-old UNIX security practice), they couldn&#8217;t be executed. Incidentally, the files in question are these:</p><pre>[android-sdk-linux_86]$ ls /tmp/swtlib-32/
libswt-gtk-3550.so  libswt-pi-gtk-3550.so</pre><p>There may well be a better workaround, but my quick-and-dirty solution was to just edit the <code>android/tools</code> script and hardcode an alternate Java tmpdir (in this case, <code>~/tmp</code> in my user directory). Just add a <code>-Djava.io.tmpdir=/path/to/some/tmpdir</code> to the last line in <code>android/tools</code>, so that it looks something like this:</p><pre><code class="prettyprint lang-bsh">exec "$java_cmd" -Djava.io.tmpdir=/home/sticks/tmp -Xmx256M $os_opts $java_debug -Dcom.android.sdkmanager.toolsdir="$progdir" -classpath "$jarpath:$swtpath/swt.jar" com.android.sdkmanager.Main "$@"</code></pre>]]></content:encoded> <wfw:commentRss>http://lyncd.com/2011/01/android-sdk-noexec/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss><!-- Cached page generated by WP-Super-Cache on 2012-02-04 11:19:57 -->
<!-- Compression = gzip -->
