Getting Japan Citizenship (for Pakistanis)

In this blog I want to clarify some doubts and some misconceptions that people have about acquiring Japanese citizenship. I would especially focus on changing citizenship from a Pakistani to Japanese. First I would like to discuss some common misconceptions and my experience in the regard.

Is Japan Anti-Immigration

There is no simple answer to this question. In my experience Japan is not anti immigration and the criteria for naturalization in Japan is probably more relaxed then many other countries that are famous for immigration. However, Japan never advertise the immigration opportunity in local or international media. Of course the language barrier makes Japan much less attractive for immigration. Japan does not allow dual-nationality so applying for Japanese nationality is not an easy decision. So I would say that Japan is not anti-immigration, they just don’t want people to apply but if you do you have over 95% chance of approval. I would also like to mention that requirements for Naturalization in Japan are easier than the requirements for Permanent Residency.

Is Japan Anti-Muslims

I don’t know where people get this idea from but from my experience I never observed anything that may lead me to this conclusion.

One of the best resource you can come across for detailed information on naturalization to Japan is http://www.turning-japanese.info/p/steps.html. This website explains step-by-step instructions plus a lot of other stuff related to naturalization.



Japan Permanent Residence (special case)

Permanent residence gives you permission to live in Japan for as long as you like. The details can be found on the website of Immigration Bureau of Japan.


In order to apply, one must meet the requirements given in the “Guidelines for Permission for Permanent Residence”. The most difficult requirement is that you must stay in Japan for at least 10 years before you become eligible to apply for PR.

The other document titled “Guidelines for Contribution to Japan” is more interesting. According to this document if you have some contribution to Japan the 10 years requirement is reduced to 5 years. You might think that contribution might be something very difficult and you might need to become a celebrity to show some contribution. In reality, the document gives a long list of things that can be considered as contribution to Japan and there is a good chance that you might fit into one of these categories.

For example, one of the contribution that almost all post graduates can fulfill is:

The person has been recognized to have made distinguished achievements through his/her research activities and falls under any of the following:

  1. The person’s paper on the results of his/her research has been published in a scientific/technical journal, and has been referred to by two or more other researchers in their papers.
  2. Two or more of the person’s papers on the results of his/her research have been published in scientific journals as a result of selection through fair judgment.
  3. Many of the person’s papers on the results of his/her research have been published in authoritative scientific journals.
  4. The person has been highly evaluated by a scientific society generally known as an authoritative organization, and has the experience of giving a lecture,etc.

So, you must look at this document to see if you are eligible to apply for PR after 5 years of stay in Japan. All the best.


Gold Driver’s License Japan

Today I got Gold Drivers License. I think if you don’t do any traffic violation in 5 years you are eligible for a Gold license. The card looks like a normal driving license and instead of green or blue stripe in the middle it has a gold color strip.

In Japan, a gold license is given to the drivers who don’t have any points accumulated on their current driving license. Many people who get Gold license are drivers who have made a license but never actually drive a car. Such drivers are also known as “Paper Drivers”. I am happy that even after driving a car for last 6 years and over 80,000 Km I did not have any traffic violation. With the frustratingly low allowed speeds on highways and expressways in Japan, this is a big achievement.

I am planning to get a Safe Driver card (also known as SD card here in Japan). Hotels, Onsens, Shopping centers that provide discounts for SD card holders are growing at a very fast pace in Japan. It would be good to have 5%-10% off on hotel packages.


2011 Sendai Earthquake and Tsunami

I think this was an event that will change Japan for ever. I on 7th or 11th floor of computer department in Hokkaido University presenting a conference paper that I plan to present at an upcoming conference. Suddenly the building started to shake really violently. I stopped the presentation and was about to rush out of the building when I realized that the audience including my professor as sitting calmly on their seats. In Pakistan it is common to rush outside during an earthquake. However, due to well observed building codes most of the construction in Japan can handle earthquakes of scale 9.

We were waiting for the shaking to stop so that I can continue with my presentation but I remember it took around 1.5 or 2 minutes to subside. We kept discussing the earthquake in a lighter mood but deep inside my heart I knew that this was not a normal everyday earthquake. I finished my presentation and rushed home. First time in my 6 years stay in Japan, I turned on the Japanese TV in afternoon. After that both me and my wife were stuck to the screen watching the events unfold.

Looking at how people in Japan handled the crisis is a lesson for rest of the world. Despite such a calamity there were no reports of looting, robbing etc.

I wish Japan all the best. I am sure that Japan will rise above this test of time.


Unlock ZTE 003z for free

You can unlock the ZTE Blade or 003z for free as shown here.

However, Step 13 could not be completed on SoftBank 003z as it doesnot ask for the 8 digit PIN code. This is due to the “Phone.apk” that comes with  003z.

