Tag Archives: Android

Disclaimer: I wrote this myself and posted it first on PinStack.com. Then I posted it on CrackBerry.com. I am re-posting it here because I think it will benefit people, and I would like to save a copy of it.

[I am going at this from truly personal experience, along with some background so that you know what kind of an user I am. If you are interested in the specs and overall usage, there are thousands of reviews. I hope that people will appreciate this a bit more than a typical “i used it, it made phone calls, it lasted 12 hours, the screen is small, the back over heated, the keyboard was amazing, it’s not an iPhone or Android and there are no apps” review]

First – a bit of background about me and cellphones: to call myself a cellphone enthusiast/a power user, or someone who is obsessed with cellphones would be kind of like calling Tiger Woods “ok at golf” or the Bugatti Veyron “faster than a honda”. To give you some quick numbers: I’ve gone though >30 phones in ~4 years (many many more since the early part of 2000), I have switched through each major US carrier about ~5 times, and in the whole process, I have only paid a cancellation fee twice. [Please note that I have really toned this down lately – mostly because carriers like Samsung have found a way to push a new device every 3-4 months without doing anything exciting and ground breaking.]

Continue Reading →1 Week (so far) with the BlackBerry Q10!

The Scenario:

Let’s say you are at a coffee shop with public internet access, and you don’t want someone snooping on your traffic, so you VPN to your work. However, you also don’t want to tunnel personal stuff out of your work VPN (chat, facebook, youtube, your personal email maybe?), so the question becomes, how do you create 2 different firewalls – one that ONLY allows you to VPN and does not allow any other applications access, and one that then controls the traffic within the VPN channel so that you can utilize the connection for some apps but not others?

At this point, there are only 2 “methods” of running a Firewall on Android: having root and managing/accessing IPTables, or, the only alternative – creating a sub-VPN channel that you pipe the traffic over and filter (which does not require root). Unfortunately, the second type (without root) will not work for this, since we will need to utilize the VPN channel ourselves for our VPN, and to my knowledge, Android let’s you setup only 1 active VPN channel. So, you need 1.) a way to root and 2.) a good Firewall

Continue Reading →Firewall the Inside of your OpenVPN or L2TP/IPSec Tunnel on Android

This will be my last post about the Google Nexus S since I just purchased (and received) my Nexus 4. That said, I really wanted to give one last update on the Nexus S since it looks like things have changed quite a bit with the update process. While it looks more complicated at first, it’s actually a lot more flexible now. Here is how to upgrade your Nexus S manually to a full 4.1.2 Jelly Bean, even if you have not received it yet/are in a country where the updates are not coming in, or are on a carrier which is not pushing OTA updates.

The first step is to go to Google’s Official Factory Images for Nexus Devices

Now, you have one of four choices for sections, based on your phone:

  • If you have the (MOST POPULAR) T-Mobile or ATT (GSM) version of the Nexus S, go to: “Factory Images “soju” for Nexus S (worldwide version, i9020t and i9023)”
  • If you have the Sprint (4G) version, go to: “Factory Images “sojus” for Nexus S 4G (d720)”
  • If you have the Korean version (VERY RARE), go to: “Factory Images “sojuk” for Nexus S (Korea version, m200)”
  • If you have the NON-1Ghz (STILL RARE) version, go to: “Factory Images “sojua” for Nexus S (850MHz version, i9020a)”

Let’s assume you have the T-Mobile/ATT one since most people have that.
You will want the “4.1.2 (JZO54K)” image, which you can download from their official link:

(md5: 788233dca5954532acda63039f814b4d)

Continue Reading →Google Nexus S – update manually to 4.1.2 Jelly Bean

