Monday, January 28, 2019

Google on a Chinese Samsung Galaxy S9+

Forgot the fact that Google and its apps do not come pre-installed on smartphones sold in China.
I knew I should've gotten the phone in Hong Kong, instead of Shanghai.

After some research, the safest way to do this without mucking around with rooting and/or installing custom ROMs is to simply download Google Services Framework. Google Play Services, and Google Play Store from APK Mirror, then sideload and install the APKs on the phone.

The APKs installed just fine. On first run, it asked me to log in with my Google account. gapps would crash during the password verification phase. Play Store recognizes my account, but is not showing any apps. Getting Server Error message. Restarted the phone. This time, I was able to access Play Store properly and download apps. All this time, I'm getting a notification that says "Google Play Services won't run unless you update Google Play Services". Catch-22 much?

When I click on the notification message, I get to the Play Store entry for Google Play Services, but the only option is Deactivate. I click on it, and pop-up window says device administrator needs to be disabled first. No such option under Settings - maybe because APK was sideloaded??

In any case, it's not really a big deal as Google Play Store is definitely working. Later on I realized that not all Google apps are working properly. For example, Calendar can't seem to see my calendars. Gmail says "Getting messages", but no emails actually show up. Google News says I'm not authenticated. Booted to recovery and wiped cache partition. Didn't help.

At this point, I decided something else needs to be done. I decided to change the firmware from CHC (Open China) to TGY (Hong Kong). The model I got is SM-G9650/DS, which is only sold in China (and HK) and Latin America. Google works in HK, so I'm hoping Play Store will come pre-installed on the TGY image. Not too sure if device needs to be rooted or OEM unlocked first. Hoping the hardware is fully compatible with the new firmware.

One thing to note: Downloading the firmware files from SamMobile took a couple of hours. (SamMobile limits the download speed to 15kB/s for free users.)

Cleanest procedure is to do factory data reset via Settings. Boot to recovery, do a factory reset, then wipe cache and data. After that, flash new firmware. Prior to factory reset from recovery, it warns you that you might need to authenticate with the Samsung account that was first used with the device. Not so sure about this part, so crossed my fingers and continued on to the flashing part. While it took hours just to get the stock firmware, flashing it via Odin took only 8 minutes.

