Stefan Rusek | How to root your Nexus 7 in seven easy steps

How to root your Nexus 7 in seven easy steps

Sunday, August 26, 2012

No fluff, just easy steps that my old man can follow. (Actually, I’m writing this specifically for my old man! Winking smile) The steps below also work for rooting a Galaxy Nexus, except you should use the Galaxy Nexus version of the TWRP ROM.

What you need

  • Nexus 7 (the one you want to root)
  • Computer (most of the rooting process will be done from the computer
  • USB cable (to connect the Nexus to the computer)

Steps

  1. Download and extract drivers and such.zip on to the computer
  2. Backup the stuff on your Nexus, that you want to keep and make sure your Nexus is fully charged.
  3. Copy CWM-SuperSU-v0.95.zip to your Nexus
  4. Boot your Nexus into the boot loader
    1. [Nexus] Turn your Nexus off
    2. [Nexus] Hold down both the volume buttons and while keeping them down press the power button. Keep the buttons held down till you see an Android this its chest open, and at the bottom of the screen it should say in red, “FASTBOOT MODE”
  5. Switch your boot loader into S-Off mode – This will allow you to install custom ROMs.
    1. [Computer] Install the Android fastboot drivers on your computer.
      1. In the usb_driver directory, right click on android_winusb.inf, and click Install
      2. Plug your Nexus into your computer. The drivers should install.
    2. [Computer] Open a command prompt in the fastboot directory
    3. [Computer] Type “fastboot-windows oem unlock”
    4. [Nexus] Your Nexus screen should prompt you to wipe your device, choose yes.
  6. Install a custom recovery ROM.
    1. [Nexus] When it is done, boot back into the bootloader.
    2. [Computer] Type “fastboot-windows flash recovery openrecovery-twrp-2.2.1-grouper.img”
  7. Install SuperSU (after this step you’re officially rooted)
    1. [Nexus] While in the boot loader press the volume down button till it says “Recovery Mode”, press the power button.
    2. [Nexus] Once TWRP has booted, tap “Wipe” then tap “Dalvik Cache”
    3. [Nexus] Swipe to wipe
    4. [Nexus] Tap back, then tap the back button
    5. [Nexus] Select “CWM-SuperSU-v0.95.zip” (Which you copied over in step 2).
    6. [Nexus] Swipe to confirm flash
    7. [Nexus] Once it is done flashing, reboot

Stefan Rusek | Using Razor with ASP.NET MVC in Four Easy Steps

Using Razor with ASP.NET MVC in Four Easy Steps

Saturday, July 17, 2010

I love Scott Guthrie’s blog, even though he is always taunting us with awesome new stuff. Recently, he posted about Razor, which is a new view engine for ASP.NET MVC. Normally views in ASP.NET MVC are just .ASPX files without codebehind files. This works decently well, because it turns out that ASP.NET is better than you’d think as a template language. That said, it could be a lot better. Since the release of ASP.NET MVC, several people have written alternatives to the default WebForms view engine (Spark, NHaml, even me). Razor is Microsoft’s attempt to create a view engine that better fits the needs of MVC developers than the WebForms engine. You can read all about it on Scott Guthries’s blog and on the WebMatrix Razor site. At work we use the WebForms engine, and we would love to switch to something that doesn’t require a web server. While the Xronos view engine would fit our technical needs, I am the first to admit that Xronos isn’t something I want to force on my coworkers. So, Jacob (the other lead developer) and I were pretty excited to read about Razor.

Of course, Microsoft has yet to actually release a CTP for using Razor in MVC, but they did release the Razor engine as part of the latest WebMatric CTP. I had a hunch that there might be enough pieces to put together something that works in MVC, and I was right! Below are the minimum steps needed to get it running for yourself.

Step 1:

Download and install WebMatrix. http://www.microsoft.com/web/webmatrix/download/

After it is installed the Razor files are in the GAC, but I wanted to make it so that I could just install my web app on my server and not have to mess with installing WebMatrix everywhere, so I copied the file dlls from C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\Assemblies (C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\Assemblies on 32bit Windows) to a directory in my source tree.

Step 2:

Add the following dlls to your web project.

  • Microsoft.Data.dll
  • Microsoft.Web.Infrastructure.dll
  • Microsoft.WebPages.Compilation.dll
  • Microsoft.WebPages.Configuration.dll
  • Microsoft.WebPages.dll
  • Microsoft.WebPages.Helpers.dll
  • Microsoft.WebPages.Helpers.Toolkit.dll

You will also need to add a reference to Microsoft.WebPages.Configuration.dll in your web.config file:

<compilation debug="true" targetFramework="4.0">
  <assemblies>
    <add assembly="Microsoft.WebPages.Configuration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
  </assemblies>
</compilation>

You probably already have a few other assemblies list, so just add the <add /> tag to the end of the list.

Step 3:

Since the WebMatrix release lacks the needed Razor=>MVC dlls, you’ll need a RazorViewEngine, here is one:

public class RazorViewEngine : VirtualPathProviderViewEngine
{
    public RazorViewEngine()
    {
        MasterLocationFormats = new[] {"~/Views/{1}/{0}.cshtml"};
        AreaMasterLocationFormats = new[] {"~/Areas/{2}/Views/{1}/{0}.cshtml"};
        PartialViewLocationFormats = ViewLocationFormats = new[] {
            "~/Views/{1}/{0}.cshtml", "~/Views/Shared/{0}.cshtml"};
        AreaPartialViewLocationFormats = AreaViewLocationFormats = new[] {
            "~/Areas/{2}/Views/{1}/{0}.cshtml",
            "~/Areas/{2}/Views/Shared/{0}.cshtml"};
    }

    protected override IView CreatePartialView(
        ControllerContext controllerContext,
        string partialPath)
    {
        return new RazorView {ViewPath = partialPath};
    }

    protected override IView CreateView(
        ControllerContext controllerContext,
        string viewPath, string masterPath)
    {
        return new RazorView {ViewPath = viewPath};
    }

    private class RazorView : IView
    {
        public string ViewPath;

        public void Render(ViewContext viewContext, TextWriter writer)
        {
            var pc = new WebPageContext();

            const BindingFlags bindingFlags = BindingFlags.SetProperty
                | BindingFlags.Instance
                | BindingFlags.NonPublic;
            typeof(WebPageContext).InvokeMember("HttpContext", bindingFlags,
                null, pc, new[] {viewContext.HttpContext});
            typeof(WebPageContext).InvokeMember("ViewContext", bindingFlags,
                null, pc, new[] {viewContext});

            var wb = WebPageBase.CreateInstanceFromVirtualPath(ViewPath);
            wb.ExecutePageHierarchy(pc, writer);
        }
    }
}

Step 4:

Register the RazorViewEngine from the same place you register your MVC routes.

protected void Application_Start()
{
    RegisterRoutes(RouteTable.Routes);
    ViewEngines.Engines.Add(new RazorViewEngine());
}

Here are some things that either don’t work right yet or you may need to change.

  • Html.BeginForm() and Ajax.BeginForm() do some tricks with the HttpResponse object, and Razor doesn’t quite support it, so these methods don’t work like you want. Luckily, Html.BeginForm() is easily replaced by <form action=”@Url.Action()” method=”POST”>.
  • Razor uses its own HttpApplication class, so you may need to change the base class for you Global.asax file.

Have fun!


Stefan Rusek | Kanban FogBugz Plugin v2.0.3.7

Kanban FogBugz Plugin v2.0.3.7

Monday, March 22, 2010

This weekend the latest version of the Kanban plugin for FogBugz went live. This is the first time I've blogged about the plugin for a few months. The current version has a lot of bug fixes, but it also has some cool new features. Some of these new features were inspired by my talks with people at the Open Agile Northwest Conference in February.

Multiple Simultaneous Editors

Originally, I only invisioned having one person edit the board at a time, but almost immediately after we started using it at icanhascheezburger.com, it became clear that my assumption was bad, and people would commonly accidentally squash one another's changes. The latest version allows multiple people to edit the board at the same time, and will automatically sort out conflicts. Additionally, it will automatically reload the board if someone edits the board, so you don't need to worry about seeing a stale version.

Custom Colors

Often, when a physical Kanban board is used, people will use certain colors of post-it notes to mean specific things. One of the really powerful aspects of Kanban is that people decide what the colors mean for the way they are using the Kanban. To better support this, you can now easily add your own colors, and name them something meaningful for your Kanban.

Kanban Metrics

Kanban, like all agile development methodologies, has at its core the ability (no, requirement) to evolve over time to improve your development process. (If you aren't constantly tweaking your process, then you aren't being agile.) In order to understand what is happening on your board (and hence your process), it is important to understand how items are flowing across your board. The latest version of the plugin tracks items as they move across the board and provides some statistics on what has happened, making it easier to see where your bottlenecks are and to understand your flow. These reports will almost certainly evolve over time, but they should be pretty useful in their current state.

I am really excited to see 2.0.3.7 on FogBugz OnDemand, and I look forward to getting feedback on what is working and what can be improved. The plugin is a free download.


Stefan Rusek | Seventh-Day Adventist Sabbath School Quarterly for Android

Seventh-Day Adventist Sabbath School Quarterly for Android

Friday, March 19, 2010

Today, I released a Sabbath school quarterly app on the Android Market. I’ve been using it on my phone for the last few weeks, and it makes keeping up with the lesson tons easier. If you are an Adventist with and Android phone (or other android device), then totally check it out.

It let’s you take notes, and it remembers the notes so they are easily accessible later when you are taking part in the discussion during Sabbath school.

Capture Capture2

Scan the bar code below to download it to your phone.

ssqcode


Stefan Rusek | Kanban v1.2009.8.22

Kanban v1.2009.8.22

Monday, August 24, 2009

Over the weekend, the latest version of my Kanban Board plugin for FogBugz became available for use in FogBugz OnDemand. The new version has a lot of bug fixes and cool new stuff. Over the last month, I’ve got a lot of positive feedback. From the feedback and feature requests, I’ve been able to get a better idea of how people are using my plugin. As a result, the new version should fit a lot more peoples needs an make working with cases that much easier.

New Cases

Creating a new case

There is now a option to create a new case in the column dropdown menu. It pops up a New Case dialog. Setting the properties will seem very familiar if you have used FogBugz search axes. In the above example I typed: title:”Rocks!” project:”Kanban” assignedto:”Stefan”. This will create a case in the Kanban project that is assigned to me and has the title “Rocks!”.

Filter Options

Setting filter options

By far, I’ve had the most requests for either personal kanbans or single project kanbans. This was kind of tricky given that I wanted to keep the UI simple and understandable. I feel like the new solution to this problem will make a lot of users happy. If you click the Filter Options button the above dialog will show up.

As you use FogBugz, you end up with more and more closed cases. This is generally a very good thing, but most of the time you don’t want to see them in your kanban. In the past you could only remove them from the kanban, but this isn’t always desireable. Now you can click the “Hide Closed Cases” box and they disappear without loosing any data.

If you have multiple projects, then your kanban can start to feel cluttered with cases from other projects. You can now select a specific project and see only the cases in that project.

You can also filter by who the cases are assigned to. This is a handy way to see what cases you are working on.

The dialog is draggable so you move it out of the way of the kanban view and change the options and see the results instantly. Your options are saved so the board will look the same when you return.

Give it a try!

You can find the plugin at http://www.fogcreek.com/FogBugz/Plugins/plugin.aspx?ixPlugin=15. you can install it on your own FogBugz install or you can install it into your FogBugz OnDemand account. There is a handy feedback link inside the app, so you can complain to me about stuff or even tell me how useful you find it. Either way, I will be glad to hear from you!

Page 1 of 5 Next >