[updated: March 29th, 2015 | Aman Surana created a great youtube video on how to do this. The main difference is that he is using a plugin (comes as an app which extends Tasker) called AutoNotification. The biggest benefit is that it abstracts the application notification layer into a standard set of variables. This allows you to utilize apps other than the main SMS app (ex: now you can use things like WhatsApp, Google Hangouts, etc). It also works with the latest version of Android, which I am starting to get the feeling that my profiles bellow do NOT work with anymore. Anyway, you can find the video here: https://www.youtube.com/watch?t=37&v=c-Kp9KynlV4, and read the post here since the idea behind how to do this still holds. That and it’s an interesting way to accomplish this task – no pun ;)]

I walk outside listening to Pandora quite a lot, and today I realized that I miss about half the SMS’ that I get. Either because it’s too noisy, or maybe because the SMS’ are not loud enough and I use a single beep, or because the sound trigger gets interrupted by Pandora, but either way, it’s a bit annoying. I have been considering some sort of a solution that will play incoming SMS messages when my headphones are plugged in for quite some time, but I couldn’t think of an efficient way to do it — that is, efficient on the battery. I think I came up with one today.

The idea behind this Tasker program is the following:

There are two Profiles: ‘Detect Headphones‘ and ‘Play Text Over Headphones‘. Only one Profile has to be actually active at all times – the Detect Headphones one. When you plug in your headset (with microphone, or just regular headphones), the profile sets a variable %HEADPHONES to ‘yes’. It then turns on the second Profile – the one that monitors incoming SMS messages and plays them over the headset if your %HEADPHONES variable is set to ‘yes’.

Continue Reading →Speak SMS over the Head Phones only when they are plugged in

The general idea behind this is that it utilizes my original Blackberry Sound Profiles for Android and it adds a “timer” element which can be set. Upon setting the timer, it will set a temporary task until the timer runs out. The idea came from one of my visitors who asked me how to do this. At first, I had no idea how to do it. About 30 minutes later I had a semi-working prototype. Another 3 hours later (had to figure out how Scenes worked and interacted with variables and the rest of the system) I had the final version with a working GUI.

The first thing that you need are my Tasker Blackberry Sound Profiles found here: (http://blog.vpetkov.net/2011/05/10/my-tasker-program-blackberry-sound-profiles-for-android). If you don’t have them yet, follow the super quick “Getting Started” section. Once you have the tasks and you have them working (if you want this to work out of the box, grab at least the “Work” task and the “Sleep” task), download the Timed extension:

Note: You need the current BETA to import this profile: http://tasker.dinglisch.net/beta.html (1.2.1b4m)

(md5: 5709a9ed0b139a027900d9f8f1e2e92a)

Now unzip it and follow the same steps from the original post – grab the “Timed.tsk.xml” file and import it into the the Tasks tab, and then grab the “TimedScene.scn.xml” file and import it into the Scenes tab. Go to your home screen and create a Tasker widget of your “Timed” task. Every time you select this task, it will pop a box which will let you use a slider or directly type in a number. After this, when you hit “Set Profile”, the temporary task (by default “Sleep”) will get activated for the number of minutes you set. After that time period it will go back to the other (by default “Work”) task.

Continue Reading →Timed Blackberry Sound Profiles for Android

This is an update to the article “My Tasker  program – BlackBerry Sound Profiles for Android” (http://blog.vpetkov.net/2011/05/10/my-tasker-program-blackberry-sound-profiles-for-android). Download the new file here, read through “what has changed”, and “what I have updated”, and then definitely read the original post (url above) as it contains all the details and how-to information.


What Has Changed:

There are a couple of things that Google has drastically changed in ICS 4.0 when it comes to Sound, Vibrate, and Volume.

First of all, they have greatly simplified the Sound Settings. The Volume menu now contains: “Music,Video, Games, and other media” as one volume toggle, then “Ringtone and notifications” as another, and Alarms as a third. Something to note here is that the keyboard “clicking” sound can now be found under the keyboard settings -> under Advanced.

The Second change is the way “Vibrate” has been re-implemented. The new “Silent Mode” controls three things currently: Sound, Mute, and Vibrate. This is important as this was completely broken on 2.3. The next thing to note is the “Vibrate and Ring” option, as this has a negative effect when toggled on via Vibrate (it’s still sticky for some reason, but due to Silent Mode being fixed, we can now un-toggle it via Tasker).

Continue Reading →Tasker – ICS (Android 4.0) – BlackBerry Sound Profiles

Google has released ICS (Ice Cream Sandwich) – the next version of the Nexus S OS (ICS 4.0.3- IML74K), and once again, I am posting it directly here — mostly for people who have not received it yet, people who are using a jailbroken phone, or people outside of the US who do not get the updates.

If you are on GRK39F (2.3.6), you can apply only the small update:

(md5: 9cf66f890e71708f458df9932e5206b3)


Again, this is directly from google (it is even linked to google), and you should follow the 7 steps from the http://blog.vpetkov.net/2011/03/11/google-nexus-s-update-manually-to-2-3-1-2-3-2-and-2-3-3/ article.

Please note that the above update is the ~128 MB update, and will only work if you are on 2.3.6 GRK39F. This is NOT for people who are running jailbroken/custom roms.

If the above doesn’t work, OR if you are using a jailbroken/custom rom, of if you have another version before 2.3.6, then I suggest doing the full 4.0.3 (IML74K) flash:

(md5: bdb728fd1581c369cd70e7f0b0e129f2)

This is the ~161 MB image. You can use the same 7 steps from the link above.
If you are having problems with the update above, this is the full factory restore and it should work without any problems.

Please post comments if you have any problems, or if you just want to post that it works!

Google has released the next version of the Nexus S OS (Gingerbread 2.3.6 – GRK39F), and once again, I am posting it directly here — mostly for people who have not received it yet, people who are using a jailbroken phone, or people outside of the US who do not get the updates.

If you are on GRJ22 (2.3.4), you can apply only the small update:

(md5: efd33eba8eb42ab77b0d279547bf76d1)


Again, this is directly from google (it is even linked to google), and you should follow the 7 steps from the http://blog.vpetkov.net/2011/03/11/google-nexus-s-update-manually-to-2-3-1-2-3-2-and-2-3-3/ article.

Please note that the above update is the ~18MB update, and it will only work if you are on 2.3.4 GRJ22. This is NOT for people who are running jailbroken/custom roms.


If the above doesn’t work, OR if you are using a jailbroken/custom rom, then I suggest doing the full 2.3.6 (GRK39F) flash:

(md5: c3d6341f18e2723d748e1dea10623d43)

This is the ~98 MB image. You can use the same 7 steps from the link above, OR you can use any custom installer (including ClockWork).
If you are having problems with the update above, this is the full factory restore and it should work without any problems.

Please post comments if you have any problems, or if you just want to post that it works!

If you just started reading this directly and didn’t read my “what is Tasker”, please read my short post: (http://blog.vpetkov.net/2011/05/10/androids-best-app-tasker-visual-programming-and-automation/)

If you are running ICS 4.0, please read: (http://blog.vpetkov.net/2011/12/27/tasker-ics-android-4-0-blackberry-sound-profiles)

Don’t let the length of this post scare you — I just wanted to provide the technical/developer details. You can get this to work in less than a couple of minutes by downloading the zip file and ONLY reading the “GETTING STARTED” section.



0.) Please download the zip file bellow if you haven’t done so already – Blackberry_Sound_Profiles_for_Android.zip

1.) First, if you haven’t already, install Tasker (you can use the Android Market, or the guys’ website). You can play with it for 7 days for free.
2.) It will create a “Tasker” folder on your SD card. Under that you will find “tasks” and “profiles” folders (if they don’t exist yet, create them).
3.) Download the zip to your computer, mount your phone’s SD card and go into the main “Tasker” folder under the sdcard. If the file ends in .prf, put it in the “profiles” folder. If it ends in “.tsk”, place it in the “tasks” folder. Unmount, disconnect your phone.
4.) Now that you have them, you need to load what you want/need into the program. Open up Tasker (program), hit Menu, and go to “Profile Data”. Do a “Import One Profile” or “Import One Task” select one of the “tabs” (Profiles, Tasks, Scenes), and hold it — an “Import” option will present itself, which will let you import a Profile or Task (or not relevant here – a Scene). This is because Tasker changed the way profiles and tasks (and Scenes) are imported . As soon as you select that, you will see all the files in the directory that you copied. Now you can import whatever you want.

