HTC Incredible S – Fix for Bootloader saying “Security Warning”

I had this infamous issue where I was stuck with my phone unable to boot for 2 days. I documented everything I learnt so others might find it helpful and as usual, it’s on XDA for all nicey goodness :)

You would want to read this post either because you have already seen this issue and want a fix or haven’t seen the issue yet and want to avoid it. This tutorial has information on how to fix the bootloader Security Warning issue and how to avoid it.

http://forum.xda-developers.com/showpost.php?p=16684717&postcount=38

Did you like this? Share it:

Rooting HTC Incredible S with Revolutionary

AlphaRevX totally revolutionized the S-Off scene for HTCs everywhere a few months back. I wrote a bunch of posts on XDA-Dev which showed people how to use it. But AlphaRevX doesn’t work on all software versions. One such version was 2.30.x which I was stuck on. I can now confirm that Revolutionary (formed by team unrevoked and team AlphaRev) does work on this version too. Really simple to use.

  1. Go to revolutionary.io and download revolutionary for your OS (Windows/Linux)
  2. Enter the details they request for to get your beta key. It’s pretty straight forward. You should know your phone version. Your HBoot version is available by you switching off your phone > turning it on with vol down pressed. Your Serial number is on your phone box/behind the battery.
  3. Turn off fastboot for your phone
  4. Turn on developer mode for your phone
  5. Make sure you have HTC Sync drivers but no HTC Sync i.e. install HTC Sync and then uninstall the software leaving the drivers on your system
  6. Connect your phone to your PC and run revolutionary.exe on your phone
  7. Enter your beta key and enjoy ;)
The reason why AlphaRevX didn’t work for some versions was because HTC patched GingerBreak which is what AlphaRevX used to get temp root then run it’s magic before giving you S-Off.
Take that HTC!
Did you like this? Share it:

File list generator v1.1

On a lazy Sunday afternoon when you’ve got nothing better to do, you either write rather useless scripts or update them. I chose to do the latter.

The file list generation script I wrote some time back was mainly to generate a list of movies I have. When I generated a list of all the HD movies I have on disk, I realized, my list was being ruined by loads of sample files which escape the file filter because they are the same extension as the videos themselves. So I decided to write a simple fix to remove all files with “sample” in it. Of course, this is activated by a command line switch which is by default off. The extension list now ignores all images (pngs, jpgs and bmps) so my file list no longer has any screen shots.

Here’s a couple of sample script calls

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command& ‘C:\Users\Karun\My Scripts\filelist.ps1‘” “H:\Movies\HQ
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command& ‘C:\Users\Karun\My Scripts\filelist.ps1‘” “H:\Movies” “true
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command& ‘C:\Users\Karun\My Scripts\filelist.ps1‘” “H:\Movies” “true” “true

The first one will call on the script and generate an output. The second will do so recursively. The third one will ignore all files with the word “sample” in them. Simple enough? Go get the code and have fun with it!

View Script Source Code | Download Script Source Code

If you’re having trouble executing the script, you should consider signing your PowerShell scripts. Scott Hanselman has written a great post on how to do so. Go read it! You could simply Set-ExecutionPolicy to Unrestricted but then you’d be leaving your system open to attacks. Don’t blame anyone but yourself if you run someone else’s unsafe code and screw something up :) You have been warned :)

Did you like this? Share it:

Clean File List Generation with PowerShell Script

I have a whole load of movies that I’d like to generate a list of. I considered writing a batch script but it didn’t really do something I needed. I ended up writing my first regular use (non test) PowerScript and here’s how.

My first requirement was to list all my 1080p movies and for the list to leave out all the subtitles. So I was looking for a function to list files (dir in command prompt did that :)) and then remove files by extension. As it turned out, I could list files of a certain extension but not leave out files by extensions. Finally, I had to write the result to file (simple enough to do in command prompt. Use the > operator to direct output of the previous command to a file) So, a quick fix would be to use something like

dir *.avi *.mp4 *.mpg *.mpeg *.mkv /B /O N

For sub-folders, you can use tree and fiddle around the options but lets face it, as programmers, we want better solutions.

Since the launch of Windows 7, Microsoft has shipped PowerShell with the OS making it much more “main stream”. I had played around with PowerShell a couple of years ago when version 1 came out but I thought it was time that I actually made a regular use script.

