“Certified” Androids?

The story begins with the moment I bought Cytus II on the very first day of its release from google play, expecting some real music gaming on my Surface Pro 3 running homebrew Android 7.1 (yes, that’s totally possible and it runs suprisingly fine with all hardware buttons and touchscreen working). However the game quits immediately and no logs are shown through the adb interface. I contacted Rayark for support and got reply like this:

Cytus II might only be compatible for native Android devices at the moment. Please also check if you have installed Xposed, firewalls, block ads, or any rooting software. If yes, these may effect the performance of the game. We’d like to suggest you to remove these software to ensure the game runs smoothly and properly.

(Probably) 3 weeks after the game’s release, I ended up playing Cytus II on my crammed 5′ mobile phone, not by choice though. Someone asked me, why I can’t buy a regular Android tablet or an iPad to do the same job. Well that could be an option if those people would donate in any means for a new one, and I really don’t think utilizing an existing hardware piece could cause any troubles for commercial devs and companies (Google: really?).

After some searches I reached conclusion that Cytus II has integrated an “compliance check” called SafetyNet and the underlying Compatibility Test Suite (CTS), a framework introduced by Google to verify if any android device falls into the category of “compatible”. Since Surface Pro 3 has never got an official Android release (it’s a Microsoft thing, of course) and the base android x86 is shipped with root and development mode on, there is probably no way that any CTS tests on Surface Pro 3 would pass any time sooner.

Just earlier this day, I saw the news that Google is attmpting to block Gapps from running on “uncertified” devices, where modding the android device or unlocking bootloader would void the “certified” status. There’s even a webpage letting people to “register” their Androids with their device identifier which is absolutely not working after I attempted to register my Surface only getting an unknown error.

I would not blame Rayark for their attempt to place a layer of piracy protection on such a nice game while hurting the ones who modded their devices properly exactly to play these games. My question is: If such a lockdown is so important that this system had been deployed to thousands of android software by now, why make android an open standard? Why not switch to the Apple production mode if a centralized control force seems so vital to the whole android community? Such blockage wouldn’t be easily tolerated if the so called “register uncertified devide page” is just a lie, and I believe there will be a solution to circumvent such unreasonable restrictions eventually. Before that, the vast population of “uncertified” androids and modders wouldn’t be so comfortable and I might really need to ask myself: Why I should spend 3 months porting an open source OS to a new device just to find nothing should works by design.

The Hot City?

When I told someone Chengdu is a hot city, I meant both food and the city itself. Hopefully, I finally remembered that I forgot procrastinated to post my photos I took when I travelled to Chengdu and stayed for a few days this winter. Still, these pictures are taken from my old Canon 50D DSLR and the mediocre lens.

Continue reading The Hot City?

The season of white (photo) album

It’s -30 degree celcius in Madison. It’s snowing. It’s the season of white album again.

白い雪が街に——
優しく積もるように
アルバムの空白を全部——
埋めてしまおう——

Camera: Canon EOS 50D (a really old DSLR)
Lens: Canon EF-S 17-85mm f4-5.6 IS USM (yes, the very mediocre default)
Aperture: f/5.6
Exposure: 1/500
Location: In my room [precise location redacted]

Sakura island blender render

Sakura Island is the spawn point in my minecraft server. Of course it would not be possible to place sakura trees in game, so what’s actually in Minecraft is pink wool. Nevertheless they still look nice from far away.

I tried water caustics with refraction and fresnel effects, which make water more realistic at the cost of increased samples and render time. Also I attempted a manual material override on tree leaves, However that seems worth it.

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Minecraft creation by me, exported with mineways on wine, rendered on blender with cuda. As usual, full resolution of 4096×4096 is available on pixiv.

Sakura Island At Night
Rendered in Blender

[Errata] Windows upgrade to 1703 broke grub

What happened?

After windows upgrading itself to release 1703 aka. the creator update, Grub bootloader can no longer start and says error: unknown filesystem and dropped in to grub rescue shell. Windows boots up fine from firmware memu.

TL; DR

Manually doing hexediting just taught me another valuable lesson: @Windows has the worst upgrade handling.