You should import the “Volume Buttons” Profiles (note: this is a profile), at least the “Normal” and “Sleep” tasks (note: these are tasks). The volume buttons profile is honestly a life saver since any time you tap a volume button, it will actually restore to the sound-profile task you have selected.

Now to use them,

5.) Hold down on the home screen, select Widget (for ICS 4, Widgets are created by going to Applications, and shifting over to widgets), select Task. It will show you a list of your tasks. Select “Normal” for example. It will show it to you (in case you have to make any changes last minute — don’t do it this way, always make them in editor), now select the green check and you are Done! You can now use it as a “program” on your home screen. Add at least 2 this way, and select them. Wait 1-2 seconds. You will see how it select/enables each, and then after it enables it, hit the volume keys on purpose, and then wait 1-2 seconds again to see how it restores it.

END OF GETTING STARTED – THAT’S IT! You have it working!



Ahh, you’ve continued reading and you haven’t skipped this…Clearly you care about some of the theory…

One of the biggest problems with Android is the sound profiles. I will start off with the main sound profile BUG:

Try setting your Settings -> Sound -> Vibrate to “Only when in Silent”, and then hold the power key, change the “Silent mode” to ON. Now hold the power key again, and change the “Silent mode” to OFF. Check your Settings -> Sounds -> Vibrate mode — it is changed incorrectly to “Always”. This renders the built-in “sound profiles” completely useless.

