Guest catfesh Posted January 16, 2010 Report Posted January 16, 2010 OK it's probably anathema here, but I'm an iPhone hacker. I was the first guy running a mk1 software unlocked iPhone in the UK (was online with geohot at 3am when he leaked his beta CLI tools... was on Vodafone within 5 minutes, jumping around the room) and have gone through much of the 'limited Unix userland' experience with the iPhone OS X hacking. Similarly, we started with having to natively compile a bunch of standard userland tools, but getting SSH on the iPhone was harder because we had to replace a boot-time binary with dropbear instead to convince it to run it :) That was long ago now though. The iPhone is now perfectly to my liking so I thought I'd try out a Nexus One because the hardware is IMO better than the iPhone 3GS (which I use as my business phone - IT isn't really my business, I hack for fun and have done for 28 years). The HTC hardware is *lovely*. However I swiftly found out that Android (well, specifically 2.1 on the Nx1 - I can't speak for earlier devices) sucks it down. The first thing I did was to root the device and get a command shell :) and then proceeded to try to use the thing as a smartphone. I can't get IMAP email to work with my server (Google bug tracker has complaints about this dating back to 2008....) which is a dealbreaker, so the device is a toy for me now. So... I've unlocked the bootloader, installed the cool 1.5.3 recovery console, and waited for some Linux hacker (I'm an OS X guy) to get busybox and dropbear working... which Paul has done a fantastic job of... and loaded that too. I've now got SSH login and am poking around the filesystem, trying to get a handle on how Android works, and how the Nexus One in particular differs from the older devices. First thing I noticed was that the 'old' Android hacks expected a /system/xbin - this didn't exist on the retail Nexus One I received - I originally got a shell on it by using adb from my Mac and did some exploration then. This exists in Paul's hacked ROM and all commands diverted to busybox - presumably later native compiles of CLI apps like nmap etc. (which would be handy :) ) will be possible. I haven't explored the toolchain in detail yet, and my C coding skills are rusty as hell. Secondly, there's no sodding /etc/passwd file - all the commands in the busybox app I'm trying to run at the moment fail with 'unknown uid 0'... obviously once logging in via SSH, the first thing I wanted to do was change the root password, but many of the busybox apps fail with the same error. I know what Linux normally looks like... what's going on with /etc on the Android platform? How the hell are multiple users supported - busybox and all normal Linux apps will presumably be consulting /etc/passwd for UIDs and GIDs but it doesn't exist... equally I've been told the disturbing news that there are no glibc libraries on the Nx1... I think I need a basic primer on the differences between Android and Linux... this thing is *alien* to me, it's less like Linux than OS X is, and that's saying something... either that or I'm a retard (I haven't read all the FAQs yet, sorry everyone). Again sorry if this has been covered elsewhere but now the devices are turning up at peoples' doorsteps, a lot of old iPhone hackers are going to be playing with these things, and Android on the Nx1 is, frankly, weird - it's like half of Linux has been thrown away. And those bits are useful... Fundamentally, to make this usable for me, I need secure IMAP email and SMTP to work (the problem is that the Nx1 is failing TLS negotiation... but that's a different thread) and I suspect I may need to make it work myself. And that means getting the toolchain working, and trying to write code again :) or more likely, just fix the existing bugs / replace removed functionality. Anyone got any quick overviews for the CLI-level hacker... And hello to everyone, this appears to be a *very* useful site. Apologies for the username, I'm 'cyberface' everywhere else on the net but someone's already taken it...
Guest catfesh Posted January 24, 2010 Report Posted January 24, 2010 Well in the absence of replies, I'll reply to myself :) The problem with IMAP email with the standard client was that TLS negotiation didn't seem to work, and even if a TLS session was established, the phone wouldn't authenticate using CRAM-MD5 which is the standard authentication method on my email server (Cyrus IMAP). There was a recent update to K-9 (yesterday evening) which now added the option to authenticate (after TLS) using either PLAIN or CRAM-MD5, and this fixed the problem. I now have IMAP email on my Nx1 and it's no longer a toy, it's a usable smartphone. There still are problems with the mail client - there appears to be a problem with the EXPUNGE command which fails with 'permission denied'. So I can delete a bunch of emails from my INBOX on the Nx1, but on my main workstation or laptop (both connected to the same email server), the mails remain in the INBOX. The 'Deleted Messages (Trash)' mail folder on the Nx1 has a line underneath it saying 'Command: EXPUNGE; response:' i.e. no response. The K9mail-errors 'special' mail folder (which doesn't appear on any other machine so can't be set up on the server itself) reports a load of errors regarding the Outbox not existing, and that Expunge fails due to 'permission denied'. If I find a workaround I'll post it here. The main issue for me with the Nx1 is simply that, as a smartphone, I need it to handle email well. I'm coming from all of the iPhones so they're the benchmark. The Nx1 keyboard is nicer to use and generally more accurate than the iPhone keyboard, and for basic business use, the new 'working' K-9 mail client is nicer than the iPhone one, allowing separating folders into different classes for different rates of refresh, and push available on a per-mailbox setting, which is finer control than the iPhone. I haven't tried the media integration that the iPhone does well (e.g. mailing a photo from the camera app, etc.) as I'm primarily a business user but getting the basics right before the eye candy is my approach... and not one the Google developers seem to be taking :D Even though the bugs initially made me think the device was going to be useless - given how quickly the authentication problem was fixed in K-9, I'm guessing it's not going to be long before the Nx1 is going to be getting near the iPhone's usability. The hardware is already better (in most respects) - it's just a question of debugging and polishing the software. I'm liking it though B)
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now