📜 ⬆️ ⬇️

Safe Android for a child

I suspect that many of the readers of this publication did not carry a mobile phone with them in their childhood, or began to carry it only in high school - oddly enough, everyday mobiles that appeared to date appeared not so long ago. And even after their appearance for a long time, mobile phones were huge and expensive, and only serious guys could afford them. But in the courtyard of the year 2018, and junior students with might and main use smartphones.

Of course, children are different, and everyone has different problems in this regard. Someone has no problems at all, and I can only be glad for these people. Best of all, if it turns out to agree with the child about the reasonable use of the phone - but we will not consider this case as fairly obvious (agreed - well done). We will consider the case when you need to give the child a smartphone, but at the same time technically limit its use.


Why so?


Surely, many will immediately have a logical sentence: “Give your child an old push-button telephone,” or “Just don't turn on the Internet for him”. Again, this can be a great solution for someone, but for me it doesn't work for the following reasons:


Formulation of the problem


I will proceed further from the above prerequisites: that the child needs a standard inexpensive smartphone, where telegrams and geolocation service will work. Now we list that the child does not need:


Small retreat


If you are only interested in the technical part, feel free to rewind to the next heading. Here are the arguments about the correctness of the task.

It may seem that I am some kind of beast with delusions of control, so I’ll clarify that the child has a tablet and a computer at home. And after the lessons are done, you can watch cartoons, read Wikipedia, play toys, or write your own toys. Before they are made, you can also relax - but without using devices.

In general, we recognize honestly: the need to resolve an organizational issue with technical means is already a file. For example, if a pass system is set up in a company, employee traffic is monitored, open applications and mouse clicks are active, this means that something has gone wrong much. It is unlikely that the productivity of employees will grow from the fact that they will stick in the wheel. Adults and conscious people, at least out of a sense of contradiction, will begin to circumvent the prohibitions.

With the child the same thing - the main problem is that the child is absolutely not interested in doing homework. And looking at the tasks, I understand why. And even if you pick up the phone, the child will always find something else to entertain: to play with cars, dolls, or just sit and dream. So the real solution to the problem is rather a change of school, or home schooling. But this is a topic for another publication and other resources.

On the other hand, I have a suspicion that all these new technologies “at their fingertips” are too attractive for a child, and he simply cannot physically resist temptation (the Apple logo is remembered right away, right?). So perhaps the best solution is simply not to tempt. At least for a while. Then you will still need to slowly enter into the adult information sphere. Otherwise, everything can end badly when a child suddenly gets access to everything in the world, and from your greenhouse world pink ponies will plunge headlong into the Internet with toys, MMORPGs, applications, social networks, naked people, strange vocabulary, and so on. No kidding - I know quite a few guys who flew out of universities, because total control was established over them at home. And, having got to the hostel, they completely went into toys or communication, which they lacked so much. I would like to avoid this.

On the third hand, maybe I'm just getting old and starting to grumble against natural technical progress? Although, is the smartphone under the table so different from the book and the flashlight under the covers?

With the fourth - I myself am a second-generation developer, and I remember how I was limited to using a computer. And I remember that if I could somehow get around the prohibitions (oh, how much I learned in the process), then after that it was very difficult for me to control myself. Maybe it was the effect of the “forbidden fruit”. Or not ... If you can play a modem with a friend in DOOM, then what the hell do something else? So, I do not think that the absence of restrictions on using a computer as a child would give me something good. For example, I would definitely not start making first web projects for the money of 14 years to buy my own computer ...

I can not draw unambiguous conclusions, so I choose the old reliable method - the trial and error method. I try to limit the phone to the child and see what comes of it. Probably, in a year I will return everything to its original state, and see if the child can cope with it.

Platform and piece of iron


