Wednesday, 5 May 2010

iPad is NetBook Killer

The king is dead, long live the king!  Say goodbye to the NetBooks, that whole class of machines is dead. The iPad may not kill them off, but future iPads and all the clones that will eventually follow definitely will. Is the PC the next to get bumped off? Not right away, but in the long run, yes.



I have been using the iPad for about a week now. This device is a game changer. For about 90% of the population, it will do everything they need.  Surf the web. Check. Get e-mail? Check. Manage your finances with Quicken?  Eventually, check. Manage your social networks? Check. Play your music and videos? Check and Check. Do simple word processing and document creation? Check.



At its core, the iPad is a web browsing and media playing device. It does both those things exceedingly well. Download speeds are fast and pages look good. Its amazing how much better it is to surf using your finger rather than a mouse. Plus the portability allows me to do this anywhere, anytime. Think about it, can you use a netbook while standing up and drinking a coffee?  Also, the battery seems to last forever. In the week I have had it, the iPad still has not needed a recharge.



But it is not all rainbows and unicorns. There are a few things missing from this first generation device. First, you still have to physically sync it with a PC or Mac that has iTunes to load apps, music, photos, and video on the device.  That is fine for now, but in the future, all that stuff should be stored in the cloud. The other glaring omission is the ability to print. Its cool that you can do word processing and spreadsheets, but the device is still heavily reliant on the PC for this sort of thing.



In two or three years, devices like this will dominate the mobile computing environment. It will be interesting to see if the iPad or its clones, that are sure to follow, will prevail in the end. Whatever happens it going to be very interesting the next couple of years.

Third Party Toolbars are Feces



What is it about Windows, Internet Explorer, and 3rd party toolbars?  The last few days I have been having trouble getting IE to start. It was hanging every third time or so when it started. And once it started, it was kinda slow.



I really needed IE for work so I decided to try and fix the beast. So I removed the Bing/Live toolbar and my AVG toolbar. Guess what?  IE loads in a second, doesn't crash, and isn't slow any more. I'm shocked, shocked that this solved the problem! :)

Umbrella with device detection is now in beta

Edit: Fixed a few random exceptions that would cause the app to be unable to detect devices. (VERY rare but still possible)



Edit: Re-added iPod Touch 2G support. Also added model number to the detection label at the bottom of the window so iPod Touch users can better tell if they need to save their SHSH or not (MC ipot touch 2g MUST)





Edit: I've gotten it working now with all versions of iTunes > 9.0. Windows x86 and 64 bit are supported, OSX is supported. (Vista, XP and Windows 7 are all confirmed working).



This is RC1. I'm going to work on any bugs you guys find and RC2 will have linux support. Final will fix any linux bugs and should be fully functional.





As a note I *MAY* support 64bit java on windows through a bridge or using libimobiledevice. We'll see...



Edit: I've been working on bug fixing and currently all I have left is getting iTunes 9.1.x working. Windows 64 will not work until I write some form of bridging code. And after this initial release I'll get right to work on the linux version... which I promised @posixninja :P



I've finished implementing the device detection logic for Umbrella. I've kept the codebase in java simply because I'm lazy and don't feel like porting all of that code to c AND maintaining 4+ versions for each operating system.



The first thing you'll notice in the zip is that the source and supporting files are not in there. The fact is that the support files are huge. The zip file was over 10mb with them in it. So I've stripped it down to just the umbrella.exe and umbrella.dmg (and tinytss.exe which is unchanged for now).


This beta will only support windows and mac (linux is in the works). Even further, it only supports 32 bit java. I've gotten some nasty errors on 64 bit java in windows and before I do a full release I want to make sure those are ironed out. I'm not 100% sure this will work on windows 64 with a 32 bit java JVM but by all means give it a try.


This new version is very simple. Here's a screenshot:
As you can see it doesn't get much easier. When you start the app it will tell you to connect a device.


Once the device is connected you will be able to get your shsh for 3.1.3/3.2 depending on your device.


That's it (for most users).








For the rest of you there are 'Advanced Options' which is nothing more than the options you used to have.


If a device is connected, the ECID field will be populated for your convenience. Or if you want to get the SHSH for another device, enter it like you did in the old version.


Please remember this is beta. I'm only realeasing it because I think it works "OK" not perfect but definitely well enough that most people will be able to work just fine. In fact I've personally tested it on OSX, Windows 7 (32 bit) and Windows XP (32 bit) and have had no problems.


