Rebounder Tech Blog

Written by the people who actually run these systems in production.

Running a Google TV Kiosk for Several Months

公開 読了時間 約4分執筆: Rebounder 開発チーム(当該システムの運用当事者)

※本記事にはアフィリエイトリンクを含む場合があります。内容は広告の有無に影響されません。

結論

Most of the work in turning a Google TV into signage is power and permissions, not display, and Device Owner can only be set while the device holds no Google account at all.

Starting with the conclusion

It has run untouched for several months. But almost all the work getting there had nothing to do with display.

Putting a web page full-screen takes minutes. What is hard is “keeping going by itself for months on the premise that nobody touches it”, and what actually had to be dealt with was these three.

  • The remote or the home button slips out to another app at some point
  • Power-saving settings blank the screen overnight and it does not come back in the morning
  • Once a freeze or an outage happens, it stays black until someone recovers it by hand

Not one line of clever code was needed. Power, permissions and model-dependent behaviour — those three.

The setup

Building a kiosk with a Raspberry Pi and Chromium was an option, but we chose to ride the mechanism Android already has for taking over a whole device. On a TV-shaped one, screen, power and audio are a single unit; you put it down and you are done.

All you need is a Google TV device and a PC that can reach it over adb. Open developer mode on the device and the preparation is finished.

Device Owner is the core

Android has a strong privilege called Device Owner. It is the mechanism for locking down company-issued devices, and giving it to your own app lets you do the following with no extra permissions.

  • Pin the screen to one app (home and back stop working) = kiosk mode
  • Turn off only the display backlight at night while keeping the device awake

The crucial part is that the device stays alive when the display goes off. Sleep the whole device here and remote wake stops working too, which breeds the “cannot recover” state. Turn off the screen, keep the head awake.

The traps we hit

① One account and you cannot become the owner

Device Owner can only be set while no Google account exists on the device. Sign in during initial setup by accident and you are stuck: you start again from a factory reset.

Cutting the network for a moment during setup to skip adding an account was the practical workaround.

② Without permission, a feature dies silently

The presence sensor we integrate with would not react at all. No error, no exception.

The cause was simply that the location permission had not been granted. BLE scanning returns zero results without saying anything when location is missing. It does not even appear in the log.

This class of silent failure ate the most time. A full day.

③ The TV’s own timer cannot be cleared by command

Having thoroughly applied every “do not turn off” setting in software, the whole box still lost power in the evening.

The culprit was a power-off timer in the TV’s firmware, and adb settings did not clear it. In the end it has to be switched off by hand from the TV’s own menu.

“Thinking you applied a setting” is the most dangerous state.

④ Some models ignore a setting silently

“Do not blank the screen” settings can, depending on the manufacturer, be ignored while pretending to apply.

So night blanking defaults to a pseudo-off that lays a fully black overlay on top. It tips toward “on any model, it definitely comes back in the morning”. We took certainty and gave up the power saving.

What the four traps had in common

Lined up, their nature matches. All four take the shape of “you cannot tell that you failed”.

  • ① you do not learn you are stuck until the factory reset stage
  • ② there is no error, no exception, no log
  • ③ and ④ leave the person who applied the setting thinking it worked

So the problem was not difficulty but visibility. It is not that it is too hard to solve; it is that you move on with the failure in place. That is what eats time.

What actually helped was not code but ordering: do not depend on settings you cannot verify; tip toward forms you can verify. Defaulting night blanking to a pseudo-off is exactly that — whether a model’s “do not blank” setting took effect cannot be confirmed, but whether the overlay is on top is visible.

Taking certainty and giving up power saving has been the right call so far.

When it suits and when it does not

If you want an always-on display running for months without staffing it, this is very hands-off. It has run untouched for several months since being put in place.

Conversely, if you want everything done through a GUI, or you never want to type a command, a commercial signage product or an off-the-shelf kiosk app suits better. The cost of getting all the way to Device Owner is only recouped once the number of units grows.

よくある質問

Q1What happens if setting Device Owner fails?

Device Owner cannot be set if even one Google account exists on the device. If you signed in during initial setup, you start again from a factory reset. Cutting the network briefly during setup to skip adding an account is the practical workaround.

Q2I want the screen off at night — must I not sleep the device?

Sleeping the whole device risks it never waking. Turn off only the display backlight and keep the device awake. On some models the screen-off setting is ignored entirely, so a black overlay as a pseudo-off is more reliable.

Q3Is this better than building a kiosk on a Raspberry Pi?

The Android side's advantage is that screen, power and audio are one unit — you put it down and you are done. Against that, whether Device Owner is available and how power behaves are model-dependent. The comparison is in a separate article.

この記事の根拠

  • ドキュメントファイル

本文の主張は、上の記録に書かれていることだけです。運用しているリポジトリは非公開のため リンクは張れませんが、どのファイルの何行目を、どのコミット時点で見て書いたかは 記事ごとに残しています。推測で書いた箇所はありません。