This repository contains scripts for working with "4K Mi TV stick".
deploy_as_system_apps.sh - is a script that scans the directory in which it is located for the presence of applications and loads these applications into the mi tv stick in the /system/app folder, without the subsequent ability to delete these applications.
Этот скрипт сканирует папку, в которой он находится, на наличие APK-файлов и устанавливает эти приложения на Android-устройство в папку system/app
через ADB.
-
Убедитесь, что ADB установлен
Убедитесь, что вы установили Android Debug Bridge (ADB) на своем компьютере. Вы можете скачать его с официального сайта Android. -
Подключите Android-устройство
Подключите ваше Android-устройство к компьютеру через USB-кабель. Убедитесь, что включен режим отладки по USB:- Перейдите в Настройки → Для разработчиков → Отладка по USB и активируйте ее.
-
Проверьте подключение устройства
Откройте терминал и введите следующую команду, чтобы убедиться, что ваше устройство правильно распознается:adb devices
Вы должны увидеть список подключенных устройств. Если ваше устройство не отображается, убедитесь, что драйвера установлены и отладка включена.
-
Сделайте скрипт исполняемым: В терминале перейдите в директорию, где находится ваш скрипт, и выполните следующую команду, чтобы сделать его исполняемым:
chmod +x deploy_as_system_apps.sh
-
Поместите в папку со скриптом апк файлы
-
Выполните скрипт с помощью следующей команды:
./deploy_as_system_apps.sh
или
{Полный_путь_к_скрипту}/deploy_as_system_apps.sh
Убедитесь, что у вас есть права суперпользователя (root) на вашем Android-устройстве, чтобы установить приложения в папку /system/app. Если устройство не рутировано, установка в /system/app не будет возможна, и вы получите ошибку.
This script scans the folder it is in for APK files and installs these apps on your Android device in the system/app
folder via ADB.
-
Make sure ADB is installed Make sure you have installed the Android Debug Bridge (ADB) on your computer. You can download it from the official Android website.
-
Connect your Android device Connect your Android device to your computer via a USB cable. Make sure USB debugging is enabled:
- Go to Settings → Developer options → USB debugging and enable it.
- Check device connectivity Open a terminal and enter the following command to make sure your device is recognized correctly:
adb devices
You should see a list of connected devices. If your device is not shown, make sure the drivers are installed and debugging is enabled.
- Make the script executable: In the terminal, go to the directory where your script is located and run the following command to make it executable:
chmod +x deploy_as_system_apps.sh
-
Place the apk files in the folder with the script
-
Run the script with the following command:
./deploy_as_system_apps.sh
or
{Full_path_to_script}/deploy_as_system_apps.sh
Make sure you have root access on your Android device to install apps to the /system/app folder. If the device is not rooted, installing to /system/app will not be possible and you will get an error.