First you need to choose a platform and a piece of hardware on which we will make a children's phone. My choice fell on Android - for the simple reason that I worked with it, and I can flash it, write Java software or something native at the Linux level. The piece of iron is not so principled, and I already had a cheap phone that I bought earlier (so that it would not be a pity, if anything, and that the children would not measure themselves “at someone cooler”). It doesn't matter what to take, but if I did it now from scratch, then the requirements would be:


Options that don't work


First, I’ll tell you what I’ve watched and tried:


In any incomprehensible situation - DIY


After it became clear that I would not get off with a little blood, I began to think that it was easier to cut my native firmware, or install an alternative one. With anguish, I looked at an insane amount of noise, whistles and other bloatware at home. Then I looked that on the alternative, supposedly, everything works. The Android version on both firmwares was the same. And I decided that I would be faster to finish the alternative than to cut my own.



As an alternative, I put Cyanogen. It is clear that it is no longer supported, but there were no alternatives, except for those who were obviously not working. Yes, and I was not very worried about the update - according to the plan, the phone should live in peace for a few more years on the set of software that I am installing now.

I will not describe the firmware process myself - there are kilometer topics on a known resource for this. I can only say that for the first time it took me about 5 hours - but rather because of inattention. I can repeat it now in half an hour. There were no problems - the firmware got up, everything works, quickly took down the built-in browser and calculator. But then it turned out to be interesting - not a single family geolocation service did not want to work without Google Play on the phone. I do not know what amazing reasons this is due, but true. I suppressed the impulse to quickly write my geolocation service (the task is simple, I already did such, but it was an obvious “fatal flaw”), and resigned to the fact that Google Apps needed to be installed, and then somehow deal with them. Put as a result of Open GApps in the pico version - only there was no Google Now in it, which essentially opens the search window anywhere. After that, I got geolocation services. I struggled with the problem of accessibility of Google Play for quite a long time, not understanding why the seemingly simple thing was not described anywhere - a complete ban on installing applications. Actually, I spent 5 hours and another night on this.

There should have been a description of the solution dictated to me by nighttime despair and lack of sleep - how I set up crowns so that it constantly kills the google play process. But I slept and realized that it is enough to write a simple script in /etc/init.d

chmod 0551 /data/app
sleep 20
chmod 0551 /data/app

Пояснение — при установки нового приложения под него создаётся отдельная директория. Убираем права на запись — после скачивания приложение не может установиться. Заодно так решается проблема с установкой сторонних apk.

Один раз этого сделать недостаточно — андроид сам исправляет права на папку, поэтому скрипт помещён в автозагрузку в init.d. Два раза это делаю для надёжности — мало ли когда там исправление прав происходит.

Что вышло


Плюсы



Минусы



Не думаю, что моё решение идеально, и с интересом жду способов обхода ребёнком ограничений. Помню, как я в детстве начал интуитивно понимать комбинаторику, прикидывая количество возможных комбинаций пароля из 4 символов. Как учился сбрасывать пароль в BIOS. Как использовал софт, который мог этот пароль мне выдать. Как учился минимальному тайм менеджменту, чтобы тёплый ламповый монитор успел остыть к приходу родителей. Как в конце концов понял, что выгоднее всего быстро и хорошо сделать уроки, а потом втихую играть…

Выводы


Честно говоря, не понимаю, почему на рынке нет такого востребованного продукта, как полноценно управляемая детская мобильная ОС, или надстройка, которая позволяет её сделать (ну, кроме упомянутого варианта от ЛК). Если вдруг и есть, то странно, что я оказался не в силах его найти. Было бы это лет пять назад — я сразу загорелся бы идеей самому написать такую прошивку. Но уже не сейчас. Хотя инициативу я бы на досуге поддержал.

А вообще, я очень сильно надеюсь, что упустил какое-то известное решение, которое вы мне подскажете в комментариях.

UPD. В комментариях подсказали огромное количество всего интересного — как по техническим решениям, так и по организационным. Тот самый случай, когда получил много пользы от комментариев к статье. Вам тоже рекомендую к прочтению.

Source: https://habr.com/ru/post/410213/