— @cth451 July 28, 2017

  1. Prepare a USB linux live environment.
  2. Find the correct partition number, it might have been changed during upgrade.
  3. Look for grubx64.efi in your EFI system partition and use a hex editor to open it
  4. Search for /boot/grub and notice the (,gptN) where N is your original partition number for linux OS.
  5. Change N to the new parition number, save the file and reboot.

Analysis

Before upgrade, my partition scheme was:

  • sda1 fat32: EFI system parition
  • sda2 ext4: Archlinux root filesystem
  • sda4 ntfs: Windows drive C
  • sda3 ext4: AOSC OS root filesystem

Partition numbers were not exactly in physical order of data, for I shrinked Archlinux to make room for Windows installation. However after upgrade, it became:

  • sda1 fat32: EFI system parition
  • sda2 ext4: Archlinux root filesystem
  • sda3: Windows drive C
  • sda4: Windows recovery environment
  • sda5: AOSC OS root filesystem

So what did windows do down there? It shrinked drive C and made a little recovery partition, then re-sorted the partition numbers. However grub bootloader looks for partitions by partition number. It tried parition 3 (which was a valid linux filesystem), but it’s an ntfs now.

This partition number is hardcoded into the bootloader efi image, so we need to manually hexedit it.

Self burn notice: Sina Weibo

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

近期由于新浪微博已经无法正常使用,我将不会在 Sat Jul 15 8:00am GMT+8 之后继续发布微博。
以防万一,在此声明此后的所有新微博、评论和私信均非本人所为。但是,我仍然会主动的维护关注及粉丝列表。

- -- cth451
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEsbVKlVRo2o1u8IoTEN2RLfRlcEgFAllo7NUACgkQEN2RLfRl
cEgvaRAA0rnVIGjmhV2oJ5Z4wnoO+fiIJxumNws83zdfU0veZNE7I41dJ0VZ9BMT
FDFd6bVaBiCDML36bb4L4N48M5TB/zTo2N7bAoIhebCuMJV45D7z29Iif3IsxoO2
TnPUYIyKuLu23or0Ya0i3Y6Jtp6mviYKKYlK4DuK5ZO8d3dd3QjUswr5kxCOCBMA
l7/PowUpoBHQw2cDqlJDwCywXQztroIuXgau472Wbk22owRDUQu8B4gexJqYwDWQ
FAu8t8Me4FYlbaXXUUfV5K7ZmnRAfDNa535LIzaE6OpNe14BdQSbVyOE42dsYQHI
Qf7gPvjahqQh1U4J4XwMjI03JYd2Y0TpvlSHeYu5c7lRyxoaTUjNjwKEvDBZqukO
2S40brJ6Qgrex+SISV0VZcMm1lBfQYewA4jzrU9RbY5TEb3078KcZ6Q0nUiAUpZb
qIYoSG7W/8vQ0JWkEFA+039Rs7ZIs+cnKB+45xVV3JGPawQk7cNG9rk8RcQm+fjr
Hjzwi2QfHAQ7PNkTwDYc2M4lOanSUKKP7wE9Mw7NpK6GdWAv8Lbx+m+9liNlhkzM
jbhD7QqIfOlgsDrp3UqgWqbwhRnKmMMtq8y9svm/MDok6jGMGKIIOQCsJTouHHpK
acR3ubO26cDAdqaezSLMYMPGmfj58SyRY3z5NUMPEFvJzv+Wx7Y=
=btsa
-----END PGP SIGNATURE-----

我将会陆续停用其他社交网络与新浪微博之间的连结,并且可能出现大量数据删除。感谢微博上不知名的各位在过去对一个普通学生的支持。

大阪

梅田

A photo of the Yodo-gawa (淀川) from the skyscrapers with the old DSLR Canon 50D. Juusou-suji (十三筋) and Hankyu railways are visible in this picture.

EXIF:
Camera   = Canon EOS 50D
Lens     = EF-S 17-85mm f/4-5.6 IS USM
ISO      = 100
Aperture = f/11
Exposure = 30"
Shot from 梅田スカイビル 空中庭園

天満橋

A shot of the only double decked bridge in Osaka. Taken with my Xperia Z5 on the cruise ship during sunset.

天満橋 Geotag: 小川