The core of the script is using get-childitem to get all files and folders in a directory. From there, you can make it go recursive (and look inside sub directories) with a -recurse switch. Little bit of piping allows you to eliminate results you don’t need. For this, I wrote a simple function.

function fileCheck([string]$extention, [string]$attributes) {
# list of rejected extentions
$exts = “.srt”,”.sub”,”.idx”,”.txt”,”.lnk”

return $exts -notcontains $extention -and $attributes -ne “Directory”
}

As you’ve probably figured out, this function ignores those file extensions and directories as well from our final file list.

Once you have the list, you can either use $object.Name for full name (ie file name with extension) or $object.BareName for only the file name. On reading the source of my script, you’ll see I’m using both and also writing a count of the number of files in a file named list.txt. The first part of the file is a human readable list for your consumption using new lines for separation. The second is a single line output of all files using commas for separation and containing a file count at the end. The latter is simply for copy pasting into chats (like IRC) where you can’t spam with a huge multi-line list.

I went on then to add more code to handle command line inputs so that you can make shortcuts from folders and call the script. I have attached a couple of sample script calls

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command& ‘C:\Users\Karun\My Scripts\filelist.ps1‘” “H:\Movies\HQ
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command& ‘C:\Users\Karun\My Scripts\filelist.ps1‘” “H:\Movies” “true

The first one will call on the script and generate an output. The second will do so recursively. Simple enough? Go get the code and have fun with it!

View Script Source Code | Download Script Source Code

If you’re having trouble executing the script, you should consider signing your PowerShell scripts. Scott Hanselman has written a great post on how to do so. Go read it! You could simply Set-ExecutionPolicy to Unrestricted but then you’d be leaving your system open to attacks. Don’t blame anyone but yourself if you run someone else’s unsafe code and screw something up :) You have been warned :)

Did you like this? Share it:

First hand at F#

With the release of the first beta of Visual Studio 2010 which includes support for F#, it was only a matter of time till I tried my hand at it.

I don’t go for Hello World programs. Apart from C, the first code I’ve written in every other language (since I heard this question) has been the same. Keeping up tradition, here’s the F# port.

let Check (x: int) = float(int(sqrt(float x))) = sqrt(float x)
for x = 32 to 99 do
let sqVal = pown x 2
if (Check(sqVal / 100) && Check(sqVal % 100)) then
System.Console.WriteLine(sqVal);
done

This code aims to find every 4 digit number that is a perfect square whose upper and lower two digits are both perfect squares. This question was part of my sem 1 C paper and got me a 0/10. Clearly the examiner didn’t understand my answer. :P In honor of the great act of stupidity on my side (of writing such a solution in an exam), I recreate this in every concievable language as my first code :)

This is my first piece of code in a functional language so if I could have done this better, please let me know. Now to try out Haskell :)

A note about the VS 2010 F# editor. I know its not meant for performance but compiling clearly takes a couple of seconds. The IDE also could do with a bit more work with its intellisense because it didn’t like remembering System.Console and instead searched for the string everytime meaning I would hit System.Configuration instead (I am used to hitting enter after ‘Con’ due to C# :))

Did you like this? Share it:

[Release] RSWC 1.00

My new laptop is a work box and doesn’t inherit the obsessive compulsiveness of File naming and sorting that my desktop hard disks have. I have, for this reason, dumped all wallpapers which are applicable to be used with my desktop (wallpapers with aspect ratio 16:9) into my “My Pictures” folder. Randomly, I have an urge to change the wallpaper and I really don’t want to go select one. So I thought I should have something that would change my wallpaper to a random image. I tried finding something but most such applications were installables and would change the wallpapers after periodic time intervals, something i didn’t want.

Thus was born the Random Selection Wallpaper Changer (RSWC). An extremely simplistic, single exe application that does what is required.

Default Values:

  • RSWC takes images (bmp, jpg, png) from the user’s My Pictures folder.
  • It sets this image as your desktop wallpaper using stretched mode.

Pre-Requisite: A pre-requisite is that you have .NET 2.0 installed on your machine.

Future Plans: The exe is 416kb, something I wish to reduce. I might rewrite the code in C++ to get rid of the .NET dependency (despite Microsoft claiming .NET is common enough to no longer be a  “requirement” and even reduce the file size. Also, I might contemplate creating a light weight application to change wallpapers at regular time intervals as well. (People requesting for such things would certainly compel me. I’m not motivated to do this for personal usage :))

