Sunday, November 6, 2011

Iphone 4 and unlocking it..

This is a pretty sad story of me ending up using a costliest ipod ! I thought of sharing it with everyone so that the same mistake can be avoided in future.

images

If you are owning a brand new IPHONE 4, I mean a locked one and if you are trying to unlock it.. Then never go for a software update ! If you wish to upgrade your OS to iOS5, then there are some special steps that you need to do. This is called as “preserving BASEBAND”. In Iphone’s terms, BASEBAND plays a vital role.

What’s a baseband ?

Baseband is something associated with the cellphone’s antimages (3)enna, or say a firmware for the gsm modem. So what does it do ? The iphone’s baseband will take over all the functions associated with the sim card and an antenna. Using this you can a send  text msg, make a call, pick the right signals from the towers etc., Baseband has some link to the bluetooth and the WiFi too which I am not pretty much sure !

 

 

route-retina-20100607

Now how does your baseband get updated when you update your OS?

Well, whenever apple does an update there will be two separate  updates. One is for the baseband firmware and the other is for the OS, both are two different updates but happens the same time. Once you update the baseband, and then there is no way (so far) to downgrade it. Where as, you can downgrade the OS if apple signs the lower versions of it. Which means, when u do an OS upgrade from 4.3.5 to 5 and at the same time if your baseband goes to 4.11.08 from 01.59.00 .. you can get back to 4.3.5 but your baseband remains at  4.11.08 only ! if some one tells you that baseband can be downgraded, plz don’t enter that site it’s a scam for sure.

If they are two different updates, can we ignore the BaseBand and just update the OS alone ? (preserving the baseband)

Yes, you can. And this is what you should have done first case. At first preserving BB was only possible from a MAC machine, ie., we are supposed to create a custom firmware from the stock firmware. By doing this, the BB update present in the stock firmware will be removed in that custom firmware which you have created now. And using the shift+resore option from the iTunes you can do this. For creating the custom firmware, we use a tool named Pwnage in Mac. images (2)

 

Right now, this can be done with windows PCs also. We need a tool named RedSnow 0.9.9b8, using this we can accomplish the above said steps. This is a trustworthy tool, and you can go ahead with this.

“Baseband gets updated, and so what ? why can’t I unlock my phone now ?”

This question was the first to pop in my mind, all the unlocks for the iphone depends on BASEBANDs only. First of all, you should be pretty clear with whats an unlock and whats a jailbreak. You can jailbreak even iOS5.0.1 beta but u cannot unlock 4.11.08. I guess u must have got a clue with the above said statement.

Whats a jail break ?

Yes, Jailbreaking is something associated with the OS & firmware. By default apple does not allow you to install any other third party applications in your iphone.    images (1)To break that our iphone devs have come up with this “cydia”, that’s just an addition to our OS through which we can install all the apps that were not signed by Apple. In other words “iPhone firmware is modified to allow unsigned code to be run to gain access to files that Apple wouldn’t normally let you access”.

Now what’s unlocking ?

ultrasnow_iphone3GSMost of the apple phones are locked with a certain carrier, (AT&T etc.,)..Unlocking is the removal of SIM restrictions on the modem, allowing the use of the iPhone on any carrier. If you think why should I buy a locked phone why not a factory unlocked phone ? Oh, yea the cost factor comes into picture. Factory unlocked costs around 34.5k (INR), and the locked one is around 10k-15k.

There are two types of unlock :

1) Soft unlock  (only after a jailbreak you could do a unlock.)

2) hard unlock (use of gevey sim)

gevey-sim-india

Gevey sim is a thin piece or a sheet like which is kept over the normal sim before inserting. Once you place it above, and insert.. all you gotta do is “call 112” (emergency call) for 2 seconds. And then immediately you need to switch the airplane mode on and then off.. That’s it as far as the Gevey sim is concerned. The cost of that sim is around 35$, and there are places in chennai where you can get it for 1K.

I found most of my friends doing the same mistake, “I accidentally updated my OS to iOS5 without preserving my baseband” .. now what can I do ?

