What is the android source code for? Android from A to Z: What is open source and open source


Every day there are more and more applications for Android. Millions of interesting games and useful programs can be found in the Play Market. All of them have a user-friendly interface and cope with the task. It is difficult to imagine the modern world of information technology without them. This article is aimed at people who not only appreciate the functionality and appearance of applications, but are also interested in their internal structure.

If you have ever wondered what is “under the hood” of your favorite application, and you know a little about programming, this article is for you. We'll tell you how to view the source code of an Android application directly on your gadget. Go!

General information

Most programs for the Android OS, like most of the operating system itself, are written in a programming language. This means that when we look at the source code of Android programs, we will most likely see Java code using the Android SDK (which includes Android platform tools). I repeat: to understand the source code of applications, you need to have basic knowledge of Java and the principles of Android.

How to find out the source code of Android applications?

First, download the application whose source code interests you. Then go to the Play Market and download a utility called Show Java. She will be the one who will do the decompiling. Installed? Great, now let's move on to the fun part - extracting the source code of an Android program. Launch Show Java.

Select the desired application from the installed ones, or find it on the SD card. Now you need to select a decompiler. I usually choose CRF. If you have problems, try JaDX.

Upon completion of the process, you will receive a list of packages with the Android application sources. Of course, this is not a 100% copy of the code that the developers of this application wrote. But the basic logic remains the same and is not difficult to understand. What to do with the sources? Anything. Look, take a look, maybe you will be interested in some “features” or features of the implementation of the program’s functionality.

Heading:

It is no exaggeration to say that the world of mobile devices is ruled by open source operating systems. Android is still an open source project, although, due to the set of proprietary software on Android devices, many people do not think so.
Does Android have any worthy open source competitors? To answer this question, let's look at seven of the most popular open source Linux-based mobile operating systems. The OSes below are listed in random order.

Best Open Source Android Alternatives

1.Kai OS

Did you know that Kai OS is aiming to become the third largest mobile operating system in the world? Most likely no.
Well, this is not surprising. KaiOS entered the market not so long ago - in 2017 - but in less than two years it has become a platform for a huge number of mobile phones.
What's the secret? Unlike other operating systems, Kai OS is not designed for smartphones, but for feature phones - classic cell phones equipped with advanced options. The low price, combined with the functionality inherent in smart phones, makes feature phones quite popular.

A fork of the defunct Firefox OS (see below), Kai OS is also based on the Linux kernel.
You can gauge the potential of Kai OS by the fact that Google recently invested $22 million in this operating system.

2. Tizen

The open source Tizen mobile operating system is supported by the Linux Foundation, which is why it is often called the official Linux mobile OS. In addition to the Linux Foundation, Tizen is also supported by tech giants such as Samsung and Intel. The release of the first smartphone with Tizen OS, Samsung Z, took place in January 2015 (although it was originally planned for the end of 2013) on the South Asian market. Unfortunately, Samsung Z did not gain much success in the Indian market.

Despite the fact that the Tizen operating system is based on the Linux kernel, vulnerabilities have been discovered in it more than once. To be honest, it’s hard to believe in the future of this OS. It seems that sooner or later Tizen will become obsolete.

3. Plasma Mobile

In 2015, the developers of the KDE desktop created the open source mobile operating system Plasma Mobile. The application is based on the Kubuntu OS and is essentially a mobile version of the Plasma desktop user interface. At the same time, Plasma Mobile is compatible with other operating systems.

Plasma Mobile works on Nexus 5 and OnePlus One. The mobile OS supports KDE Plasma widgets and allows you to download desktop applications on your smartphone.

4.postmarketOS

postmarketOS (abbreviated pmOS) is a pre-configured and touch-optimized operating system based on Alpine Linux with its own software packages that can be installed on smartphones.

