Smartphone Honor 9, despite its age, remains a powerful device that can become not just a means of communication, but also a full-fledged mobile station for software development. Many novice programmers mistakenly believe that learning coding requires an expensive laptop or PC, but modern realities allow you to write, compile and test applications directly on your phone. Using this device as the main platform for studying Java or Kotlin gives a unique advantage: you immediately see the result of your work on real hardware, and not in an emulator.
The process of turning an ordinary user into a mobile developer requires not only the installation of specialized software, but also deep reconfiguration of the system. You have to discover the hidden capabilities of the operating system Android, obtain superuser rights and configure the code execution environment. This is a fascinating path that will allow you to understand the architecture of mobile applications from the inside, turning your flagship into a real pocket computer for an engineer.
In this article we will analyze in detail each stage of setup Honor 9 for programming tasks. You'll learn how to properly prepare your device, what tools are needed to write code, and how to avoid common mistakes that can lead to data loss or system instability. Willingness to experiment is the main requirement for someone who wants to master this profession.
Preparing the device and unlocking capabilities
The first and most critical step is to activate the developer mode. Without this basic set of functions, interaction with the system at a deep level is impossible. On the shell EMUIinstalled on Honor 9, this item is hidden from the eyes of the average user by default for security reasons. To access it, you need to go to the menu Settings โ About phone and quickly click on the item Build number seven times in a row.
After completing these steps, a new section will appear in the main settings menu, which will become your main working tool. Here are the key switches that allow you to control the behavior of the system. Particular attention should be paid to point USB Debugging. Enabling it allows your computer or other devices to send commands to your phone, which is fundamental to app installation and logging.
โ ๏ธ Attention: By enabling USB debugging, you open up a potential attack vector for malware. Never connect your Honor 9 to unfamiliar public charging stations or other people's computers in data transfer mode if you do not trust them completely.
Additionally, in this menu it is recommended to activate the option USB charging to manual mode in order to have full control over the type of connection. This will avoid automatically switching to charge-only mode, which sometimes blocks development tools from working. It's also worth turning on touch display and position indicator, which will help visualize user interaction with the interface of your future application.
โ๏ธ Preparing Honor 9 for development
Installing the development environment and compilers
Choosing the right tool for writing code on a mobile device determines the speed of learning and comfort of work. For the platform Android there are several powerful solutions that can run directly on the smartphone processor. The most popular and functional option is the application Acode or Dcoderthat support syntax highlighting, autocompletion and integration with version control systems.
However, full development under Android often requires a local compiler. The application turns your phone into a Linux terminal emulator, allowing you to install packages and even run lightweight servers. This makes it possible to compile projects using Gradle directly on the device, although the process can be processor-intensive. If you plan to write on Termux turns your phone into a Linux terminal emulator, allowing you to install packages openjdk, git and even run light servers. This makes it possible to build projects using Gradle directly on the device, although the process can be resource intensive for processor Kirin 960.
If you plan to write on Kotlin or Java, make sure to allocate enough RAM to run background compilation services. In the developer settings, you can artificially limit the number of background processes to free up resources for the IDE. It is also useful to install a plugin for working with XML markup, since interface layout takes a significant part of the time.
Use an external keyboard connected via an OTG cable. Typing code on the Honor 9 on-screen keyboard is extremely inconvenient and significantly slows down the learning process.
For those who want to go further and run a full-fledged Android Studio in the cloud or via remote access, Honor 9 has a sufficient screen resolution 1920ร1080 for comfortable viewing. However, local compilation of large projects can cause the case to heat up, so monitor the temperature during long builds.
Setting up debugging and interacting with ADB
Tool ADB (Android Debug Bridge) is a bridge between your computer and your smartphone, allowing you to execute complex commands, install applications and read system logs To work with Honor 9 you need to install drivers HiSilicon or universal Google USB drivers on your PC. After connecting the cable in debug mode, a command adb devicesshould appear in the computer command line, displaying the serial number of the device.
Through ADB, you can obtain rights to read and write to protected sections of the file system, which cannot be done through a standard file manager. This is especially useful when testing applications that require access to system databases or settings. You can emulate various network scenarios, change the pixel density of the screen and forcefully close frozen processes.
| ADB command | Description of action | Required rights |
|---|---|---|
adb install app.apk |
Installing the application | Debugging USB |
adb logcat |
View system log | USB debugging |
adb shell |
Login to the device console | USB debugging |
adb reboot bootloader |
Reboot to bootloader | Unlocked BL |
It is important to understand that constant work in debug mode can affect battery life. The debug interface consumes additional CPU resources to process incoming commands. If you are not using a connection to a PC right now, it is better to temporarily disable this mode through quick settings or the main menu.
What to do if the computer does not see Honor 9?
Make sure the cable supports data transfer and not just charging. Try a different USB port, preferably USB 3.0. Restart the ADB service using adb kill-server and adb start-server. Check whether the MTP or PTP mode is selected in the phone notifications.
Obtaining root access and modifying the system
For an advanced level of development, rights are often required SuperUser (Root). They allow you to change system files, remove pre-installed software (bloatware) from Huawei and customize the system kernel to suit your needs. The process of obtaining root access to Honor 9 has historically been difficult due to company policies that have closed the possibility of officially unlocking the bootloader.
However, there are workarounds using third-party utilities and exploits specific to Kirin chipsets. Before starting any manipulations, it is critical to create a complete backup of your data, since an error can turn your phone into a โbrick.โ After successfully obtaining root access, you can install a manager Magiskthat provides systemless root without directly modifying the system partition.
โ ๏ธ Attention: Obtaining root access to Honor 9 may cause security features such as Google Pay or banking applications to fail. Some services may refuse to work on a modified system without additional settings for hiding the root.
Having superuser rights gives access to tools such as Titanium Backup or Tasker with extended rights. You can automate code build processes, clear the compiler cache on a schedule, and manage the power consumption of each individual tool application. This turns your smartphone into a flexible platform for experimentation.
Performance optimization for coding
Software development is a resource-intensive task. Compiling code, indexing files, and running emulators place a high load on the processor. On RAM and processor. On Honor 9 with its 4 or 6 GB of RAM, it is necessary to competently manage background processes so that the IDE does not fly out of memory at the most crucial moment.
In the menu for developers, find the item "Background process limit" and set the value to no more than 2-3 processes. This will reserve enough memory for your code editor and compiler. It is also recommended to disable all interface animations (window animation scale, transition animation) by setting them to "No animation" or "0.5x". This will speed up the system response when switching between windows.
Monitor the temperature of the device. Long compilation of projects can cause throttling (reduction in processor frequency), which will slow down the build. Use light themes in code editors, as dark themes consume less power on AMOLED screens (although the Honor 9 uses IPS, the savings will be due to lower pixel brightness in dark areas). Regularly clear the cache of development applications through the storage settings.
Disabling animations and limiting background processes is the most effective way to speed up the work of heavy IDEs on smartphones of previous generations.
First steps: creating and testing an application
When the environment is configured, you can start creating your first project. Start with a simple "Hello World" application to test the chain: code editor โ compiler โ install โ run. In Termux or mobile IDE, create a project structure, write code in Java and compile it to .apk file. Compilation errors will be output to the console, and analyzing them is an important part of the training.
After a successful build, install the application on your device. Test its operation: press the buttons, enter text, rotate the screen. Use logcat to track what is happening โunder the hoodโ when the buttons are pressed. You will see system messages that will help you understand the activity lifecycle Android.
Don't be afraid to make changes to the code and break the application. Mistakes are the best teacher. Try intentionally crashing to see how the system handles Exceptions. Study the documentation for Android SDKwhich is available online, and try to implement simple functions, such as access to the camera or accelerometer, which are in Honor 9.
Is it possible to make money by developing only on the phone?
Yes, it is possible, especially in freelancing or creating small utilities. However, for large teams working on complex enterprise projects, having a PC with a large monitor remains the industry standard due to the ease of navigating large code.
Does the Honor 9 get very hot when compiling code?
When compiling large projects for a long time, heating is possible since the processor is loaded at 100%. It is recommended to remove the case for better heat dissipation and not cover the device during assembly.
Do you need to update EMUI before starting development?
It is advisable to stay on the latest available stable firmware version, as it contains the latest security patches and Android SDK libraries. However, if the new version is known for problems with root access, you should stay with the old one.
Which programming language is better to choose to start on Android?
Today Google recommends Kotlin as the main development language. It is more concise and secure than Java, and is fully compatible with existing libraries.