Just change your Phone.apk as I showed in “Run Ordinary SoftBank SIM on ZTE 003z” Blog and you can now Unlock the phone by completing the Step 13 of the process.


Run SoftBank 003z with Ordinary SoftBank SIM

I bought ZTE Libero 003z (ZTE Blade) from Japan. The phone is SIM locked with SoftBank. SoftBank have started special SIMs for the smartphones known as “smartphone SIM”. With this SIM you have to get a data plan in your package else the SIM won’t work with your phone. This was very frustrating for me. I have access to WiFi almost throughout the day so didn’t want to pay for the monthly data service. After reading a lot and browsing through the Internet I found a way to run ordinary SIM with 003z.

What we need to do is to replace the original “Phone.apk” that comes with the phone with Phone.apk. All you need for this is root access to your phone and then you can use the adb-shell to replace the file. Please be sure to backup the original “Phone.apk” file before replacing it.

Ok lets go to the fun part …

  1. Download latest version of “UniversalAndroot” on your phone.
  2. Open it and press “Root” button to get the root access to your phone.
  3. Now download and install Android-SDK on your PC.
  4. On you phone Goto Menu->Applications->Development and Turn on the USB Debugging remember to turn it off once we are finished.
  5. Connect your phone to your PC via USB cable.
  6. Open command prompt on your PC and navigate to the Android-SDK->Tools folder
  7. Just write “adp devices” to check if everything is fine. You should see the name of your device if everything is working.
  8. In order to backup the Phone.apk write “adb pull /system/app/Phone.apk PhoneBkUp.apk”
  9. Now write “adb shell” and press Enter.
  10. In adb shell give “su” command.
  11. You will see a dialog box on your phone asking for root permission. Give the permission.
  12. Now give “cd system” and then “cd app” command.
  13. Now remove the phone application by “rm Phone.apk” command.
  14. Now do “cd ..”
  15. Do “chmod 777 app” . This gives root access to app folder
  16. Do “exit”
  17. Now from windows command prompt do “adb push Phone.apk /system/app/Phone.apk”
  18. If you get no error this means that its Done … So Smile :)
  19. Don’t forget to turn off USB debugging.
  20. Open “UniversalAndroot” and Unroot your phone.

That’s all. Enjoy your phone with WhitePlan only SIM 8-) .


Here are some useful troubleshooting tips.

  1. If your computer does not detect the ZTE HS USB driver automatically you can download it from here.
  2. In case you get ReadOnly File system error during chmod or Push operation do as follows:
    1. Run "adb shell".
    2. Run "mount" command.
    3. Check the name of the partition where “/system” is mounted. The name will be “mtdblock” + a digit.
    4. Then re-mount this partition by the following command.
    5. mount -o rw,remount -t yaffs2 /dev/block/mtdblock5 /system
    6. Now you can do "chmod 777 /system" or whatever you like.

Disclaimer: As mentioned here, unlocking your phone is not illegal in Japan but SoftBank doesn’t encourage it. So only unlock your phone if you know all the pros and cons. It may void the warranty. The author of this article cannot be held responsible for any consequences you may face.


How to travel light?

Hmmm this seems to be an easy task however, I learned it over a long period of time after many trips to different countries.  Today for the first time I am going somewhere for 8 days with a very small bag. Here are some of the tips that might help you to travel light.

  1. Try to fit everything in carry on lugage. Checkin lugage is a headache. It takes time to check it in and pick it up. Some airlines (notably some american airlines) are good at loosing checkin lugage.
  2. Netbooks are cheaper and easy to carry than notebooks. They may not be very powerful but they are certainly good for carrying. When buying a laptop, always check the weight and size of the power adapter. Sometimes power adapters alone can weigh over 700 grams.
  3. If you can manage internet browsing on a mobile phone you may not need to carry a laptop at all. For me, I have to carry a laptop.
  4. Carry 2 pair of pants (preferably one jeans) and three shirts. You can always use the laundry service in the destination hotel to wash them. Its better to carry shirts that does not need ironing.
  5. Don’t carry extra shoes. The pair you are wearing is more than enough.
  6. If you are traveling to a place that has very different weather than your city. Then prepare for the destination and don’t put extra things just because it is cold in your city.
  7. Just buy one of these bags with wheels. Lighter bags are little expensive but they are worth it.
  8. If you want you can take some food and snacks with you. As you will eat them on your trip so you can use the space for some shopping that you might want to do.
  9. Buy compact soveneirs like keychains, pens, jewlerry etc. Buying outerwear, shoes and stuff like that is a very bad idea in my opinion.
  10. As for the toiletries, you can buy things from a dollar shop or 100 yen shop in case of Japan. Disposable stuff would be great. Just throw them on you trip back.
  11. If you are going for business don’t carry SLR cameras. Just buy a smart camera that can fit in your pocket. Buying a mobile phone with a good camera is a great idea.