Android and iOS are known to stop releasing updates for models after a few years. At the same time, Linux works without problems on older computers. The goal of postmarketOS is to implement this experience on the mobile platform, providing smartphones with a 10-year life cycle.

The project is currently under development, so taking advantage of postmarketOS right now will most likely not be possible.

5. Librem

Librem is not even a mobile operating system, but a secure, encrypted, open-source mobile phone that the developers of the Linux distribution PureOS plan to bring to market in the near future.

The device will receive a touch-optimized version of PureOS, Debian, Ubuntu, SUSE, Fedora and even Arch Linux.

Librem is positioned as "a phone that's security and privacy-focused by default." The smartphone runs on free and open source software, the GNU+Linux operating system, and its mission is to “create a free development utopia as opposed to the walled gardens of other phone providers.”
We'll see if the idea succeeds.

6.LineageOS

LineageOS is an Android distribution, in other words, a custom firmware. The operating system replaced the much more successful Android distribution CyanogenMod and is its fork.

Released in December 2016, LineageOS currently supports 178 smartphone models, and the number of installations of the operating system, according to the developers, has reached 1.7 million.

7. /e/ (eelo)

/e/ (formerly eelo) is an Android distribution based on LineageOS from Mandrake Linux developer. The goal of the project is to create an open source mobile operating system not tied to Google.
It is assumed that the OS will have its own cloud and email service. The /e/ platform should appear in a stable version in the near future. The name of the project is planned to be changed again.

Sailfish OS [closed source]

When Nokia abandoned the development of the MeeGo mobile OS, some employees decided to save the project. It was assumed that MeeGo would develop the Linux Foundation community as part of the Tizen project, but the latter received independent development and ceased to be associated with MeeGo. Sailfish OS is considered a continuation of MeeGo. It is based on the Mer operating system, which became a fork of MeeGo.

The first devices based on Sailfish OS were Jolla smartphones, which received enthusiastic support from Nokia fans.
Today, this operating system is officially supported by more than ten mobile devices.
Although Sailfish OS is closed source, it can be considered as an alternative to Android, iOS and Windows.

Firefox OS [discontinued]

It is easy to guess that Firefox OS is an open source project of Mozilla, the creator of the Mozilla Firefox Internet browser. At one time, the announcement of the release of smartphones based on Firefox OS costing only $25 caused a lot of noise. The project's target audience was emerging markets like Brazil and India. Unfortunately, it turns out that a low price tag alone is not enough to replicate the success of the Raspberry Pi. As with Tizen, ZTE devices based on Firefox OS did not gain popularity and Mozilla stopped selling them at the end of 2015. However, experiments with Firefox OS continue.

Ubuntu Touch [Community Supported]

In 2013, the king of desktop operating systems Linux acquired a mobile version - Ubuntu Touch. Canonical has launched a crowdfunding campaign aiming to raise $32 million to develop the first Ubuntu smartphone, the Edge. They managed to collect only 12 million, but this amount also became a record.

After a failed crowdfunding campaign, Canonical managed to release Ubuntu Phone together with the Spanish mobile device manufacturer bq and the Chinese manufacturer Meizu.
Subsequently, several other models based on Ubuntu Touch appeared. In 2017, Canonical decided to stop developing its mobile OS, but the UBports community still keeps Ubuntu Touch afloat.

What do you think?

To be honest, we strongly doubt that any of the above mobile operating systems will be able to compete with Android. What do you think?
Do Linux-based mobile operating systems have a chance to displace Android on the pedestal? Or will they have to desperately fight for a more or less acceptable market share, like the Linux desktop OS? Share your opinion in the comments.

Denial of responsibility: This article is written for educational purposes only. The author or publisher did not publish this article for malicious purposes. If readers would like to use the information for personal gain, the author and publisher are not responsible for any harm or damage caused.

(12 ratings, average: 5,00 out of 5)