Here are bug reports that are all for the same thing: Issue 20463 and Issue 13732

UPDATE: Please note that Google “sort of” fixed this, to a point, where we can now correctly implement the functionality using Tasker at least. It’s not there by default, but the “Silent Mode” now works for on (sleep), off, and vibrate, and there’s a separate toggle-able Ring+Vibrate feature.

Pretty much, half of these are the same issue. The main problem is that the Silent and Vibrate options for android, are really one single “Silent Mode”. The problem arises because Sound -> Vibrate settings only apply for “Silent Mode”. This means that you cannot have a completely silent profile and a vibrate only profile, and a “normal” profile. This is the most evident to anyone coming from a blackberry, where the sound profiles are flawless. I’ve read thousands and thousands of questions asking “how do I get sound profiles like on the blackberry”. Personally, this was the first thing that drove me crazy when I moved away from the blackberry.

Most people default to using a program which creates “Profiles” — setting bundles which simply toggle each Sound option (In-Call volume, Media, Ring Tone, Notification, Alarm, and System). The best one I’ve seen is AudioGuru, which is great, but it does lack some customization. The one additional step that most programs lack also is some sort of a guard for the volume buttons which toggle the ringtone.

My goal when thinking about all of this was to create a solution that was simple, extendable, and complete. The main points I was going after was to have profiles that are completely stand-alone, extendable/fully customizable, and completely scriptable. The end result was what I call “Blackberry Sound Profiles for Android”.


First off, here’s the download:

(md5: 71d0701ce63a6953a997145c758753c8)

(don’t forget to go to Settings -> Sound -> and UNCHECK “Use incoming call volume for notifications”. Also, Settings -> Language & keyboard -> Android keyboard -> and CHECK “Sound on keypress”)

The logic becomes part of 3 sections. The FIRST SECTION is the Tasker sound profile tasks. These are “stand alone” tasks, which simply encompass every aspect of a sound profile. Let me walk through one of them:


0.) Set a default icon (used grey star in this case)
1.) Wait – 2 seconds
[note – for ICS 4, there is an extra step in here turning off the Ring+Vibrate fixed feature]
2.) Silent  Mode – off
3.) In-Call Volume – 5
4.) Media Volume – 9
5.) Ringer Volume – 5
6.) Notification Volume – 5
7.) System Volume – 6
8.) Alarm Volume – 7
9.) Set Widget Icon (to %PROFILE – used default grey star)
10.) Variable Set (%PROFILE to “Normal”)
11.) Set Widget Icon (to %PROFILE – used the grey sound icon)
12.) Notify – %PROFILE
13.) Wait – 1 second
14.) Notify Cancel – %PROFILE

Let me clarify some key things:
step #9 is needed in order to clear the old Icon back to a star.
step #10 sets the global variable to the name of this profile
step #11 activates the pressed/toggled widget

I’ve also included a “Sleep” sound-profile task (toggles all down except alarm and media), a “Work” sound-profile task (same as “Normal” sound-profile task, but the notification is less and the system sound is less so the keyboard is not obnoxious), a “Loud” sound-profile task (makes everything as loud as possible basically), a “Vibrate” sound-profile task (like sleep, but has vibrate on), and a “On-Call” sound-profile task (like sleep, but ring tone is low).