After all the work, I now have a fully-functional Google-enabled Galaxy S9+. (Not so sure about Samsung Pay or Google Pay though as that's usually country-specific.)

To boot to recovery mode:

  1. power off the phone
  2. press and hold Bixby and Vol+ buttons
  3. press and hold power button
  4. release when the Android mascot shows up after the Samsung splash screen


To boot to download mode:

  1. power off the phone
  2. press and hold Bixby and Vol- buttons
  3. press and hold power button
  4. release once in download mode


Flashing firmware with Odin:

  1. unzip firmware file downloaded from SamMobile
  2. pre-fill the BL, AP, and CP fields with the extracted files
  3. under CSC, put in the CSC file if you want a clean flash; otherwise, use HOME_CSC to keep your apps and data
  4. reboot phone into download mode (see above)
  5. connect phone to PC using a working USB data cable
  6. make sure only Auto Reboot and F. Reset Time are ticked under Options
  7. click on Start


Sunday, January 13, 2019

Movie 2019.01.13 0 Bumblebee

Have read the reviews (mostly bad). That probably lessened the blow when we finally watched Bumblebee. I mean, it's NOT a Michael Bay movie, so how bad could it be? Having Hailee Steinfeld there probably also helped. The 3D glasses definitely did. Been years since I last watched a 3D movie, and the experience was not good. The images are vague and fuzzy, and tend to make me dizzy and disoriented. This time, the 3D effect is clear and very convincing.

Back to the movie. Main reason I didn't like it is because it's a hodgepodge of cardboard humans, metallic robots, and cliched situations. You get the gungho soldier, the quirky scientist, the troubled teen, the clueless parents, the school jock, the mean girls, the clumsy suitor, etc. Now that I think about it, it has a bit of a Superman feel to it. An alien race forced to evacuate their home planet. An emissary sent off to a promising planet to bring hope to the future. Bad guys in hot pursuit. The new immigrant learning the ropes with the help of a local. Ultimately the big showdown with the bad guys with a little help from his new human friends.

At the end of the movie, I still don't get why these robots still feel the need to transform to Beetles or muscle cars or fighter jets or canines, when they could just choose the most efficient form and stick with it. It's like what Charlie said, "All this time you could've been a Camaro?!"

Despite those, there's still some genuinely unexpected funny moments. Like when Bumblebee spit out that Rick Astley cassette tape so hard it almost broke the wall. Even the Chinese audience have been rickrolled so much, they got the joke. And the last scene when John Cena saluted the Autobot soldier, and Bumblebee replied with Judd Nelson's signature fist pump in The Breakfast Club.

Sunday, January 6, 2019

Cheapest E10 Fuel

Having lots of competition is still the best way to get the cheapest price of anything.

Just near my house is a Budget Petrol. A few meters away is a Coles Express. A little further down Victoria Road, we have a 7-Eleven and a Speedway. Just across the street is a Caltex Woolworths station and a BP. That BP station has recently closed shop and replaced by a new player called Apex Petroluem. Apex almost always undercuts everybody else by one cent, which keeps prices low.

I usually check the petrol prices using the Fuel Check NSW app and PetrolSpy. If you're the betting kind, you can have a game with the 7-Eleven Fuel app. Use the app to lock in the best fuel price among the nearby 7-Eleven petrol stations. Locked-in price is good for 7 days. If the price goes up, you can still fill up using the locked-in price. If price goes down, then just pay using the lower price.

This is such an interesting idea that people started sharing notes as to where to find the cheapest fuel. If you happen to be in the vicinity of Truganina, then lock in the price. If you're not close by, then you have to find a way to pretend that you are. Apps that can detect and block spoofed locations? There's a (patched) app for that app!

The things that people do for cheap fuel, huh? Me, I normally just get 4c discount from Caltex Woolies from the weekly shop, and then pay using Woolies eGift cards.

Sunday, December 30, 2018

Windows 10 on a 15-Year Old Laptop?

Got my hands on a Dell Latitude D410 laptop, which was released back in 2005, and was wondering what OS to put on this. I hear you saying, just install Linux and she'll be right. I know, but where's the challenge in that?

So the laptop comes with an Intel Pentium M 750 processor, 2GB of RAM, and a 30GB hard drive. I know for a fact that 2GB RAM is enough for Windows 10, but that hard disk might need an upgrade. Took out my screwdriver, and guess what? It's still using the old PATA interface. All my spare 2.5" HDDs are SATA, so no upgrade. Next step is to check the processor compatibility with Windows 10 using this page. But, but the Dothan processor is not even listed there! No harm in trying, right?

Power on the laptop. Press F12 when you see the Dell logo to get into the one-time boot sequence selection. I can see the option for USB external storage, but the directional keys on the keyboard don't seem to work. Booted up again, and pressed F2 to get to the BIOS setup. Again, keys don't work. Fortunately, I've got an extra USB keyboard lying around, so issue fixed.

 Laptop starts reading from the USB stick and the Windows 10 logo comes up on the screen. Five seconds later, I get a blue screen with a sad face emoticon and some error message. I guess it's just too much to hope for, so I didn't even try to investigate or fix the error.

Moving on to Windows 7. The installation took longer than normal, but eventually the thing booted up just fine. Only issue is the drivers are the default ones. That means low screen resolution, no audio, no WiFi, no hotkeys, no sleep/hibernate, etc. And when I got to the Dell drivers and downloads page, there are only drivers for Windows XP and Windows 2000.

Why not just install CloudReady and be done with it? D410 is not on the Certified Models List, but I still pushed through. USB installer starts up then quits. Looks like I'm stuck with Windows XP. No issues installing Windows XP SP3. And after installing the drivers from Dell support page, everything is running properly.

My only concern is the software support, given the age of the OS, specifically the browser and the antivirus software. Most modern browsers don't support XP anymore, and Microsoft Security Essentials stopped support for XP long time ago. After a bit of research, I settled on Firefox ESR 52.9 (Basilisk is another option) and Malwarebytes 3.5, the last/final MB version that is compatible with XP/Vista. Hopefully this should be enough.

Laptop boots up nice and quick. CPU goes to 90% when watching videos on VLC, but can't really complain, given this is almost 15 years old!

Friday, September 21, 2018

Movie 2018.09.21 - Bad Genius

Bad Genius is a movie about a smart but poor scholar named Lynn, who gets involved in a cash-for-answers scheme to help out with her family's finances. She gets caught supplying answers to her classmates, and loses her scholarship. Not deterred, she hatches an even bigger, bolder scheme with a bigger target - the STIC exam.Together with an accomplice, they take the exam in Sydney, which has a 4-hour headstart to the rest of the world due to the timezone difference. During the breaks, they would go to the loo and send out the answers via SMS using hidden mobile phones. Plan sounds great on paper, but when you're holding up the cubicle for a long time, people tend to become suspicious. They eventually get caught out, but not before sending off the answers to Thailand, where their clients are patiently waiting. In the last scene of the movie, Lynn is blackmailed by her accomplice. Deciding to be honest this time, she goes to the authorities and makes a confession.

Interesting plot, but a little bit over dramatic and drawn out for me. A lot of unnecessary scenes to heighten the tension. And I doubt that finger-drumming actually works as a cheating method. Given how the seats are positioned, it would be hard for the concerned parties to see clearly Lynn's finger-drumming sequences. If the proctor had been paying attention, he would've noticed all of those sideway glances and a lot of finger-drumming as answers are being relayed. If not the proctor, other students not in on the scheme would've noticed something amiss and called it out.

All in all, the movie is not too bad, genius.

Thursday, August 30, 2018

Reinstalling Windows 7 Pro on a Dell Precision 3510

Company gave me a hand-me-down Dell Precision 3510. Takes literally minutes to boot up. When I press Ctrl-Alt-Delete, it takes literally minutes to give me the logon screen. I type in my username and password. Again, tens of minutes pass by before I get the desktop. With huge icons. IT doesn't want anything to do with it, and tells me to blow it away.

Tried to see if I can restore the laptop to a proper state. Boot up and press F8 to access the Advanced Boot Options menu. Click on "Repair Your Computer". Windows then loads some minimal files to boot up. Choose your language, log in as Administrator, and then you're presented with a choice of System Recovery Options. System Restore is not going to help as there were no previous restore points. System Image Recovery also won't help as no backup system image was created or found. So looks like we'll have to use the Dell Factory Image Restore option (usually the last item on the list).

The tool then goes about reformatting the hard disk and flashing the stored factory image from the recovery partition. In my case, the restoration always fails at the 63% mark. I guess the factory image is borked. Next up, the Dell OS Recovery Tool.

With this software, you simply provide the service tag, and it will download the appropriate Dell recovery image and burn it to a USB stick (at least 8GB) that you provide. Boot up the laptop, press F12 to change the boot order, and select to boot from the USB stick. In my case, the USB prep kept on failing. The tool would start writing the downloaded 7GB image. During the last few seconds (after half an hour or so), it would complain that something has changed and starts the process again, ad infinitum.
After half a day of trying, it was only after I switched to a SanDisk USB stick that the burn completed successfully.

Next problem. According to this, I was supposed to install Windows on the primary partition, but Windows says no. "Windows cannot be installed on this disk. The selected disk has an MBR partition table. On EFI systems, Windows can only installed on GPT disks." Simplest solution is to delete all existing partitions - OS, Recovery, Primary. Another way is to convert the MBR disk to GPT.

  1. Press Shift+F10 to bring up command prompt.
  2. Run diskpart command. 
  3. "list disk" to list disks.
  4. "select disk 0" if disk 0 is the one you want to install Windows on.
  5. "clean" to wipe the selected disk.
  6. "convert GPT" to convert the selected disk.
  7. "exit"
This time you should be able to install Windows successfully. Just be aware that during the restart, remember to remove the USB disk, so the laptop will boot from the hard disk.


Friday, August 24, 2018

How I Got My AWS Certification

Gives me something useful to do while idle and looking for a job. I mean, how hard can it be?
Entry-level AWS certification is the Certified Solutions Architect - Associate. Next level up is Professional.

Read from somewhere that the best way to go about this is via A Cloud Guru's course from Ryan Kroonenburg. Apparently, they used to host their courses on Udemy, and I guess business was so good that they decided to launch their own platform and host their own training videos. The 2018 course on ACloudGuru is $99. If you've bought the course elsewhere, you can transfer it to your ACG account and have access to their updated content. So I went to have a look at Udemy and guess how much is the ACG AWS CSA - Associate course? Currently going for a discounted price of $15! I guess you already know what happened next. Paid for my first Udemy course, and ported it over to ACG.

So I spent the next few days and weeks and months watching the video lessons whenever I have free time. Content is basically Powerpoint slides with Ryan's voice in the background providing additional commentary. First few sections are a bit dry, as we had to go through the intro, some history, overview of AWS and its major components, setting up a free-tier account, etc. Best thing about the course are the lab exercises. For the more complicated topics, we get video recordings with step-by-step explanation - spinning up your first EC2 VM, how to properly set up VPCs, implementing HA, etc.

Once I finished the course, and typed up all my notes, the next step is to take the certification exam. Concerned that the mock exams included in the ACG exam might not be enough to help me pass, I turned to online resources like AWS' own practice exams, Jayendra's Blog and WhizLabs. The latter's exam package costs $20 and gives you:

  • 7 sets of 65 unique questions each (mock exam)
  • 11 section tests (165 unique questions)
  • explanation for every question
  • unlimited access

As I don't like to over prepare, I didn't even take all of the practice exams. Did a set of 65 questions once. Didn't have time to do the sections tests. I also downloaded some sets of review questions and plugged them into Anki on my phone for constant review. (Quizlet also have some sets for AWS.) Once I got them all down pat, I took the actual certification exam. Aced it in one go.

Wednesday, August 22, 2018

Movie 2018.08.22 - Crazy Rich Asians

I've got the ebook, but haven't had time to read it, so watched the movie knowing nothing about it. Of course, except for the usual FB hype as to which actors are in the movie, why it's such a big deal in Hollywood, etc. etc.

To be honest, it was better than I expected it to be. I thought the movie is going to be an extended YouTube video of how the fuerdai spend their hard-earned wealth - the extravagant parties, the exotic vacations, the flashy cars, the one-of-a-kind luxury items, etc. Yeah, it has a bit of those, but surprise! - it actually has a story.

Crazy rich Nick brings poor professor girlfriend Rachel to meet the family, without telling her how wealthy the family is. Mom Eleanor disapproves because she thinks she's not good enough - not a real Chinese. Grandma disapproves because she feels she is the reason Nick is hesitant to come back home for good and take over the family business. All the girls disapprove because she is competition. To fluff up the movie a bit more, we have a crazy rich bachelorette party at a private island resort, a crazy rich stag party on a container ship, a crazy rich wedding at Chijmes, and a crazy rich engagement party at the Marina Bay Sands. Throw in an extramarital affair to add more drama.

In the end, Rachel managed to use game theory (or was that reverse psychology) to make Eleanor change her mind about her and bring about a win-win outcome. Nick proposes to Rachel with Eleanor's own engagement ring, and everyone lives happily ever after. Well, everyone except for unfaithful Michael who lost his golden ticket in Astrid.

Friday, August 10, 2018

Long-Term Learning

Nowadays, it's not just what you learn, it's also about how you learn it.

Ideally, we should be learning by doing as the retention rate is better. However, there are times when we simply need to remember a lot of things in the shortest amount of time. And this is done by rote memorization. I still remember cramming for exams using index cards, memorizing facts and formulas to get me through. Do I still remember them now? Of course, not.

How about learning languages? Well, there's an app for that. A lots of apps, actually. For vocabulary memorization, you can't go wrong with Memrise. For grammar, sentence structure, syntax, context, etc., get Duolingo as a supplement.

For everything else, you can make use of flashcard-based learning systems like Quizlet, SuperMemo or Anki. If you're not sure which one to use, try Quizlet first. Lots of study sets to choose from (or create your own), and usage is pretty straightforward. Select a study set, answer one question for every term, repeat until you get everything right.

For long-term learning, you might want to look into SuperMemo and Anki for their spaced-repetition algorithms. Spaced repetition makes use of an individual's forgetting curve - resurfacing a question just when you're about to forget it for maximum recall.

SuperMemo has been around for a loong time, and its algorithm now on its 17th iteration (SM-17). SuperMemo is not free though. It ranges from $10 to $60 depending on which version (algorithm) you get. Anki, on the other hand, is open-source and free. That said, I believe it implements the older SM-2 algorithm with a few enhancements. Quizlet now has SR as part of Plus offering, but that's $15 per year.

I'd say try out the free apps first and upgrade if you think you need something more.