There are some requirements in order to get the detection to work.


  1. You must have iTunes > 9.0 installed and (I've received at least one report that win 7 64bit with 9.1.1.11 iTunes works)

  2. You must have java jdk 1.5 or higher.

  3. For the Windows version you need to be able to run it as administrator because I read the registry for the native library locations.

  4. You must not be using 64 bit java (Windows only)

  5. 64 bit windows is OK as long as you are using 32 bit java.

I think that about sums it up. Save those SHSH files!

Tuesday, 4 May 2010

How to install sun-java6-jdk on Ubuntu 10.04 LTS?

For the just released Ubuntu 10.04 LTS, the sun-java6-jdk packages have been removed from the Multiverse section of the Ubuntu archive. So you cannot install it using the command sudo apt-get install sun-java6-jdk!!!

In order to install sun-java6-jdk on Ubuntu 10.04 LTS, You can configure Ubuntu 10.04 LTS to use Canonical Partner Repository via command-line:

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"

Then, Update the source list:

sudo apt-get update

Finally, you can install sun-java6-jdk using the command:

sudo apt-get install sun-java6-jdk

Monday, 3 May 2010

Delete an Application from the iPhone and iTunes



How do you delete an application from you iPhone?  Well most folks will say that you need to do the following:



  1. Hold down you finger on the application icon for two or three seconds until the icons begin to bounce around.

  2. Click on the X in the upper left corner of the icon.

  3. Confirm the deletion of the application

Now the application is gone, right?  Wrong. This removes the application from the iPhone. However, the application is still just sitting in iTunes. If you connect up your iPhone and look at the Apps tab, there it is. You can choose whether to the application syncs or not, but you can't delete it. What do you do?


To actually delete applications off the iPhone and iTunes, click on the Apps icon under Library in the left control pane for iTunes. You should see something like this:


This is the list of installed applications. Just click on the icon of the application you want to delete, hit the delete key, and it will be deleted from both. Gone for good. Woot!




The SpiritJB Release

SpiritJB has been released! Congratulations to @comex, chronic-dev, and all others that were involved. Hats off to you all!



If you're looking for Umbrella the link is on your right.



I wanted to update Umbrella & TinyTSS but with the Spirit Storm I couldn't, in good conscience, update with the risk of breaking the app. The last thing I wanted was to leave thousands of people stranded. So far almost 120k downloads have been registered for fw-umbrella. Wow.



Ok so for the next couple weeks I'm going to be working on a major rewrite of the app. It's been a long time since I've written anything in C from the ground up so bear with me. v222 of fw-umbrella is stable and should keep us all holding onto our local shsh files until 4.0 os ships. I want to have the rewrite finished before 4.0 is out the door.



It's looking like 4.0 is going to ship around the release of the new iphone along with a fairly major iTunes release. This iTunes release will have code that will read a new key in the shsh responses. This key will be verified in iTunes itself to determine if the shsh can/should be used. The importance of this is that iTunes currently does very little checking of the shsh that is returned by the TSS server (apple, saurik, or tinytss). This 'feature' will allow apple to stop us from restoring our idevices to 'disallowed' os versions. What's worse is that their intent is to put this new-key reading code in the bootrom of the new iphone coming out this summer. This will enable them to stop restores on the device (above and beyond the current shsh check).



Beating this system will take a lot of work and patience. I hope to [re]write firmware umbrella in such a way that I don't have to rewrite it again after 4.0 comes out.

Friday, 30 April 2010

A simple RSS reader, in ListView

In the last exercise, "A simple RSS reader, using Android's org.xml.sax package", the RSS's titles are displayed as a single String. For sure it's not a good presentation in this way.

In this article, it will be modified to display it in ListView.



AndroidManifest.xml to grant "android.permission.INTERNET" to the application. (Refer to last article "A simple RSS reader, using Android's org.xml.sax package")

In order to use ListView, create a new file, /res/layout/rsslist.xml
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/rowtext"
android:layout_width="fill_parent"
android:layout_height="25px"
android:textSize="10sp" />


Modify main.xml to have a ListView
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
<ListView
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TextView
android:id="@android:id/empty"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="No Data" />
</LinearLayout>


Modify AndroidRssReder.java
package com.exercise.AndroidRssReader;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;

import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.DefaultHandler;

import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;

public class AndroidRssReader extends ListActivity {

private List<String> item = new ArrayList<String>();

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

try {
URL rssUrl = new URL("http://feeds.feedburner.com/Android-er?format=xml");
SAXParserFactory mySAXParserFactory = SAXParserFactory.newInstance();
SAXParser mySAXParser = mySAXParserFactory.newSAXParser();
XMLReader myXMLReader = mySAXParser.getXMLReader();
RSSHandler myRSSHandler = new RSSHandler();
myXMLReader.setContentHandler(myRSSHandler);
InputSource myInputSource = new InputSource(rssUrl.openStream());
myXMLReader.parse(myInputSource);

} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ParserConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SAXException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

ArrayAdapter<String> itemList = new ArrayAdapter<String>(this, R.layout.rsslist, item);
setListAdapter(itemList);
}

private class RSSHandler extends DefaultHandler
{
final int stateUnknown = 0;
final int stateTitle = 1;
int state = stateUnknown;

@Override
public void startDocument() throws SAXException {
// TODO Auto-generated method stub
}

@Override
public void endDocument() throws SAXException {
// TODO Auto-generated method stub
}

@Override
public void startElement(String uri, String localName, String qName,
Attributes attributes) throws SAXException {
// TODO Auto-generated method stub
if (localName.equalsIgnoreCase("title"))
{
state = stateTitle;
}
else
{
state = stateUnknown;
}
}

@Override
public void endElement(String uri, String localName, String qName)
throws SAXException {
// TODO Auto-generated method stub
state = stateUnknown;
}

@Override
public void characters(char[] ch, int start, int length)
throws SAXException {
// TODO Auto-generated method stub
String strCharacters = new String(ch, start, length);
if (state == stateTitle)
{
item.add(strCharacters);

}
}

}
}


Download the files.