Recently, I read two posts, which were written two years apart but both thoroughly explained some fascinating concepts.
One is written by Fraser Speirs on how iOS manages multitasking, aimed at busting the myth of multitasking bar. The other is written by Remias Mate on how Android manages background processes, aimed at explaining how his app works. Although they had different purposes, they each gave a very detailed, easy-to-understand explanation on how each OS handles multitasking and memory usage.
In general, if you are an Android fan, next time you can laugh at your iOS counterpart on how iOS doesn't do "real" multitasking, and how you can determine which apps to run. If you are an iOS fan, you can surely enjoy your care-free style and let your Android friends know how you trust Steve Jobs (RIP) & Co, and not to mention all the battery life you are getting from that small battery of yours.
This is a place where I discuss everything from politics, to news, to technology... except those things you would expect in a diary, such as emotional struggles, or whatever kids write these days (Why would I? This is a public media, not a book with a heavy duty lock). Additionally, I will use 中文 and English interchangeably at my own comfort. Enjoy.
Search This Blog
Showing posts with label tips. Show all posts
Showing posts with label tips. Show all posts
Wednesday, January 4, 2012
Friday, December 16, 2011
Root Verizon Galaxy Nexus using Mac
Got me a Galaxy Nexus (FINALLY!!) the day it comes out (Dec 15th). Naturally the first thing I do is to unlock the bootloader, since all Nexus devices have similar unlocking procedure. Now I want root to use Titanium Backup to transfer all my apps without using data, although I grandfatered in my unlimited data, and where I live just got 4G coverage.
With a little look around, unsurprisingly my idols, Koush and Pete Alfonso are ahead of the curve and gave out instructions and nicely packaged files to use.
I figure I can go into more details so a wider audience can root their phone and enjoy the fight against evil :)
I also only have a Mac, so that's the instruction I am going to give. My Mac is 10.5 (Leopard), so I am expecting you to have a better one :)
A little concept and step summary (optional)
1. Unlock bootloader
A bootloader is a piece of software that loads other essential software for a phone to successfully start up. It loads all kinds of firmwares, recovery, and of course the OS (Android). A locked bootloader only loads things with a verified "signature", i.e. preinstalled ones made by Google/Samsung/Verizon. We need to unlock it to boot whatever we want, such as things below.
2. Flash a custom recovery
With a unlocked bootloader, we can now flash/install a custom recovery software, such as SPRecovery and Clockwork. Recovery enables you to install software directly on your phone without loading the OS. These software can include, but not limited to, super user application (give you root privilege on your OS), and custom ROMs/Android builds. With this custom recovery, we can start install whatever we want, more to follow.
3. Install super user or custom ROM
Now we can install everything, so if you want to use stock ROM but elevate your privilege to root, install super user application. If you want to use a custom ROM (with different themes and features etc), you just need to install that ROM, but make sure it gives you root privileges, although I can hardly imagine anybody made a non-root custom ROM.
Now the how (all commends are in bold):
1. Unlock bootloader (WARNING: this will wipe all your settings and data, so back up)
1. Can't mount sdcard
When I tried to install zip file from sdcard using the recovery, it gives . I restarted the phone, it stayed on the booting animation screen for a few mins, and I am not sure whether it restarted itself, or due to the fact that I was holding the power button for a while, but the second boot was successful, and I could use my phone. Then I restarted the phone and entered fastboot mode, chose recovery mode, and then chose to install .zip again in the hope that it could somehow work the second time. And low and behold, it did work. So somehow the recovery mode didn't recognize my phone's /sdcard/ partition at first, but eventually did the second time around.
With a little look around, unsurprisingly my idols, Koush and Pete Alfonso are ahead of the curve and gave out instructions and nicely packaged files to use.
I figure I can go into more details so a wider audience can root their phone and enjoy the fight against evil :)
I also only have a Mac, so that's the instruction I am going to give. My Mac is 10.5 (Leopard), so I am expecting you to have a better one :)
A little concept and step summary (optional)
1. Unlock bootloader
A bootloader is a piece of software that loads other essential software for a phone to successfully start up. It loads all kinds of firmwares, recovery, and of course the OS (Android). A locked bootloader only loads things with a verified "signature", i.e. preinstalled ones made by Google/Samsung/Verizon. We need to unlock it to boot whatever we want, such as things below.
2. Flash a custom recovery
With a unlocked bootloader, we can now flash/install a custom recovery software, such as SPRecovery and Clockwork. Recovery enables you to install software directly on your phone without loading the OS. These software can include, but not limited to, super user application (give you root privilege on your OS), and custom ROMs/Android builds. With this custom recovery, we can start install whatever we want, more to follow.
3. Install super user or custom ROM
Now we can install everything, so if you want to use stock ROM but elevate your privilege to root, install super user application. If you want to use a custom ROM (with different themes and features etc), you just need to install that ROM, but make sure it gives you root privileges, although I can hardly imagine anybody made a non-root custom ROM.
Now the how (all commends are in bold):
1. Unlock bootloader (WARNING: this will wipe all your settings and data, so back up)
- Download Android SDK from here (this provides utility tools to unlock your bootloader)
- Unzip the SDK to a desired location. For the purpose of an easy instruction, name the unzipped folder "android-sdk" and put it in your home directory (i.e. /User/YOUR_USER_NAME/)
- Download fastboot for mac from here (this is a utility tool not included in SDK, but uses utility tools provided by SDK. We will use this to perform many necessary operations.)
- Move fastboot-mac file to android-sdk/platform-tools folder
- Open "Terminal" app under Applications -> Utilities
- Type vi ~/.bash_profile (this edit your hidden bash_profile file. I use vi, and you can surely use other text editor, such as nano)
- Press i to start editing, and add following two lines to the end of the file (add these two path to your PATH variable will make all utilities in these two directory, including fastboot-mac, accessible everywhere
- export PATH=${PATH}:~/android-sdk/tools
- export PATH=${PATH}:~/android-sdk/platform-tools
- Press esc to finish editing, and type :wq to save and quit
- Command + Q to quit your Terminal and restart it again (to load the new PATH variable we just added)
- Shut down your phone
- Press volumn up and volumn down at the same time, and while holding those two keys, press the power button until an Android with its front panel open cartoon shows up (now you entered the fastboot mode, as indicated in the red text at the lower left corner. You can see in that text block that it says your phone is currently locked)
- Connect your phone to your Mac using the USB cable
- Type fastboot-mac oem unlock
- Select "Yes" on the following screen, and it will start unlocking. Should be fairly quick. Then you are back to the Android cartoon, and now it should say unlocked in the text. You are done.
- Download Clockwork recovery here (the only one I can find, and thank Koush for the quick post)
- For the sake of this tutorial, put this .img file to your home directory
- In Terminal, type fastboot-mac flash recovery ~/recovery-clockwork-5.5.0.4-toro.img (install this recovery mode onto your phone)
- Now you have the custom recovery, and choose 3 OR 4 to root your phone
- Download super user here (this will give you root privilege)
- For the sake of this tutorial, put this zip file to your home directory
- In Terminal, type adb push ~/su.zip /sdcard/ (copy su.zip to your phone)
- Once the process is done, disconnect the cable, and at the fastboot mode, press volumn down key until the "Start" at the top of the screen becomes "Recovery Mode". Press power button to enter recovery mode
- Use volumn up and down buttons to highlight install .zip file and use power button to select. Find the su.zip file on your phone, and select it to install
- Once this is done, restart your phone, and now you have root. To verify, see if you have Superuser app installed. If you do, success.
- Peter Alfonso quickly packed a rooted stock ROM for us to download here (ICL53F is the latest)
- Rename the file to update.zip and put it to your home directory (again, for the sake of this tutorial)
- In Terminal, type adb push ~/update.zip /sdcard/
- Turn off the phone and then go into fastboot mode (vol up and down and power)
- Press volumn down key until the "Start" at the top of the screen becomes "Recovery Mode". Press power button to enter recovery mode
- Use volumn up and down button to choose install update.zip from sdcard, and once it's done, reboot your phone use the option provided by the recovery.
- Now you have root. To verify, see if you have Superuser app installed. If you do, success.
1. Can't mount sdcard
When I tried to install zip file from sdcard using the recovery, it gives . I restarted the phone, it stayed on the booting animation screen for a few mins, and I am not sure whether it restarted itself, or due to the fact that I was holding the power button for a while, but the second boot was successful, and I could use my phone. Then I restarted the phone and entered fastboot mode, chose recovery mode, and then chose to install .zip again in the hope that it could somehow work the second time. And low and behold, it did work. So somehow the recovery mode didn't recognize my phone's /sdcard/ partition at first, but eventually did the second time around.
Tuesday, July 5, 2011
Chromebook, continued
Find one thing I miss a lot about my MacBook pro: the easiness to create a PDF out of ... well, anything, especially a web page.
A very good tool (chrome extension) I found is iWeb2x, which reads the current URL and makes a pdf out of it.
There is a deadly and unfortunately unchangeable imperfection to this approach. It cannot handle log-in sessions. For example, if you want to save your Facebook front page, iWeb2x will load that URL (http://www.facebook.com) itself without any log-in info, i.e. session cookies, so you will just get the log in page of Facebook.
Solution: if you need to make a pdf out of a private webpage (one that you can only see after logging in), save the webpage use Ctrl + S to your inferior file system, and go to http://pdfcrowd.com/#convert_by_upload to upload the html file you just saved.
However, pdfcrowd adds a (rather insignificant) logo watermark at the corner. Additionally, Chromebook doesn't save the "entire webpage", which means many images "might be" lost during the save (strangely not losing all images, which could be good news).
I tried many other websites, and although many of them don't add watermarks or even allow you to add your own watermarks, they either require you to give an email address to send the resulting file to or give you a zip file, which Chromebook doesn't handle very well, or just does a poor job in converting (probably because those sites have a poor html parsing tool).
pdfcrowd also makes an extension, called "Save as PDF", which works very much like iWeb2x, and as the website, it adds a small logo watermark at the corner.
If you wants to upload the PDF directly to Google Docs, use "Send to Google Docs". This extension works the same way as the other two, and in fact, it actually uses pdfcrowd's service to create the PDF, and then just directly sends the result to Google Docs. Of course, it also has the pdfcrowd watermark.
Speaking of all the files Chromebook doesn't play, I decide to keep a list of video and audio format that I managed to play on my Chromebook, and of course those that don't.
Working video format:
- Some .mp4 (yes, some .mp4 files don't work...)
- Some .mov
Non-working video format:
- .avi
- .wmv
Working audio format:
- .mp3
Non-working audio format:
- .aac (rumor)
- .wma (rumor)
All lists are continuously updated, of course.
Cheers!
Update July/10/2011
If you are a heavy keyboard user, i.e. use key shortcuts more than mouse click, you may see the Ctrl + Alt + / combo tip I talked about here.
If you use a Mac, you know how bad it is to go from "command" key to "ctrl" key due to their different locations. Well, sad no more! Settings -> System -> Language -> Modifier Keys.
When I first saw this, I was confused why would somebody wants to press "ctrl" to have "alt"'s behaviors. Now I know. "Alt" is in the same position as "Command" in a Mac keyboard, and by altering the behavior, Mac users wouldn't get frustrated when switching between Chromebooks and MacBook. Genius!
Update Oct/21/2011
Finally got my butt around and rooted my chromebook.
Took quite a few tries, but the result of integrating two articles leads to success.
First one: http://goo.gl/f9JFS < this one would be sufficient, unless you are a Mac user, which I am. If using Mac to burn the recovery image to USB, then you need to reference the second link for completing Step one in this link
Second: http://www.google.com/support/chromeos/bin/answer.py?answer=183098 < Only the step 2 in this link is useful
Also, I used a 2GB USB, and it was sufficient, so...
A very good tool (chrome extension) I found is iWeb2x, which reads the current URL and makes a pdf out of it.
There is a deadly and unfortunately unchangeable imperfection to this approach. It cannot handle log-in sessions. For example, if you want to save your Facebook front page, iWeb2x will load that URL (http://www.facebook.com) itself without any log-in info, i.e. session cookies, so you will just get the log in page of Facebook.
Solution: if you need to make a pdf out of a private webpage (one that you can only see after logging in), save the webpage use Ctrl + S to your inferior file system, and go to http://pdfcrowd.com/#convert_by_upload to upload the html file you just saved.
However, pdfcrowd adds a (rather insignificant) logo watermark at the corner. Additionally, Chromebook doesn't save the "entire webpage", which means many images "might be" lost during the save (strangely not losing all images, which could be good news).
I tried many other websites, and although many of them don't add watermarks or even allow you to add your own watermarks, they either require you to give an email address to send the resulting file to or give you a zip file, which Chromebook doesn't handle very well, or just does a poor job in converting (probably because those sites have a poor html parsing tool).
pdfcrowd also makes an extension, called "Save as PDF", which works very much like iWeb2x, and as the website, it adds a small logo watermark at the corner.
If you wants to upload the PDF directly to Google Docs, use "Send to Google Docs". This extension works the same way as the other two, and in fact, it actually uses pdfcrowd's service to create the PDF, and then just directly sends the result to Google Docs. Of course, it also has the pdfcrowd watermark.
Speaking of all the files Chromebook doesn't play, I decide to keep a list of video and audio format that I managed to play on my Chromebook, and of course those that don't.
Working video format:
- Some .mp4 (yes, some .mp4 files don't work...)
- Some .mov
Non-working video format:
- .avi
- .wmv
Working audio format:
- .mp3
Non-working audio format:
- .aac (rumor)
- .wma (rumor)
All lists are continuously updated, of course.
Cheers!
Update July/10/2011
If you are a heavy keyboard user, i.e. use key shortcuts more than mouse click, you may see the Ctrl + Alt + / combo tip I talked about here.
If you use a Mac, you know how bad it is to go from "command" key to "ctrl" key due to their different locations. Well, sad no more! Settings -> System -> Language -> Modifier Keys.
When I first saw this, I was confused why would somebody wants to press "ctrl" to have "alt"'s behaviors. Now I know. "Alt" is in the same position as "Command" in a Mac keyboard, and by altering the behavior, Mac users wouldn't get frustrated when switching between Chromebooks and MacBook. Genius!
Update Oct/21/2011
Finally got my butt around and rooted my chromebook.
Took quite a few tries, but the result of integrating two articles leads to success.
First one: http://goo.gl/f9JFS < this one would be sufficient, unless you are a Mac user, which I am. If using Mac to burn the recovery image to USB, then you need to reference the second link for completing Step one in this link
Second: http://www.google.com/support/chromeos/bin/answer.py?answer=183098 < Only the step 2 in this link is useful
Also, I used a 2GB USB, and it was sufficient, so...
Monday, July 4, 2011
A brief review (and perhaps tricks) of Chromebook (not Cr-48)
My chromebook finally got here right before the 4th of July weekend (about time!) Like a 16-year old boy seeing his girlfriend naked for the first time, I pretty much jumped on it right away. The only difference is, my play time lasted the entire weekend :)
Enough with the useless, let me just get right into it.
It is very much what you would expect from a "cloud terminal". Fast, clean, right to the point, because there isn't much else. A few things I find very useful.
1. Key shortcuts
The best thing about Chromebook is, you only need to remember one combo: Ctrl + Alt + /
This gives you all the key shortcuts on a map. Yes, a map. A virtual keyboard shows up, and as you press Ctrl, Alt, Shift or any combo of these three, the virtual keyboard highlights all keys associated with them (and of course description of what those shortcuts do).
2. Move files
This may sound insane, but as a terminal to the cloud, the last thing Google wants to do is to encourage you to use the file system. Therefore, it is a little different to manage files stored on your chromebook from what you are used to do.
As the key shortcut map can tell you, press Ctrl + m brings you to the file manager, but this manager only allows you to rename, delete, upload (if applicable) and view (a very limited set of file types).
Therefore, if you want to move files between folders or simply get files from a external storage, such as an USB drive, you need to open a new tab and put the following in the omnibox (URL bar / address bar)
- Move files from external storage:
file:///media
- Move files within Chromebook (File Shelf)
file:///home/chronos/user/Downloads/
In there, it is the good ol' tree / directory view of your file system. You just need to navigate to the file of interest and right click. Ta-da!
3. Some geeky stuff
If you really feel like it, you can of course check out the task manager (Shift + Esc), and test features ("About Chrome OS" -> "More Info" -> Change "Channel" to Beta or Dev -> put "about:flags" in omnibox) at your own risk.
I will add more tricks in the future (if there are some essential ones left to be known)
Now it's the review part.
Compare to laptops:
- Pros
a. Incredibly energy efficient. One charge lasts me all day (that's what sh...)
b. Incredibly fast on start-up and shutdown, <= 8 secs and <= 4 secs, respectively.
c. Internet-optimized keyboard (one button press for back, forward, refresh, full screen, switch windows, brightness, and volume http://goo.gl/5m71i)
d. Light weight (both literally and technically)
e. SD card slot
f. Apps are updated automatically on "the cloud", so no more pop-ups for updates
g. Files are stored on "the cloud", so you don't need to worry about losing files when you dropped chromebook in a keg, and you can access all of them anywhere there is an internet connection and a (modern) browser (yeah, I am talking to you, IE6)
- Cons
a. Although threats are everywhere, cloud is still more dangerous than your hard-drive, so no sensitive content (unless you feel very adventurous and trusting)
b. It is almost (not entirely) useless when there is no internet, because there is no native apps you can run, and only few offline apps (nice work, Scratchpad and Angry Birds)
c. Can't do any technical work, such as professional video / photo editing, coding etc.
d. Not much layout customization (Firefox is doing a much better job on this)
e. The extension and app store needs some improvement (selection wise)
Compare to tablets:
- Pros
a. The screen and keyboard are separate, so you don't need to angle your hands to make your head more comfortable
b. Full keyboard, so you don't need to cramp your hands and give up the most efficient way to type
c. Full internet (not tablet web browser, but full web browser, and support Adobe Flash, unlike some)
d. SD card slot, two USB port, and one video output (WITH cable)
- Cons
a. Similar to the comparison with laptops, no native apps (but most native apps on tablets require internet connection too, and often times features they provide can be done through web apps as well. The lack of these apps makes the whole web experience quicker and smoother as well)
b. Heavier (about 1~2 pounds heavier)
c. Not many games, which is part of the no native / offline apps issue (I am personally not a big gamer, so, not a big deal for me)
d. Similar to the comparison with laptops, the file system cannot do much locally, and the most painful thing is decompression. I tried wobzip but never really made it working.
In general, after three straight days, I find myself surprisingly comfortable with living on the cloud. I did need to adjust and give myself an orientation at first, but now I feel completely comfortable to migrate my entertainment and casual life to the cloud and enjoy all the pros I stated above. That is when I realize how little I do on my MacBook Pro besides opening up a browser. Even among those few things, I realize how little I cannot do or am not willing to do on the cloud.
Bottom line: If you often don't have internet connection where you want to use a portable device (laptop / tablet), don't consider chromebooks. Otherwise, it could be a very good fit for you. You may be surprised to find how boring all portable devices are without internet (remember not wanting to take your laptop out from your bag in the airport with expensive wifi and long layover?).
Happy 4th of July!
Enough with the useless, let me just get right into it.
It is very much what you would expect from a "cloud terminal". Fast, clean, right to the point, because there isn't much else. A few things I find very useful.
1. Key shortcuts
The best thing about Chromebook is, you only need to remember one combo: Ctrl + Alt + /
This gives you all the key shortcuts on a map. Yes, a map. A virtual keyboard shows up, and as you press Ctrl, Alt, Shift or any combo of these three, the virtual keyboard highlights all keys associated with them (and of course description of what those shortcuts do).
2. Move files
This may sound insane, but as a terminal to the cloud, the last thing Google wants to do is to encourage you to use the file system. Therefore, it is a little different to manage files stored on your chromebook from what you are used to do.
As the key shortcut map can tell you, press Ctrl + m brings you to the file manager, but this manager only allows you to rename, delete, upload (if applicable) and view (a very limited set of file types).
Therefore, if you want to move files between folders or simply get files from a external storage, such as an USB drive, you need to open a new tab and put the following in the omnibox (URL bar / address bar)
- Move files from external storage:
file:///media
- Move files within Chromebook (File Shelf)
file:///home/chronos/user/Downloads/
In there, it is the good ol' tree / directory view of your file system. You just need to navigate to the file of interest and right click. Ta-da!
3. Some geeky stuff
If you really feel like it, you can of course check out the task manager (Shift + Esc), and test features ("About Chrome OS" -> "More Info" -> Change "Channel" to Beta or Dev -> put "about:flags" in omnibox) at your own risk.
I will add more tricks in the future (if there are some essential ones left to be known)
Now it's the review part.
Compare to laptops:
- Pros
a. Incredibly energy efficient. One charge lasts me all day (that's what sh...)
b. Incredibly fast on start-up and shutdown, <= 8 secs and <= 4 secs, respectively.
c. Internet-optimized keyboard (one button press for back, forward, refresh, full screen, switch windows, brightness, and volume http://goo.gl/5m71i)
d. Light weight (both literally and technically)
e. SD card slot
f. Apps are updated automatically on "the cloud", so no more pop-ups for updates
g. Files are stored on "the cloud", so you don't need to worry about losing files when you dropped chromebook in a keg, and you can access all of them anywhere there is an internet connection and a (modern) browser (yeah, I am talking to you, IE6)
- Cons
a. Although threats are everywhere, cloud is still more dangerous than your hard-drive, so no sensitive content (unless you feel very adventurous and trusting)
b. It is almost (not entirely) useless when there is no internet, because there is no native apps you can run, and only few offline apps (nice work, Scratchpad and Angry Birds)
c. Can't do any technical work, such as professional video / photo editing, coding etc.
d. Not much layout customization (Firefox is doing a much better job on this)
e. The extension and app store needs some improvement (selection wise)
Compare to tablets:
- Pros
a. The screen and keyboard are separate, so you don't need to angle your hands to make your head more comfortable
b. Full keyboard, so you don't need to cramp your hands and give up the most efficient way to type
c. Full internet (not tablet web browser, but full web browser, and support Adobe Flash, unlike some)
d. SD card slot, two USB port, and one video output (WITH cable)
- Cons
a. Similar to the comparison with laptops, no native apps (but most native apps on tablets require internet connection too, and often times features they provide can be done through web apps as well. The lack of these apps makes the whole web experience quicker and smoother as well)
b. Heavier (about 1~2 pounds heavier)
c. Not many games, which is part of the no native / offline apps issue (I am personally not a big gamer, so, not a big deal for me)
d. Similar to the comparison with laptops, the file system cannot do much locally, and the most painful thing is decompression. I tried wobzip but never really made it working.
In general, after three straight days, I find myself surprisingly comfortable with living on the cloud. I did need to adjust and give myself an orientation at first, but now I feel completely comfortable to migrate my entertainment and casual life to the cloud and enjoy all the pros I stated above. That is when I realize how little I do on my MacBook Pro besides opening up a browser. Even among those few things, I realize how little I cannot do or am not willing to do on the cloud.
Bottom line: If you often don't have internet connection where you want to use a portable device (laptop / tablet), don't consider chromebooks. Otherwise, it could be a very good fit for you. You may be surprised to find how boring all portable devices are without internet (remember not wanting to take your laptop out from your bag in the airport with expensive wifi and long layover?).
Happy 4th of July!
Subscribe to:
Posts (Atom)