Remember, ultrasnow / Redsnow / Snow breeze or the Gevey sim card works based on the basebands. And so far we have no official updates to unlock 4.11.08. At this point there is not much to say. But stay tuned, I am following some iphone devs and hackers for the unlock updates. Until then u should “hacktivate” your phone and use it as an ipod or itouch whatever.. Well if you want to hacktivate your phone, u should get that iOS 5 jailbreak version and do it using RedSnow or SnowBreeze. (if you want more details about this, drop a mail I’ll pass you the links which works)images (4)

follow me for more updates at Twitter : @IamWini

Thursday, October 6, 2011

Beneath the surface : NEXUS S from an user perspective

     

I was very excited to own a brand new NEXUS S (google phone) which runs pure Android (ginger bread 2.3.4). Yes, it’s an interesting phone and we have a lot to explore ! But before exploring all that, we need to know few things that are totally hidden beneath the surface. Is our money worth investing in an Android phone ? Do they seriously serve the ultimate purpose of a “smart phone” ?

 nexuss60010

Hardware  :

To start with the hardware - the Nexus S boasts a 1GHz Hummingbird CPU, 512MB of RAM, a 4-inch, 800 x 480 curved Super AMOLED display (dubbed the Contour Display), 16GB of storage, a 5 megapixel rear and VGA front-facing camera, and near field communication capabilities. Well fine, the hardware looks great and clichéd. These days AMOLED display, 1 Ghz processors and 512 MB RAM  are so common, you find it in almost all the Android phones which comes in same cadre. I need to make a special note about the 512 MB RAM  present in NEXUS. Although the hardware specifications  points to 512 MB ram, not all the 512 MB is made use ! The phone supports only 300 /310 MB ram with the present Android OS 2.3.4Surprised smile The reason they say is that, the 512 MB ram is physically present to support future versions of Android. The addressing space isnt enough they say, with the current architecture.

        The internal memory 16 GB is divided in to two partitions. One is for the phone (2GB) and the other is used like a USB drive (12-13 GB). You do not have a external slot, well I guess you wont need memory more than 16 GB.

     There is a version difference between I9020  and I9023A , the latter has Super LCD and I9020 has AMOLED. The one we get in India is SLCD version for 27k. Note : Super AMOLED is the superior one and not SLCD Disappointed smile.

     The surface is a entirely different from the Galaxy SL’s surface, the touch is pretty smooth and they call it Oleographic surface. They is a notable curve in the middle and it’s a little heavy compared to Galaxy SL. The phone promises almost all the features  :3G, GPS, WiFi, NFC. There is no HSPA+, no HD recording and no FM radio. Well that’s not a big deal, But the basic problem is “prana” or the life source ! The source of power to gear this up is completely missing here Sad smile

Without PRANA u cannot live :

5409

The Nexus S' 1500mAh battery showed impressive signs of life first during the short period of testing. While taking it to the regular usage (though not tons of calling), it sustained about 15-16 hours of life before the phone was crying for its charger. I almost feel like charging it every now and then. Like all the users, I searched for “juice saving” applications. I started reading so many blogs just to find an answer. I finally ended up in a certain blog (one of my junior Shankar Ganesh – killertechtips) asking me to get an extra battery ! Wooh !!! Battery is the main problem with most of the Android phones. We need a powerful one to support the available features. Most of the applications are suspended, and they tend to run in the background utilizing some power. Some applications which has a filter runs as a service.  We have a Wifi connection but if we use it for 2-4 hours that takes most of ur battery life. But how can you be without a Wifi connection ?? It’s the same with the 3G connections too ! Smart phones are useless piece of electronics without an Internet connection, I hope most of you are aware of it Surprised smile. The live wallpaper was one of the most beautiful things I saw in this 4 inch screen. But what’s the use ? the battery consumption shows 70% for display if I use them Sad smile This is a tantalizing situation, where you have everything at reach but u cannot afford to use them because of your BATTERY ! It’s  frustrating to see your home screen asking you to connect the charger most of the time.

Android Market :

It has many applications in the market but the compatibility will be another blocker for many low end users. Many applications do not support the 2.1 éclair or 2.2 froyo users. This is a serious concern that one should know before buying an Android phone.

android

 

With an attractive hardware specification, millions of applications and a very low price most of the end users are lured to buy an Android phone. All they think is, I’m getting the efficiency , features and everything that an IPHONE has.  Nope, If that’s what u think I bet u need to reconsider your opinion.