I am not sure if you are already picking up what’s going on, but basically, the idea is that you have a few of these sound-profile tasks, and you create widgets on the home screen. They all show up as grey stars. When you press “Normal” or “Sleep” for example, it changes the star to the correct icon (Sound Icon, or Muted Icon), and shows it on your home screen and notify’s in your notification bar (after which, a second later, it clears the notification bar). Now, go through the other profiles to see what they do. They are all pretty much the same, except the Vibrate profile, which uses step #2 to select the official Android “Silent” mode, with a Vibrate outlet.

Now, the SECOND SECTION is a single Tasker task called “Sound Profile” which has one step:

1.) Perform Task – %PROFILE

And now you see why step #10 from section one is needed. When this task is called, it will change the current Sound profile to the global variable (%PROFILE). Please import this task too. Why is this needed you ask? Because of my clever hack in the THIRD SECTION:

Here is where you have a Tasker Profile. It is called “Volume Buttons”. The basic logic is as follows:

1.) If Variable Set %VOLR (ringer volume), then call the “Sound Profile”

This essentially achieves a volume-reset every time you accidentally hit the volume up or down keys. Now you can see why the “Wait – 2 seconds” was needed. The key part about this is that it uses your global variable, and it resets your volume to the last Sound profile that you selected. Great huh? Please make sure you import the “Volume Buttons” profile into Tasker.

At last you are Done! You now have individual Tasker tasks which you can make widgets out of. I have the 3 that I use the most – Normal, Silent, and Work (work being a bit quieter on the notification and system sound for the keyboard noise) on my main home screen. Then I have the Loud, Vibrate, and On-Call on another screen since I use them less often.


For the people interested, the ‘On-Call’ task works in a super elegant way: it silences everything except the ring tone (which it lowers), the alarm, and the media volume. The media volume is the key here. Let’s say you want SMS notifications but not emails while you are on-call. They both use the “notification” system, so there’s no way to do this by default (yet another ex-blackbery annoyance). What you can do is write a Tasker profile which interprets a “Notification Messaging, *” notify, (you can check the time if you are only on-call during the night or day) and then have the action for the task for the profile call the “Music Play” action which simply plays your SMS sound as an MP3. This essentially lets you isolate one application from another, by using the fact that you can play the selected notification through the media outlet. Beautiful Eh?

I hope all of this helps people out.

UPDATE – Added “One Ring” Task and Profile Monitor

I’ve updated the zip pack with two additions: a task which will provide you with a “One-Ring” sound-profile task — it’s basically the normal profile, but it brings the Ringer Volume to 0, and it increases the Media Volume up to 11. Also, I’ve added a “One_Ring_Monitor” profile, which intercepts calls, and plays a music file (mp3, wav, ogg, others…) — giving you the ability to play a notification — thus a single beep/sound.

If you just started reading this directly and didn’t read my “what is Tasker”, please read my short post (http://blog.vpetkov.net/2011/05/10/androids-best-app-tasker-visual-programming-and-automation/)

Let’s start with the problem – I can’t stand unlocking my phone every 10-15 minutes when I decide to look at the screen either because I heard a beep, or because I want to check for a work email/SMS. The obvious solution: get rid of the lock screen. The new problem: now my phone is not secure. I need something to toggle this functionality on a “need basis”. Solution: use Tasker to create a task which will be created into a widget.

Here’s the logic:

0.) Set a default icon (used key in this case)
1.) Keyguard – toggle
2.) Notify – KEYGUARD IS OFF, if %KEYG is off
3.) Notify – KEYGUARD IS ON, if %KEYG is on
4.) Wait – 1 second
5.) Notify Cancel – KEYGUARD IS OFF, if %KEYG is off
6.) Notify Cancel – KEYGUARD IS ON, if %KEYG is on
7.) Set Widget Icon – Unlocked Lock, if %KEYG is off
8.) Set Widget Icon – Locked Lock, if %KEYG is on

Download Takser task: Keyguard.tsk.xml.zip (md5: 0e2f2fd8cdaa5ff71a1fd5b0329bdfe6)
Please unzip it, copy it to your device, and then import it into Tasker.

Make it into a widget, press it, the icon will change to an unlocked keylock, and your lock screen goes away. Hit power, check to see that when you hit power again, your lock screen is not there. The volume keys will turn on the screen too. If you press the widget again, the icon will change to a locked keylock, and now you will have your lock screen. What I personally do is use the pin lock screen, and then toggle it this way while I am at work. As soon as I step out or anything like this, I toggle my lock back on.