If you have more tips please add them in the comments. Have a safe journey !!!


Sold my HTC Desire

Finally I decided to sell my HTC desire for $360. I tried to fix the battery problem by doing everything possible. I tried to reflash it, installed different kinds of monitoring software’s, also performed the famous HTC plane mode trip, and another trick to calibrate the battery. However, none of these worked. The most frustrating thing was the customer service representative response from HTC and also from my service provider SoftBank.

First, I called SoftBank and told them about the problem that I am having. They gave a very lame excuse and I am sure they did not know what they were talking about. After talking to me for around 30 min the representative said that there is a big difference how the SIM unlocked and SIM locked phones connect with the network. And because my phone is SIM unlocked therefore I don’t get good battery life. They claim that even if I see full bars on my mobile phone that does not necessarily means a good signal strength.

Then I planned to call HTC Japan. I called them and they forwarded my call to someone very non technical. All his discussion was simply out of the context. However, he recommended me to call HTC Taiwan where they have the biggest repair center of HTC phones. I called them and all they said is that uninstall useless applications and you will get a good battery time. I told him my situation in detail but he had nothing to say. Finally, I became kind of angry and decided to claim the warranty.  But again the guy in Taiwan said that there is nothing that we can do. This is perfectly normal and we will not be able to make any repairs or give you a replacement. So, it is useless to send you phone to Taiwan. There is some serious problem with some HTC desire sets. Google the problem and you will find quite a few people having the same problem with their battery. HTC does know the problem but they don’t want to replace the defected sets.

I don’t have anything against HTC phones. They make great phones but they should improve their customer’s service quality. As for me, after fulfilling my desires 8-) , I am back to the good old HTC Hermes.


HTC Desire strange battery problem !!!

Ever since I got my first mobile back in 2000, this is by far the strangest problem I have ever faced. My HTC desire’s battery behaves very different in different cities of Japan. I am living in Sapporo, a city in the northern Island of Japan. On one full charge the standby time that I get is around 11 hours maximum. If I use the WiFi or Blue Tooth the time reduces further.

Same mobile in Tokyo gives me more then 60 hours of standby time. I don’t know what is the problem. I have searched a lot and many people blame this on the signal strength and environment temperature. In my case both are constant. I contacted HTC customer service and their reply was confusing and kind of useless. I also went to my service provider (SoftBank) in Sapporo. They are also confused over the strange behavior of the phone.

I think this is a software flaw. I think my mobile keeps on searching for new signals even if it has good signal strength. I reached this conclusions because the mobile gives similar standby time if placed at a location without any signals.

Still the thing that confuses me is why so much difference in standby times between Sapporo & Tokyo.


Interview with Amazon

I applied for a mid-career job at Amazon Japan. My interview went fine but I was not selected for some reason. The interview lasts for 45 minutes and they ask three simple but conceptual programming problems. Then they have around 10 minutes time for any questions that you might want to ask them. Here are the solutions of the problems that were asked during the interview:

1. Fibonacci Numbers:

Write a code that can returns nth member of  Fibonacci series. For those who don’t know, Fibonacci series start with 1 ,1 and next member is calculated by taking the sum of previous two members in the series. So it goes like: 1,1,2,3,5,8,13,21,34,55,….


It a very easy problem and can be solved by recursion or simple looping. Given below are both the functions:

Recursive approach:

int fib(int n)
	if(n <=2)
		return 1;
		return fib(n-1)+fib(n-2);


int fib(int n)
	int i=0;
	int x=1,y=1,z;

		z = x+y;
	return z;

2. Random Numbers Generator

Given a function ” rand5()” that returns random integers from 1 to 5 with uniform probability. We have to make a function “rand7()” that produces integers between 1-7 with uniform probability.


This was a very interesting question. I was confused in the beginning but then I sorted out the solution. The interviewer didn’t ask for the code, he asked me to explain my strategy for the solution. My solution to this problem would be as follows:

1. Convert rand5() to rand4(). rand4() will return integers 1-4 with uniform probability. rand4() is simply a rand5() function that ignores the value 5.

int rand4()
	return r;

We need 3 bits to represent numbers from 1 to 7. Therefore, we will call rand4() function three times. If we get 1 or 2 we change it to “0″ and if we get 3 or 4 we change it to “1″. In this way we will get three bits required to create the random numbers from 1 to 7. However, three bits can represent 8 integers from 0 to 7. We will simple ignore the case when we get 0,0,0. In this way we can get a uniform distribution of integers from 1-7.

3. Class Design:

Design a class for public garage system.


This problem can have infinite solutions depending on the requirements of the customer. However, a garage class can look something like:

class Garage
   int numberOfGarages;
   float maxHeight;
   float maxWidth;
   float pricePerHour;
   int carEnter();
   int carExit();
   int garageClose();

Older posts «