Wednesday, September 28, 2011

How to bypass the blocked websites in Schools, Colleges or even in Workplace ? (re-sharing)

Websites like facebook , twitter  and other social networking sites are generally blocked in schools, colleges and offices . There exist some tricks by which you can bypass  the restrictions and access blocked sites , the most obvious is the use of proxies or Anonymizer websites . But using proxies doesn’t always works as they gets blocked by firewall as well . Here I am listing some other methods to access blocked contents .

1. Use IP instead of URL

Each website has its equivalent ip address . This method works best when blocked sites are stored as a list of URLs  .You can use  ip address  to access blocked contents . For example to access facebook you can use  ip address 69.63.189.11 in your address bar . You can use ip-address.com to find the ip address of other websites .

2. Use Google Cache

All major search engines like Google yahoo and Bing stores cached pages of websites themselves . You can access blocked websites by viewing their  cached copy on search engines  .

google cache website

3. Translations services

Translation services like Google Translate , translate a website from one language to another and  display the translated results on their own page .You can access the blocked website by re-translating  blocked url using such online translation services .

4. Retrieve web pages via Email

Web2Mail is a free service that sends any websites  into your inbox. All you need to do is send an email to www@web2mail.com with the URL as subject title.

5. WayBack Machine

Wayback machine periodically keeps a copy of almost all websites on the internet  from the date they have started . You can access your blocked site by fetching its latest copy from archives .

6. Screen-Resolution.com

Screen-Resolution.com allows you to view any website in a different resolution . This could be an interesting tool to access blocked websites .

7. Google Mobile Search

Google Mobile Search displays a web page as if you are viewing it on a mobile  phone .You can use it to access blocked websites but javascript and css will be disabled . This is a pretty old technique, which most of the college students use.

8. Redirect with Short URL service

Short URL service are used for converting a long URL in a shorter one . You can convert your blocked url into a shorter one and use  it to access blocked websites . This trick dont always works . The two popular url shortening service are bit.ly and adf.ly

9. USB Browsing

You can use this method if you have access to usb port  ,you can load usb with your own portable Firefox, with the portable Tor plugin  or you can directly use tor-firefox . I haven’t tried this out but this seems to be a worthy work around !

10.  Proxy Websites

