Skip to main content

When I said vibrate, you should do that

So I upgraded my old-ish P500 to ICS one or two weeks ago. Nothing complicated, step by step below

  1. Download the ROM here. The thread specifically mentioned "GEEK ONLY". At the time of this writing, the latest version is beta 4. It's quite solid. Good battery mileage. All fundamental modules are working with the exception of Camera.
  2. Reboot into recovery and flash it. Before trying ICS, I used CM7 + CMW so it should be easy. In case you are curious, I was using this ROM. I used version 6.6. Now it's a little out dated but when I tried it, it was the first and the only CM7 ROM for P500. 
  3. After the flash, not reading the instruction very carefully, I wiped basically everything and boot it up. OMG IT WORKED. Beautiful home screen and the new overall style. I was quite satisfied.
  4. Browsing around for a while then I tried to go to the Market only to realize I have no Google apps installed. This is a common thing so I wasn't surprised so much, just need to grab the latest gapps package and flash it together (the package is here). 
  5. Another problem: I have no signal whatever! Wifi is working very good (which is a rare thing with new ROM) but no phone signal. I started to freaked out a bit since this is the only phone I got and I need it to work as a phone (to call and text).
    1. Wiping didn't solve the problem.
    2. Reflashing didn't work out.
    3. Reading through the first few pages and last few pages didn't yield any useful piece of information. Nobody encountered this before me? Hmm, maybe there's some problem with Viettel network? Anyway, I stumbled upon a quoted post of the instruction, basically it said the ROM only supports new baseband. Hmm, did my phone have the new baseband? I didn't remember anything about updating baseband. Hmm, the baseband line in the info page showed "Unknown". Not a good thing at all so I went out and use this tool to update the baseband.
    4. The biggest problem is it's a Windows app. Lucky me, still have the old IBM T42 laying around so booting it up is not a big problem. Took a while to install the LGE drivers though. And then praying! The app is ridiculously slow! And then it failed! Scared the sh!t out of me!
    5. Booting the phone gave me a black screen with alien text. J/k, it was English but very unfriendly. Basically the boot sequence is fcuked up so the phone couldn't boot! Agrrrr!
    6. Searching around with the error message didn't help at all but at least I found out that the app actually saves a backup copy before it starts working so it should be possible to restore using the backup.
    7. And it worked! The phone booted normally again and with phone signal! LOL, I have no idea why it turned out like that. Actually, the app reported error messages after the restoration so I just guess that app is poorly coded or something like that.
  6. So now I have the shiny new ICS installed and working on my P500. Restoring apps with Titanium Backup is fast. Contacts and other stuff are restored from Google's servers. All is well... so far.