Browser developers have taken care of the convenience of those who create sites that open in these same browsers, namely webmasters. They have added developer tools to the standard features, with which you can easily open and view the source code of the site page in the browser: HTML, CSS, JavaScript (JS), obtain various useful data about the structure of the site, conduct its technical analysis. In general, see a lot of useful things.

Of course, these tools are used not only by website creators for work, but also by ordinary users, for whom the source code allows them to view various useful data.

From this article you will learn how to view the source code of a website page in a browser (how to open the HTML, CSS, JavaScript code of a website).

How to open a page's source code in a browser

There are two ways to open the source code of a web page in a browser:

  1. Using hot keys;
  2. Open from context menu.

Ctrl+U– a hotkey combination to view the source code of the entire site page in a separate new window. Standard for all browsers: Google Chrome, Opera, Mozilla Firefox, Yandex browser, IE.

You can also enter the developer tools as follows:


In order to quickly find the desired code, word or text on a page, you can use the standard search hotkey combination for all browsers: Ctrl + G.

Video instruction:

View element code | explore element | inspect element

If you suddenly need to view not the entire source code, but display only a separate part of it, some area on the page, then the previous tool will not work. For this purpose, the developer tools have another function, which will be discussed below.

How to view the code of an element on a page:


You can also use keyboard shortcuts to quickly access element inspection.

Hotkeys (buttons):

Google Chrome: Ctrl+Shift+I and Ctrl+Shift+C

Opera: Ctrl+Shift+I and Ctrl+Shift+C

Mozilla Firefox: Ctrl+Shift+I and Ctrl+Shift+C

Yandex browser: Ctrl+Shift+I and Ctrl+Shift+C

After these steps, the source code of the web page will open in the same browser window:

All HTML code will be in the large left column. And CSS styles are on the right.

The advantage of this method, of course, is that the user has the opportunity to change the source code and edit styles. That is, you can edit the styles on the site and see how it will look with certain styles, without having to immediately make changes to the files located on the hosting servers. To change or add program code, you need to double-click on the desired fragment or area. Of course, the code correction in the browser will not be made on the hosting servers. Therefore, in the future, in any case, you will have to copy this code and write it into files.

This video instruction describes in detail and shows how to work with the developer tools:

Just like that, just online, right in your browser, you can view the source code of the site page, get basic data about the HTML and CSS code, change and copy them, without having to download the files of this site to your computer.

By the way, inexperienced Internet users who have changed the page code and expect it to be saved will be disappointed. After all, after refreshing the page, all changes on it will disappear. This is not enough to hack the site :)

How to View Source Code on Android Phone

I would also like to note that the developer tools are available not only in the desktop version of browsers, that is, on computers and laptops. On phones and tablets (Android, iOS) you can also view the source code.

To do this, add the view-source prefix to the URL of the page being inspected:

For example:

view-source:https://site/turbo-rezhim-opera/

Open Software (open-source software) is intended for free access to source code For everyone. There are different licenses with different terms of use from GPL (GNU General Public License) and to more loyal Apache License. The first allows free distribution provided that the same license is used for subsequent products. The second does not require mandatory distribution of the finished product and open source code. Android uses both. Inside, the sequel talked about open source and open source software.

The kernel that is used in the OS is subject to GPL. This means that all changes source code should be available to the public after the official release of the software. In practice, it should look like this: manufacturers such as HTC, Samsung, Motorola, releasing a new device, are obliged to make open access to source code since the release of this device. For the most part, hardware manufacturers are a little delaying this.

Source for OS Android usually falls under Apache License. Anyone can download source and change it without having to make the code available to everyone. For this reason Android cannot change or improve HTC Sense or MotoBlur. Despite the fact that many users do not like this situation, it cannot be changed for commercial reasons. If manufacturers made all their secrets available, there would be no financial reason to create various innovations to stay ahead of their rivals in the competition. Thus, using a more flexible license is completely justified. The release of new devices regularly confirms this.







2024 gtavrl.ru.