This is the generally known method to access blocked websites . There are thousands of online proxies you can use to surf anonymously or to access blocked websites . This is not preferable though, since you might be exposed to vulnerable attacks.

 

  • http://www.hidemyass.com
  • http://www.anonymizer.com
  • http://www.wujie.net
  • http://www.ultrareach.net
  • http://surfshield.net
  • http://www.guardster.com/subscription/proxy_free.php
  • http://anonymouse.ws/anonwww.html
  • http://www.browser-x.com
  • http://www.spysurfing.com
  • http://www.xerohour.org/hideme
  • http://www.proxyz.be
  • http://www.sc0rian.com/prox
  • https://www.proxify.us
  • http://kproxy.com/index.jsp
  • http://www.brawl-hall.com/pages/proxy.php
  • http://www.proxify.net
  • http://proxy.computersteroids.com/index0.php
  • http://www.unipeak.com
  • http://flyproxy.com
  • http://alienproxy.com
  • I came across this information in a certain article, I thought it would be good if we share it Smile

    Monday, September 19, 2011

    Conversion to DALVIK FORMAT failed with error 1 !!

    Well this is a simple issue, need not panic. If refreshing the project, rebuilding it or cleaning did not work. Then probably u might have added an additional library which is not necessary.

    solution : Go to Project » Properties » Java Build Path » Libraries and remove all except the "Android X.Y" (in my case Android 1.5). click OK. Go to Project » Clean » Clean projects selected below » select your project and click OK. That should work.

    image

    How to open a database for cross checking ? (ADB)

    First we need to log on to this path : E:\android\android-sdk-windows\platform-tools

    This is where our adb.exe is present, once you have cd’d thru to that path you will have to run “adb shell” (to open the remote shell for our emulator device)

    Once your command is executed, you will be able to see “#_” similar to our bash in unix. U need to know the folder structure before you “cd” here bcoz tab doesn’t work !!

    So our project resides at /data/data/<project name>/databases. Once you have reached this point, the next thing is to “ls” or list all the db files present.

    Now, if your db file is present : then we need to open sqlite3 (which comes built in)

    #sqlite3 /data/data/<projectname>/databases/contact.db

    SQLite version 3.5.9
    Enter ".help" for instructions
    sqlite> .tables
    android_metadata  contact_to_grp



    sqlite> select * from contact_to_grp;

    image


    The rest of the commands are simpler from here.

    Friday, September 16, 2011

    Android debugging made easy

    If you are much attached to Microsoft’s visual studio then stepping through the code here in eclipse might be a bit confusing . We might just mix this up with  VS’s shortcuts (keys used here : F5, F6, F7 and F8)

    Here’s what they mean in eclipse (ADT) :

    F5
    Goes to the next step in your program. If the next step is a method / function this command will jump into the associated code.

    F6
    F6 will step over the call, e.g. it will call a method / function without entering the associated code.

    F7
    F7 will go to the caller of the method/ function. So this will leave the current code and go to the calling code.

    F8
    Use F8 to go to the next breakpoint. If no further breakpoint is encountered then the program will normally run

    If you are interested to see the Current Stack   then we need to switch to the “debug” view in the top right corner of your eclipse.

    About using DDMS for debugging will be available in the next post Smile

    Friday, June 24, 2011

    Met with a CRASH , What to do next ??

    A Crash is something that deters developer's pace. Trust me, to analyze the android app crash is a piece of cake with android's adb. It's just that we need to be familiar with certain internal stuff. I'm mentioning few of the things that i came across these days that might be handy for a new android developer. This is will be like a check list that u need to make sure before stepping through the code.

    First and foremost thing is "LogCat", its already there in your eclipse IDE. If you are not able to see the logcat window, then go to Window -> show View -> Other -> Android -> Log Cat. This is an important tool, which catches all the application logs, exceptions, debug statements and of course the verbose. If you have set this up, then i'm sure you have almost fixed your crash ;)

    Second, Now you can scroll and see all the red coloured horrible lines of your code's exception message inside the LogCat. Please do not start with the last line of the exception thrown, I'm sure you will not have the slightest understanding of what has went wrong. Scroll to the top and read the function which is at the top of call stack (similar to ur windbg call stack). You may get a clue - which function has the problem.

    Third, Most often you might end up with an error of missing activity or unable to start the activity. You would created the xml file, and u might used the proper id in the java file. But stil, most of the time we might forget to add them to the androidManifest.xml file. If you have not added it here, AOS does not identify your new activity. So make sure all the activities you have used are mentioned here. This includes all the broadcast receivers, services etc.,

    Fourth one also involves the androidManifest.xml file. This time, you need to use this line :
    e.g., uses-permission android:name="android.permission.CALL_PHONE" in ur manifest file which asks the permission to the user. If you have not mentioned something like this, and if you programmatically try to do those operations, again its a crash !
    Examples of uses permission:
    uses-permission android:name="android.permission.READ_SMS"
    uses-permission android:name="android.permission.RECEIVE_SMS"
    uses-permission android:name="android.permission.READ_CONTACTS"
    uses-permission android:name="android.permission.READ_PHONE_STATE"
    uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"
    uses-permission android:name="android.permission.MODIFY_PHONE_STATE"
    uses-permission android:name="android.permission.SEND_SMS"
    uses-permission android:name="android.permission.WRITE_SMS"
    make sure to use the appropriate permission in ur manifest, not all are required !

    Fifth, its the most familiar problem "java-NullPointer-exception".. This problem can be caused in a variety of ways and i'm sure i have caused this issue in almost all possible ways :P Anyways, most common issues are caused when we try to access the variable or the object without initializing it.
    For e.g, say you have a text view with an id = textview01 and if you need to access it in your java file.
    You must : mTextView = (EditText) findViewById(R.id.textview01) only after this you can do this -> String str = mTextView.getText().toString();
    There are other possibilities like string array initialization, cursor out of bounds, array index out of bounds, etc. which you must be very familiar. Please take spl care when you are accessing a cursor adapter to query values.

    Sixth is, try to use "try catch" where you do string operations, db queries, web service communications,threaded functions,content resolver operations and array parsing etc., Try catching can avoid that terrible "sorry -- close" dialog. (Which i know is terrible to look at ;))

    Thursday, June 23, 2011

    What will you do when you have an xyz.aidl file to use ??

    You need to be pretty sure whats an aidl file and whats the point in using them ! Yes, an aidl file is the interface through which we can perform an IPC. Since each application runs in its own VM (dalvik vm), each process has its unique user id and its restricted to access data or the memory part of the other processes. For example, if your app needs to communicate with the call application of the phone's process you need an interface through which you can communicate. People familiar with marshalling & unmarshalling will have the idea of the purpose behind. To put them in simple words : "they need to decompose their objects into primitives that the operating system can understand, and marshall the objects across that boundary for you. The code to do that marshalling is tedious to write, so Android handles it for you with AIDL" - from the docs.

    Fine, if you are well aware of the aidl's purpose you can get it working in your test application. All that you need is to obtain the xyz.aidl from the correspoding repo. (Whenever you need it -> sync it from the google code repo -> use tortoise svn (win 32 client)). As soon as you sync it, cpy that aidl file along with its package structure (com.android.internal.telephony) and place it in your src file. After adding it there, open eclipse and refresh your project. If it has not been added yet, then perform a clean and make sure the particular interface gets added in your project explorer.

    Once that is listed, you can make use of the interface and call the functions directly from the local thread. You can notice the xyz.java file generated in the project explorer.

    Wednesday, June 22, 2011

    All about developing an android app !

    I have planned to share all the information that i came across while developing the ANDROID application, in that way i can keep a log of the new things that i have learnt so far. This may be interesting for the newbies !

    Here we go ..
    The first interesting thing that i came across was the ksoap2 library provided by google. Well, we need to know the purpose of this external jar file first ! My application had to connect to a web-service application hosted in a test server. For an android client to communicate with the web-server (.Net) we need add this ksoap2 library to our project properties (java build path).
    download link : http://code.google.com/p/ksoap2-android/wiki/HowToUse?tm=2

    The first noticeable thing with ksoap2 is to pick the right version from the google code page. I detected some issues with the 2.4 version which i downloaded initially. Later on, i downloaded the 2.5.5 from the download page and i had no example code to work on and the older example codes were not compatible with the latest version. So i decided to pick an intermediate version 2.5.2 from the google code page using tortoise svn from windows. (bcoz repo is maintained in svn).

    Once you have obtained the 2.5.2, you can use this example code to work on.

    public void GetResults()
    {
    SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
    request.addProperty("lastName", "sm");
    request.addProperty("middleName", "");
    request.addProperty("firstName", "");
    request.addProperty("pageSize", 25);
    request.addProperty("pageNumber", 1);

    SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
    soapEnvelope.dotNet = true;
    soapEnvelope.setOutputSoapObject(request);

    //AndroidHttpTransport aht = new AndroidHttpTransport(URL);
    HttpTransportSE aht = new HttpTransportSE(URL);

    try
    {
    aht.setXmlVersionTag("");
    aht.call(SOAP_ACTION, soapEnvelope);

    //SoapObject result = (SoapObject)soapEnvelope.bodyIn;
    SoapObject result = (SoapObject)soapEnvelope.getResponse();
    //SoapPrimitive result = (SoapPrimitive) soapEnvelope.getResponse();
    //Object result = soapEnvelope.getResponse();

    Log.d("WS", String.valueOf(result));
    }
    catch(Exception e)
    {
    e.printStackTrace();
    }
    }
    you may be wondering, what to import since ctrl+shift+O does not automatically fix the project settings. So here is the import list required :
    import org.ksoap2.SoapEnvelope;
    import org.ksoap2.serialization.PropertyInfo;
    import org.ksoap2.serialization.SoapObject;
    import org.ksoap2.serialization.SoapPrimitive;
    import org.ksoap2.serialization.SoapSerializationEnvelope;
    import org.ksoap2.transport.AndroidHttpTransport;
    import org.ksoap2.transport.HttpTransportSE;
    See I faced a lot of issues with the import statements when i used the latest 2.5.5. So be careful with the import statements.
    Now.. In the above code u might see somethings like NAMESPACE, METHOD_NAME ,URL etc. What are these ? and why are they important ??
    this is the place where we are going to specify the webservice, the method exposed and its corresponding address.
    private static final String SOAP_ACTION = "http://tempuri.org/MethodName";
    private static final String METHOD_NAME = "MethodName";
    private static final String NAMESPACE = "http://tempuri.org/";
    private static final String URL = "http://your_ip_where_service_running/Service1.asmx";

    Many of you might ignore the last four lines of code, but believe me a small issue in the namespace took me 2 days to fix a certain deadly issue. When ever i passed a property / parameter to the web service - i was getting a null parameter there. I tried all the possible ways of sending the params, nothing worked. Finally found that the namespace name needs to end with a "/" else you will face with this kinda issues. There is one more notable thing here, we need to tell the soapEnvelope that this is going to communicate with a dotNet service. So soapenv.dotNet = true; is a compulsory thing !!

    Once you have taken care about all these things, hope u can get it to work ;) more posts on its way !! If you have doubts post it here.

    Saturday, January 8, 2011

    Gre Unit Tester

    It has been a very long time since i posted something out here, I do not know if thats what they call it a "transformation period" ! "Reconnaissance" so to say .. As long as i don't bungle my life, its fine I guess !!


    Purpose of this post is to share my tool named as Gre Unit Tester. We use tools just to make our life easier or better, and this tool serves its own purpose. This is for all GRE aspirants. This tool helps you to manage all the words that you come across in your day to day life (may it be from word lists or newspapers or even books) in an organised way.

    Here's what the tool does for you :


    • You may add words with their synonyms along with their relevant chapter numbers / WordList numbers.

    • If the words are apart from Wordlists , you can use your custom chapter numbers above 50 for your own convenience. Say if the words are from newspapers use chapter number 100/200 when ever you add your word. Its up to you, to customize it. Make sure from then on all the newspaper related words go to chapter number 100

    • Chapter numbers are important bcoz when u take your unit tests, you can choose specific chapters to test yourself with.

    • I forgot to mention, while adding your synonyms you can separate them using commas. This applies when u want to link more than a single word. (use commas to separate them.

    • You can click view, to view all the words entered so far. By clicking view, you have three options (context menu).
      1. You can check the flash card for a certain word, that you have entered previously.

      2. You can edit its synonym, if you want to

      3. Most importantly you can link related words !


    • I know, this tool is not a big helper but this can surely save you some time while you are revising. you can take unit specific tests, last unit tests and entire unit tests. The words are jumbled up for you thats all

  • All the words that you enter are taken to the wordlist.xml file, which will be present in your application folder. This file has a simple format for storing the words.

  • Initially to enter all the words may seem difficult, but employ a divide and rule technique to make this faster and easier. Get a chapter done by your friend and you complete another one. Tada !! Now you can merge the xml file and have 2 wordlist chapters in your db !! For now im not sharing any xml file, but as and when my friends give me I'll post it here. You can take it and replace the existing xml or merge it for further use.


  • Do post all your comments because i knew that there would be a lot of things to be refined and new features to be added.

    Link to download
    Link to download the XML database of all the words
    You can download this xml file, and paste it inside ur applications folder. (C:\program files\GreUnitTester\Wordlist.xml)
    If you get an error like notepad.ico is missing, neva mind.. You can ignore them, and run your tool as an administrator.
    For now all the words are given together, you can seperate them into chapters if needed. Just add some nodes between the words which u want them to be in a certain chapter
    For your convenience , the words are marked with "N"oun, , "V"erb,"ADJ"ective.
    For now, its a skeletal tool that i give you. This requires .net framework 3.5 to be installed on your system which isn't a big deal. There are some UI issues like main screen size, tabbing etc., kindly bear with me. I'm sure i would update them in the next version ;) I am also working on a bulk word import methodology so that we need not enter each word by typing.

    Next version enables you to add words - BY SENDING AN SMS !!
    1.Wordlists will be maintained in the cloud, so that from any where you can change the data.
    2. You add words using a simple sms to a certain number.
    3. You will be allowed to access the global wordlist and the user specified wordlist both together.