A few days in, I turned on 3G but the battery dies too fast so I have to use 2G only and it's better. 3G is known to kill battery so I don't complain anything. But then it hit me: the one important reason why I sticked with CM7 for so long is because the phone vibrates when I call and the receiver pick up. Because of that feature, I can press call then do something else instead of put the phone to my ear. This is simply a convenient thing, not that I think it will reduce cancer or else... I just love that feature and this ROM doesn't have it! Searched around and there are a few apps available but they all seems to be not good enough so I decided to modify the Phone app to make it vibrate! Again, step by step below
  1. Grab the CM9 source code (reading this).
    1. There is no instruction for P500 at the time so just use SGS instruction instead.
    2. I don't follow the instruction all the way though, I skipped steps that are too complicated or steps that I thought is not related (mostly because I'm lazy, LOL)
    3. In the "Install the repository" step, instead of the given "repo init" command, you should use this instead "repo init -u git:// -b ics" (to get the ICS branch)
    4. After "repo sync", go to step 2. You don't need to copy priority files and such
  2. Get the device files from here. You will need to create the directory /device/lge, step by step below (assuming you are at the disk root)
    1. cd device
    2. mkdir lge
    3. git clone p500
  3. Get the vendor files from here. Step by step (assuming you are at the disk root)
    1. cd vendor
    2. git clone lge
  4. I had to read quite a bit of code + do many experiments but in the end, the required change is just a few lines. I got the diff uploaded here.
  5. To build the Phone app, type this into Terminal (assuming you are at the disk root)
    1. lunch cm_p500-userdebug (I knew about this because I read the file device/lge/p500/, if you are building for other devices you will find the lunch combo in a similar place)
    2. make Phone
  6. To get it on your phone, it's a little bit complicated but here are the basic steps (assuming you are at disk root + have adb in your PATH)
    1. adb remount
    2. adb shell
      1. rm /system/app/Phone.apk 
      2. exit
    3. adb push out/target/product/p500/system/app/Phone.apk /system/app/Phone.apk (the built apk file path will be presented to you after it's generated)
That's it. I thought this is a short post but it's quite long actually. Sorry. Below are some search phrases that people may use to search for this kind of thing (like I did and found nothing!)
  • how to build android from source (hmm, this is too generic I think)
  • how to build cm for p500
  • how to build cm9 for lg (I cheated a bit here)
  • how to build individual app from android source (yeah, I searched for this)
  • how to build stock app for android
  • how to build android phone app (use "make Phone" like I did)
  • how to build android contacts app (use "make Contacts")
  • (I ran out of ideas, hehe)


Popular posts from this blog

Flutter: Fixing Firebase header not found with Notification Service Extension

If you follow the FCM tutorial Send an image in the notification payload and encountered this error message: 'FirebaseMessaging/FirebaseMessaging.h' file not found You are on the right place, I'm going to show you how to fix it. My app was working fine but one day it stopped compiling. Apparently Flutter 1.20 changed the way it uses CocoaPod so the service extension no longer has the proper library configured. After some tinkering, I came up with this pod config, it has to be added to ios/Podfile below the main Runner target. target 'FcmImage' do use_frameworks! use_modular_headers! require File.expand_path('../.symlinks/plugins/firebase_core/ios/firebase_sdk_version.rb', __FILE__) firebase_sdk_version = firebase_sdk_version! pod 'Firebase/Messaging', "~> #{firebase_sdk_version}" end FcmImage is my extension name, replace it with yours We can use a hardcoded version for Firebase/Messaging pod but doing so m

IMAP module for PHP in Mac OS X Mountain Lion

So here it comes again. I have recently upgraded to Mountain Lion and for whatever reason, Apple decided to nuked all my previous PHP (among other things) configurations so I have to setup IMAP in PHP again. A simple Google search may point you to this post with detailed instruction for Lion however, some steps have been changed a bit... Step 1: Install prerequisites You may choose to download Xcode ( FREE ) from the App Store then go to menu Xcode > menu item Preferences > tab Downloads, select to install Command Line Tools OR you can go to Apple Developer  to get it, you may need to login. Step 2: Compile IMAP Get the IMAP source code from University of Washington website . Please do me a favor and check that website for the latest version, it's good practice. If you that laz y , try to click the "y" to get direct link to 2007f version. Extract the package and open the Terminal to the new directory before executing these command: make osx EXTRACFLAG

OAuth with Google, Twitter and... Facebook!

This is sick! Just a few days ago, I ran into OAuth as I want to get my GMail feed based on Google Data API . I succeeded. With a little help of an OAuth open source ( here , available in several programming languages). Then I remember that I once heard that Twitter also uses OAuth as an authentication option so I turned into Twitter and had a good read. Finally, I found out that they are basically the same (hehe, it's obvious since OAuth 1.0 is a worldwide standard). I had an idea of writing a universal class which can handle both Google and Twitter OAuth functionalities. It's not too hard. I took most of the idea from the PHP example ( here , PHP only). I also made a small script which accepts URI to send and intercept response from Google & Twitter servers. At that moment, I was so excited with all the ideas but actually it has no real world benefit so I just left it there... Until today, in the F8 (says "fate") conference of Facebook, I was stunned fin