If someone requires it, I might work a way in to set the source folder and mode of setting the wallpaper and still keep it portable and single filed. I could write to registry but that isn’t really portable in my opinion. Ideas/Suggestions/Feedback/Advanced Critique is always welcome ;)

Known Limitation: Setting png wallpapers sets the desktop to a plain coloured background (your default background color) because Windows doesn’t support png wallpapers. It converts pngs into jpgs and then applies them and I shall do the same in the next update.

Download: Random Selection Wallpaper Changer (RSWC) v1.00 (416 KB)

Did you like this? Share it:

Team SKAN: Enpower

Its been a long road going through the SDI National Finals where we came second, going to IIM-A where we got project incubation and then finally to the World Finals where we won the interoperability award. Along the way, we made lots of new friends and learned a whole lot more.

Here are a few related posts on my blog: Imagine Cup 2008 World Finals and Imagine Cup 2008 Gallery. Be sure to check out the latter post which has never before seen footage.

Another announcement to be made is that the development for my custom CMS j@x has been put to halt indefinitely due to shortage of time. As have a few other projects like Scribble Scrabble. Some of them, I’ve signed over control to other AXIS members while others (like PHPIRCBot) shall be released in their current state. This decision had to be made considering my schedule over the past year only keeps getting busier and busier.

Next month, I’ll make sure I tell the world about a few products I have under development and others I have ready in my garage ;) The releases include DarkLight, PHPIRCBot and a brand new CountPrime.

Did you like this? Share it:

WhatPulse data parse class

On 10th of December, 2008, 2 days before my Computer Networks paper I made a WhatPulse class in php to get data from the WhatPulse WebAPI for you to work with. With the information at your finger tips make a forum signature, why don’t you? ;)
I’ve added a few functions to the class and written a small example for people to use. Most people must have it already because the WebAPI came out around 2 years ago but in case there is someone who doesn’t have caching of the WhatPulse data then this is useful.

Caching of data means lesser resources used by your php script to
a) Read from the WhatPulse server.
b) Write to the server’s hard-disk.
c) Use the server’s tubes (even though the xml is less than a kilobyte).

So what are you waiting for? Go have a look ;)
WhatPulse.class.php on svn
WhatPulse_example.php on svn

My WhatPulse profile

PS: This whole thing started with me updating to WhatPulse 1.5b1 after noticing that the WhatPulse team wasn’t going to release any more betas any time soon and the fact that I am currently 18th in the world :-o! (in keystrokes)
More such releases to come soon. I’m planning to have a collection in the dev section. I make tons of useless scripts in php. Might as well put them up just in case someone finds them useful ;)

Everything written in this post except this line and the first line were written 2 months ago. I just didn’t put it up for so long :-(

Did you like this? Share it:

Uptime Challenge

There is a Plus! scripting competition going on that the entire community knows about. With t-shirts for all participants, there have been over 70 entries in 3 weeks. There are only 4 days to go so despite my exams, here is my shot at the competition.

I don’t want to give away much right now but all I can say is its a project that uses JavaScript, Delphi, PHP and mySQL. I don’t think any other script uses all 4 so far. Of course I have my favourite Boca Juniors fan doing the Delphi hax.

Soon you shall see the update on the dev page. But for now, its over and out.

Update: The script was uploaded just in time for the competition. Go check it out ;)

Update (14/07/2011): This script is no longer supported. All the server side code has been managed out.

Did you like this? Share it:

New beginnings

Here it is, the launch of my new site. What is to come, you shall see. I’ve been working on this despite my exams going on cause i wanted to complete this project. I’ve wanted to do this forever now.

Thanks to dt and segosa for their help over the past few days. I may add a new interface but I’d like to keep this one for now, its my first creation from scratch. It will stay at least till the end of exams.

This is going to be different from Jatonian Life How exactly, you ask? Wait and find out ;) I have great things planned for j@x.
Yeah I do need to add rss support. Apart from that and a few repeated calls, I’d say this blog is pretty streamlined. At 12.8 KB (13,151 bytes) including the installer, I’d say its pretty impressive for my first project. I think optimisation could bring it to around 11kb but lets leave that for a rainy day.

Did you like this? Share it: