Implementing DM-VERITY for rooted/xposed/customized roms - HTC One A9

Hi, this is my first post on XDA, even though I've been trolling/using the site since my first Android device in 2011.
According to everything I've read so far, implementing dm-verity on anything but a completely untouched OEM /system is impossible. This breaks the ability to extend "internal" storage with a microsd card and forces us to use workarounds to encrypt /data on Marshmallow Sense roms (and probably others).
All of the media hype surrounding mobile device security lately has me thinking more about this subject.
In theory, if we are s-off, couldn't we implement this functionality into a rom/kernel (hboot and/or aboot?) of our own design, customized to our preference, then lock the bootloader back down and s-on to prevent modification by anyone without the dm-verity table signature?
If we could implement this, it would be a huge breakthrough in security, especially for those of us who like to modify our devices.

Related

[REF]{Definitions} Andorid & SGS4G specific <7/18>

THE SGS4G DICTIONARY​
A COMPANION TO THE BIBLE​​​
I am going to put a more in depth dictionary together, but this is my start. This was "Kanged" (look it up) from cyonogenmod wiki and Wikipedia. but I will be rewording it and customizing it to fit our needs here over time. This is just a jumping off point to get me going. As always, feel free to leave any words that need to be added!
2e recovery
3G
3G is the term generally used to describe 3rd Generation mobile telecommunications, specifically allowing for greater throughput of data over cellular networks. The official standard is known as "International Mobile Telecommunications-2000 (IMT-2000)".
4G
4G is the fourth generation of cellular wireless standards. It is a successor to the 3G and 2G families of standards. In 2009, the ITU-R organization specified the IMT-Advanced (International Mobile Telecommunications Advanced) requirements for 4G standards, setting peak speed requirements for 4G service at 100 Mbit/s for high mobility communication (such as from trains and cars) and 1 Gbit/s for low mobility communication (such as pedestrians and stationary users).
ADB
Android Development Bridge. Command line tool used to communicate with & control the device over a USB link from a computer. The ADB command is found in the Android SDK.
ADP
Android Developer Phone. The first ADP was a "development" version of the HTC Dream. The current ADP is the Samsung Nexus S II.
Aftermarket
Aftermarket generally refers to any product or service applied or requisitioned by end-users to add usability or functionality to the original product. Many aftermarket modifications can void the manufacturer's warranty. From a manufacturer's perspective, the after-market is any goods or services offered by the manufacturer directly to end-users of a given product or service. After-market services include support for warranties, contracts, and parts and accessories sales.
Android
Unveiled on 5 November 2007, Android is a mobile operating system running on the Linux kernel developed by Google. Below is a list of the most recent versions, and what they include:
2.0 (Eclair) included a new web browser, with a new user interface and support for HTML5 and the W3C Geolocation API. It also included an enhanced camera app with features like digital zoom, flash, color effects, and more.[46]
2.1 (Eclair) included support for voice controls throughout the entire OS. It also included a new launcher, with 5 homescreens instead of 3, animated backgrounds, and a button to open the menu (instead of a slider). It also included a new weather app, and improved functionality in the Email and Phonebook apps.[46]
2.2 (Froyo) introduced speed improvements with JIT optimization and the Chrome V8 JavaScript engine, and added Wi-Fi hotspot tethering and Adobe Flash support[47]
2.3 (Gingerbread) refined the user interface, improved the soft keyboard and copy/paste features, and added support for Near Field Communication[48]
3.0 (Honeycomb) was a tablet-oriented[49][50][51] release which supports larger screen devices and introduces many new user interface features, and supports multicore processors and hardware acceleration for graphics.[52] The Honeycomb SDK has been released and the first device featuring this version, the Motorola Xoom tablet, went on sale in February 2011.[53]
3.1 (Honeycomb) was announced at the 2011 Google I/O on 10 May 2011.[54]
3.2 (Honeycomb) is "an incremental release that adds several new capabilities for users and developers." Highlights include optimization for a broader range of screen sizes; new "zoom-to-fill" screen compatibility mode; capability to load media files directly from the SD card; and an extended screen support API, providing developers with more precise control over the UI.[55]
Below is a list of future releases that have been announced:
4.0 (Ice Cream Sandwich)[56] is said to be a combination of Gingerbread and Honeycomb into a "cohesive whole."[57] It will be released in Q4 2011.
.apk
The .apk is a file extension that denotes "android package". As android in a linux based operating system, things are installed in packages. It is practically the installation file of a new program.
Apps2SD
Move applications from the internal NAND memory on the device to a removable SD Card.
Bloatware
Software or 'apps' that you don't need, but come preinstalled to a device's /system partition, meaning that you cannot remove them unless the device has been rooted. Usually, these are apps are sponsored by a company and included by a carrier for profit. The majority of bloatware put on the phones can be useless, as well as additional theming provided to the SGS4G can cause lag.
Brick
Bricking; Essentially the phone is as good as a "brick" or "Paper weight". There are two types of bricking;
Semi-bricked - Phone will boot up to a stage of perhaps the S logo animating but not entering the correct stage of normal use, you should be able to enter recovery mode or download mode and recover your device.
Fully Bricked - The phone will not boot up, depending on what went wrong, you may not even be able to access recovery or download mode to recover your device, but in some circumstance it is possible with the help of a home-made JIG to Trigger download mode. Or- The phone will do nothing, in which case only a JTAG will help.
CWM
ClockWorkMod is an alternate recovery menu where you can execute more advanced features such installing custom ROMs, Modifications such as kernels, lagfixes, battery indicator MODS etc from the internal SDCARD. As well as backing up and restoring the current ROM you are using. Other advanced features include clearing Dalvik Cache, wiping battery stats and partitioning the sdcard. Kernel/lag-fix settings can also be changed using the CWM. It can be installed by using the update.zip by downloading from either a site or via the app on the market. You must have 2e recovery to install this MOD.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Dalvik-Cache
The dalvik-cache directory holds all of the pre-compiled .dex files created from installed apps. These files are static and do not change unless the app is updated.
Debranding
To "debrand" a handset, you flash stock firmware to it, thus stripping it of any network branding whatsoever. It is a clean handset where adding customizations and modifications has a less chance of causing instability with the SGS.
Download Mode
Can be accessed by pressing "Volume Down + Power + Menu" when the phone is powered off. It is the standby prompt for the installation of new firmware.
ext2
Second extended filesystem for the Linux kernel. ext2 is still the filesystem of FSchoice for flash-based storage media (such as SD cards, SSDs, and USB flash drives) since its lack of a journal minimizes the number of writes.
ext3
Third extended journaling filesystem is a journaled file system that is commonly used by the Linux kernel. It is the default file system for many popular Linux distributions. Note that due to limitations of SD Cards, you need to run "e2fsck -f" on any ext3 based SD Card filesystems after a crash to insure your data is still intact.
ext4
Fourth extended journaling filesystem is a journaling file system developed as the successor to ext3. Note that due to limitations of SD Cards, you need to run "e2fsck -f" on any ext4 based SD Card filesystems after a crash to insure your data is still intact.
Fastboot
Fastboot is protocol used to directly update the flash filesystem in Android devices from a host over USB. It allows flashing of unsigned partition images. It is disabled almost all production devices since USB support is disabled in the bootloader.
Firmware
Programs stored in the ROM, EPROM, or flash memory that usually control various internal electronic devices (Hard Drives, Keyboards, Displays, etc). Firmware is typically 'fixed' software that is not updated in consumer devices, however it is often updated (or 'flashed') by advanced users to fix bugs or add features to the device. Flashing firmware designed for one device onto a different device, or not following a specific procedure while flashing will often render the device unusable.
Flash
Non-volatile computer storage that can be electrically erased and reprogrammed (similar to EPROM). No power is needed to maintain the information stored in the chip. This technology is primarily used in memory cards and USB flash drives for general storage and transfer of data between computers and other digital products. Because of its ease of use, speed, ability to be updated (see flashing), this technology is often used in mobile devices, PDAs, digital media players.
Flashing
The process of applying a firmware image (or ROM) to a device. It generally entails a very specific order of steps. Failing to complete any one of these steps properly may result in bricking the device.
GApps/Google Apps
An add-on for Google's applications (Market, GMail etc.), packaged separately to avoid copyright issues
GNU
A recursive acronym for “GNU's Not Unix!”; it is pronounced g-noo, as one syllable with no vowel sound between the g and the n. The GNU Project was launched in 1984 to develop a complete Unix-like operating system which is free software: the GNU system. “Free software” is a matter of liberty, not price. To understand the concept, you should think of “free” as in “free speech”, not as in “free beer”.
IMEI
The International Mobile Equipment Identity is a number unique to every GSM, WCDMA, and iDEN mobile device, as well as some satellite devices. The IMEI number is used by the GSM network to identify valid devices and therefore can be used to stop a stolen device from accessing the network. For example, if a mobile device is stolen, the owner can call their network provider and instruct them to "ban" the device using its IMEI number. This renders the device useless, whether or not the device's SIM is changed. The IMEI can be displayed by dialing *#06#.
JTAG
JTAG is repair solution providing unique scripting support and IDA real time debugging via GDB Server. RIFF Box JTAG is a high quality hardware with the Resurrection feature allowing for one-click repair.
Kang
The process of creating a code based of someone else's code or reapplying code that someone else created into your own code (e.g. git cherry-pick)
Kernel
The central or core software component of most operating systems. Its responsibilities include managing the system's resources (the communication between hardware and software components) and can provide the lowest-level abstraction layer for resources (especially memory, processors, and I/O devices). You can flash different kernels to the SGS, being Voodoo, SpeedMOD and others, you can have different desired effects with flashing different kernels by enhancing sound/picture, the enhancement of input/output between the processor and memory as well as lagfixes.
Kies
Kies is official software from Samsung which allows you to connect your SGS to your PC. It provides many features such as photo/audio/video copying PC <-> Mobile, firmware upgrading and backing up of data such as contacts/calendar/media.
IRC
Internet Relay Chat. Basically a chatroom, or a cross between Instant Messaging and a forum.
Lagfix
The lagfix in the SGS is exactly what it means...fixing lag. Reason for it is that the SGS has a proprietary filing system known as RFS, this although works with android, it can cause lag. Fixes for these are "lag-fixes" which can convert the original RFS filing system into EXT4, a linux filing system which the android operating system can work very well with. Newer ROMs such as 2.2.1 JPU + have improved RFS structures which aid against lag and alot users are not using lagfixes anymore.
Launcher
The standard launcher that the SGS comes with is the touchwiz. This allows you to have a standard 4-icon dock and 7-home screens, placing icons and widgets onto the home screen, it is responsible for launching various applications. You can have alternate launchers such as "launcher pro", ADW, new gingerbread launcher and modified touchwiz's, each can give you additional performance and features such as graphics, widgets and increased speed in launching applications.
Logcat
A debugging tool built into Android devices that displays system logs as they occur. See Logcat.
NANDroid
A set of tools that will enable anyone who has root on their Android device to make FULL system backups, in case something goes wrong or you want to try out that new experimental ROM/theme. NANDroid will backup (and restore) /system, /data, /cache, and /boot partitions.
ODIN
Is a windows program used to flash the SGS phones when the phone is activated in download mode. It is an un-offical method to flashing the SGS. However, it is rumoured to be leaked firmware flashing software from Samsung.
PIT File - Believed to be responsible for the partitioning and directing where to install firmware on disk.
PDA File - Is the main firmware image of the phone containing the kernel, bootloader and majority of data for the SGS.
Phone File - Also known as the modem file, believe it is responsible for the phone/modem data, such as calling protocols and having the relevant software for being able to sign onto mobile networks and other communications such as wi-fi/bluetooth and GPS.
CSC File - Customer sales code, responsible for the identification of the phone, e.g XEU-CSC will be UK/Europe Standard. The CSC values will be used for future "over the air" updates as well as current identification while in the android market to see which apps are available to you.
Open-source
Open-source is software that anyone is allowed to see the 'source' code. In the context of Android, Open-source refers to the approach to the design, development, and distribution of software. This offers accessibility to a software's source code for modification, improvement, bug-fixing, and security-enhancement. CyanogenMod is based on this principle.
Radio
The cellular radio on the device which needs control software called firmware to control it.
Recovery Mode
A special environment that you can boot into for troubleshooting and upgrading purposes. Can be accessed by pressing "Volume UP + Power + Menu" when the phone is powered off, press and keep a hold for approx 4 seconds and release.
2e Recovery;
Is a revision of recovery mode which allows you to apply unsigned "update.zip"s, Wipe Cache partition, Wipe data/factory reset and format the internal SD-Card. This is the commonly used recovery mode.
3e Recovery;
Is the latest revision of recovery mode which allows allows you to flash signed "update.zip"s. Wipe Cache partition, Wipe data/factory reset and format the internal SD-Card. This recovery revision can be downgraded to 2e in order to flash unsigned zips and allow the installation of rooting or other modifications used in recovery.
ROM
Read Only Memory. In the context of an Android device, ROM is the internal flash memory where the core operating system resides. It can also refer to a specific version firmware that can be applied to a device through a process usually referred to as flashing. An improperly flashed ROM can often brick the device, rendering it unusable.
Rooting
Obtaining root ("administrator", or "full") access to the device. This means you can mount its internal memory partition as read/write, which lets you do various things: have USB or Wi-Fi tethering, uninstall applications you otherwise can't uninstall (e.g. the Amazon MP3 store), install applications that need root access (such as AdFree), disable the camera shutter sound (simply by deleting the shutter sound file), overclock or underclock the CPU, install and boot Debian, and so on. Installing CyanogenMod roots the device in the process. The "Superuser" app controls what applications may gain root privileges.
SDK
A software development kit (SDK or "devkit") is typically a set of development tools that allows for the creation of applications for a certain software package, software framework, hardware platform, computer system, video game console, operating system, or similar platform. You can find the Android SDK at http://developer.android.com/sdk.
SIM
A subscriber identity module or subscriber identification module (SIM) is a small card provided by your carrier. It is an integrated circuit that securely stores the service-subscriber key (IMSI) used to identify a subscriber on mobile telephony devices (such as mobile phones and computers). A SIM card contains its unique serial number (ICCID), internationally unique number of the mobile user (IMSI), security authentication and ciphering information, temporary information related to the local network, a list of the services the user has access to and two passwords (PIN for usual use and PUK for unlocking).
SPL
Second Program Loader, in conjunction with the IPL comprise a device's bootloader. Aside from bootstrapping Android, the bootloader also fulfills various diagnostic functions. One of these functions is the manipulation of data in the device's internal flash ram. Depending on the SPL installed, the user might be able to flash signed NBH files, flash nand images, and more. Note that the SPL is installed and operates independently of the Android build that runs atop it.
Generally speaking, there are two variants of the SPL: Stock, which is 'locked' and is installed on most devices from the factory, and Engineering, which is 'unlocked' and has to be manually flashed - usually after 'rooting'.
Stock firmware
Stock firmware is official, untouched firmware from Samsung.
Tethering
Using a wireless device (e.g. an Android phone) to share it's wireless data connection to another device (e.g. laptop). With an Android device, the wireless data connection can usually be shared via WiFi, Bluetooth or USB connection.
Unlock
Most GSM devices are locked to only work with the sim cards of a particular carrier. Obtaining root access (e.g. installing CyanogenMod) on the device usually does nothing to the sim-lock. The usual way to unlock the device to all SIM cards is to obtain a subsidy unlock code from a carrier.
Vanilla
A clean, unmodified version of something. In the context of Android ROMs, vanilla refers to the stock ROM that came pre-installed on the device.
Widget
An application that lives (in other words, is always running) on the homescreen instead of being 'run' like a regular app. It feeds information right to the home screen, and you can interact with the app without the need to open the app. Common examples are calenders and weather widgets.
Wipe
Usually refers to wiping data and cache partitions of the device.
Zipalign
Reduces the amount of RAM consumed when running the application by allowing data to be mmap'd in; which causes all uncompressed data within the .apk, such as images or raw files, to be aligned on 4-byte boundaries.
More to come as I fill it and make it pretty!
*reserved*
Thanks for all the reference materials you put up golmar88!
thank you for this. it will certainly help so many people; to learn and explain to others.
bkoon1218 said:
Thanks for all the reference materials you put up golmar88!
Click to expand...
Click to collapse
NP, Hope it helps.
This'll definitely prove useful for many people.
**requesting this to be a sticky**
Thank you!! Very helpful
Possibles
I'd like to understand these better and
any other similar. Thanks.
ODEXED DEODEXED voodoo KG4
KG6 KB5 KC1 KD1
@idiot41, I'm right there with you, I know what a modem is on computers, but is it the same?
Sent from my SGH-T959V using XDA App
VERY helpful to this noob! Thanx
We could refer every noob here..YES!
Sent from my SGH-T959V using xda premium
idiot41 said:
I'd like to understand these better and
any other similar. Thanks.
ODEXED DEODEXED voodoo KG4
KG6 KB5 KC1 KD1
Click to expand...
Click to collapse
Seconded. I found this thread while trying to find out what odexed/deodexed mean.
Great resource for noobs!
bump for sticky.

[Info] For Newbie What It Is It Mean? Your Answare Are Here (Updated 24th January)

Newbie Quick Start​
UPDATES
[Info] For Newbie What It Is It Mean? All Your Answare Are Here Part I
[Info] For Newbie What It Is It Mean? All Your Answare Are Here Part II - 29th December 2011, 07:54 PM
[Info] What Is Odex And Deodex In Android - 24th January 2012, 03:07 PM
[Info] What Is Zipalign In Android And How To Make Apps Zipaligned - 24th January 2012, 03:18 PM
Click to expand...
Click to collapse
USER REVIEW'S ABOUT THIS THREAD IN JUST SOME MINUTES
m.kochan10
Really good idea! IT should be sticky!
-----------------------------------------------------------------------------
rajanprash
Hi Sbxlive,
Thanks for all the info on the Galaxy R.
I am getting the device today.
I wanted to know if thr GR has NFC and MHL. As far as I know no review states that these features are present on the Galaxy R.
Thanks.
Click to expand...
Click to collapse
I Created This New Thread Because Of When I Entered In XDA With My Galaxy R ,I Really Don't Know About Above This Things And I Thought Daily New Members Are Coming In XDA With Their Devices And Facing Thats Problems Also So I Help This Buddies As I Do. So Lets Go On The Worlds ​
ITS SIMPLE BASIC BUT IMP MY FRIENDS SO PLEASE READ IS CAREFULLY YOUR DEVICE IS YOUR PART OF YOUR LIFE I THINK SO ​
OTG USB On-The-Go
USB On-The-Go, often abbreviated USB OTG, is a specification that allows USB devices such as digital audio players or mobile phones to act as a host allowing a USB flash drive, mouse, or keyboard to be attached.
Click to expand...
Click to collapse
NFC
Near field communication (NFC) is a set of standards for smartphones and similar devices to establish radio communication with each other by touching them together or bringing them into close proximity, usually no more than a few centimetres. Present and anticipated applications include contactless transactions, data exchange, and simplified setup of more complex communications such as Wi-Fi.Communication is also possible between an NFC device and an unpowered NFC chip
Click to expand...
Click to collapse
OC
Over Clock (more clock cycles per second)
Disadvantages
Many of the disadvantages of overclocking can be mitigated or reduced in severity by skilled overclockers. However, novice overclockers may make mistakes while overclocking which can introduce avoidable drawbacks and which are more likely to damage the overclocked components (as well as other components they might affect).
Click to expand...
Click to collapse
ROOT
Rooting is a process that allows you to access the workings of your phone that the phone provider does not want you to. It allows you to changed settings, functions, whole operating systems, make upgrades etc......
You can leave the "Stock" OS behind and get the most out of a phone. IT DOES VOID YOUR WARRANTY.
Click to expand...
Click to collapse
KERNEL
In computing, the kernel is the main component of most computer operating systems; it is a bridge between applications and the actual data processing done at the hardware level. The kernel's responsibilities include managing the system's resources (the communication between hardware and software components). Usually as a basic component of an operating system, a kernel can provide the lowest-level abstraction layer for the resources (especially processors and I/O devices) that application software must control to perform its function. It typically makes these facilities available to application processes through inter-process communication mechanisms and system calls.
Click to expand...
Click to collapse
MHL
Mobile High-Definition Link (MHL) is a proposed industry standard for a mobile audio/video interface for directly connecting mobile phones and other portable consumer electronics (CE) devices to high-definition televisions (HDTVs) and displays. The MHL standard features a single cable with a low pin-count interface able to support up to 1080p high-definition (HD) video and digital audio while simultaneously charging the connected device.
Click to expand...
Click to collapse
CWM
ClockWorkMod - A utility for Android used to flash zip files containing Android ROM distributions on an Android mobile phone. It also allows the user to create or restore backup files containing a whole installation of a ROM, including system, application and user files.
Click to expand...
Click to collapse
ROM
Technical Definition of ROM
ROM stands for Read-Only Memory and technically speaking, it refers to the internal storage of a device, which is supposed to contain the operating system instructions that needn’t be modified at all during the device’s normal operation. For this reason, such instructions are stored in read-only memory – much like on a non-rewriteable CD or DVD – to make sure no changes are made to them that could possibly make the device malfunction. This is in contrast with hard disk drives, solid state drives or regular flash storage devices used by personal computers that allow full read/write access even to the storage area that contains the operating system files.
Click to expand...
Click to collapse
What is Firmware
The read-only operating systems that we just discussed above are also called ‘firmware’, as they stay firmly in place without modification access to the users of the device. Modification of firmware is still however possible, just not under normal usage. Many devices require specialized hardware to be used for the purpose while other devices have the storage set as read-only through software protection only, which can be removed or overridden without the need for any specialized hardware, just by using software written for the purpose, often but not always requiring connection to a computer.
Click to expand...
Click to collapse
Thus, the terms ‘operating system’ and ‘firmware’ both refer to the same thing and can be used interchangeably when applied to such devices.
Click to expand...
Click to collapse
Flashing
The ROM memory used in smartphones and tablets etc. is often same as flash memory found in SD cards and USB flash drives, simply optimized for better speed and performance while running the operating system. As explained above, it is read-only under normal usage and requires a special procedure for any modifications to be made to its contents. The procedure of modifying or replacing the contents of such flash memory is known as flashing. Thus, in layman’s terms, flashing is essentially the same as installing or modifying the firmware of a device that is stored on its protected flash memory.
Click to expand...
Click to collapse
ROM as the Operating System
When it comes to smartphones and tablets, the term ROM is used to refer to the firmware stored in the internal memory of the device, rather than the internal memory itself. It can also refer to a file prepared for the purpose of replacing this firmware with another version of using a special method.
Thus, when you are told by someone to download a ROM, they are referring to the file that contains the firmware in a format ready to be installed to your phone to replace it’s existing firmware. Similarly, when asked what ROM is your phone running or when told by someone their phone is running a particular ROM, they are again talking about the particular variant of the firmware.
Click to expand...
Click to collapse
Types of ROMs
Unlike most desktop operating systems, mobile operating systems can be found in installable format in multiple forms, which can be categorized as follows.
Truly Stock ROMs / firmware:
This is the operating system in its default form, without any modifications made to it except for any device-specific support required to run it on the particular device. Truly stock firmware provides the standard user experience of the operating system without any cosmetic or functional changes made. These days, truly stock firmware is primarily found in cases where both the device and the operating system is built by the same company. Amongst modern mobile devices, examples of truly stock firmware can be found on Apple’s iOS devices, Palm’s WebOS devices and some Android devices shipped without any modifications made to the operating system by their manufacturers.
Click to expand...
Click to collapse
Manufacturer or Carrier branded Stock ROM / Firmware:
This type of firmware has had enhancements added over the default operating system by the device manufacturer or the mobile service carrier. This often includes interface enhancements, proprietary applications and in most cases, restrictions intended to limit the use of the device with a specific carrier or region. There are often further restrictions preventing installation of firmware not released by the carrier or manufacturer.
Most Android and Symbian devices fall under this category, and so do most Windows Phone 7 devices but in their case, the changes made from the truly stock firmware are minimal and limited to the inclusion of additional apps only.
Click to expand...
Click to collapse
Custom ROM / firmware:
Almost all devices ship with either of the above two categories of firmware, though things don’t end there. Independent developers who like to customize their devices beyond the standard options provided often tend to release the fruits of their labor for the rest to enjoy, in form of custom ROMs. The more open the platform, the more independent development it attracts, a good example of which is the independent custom ROM development for Android.
Click to expand...
Click to collapse
In case of proprietary firmware such as iOS and Windows Phone 7, there is often little or no room for customization of the operating system itself but regardless of that, developers still tend to release custom ROMs bundled with useful tools and hacks applied to provide functionality beyond the stock features. In fact custom ROM development for the otherwise proprietary and closed-source Windows Mobile platform lead to the formation of the largest independent mobile development community – the XDA-Developers forum.
Click to expand...
Click to collapse
Stock Vs. Custom ROMs
Both stock and custom ROMs have their merits and demerits and choosing between the two requires careful consideration. In this section, we are going to make a comparison between the two types of ROMs to help you make the right choice. Let us begin by taking a look at their advantages and disadvantages.
Do note that this section is written with primarily Android (and now obsolete Windows Mobile) devices in mind. However, the many of these concepts will also apply to other smartphone platforms.
Click to expand...
Click to collapse
Advantages & Disadvantages of Stock ROMs
Stock firmware is the result of a lot of research and testing done by the operating system vendor, the device manufacturer and/or the mobile service carrier. Therefore, it carries several advantages:
It is usually quite stable upon release.
Almost all bugs are patched during the extensive beta testing before release.
It carries the official support by the firmware vendor, device manufacturer and the mobile service carrier.
Updates are pushed automatically to the device by the carrier.
Along with its advantages, stock firmware also carries its disadvantages and these include:
Updates aren’t frequent, as development is done mostly by corporations who have to follow a scheduled release cycle.
Providing feedback to the manufacturer in case of any issues is either impossible, unwelcome (often with Apple devices), or a long, tedious process.
Similarly, getting official support can be a hassle as well, involving a tedious process.
If the device manufacturer and operating system developer are different (as is the case with Android and Windows Phone 7), any updates released by the operating system vendor need to be edited by the device manufacturer or mobile carrier to add compatibility and additional software before release. Hence, some devices get updates delayed by months.
Updates are often released first in the United States, leaving the rest of the world waiting. (A world does happen to exist beyond the United States, we’ve confirmed it ourselves!)
Worse still, when manufacturers choose to no longer release official updates for their older devices in favor of newer ones, their users are essentially stuck with old versions of the operating system. This case is evident with many Android devices barely a year and a half old.
Several OS developers, device manufacturers or mobile service carriers add
restrictions in the stock firmware ranging from locking the use of the device with one network/region to disabling sideloading of apps (we’re talking about you, AT&T) not available in the official app market, to advanced restrictions removing any chance of getting root access, just to name a few.
Click to expand...
Click to collapse
Advantages & Disadvantages of Custom ROMs
Custom ROMs are as good or as bad as the effort put into them by their developers. Key advantages of custom ROMs are:
First and foremost, choice! There are thousands of custom ROMs out there for a range of devices, each offering a diverse set of features not found in the stock ROM.
Update frequency – custom ROMs are often under active development and newer releases of the core operating system are incorporated in them way before updated official ROMs are released. This is particularly true in case of Android devices, where developers start porting newer versions of Android to several devices as soon as they are released.
Providing feedback is as easy as leaving a message on the development forum for the ROM in question, resulting in highly efficient bug reporting.
Getting support with your issues at the forums is similarly easy, as not only the main developers themselves but also other experienced users of the ROM from the community are glad to help you with your issues and in the process, improve the ROM for everyone.
Custom ROMs usually have all the extra restrictions removed, enabling users to sideload apps, tether their mobile data connection to their computer without paying extra for it, gain root access, use their device in any region etc. without any need for circumventing the protection themselves.
Performance enhancements and optimizations found in many custom ROMs can make them much faster than stock ROMs, enabling users to get the most out of their devices.
Overclocking options are built into some custom ROMs, further speeding up the devices.
Undervolting options found in some ROMs on the other hand result in improved battery life.
Old phones with little internal memory can benefit most from custom ROMs that allow them to use the external SD card memory for the apps exactly the way they would use the internal memory.
So with all these advantages, there should be no reason to stick with the stock ROM, right? Not necessarily! Like all things in life, custom ROMs come with their disadvantages as well:
Due to the lack of extensive testing prior to release, many custom ROMs can be buggy in the beginning and installing a ROM with missing or corrupt critical files can even brick your phone.
Several custom ROMs that are ports of ROMs from other phones can have missing functionality that hasn’t been made to work on your phone with the ROM yet.
Installing a custom ROM usually involves wiping your phone to factory settings, so you lose your data and start from scratch. Fortunately, Android’s built-in contact syncing along with apps offering message, call log and app backup/restore make this process easier, letting you retain your data.
The installation process itself can be cumbersome and may require you to root your phone and often circumvent its security features to allow for custom ROM installation in the first place.
Installing a custom ROM will in most cases void your phone’s warranty, though often the process is reversible, meaning you can turn your phone back to stock as long as it isn’t bricked.
Installing a ROM to your phone requires you to root it first in most cases. While rooting most phones is easy, some phones require a complicated procedure to be followed before you can install a ROM to it and often, such procedures involve a risk of bricking your device if things go wrong.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Click to expand...
Click to collapse
------------------------------------------------​
I THINK THIS THREAD HELPED YOU MUCH MORE AS YOU KNOW IT WILL KEEP UPDATING WITH NEW WORDS SO KEEP IN TOUCH AND DONT FORGET TO SAY THANKS OR REPLY
IF YOU HAVE SOME SUGGESTIONS OR ANY QUERY"S PM ME OF REPLY
Click to expand...
Click to collapse
DONT FORGET TO CLICK ON THANKS​
Really good idea! IT should be sticky!
Thanks for the Info.
Hi Sbxlive,
Thanks for all the info on the Galaxy R.
I am getting the device today.
I wanted to know if thr GR has NFC and MHL. As far as I know no review states that these features are present on the Galaxy R.
Thanks.
m.kochan10 said:
really good idea! It should be sticky!
Click to expand...
Click to collapse
t-t i can not understand my english very poor
Thank you.It makes a huge contribution to new users to understand Android.
No problem mys199156 Sticky thread means in this context "fixed", it remains always on the top, no matter if a new post has come or not.
great! post, sticky now!!
Thanks. This should be sticky !!
PS : ClockWorkMod should be CWM....Not CMW.
Cheers !
s4sixty said:
Thanks. This should be sticky !!
PS : ClockWorkMod should be CWM....Not CMW.
Cheers !
Click to expand...
Click to collapse
sry my mistek
somthing wrong here wait i will again edit this topic from first line coc i dare to edit this topic on my mobile thats why it happen sorry for that
Sent from my GT-I9103 using XDA App
[Info] For Newbie What It Is It Mean? All Your Answare Are Here Part II
BFQ - Budget Fair Queueing
BFQ (Budget Fair Queueing) is a Proportional Share, or equivalently Fair Queueing, disk scheduler that allows each process/thread to be assigned a fraction of the disk throughput. It has the following characteristics.
It distributes the disk throughput to disk-bound proceses as desired, even if it fluctuates, independently of the disk parameters and with any workload. Providing this sector-domain fairness to processes issuing random requests would easily cause the disk throughput to drop on one hand, and cause other processes to experience very high latencies on the other hand. To face this problem, for processes issuing random requests, BFQ switches to time-domain fairness, in which it is the disk time to be fairly distributed (basically the scheme of CFQ).
According to our results, BFQ achieves up to 30% higher aggregate disk throughput than CFQ with most of the workloads considered, or the same throughput with the others.
BFQ guarantees to each disk request a tight delay with respect to the completion time that the requests would enjoy in an ideal (unfeasible) perfectly-fair system.
BFQ exports a low_latency tunable. If enabled (currently the default), BFQ executes a special heuristics that automatically gives to interactive and soft real-time applications more than their fair share of the disk throughput, to reduce their latency. According to our results, for desktop or handheld usage, the system becomes virtually as responsive as if the disk was idle, whatever the actual disk load is. Soft real-time applications enjoy up to 3-time lower latencies than under CFQ.
Low-latency guarantees are preserved also in presence of NCQ.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
USB JIG
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This jig will allow you to get your phone into download mode when your phone is 3 button combo disabled or soft bricked. As long as there is something on the screen, the jig should work for you.
This JIG also works to RESET THE FLASHING COUNTER. You can flash custom ROMS and put the flash counter back to 0.
***WORKS ONLY AS RESETTER FOR ANDROID 2.3.4 AND EARLIER***
For More Info : http://usbjig.com/
Click to expand...
Click to collapse
SbXLivE said:
BFQ - Budget Fair Queueing
Click to expand...
Click to collapse
You should always update this article
Very good explanation of basics!
Would be nice to have similar intro explaining slightly more complex things seen during flashing a new firmware or somehow else modding a phone. Not everyone understands what is kernel, boot, recovery, system and data partitions.
Very interesting! You resolve some doubts, thank you!
Sent from my GT-I9103 using xda premium
SbXLivE said:
sry my mistek
somthing wrong here wait i will again edit this topic from first line coc i dare to edit this topic on my mobile thats why it happen sorry for that
Sent from my GT-I9103 using XDA App
Click to expand...
Click to collapse
what I've said is wrong. I always say CMW
Nice post for android beginners.
much useful info. thanks!
What Is Odex And Deodex In Android
What Is Odex And Deodex In Android
WHAT IS AN ODEX FILE?
In Android file system, applications come in packages with the extension .apk. These application packages, or APKs contain certain .odex files whose supposed function is to save space. These ‘odex’ files are actually collections of parts of an application that are optimized before booting. Doing so speeds up the boot process, as it preloads part of an application. On the other hand, it also makes hacking those applications difficult because a part of the coding has already been extracted to another location before execution.
Click to expand...
Click to collapse
THEN COMES DEODEX
Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files. By doing that, all pieces of an application package are put together back in one place, thus eliminating the worry of a modified APK conflicting with some separate odexed parts.
In summary, Deodexed ROMs (or APKs) have all their application packages put back together in one place, allowing for easy modification such as theming. Since no pieces of code are coming from any external location, custom ROMs or APKs are always deodexed to ensure integrity.
Click to expand...
Click to collapse
HOW THIS WORK
For the more geeky amongst us, Android OS uses a Java-based virtual machine for running applications, called the Dalvik Virtual Machine. A deodexed, or .dex file contains the cache used by this virtual machine (referred to as Dalvik-cache) for a program, and it is stored inside the APK. An .odex file, on the other hand, is an optimized version of this same .dex file that is stored next to the APK as opposed to inside it. Android applies this technique by default to all the system applications.
Now, when an Android-based system is booting, the davlik cache for the Davlik VM is built using these .odex files, allowing the OS to learn in advance what applications will be loaded, and thus speeds up the booting process.
By deodexing these APKs, a developer actually puts the .odex files back inside their respective APK packages. Since all code is now contained within the APK itself, it becomes possible to modify any application package without conflicting with the operating system’s execution environment.
Click to expand...
Click to collapse
ADVANTAGES & DISADVANTAGES
The advantage of deodexing is in modification possibilities. This is most widely used in custom ROMs and themes. A developer building a custom ROM would almost always choose to deodex the ROM package first, since that would not only allow him to modify various APKs, but also leave room for post-install theming.
On the other hand, since the .odex files were supposed to quickly build the dalvik cache, removing them would mean longer initial boot times. However, this is true only for the first ever boot after deodexing, since the cache would still get built over time as applications are used. Longer boot times may only be seen again if the dalvik cache is wiped for some reason.
For a casual user, the main implication is in theming possibilities. Themes for android come in APKs too, and if you want to modify any of those, you should always choose a dedoexed custom ROM.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
What Is Zipalign In Android And How To Make Apps Zipaligned
What Is Zipalign In Android And How To Make Apps Zipaligned
WHAT IS ZIPALIGN?
zipalign is an archive alignment tool introduced first time with 1.6 Android SDK (software development kit). It optimizes the way an Android application package (APK) is packaged. Doing so enables the Android operating system to interact with the application more efficiently, and hence has the potential to make the application and overall the whole system much faster. Execution time is minimized for zipaligned applications, resulting is lesser amount of RAM consumption when running the APK.
Click to expand...
Click to collapse
SO HOW DOES IT EXACTLY WORK?
In an Android operating environment, data files stored in each application package are accessed by multiple processes, for example, the installer will read the data manifest to determine the associated permissions; the system server can read these resources for multiple reasons, like displaying notifications; the Home application, for example, will read resources to get the application’s name and icon. Since Android is based on a a true multi-tasking operating infrastructure, these files are continually and repeatedly accessed. Finally, but not least, the application itself reads the manifest data.
As Android is Linux-based, memory-mapping plays a key role in efficient handling of processes. Essentially, the optimal alignment for the Android OS’ resource-handling code is 4-byte boundaries. What this means is that, if APKs are memory-mapped to 4-byte boundaries, and aligned accordingly, the OS will not need to ‘read through’ the whole application package to get to the desired data manifest. Every system process will know in advance where to look for it’s desired resources, and hence will execute much smoother and faster.
Summing it up, zipaligning an APK results in all uncompressed data within the package to be aligned on 4-byte boundaries, allowing all portions to be accessed directly with the memory-map. RAM consumption is lowered while execution because the querying code doesn’t have to read through the entire application package.
Click to expand...
Click to collapse
DISADVANTAGES OF UNALIGNED APKs
Quite understandably, situation would be reserved for unaligned application packages. Resource reading would be slow and memory usage would be on the higher end of the spectrum. It would also depend on how many unaligned applications are present. For example, if less number of applications with an unaligned home application, you’d see slower application launch times. This is the best case scenario. For a worst case scenario, having a number of unaligned applications will result in the system repeatedly starting and killing processes, struggling with lags and huge battery drain.
Click to expand...
Click to collapse
HOW DO YOU DO IT, THEN?
As mentioned earlier, the zipalign tool became a part of Android SDK from 1.6 onwards. It can be found under the ‘tools’ folder of the SDK. To use it, simply run the command:
Code:
zipalign [-f] [-v] <alignment> infile.apk outfile.apk
where infile.apk is the source file, and outfile.apk is the output file.
Furthermore, you can also verify the alignment of an APK file using the following command:
Code:
zipalign -c -v <alignment> existing.apk
where existing.apk can be any application package that you need to get verified. Also, the <alignment> tag in both the commands needs to be an integral value (otherwise the command will return invalid). This value, although can be any integer, MUST always be 4, which would provide 32-bit alignment. Any other value and it will effectively do nothing.
Finally, for the flags used in these commands,
-f : overwrites existing outfile.zip
-v : will give verbose output
-c : will confirm the alignment of a given file
WORD OF CAUTION: zipalign operation must only be performed after you have signed the APK file with your private key. If zipaligned before signing, the signing procedure will disturb the alignment. Same holds true for any other alteration, addition or removal to the APK file. Any change after running zipalign will undo the alignment.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
thanx dude, i am translating to my own language and will use at a forum with your permission?

[Q] Micro Systemation XRY (Forensics investigation tool))

Surfing the daily news I stumbled upon a short article about Micro Systemations XRY (Danish article), a tool meant for use by the law enforcement, military and intelligence agencies. It can pull every last detail out of the phone, by first rooting/jailbraking the device, and then bruteforce the Pin lock. After this, it should be pretty much "open" and ready to get ripped. It works on just about any type of (cell)phone you might have around, including all smartphones running one of the major operating systems - such as Android, IOS, WP7 etc...
More info:
http://www.msab.com/
http://www.forensicswiki.org/wiki/.XRY
See it in action:
v6.2 smartphone support video
In the hands of the right people/instance this is a very useful tool, but it could potentially be a threat if it gets out to the public.
And now to my question; What would be the best way to secure a device from something like this??
The first thing that comes to my mind would be to either use a pin code of 5+ numbers, as the bruteforce attack would be much longer or using the pattern lock if you are on an Android phone.
The second thing would be just as simple as keeping the device updated, so older exploits would be patched up by the manufacturer.
And how about the device encryption from Android 4.0, would it have any impact on this or would that also be circumvented by the rooting procedure?
from what i've gathered they need to get root to then find out your pin. They also mentioned that in previous videos that they used to use super1click to gain root.
I wonder how far they would get with a non-rooted,pin-enabled phone that has USB debugging turned off?
sidenote: the youtube video alludes to multiple access routes; wifi, bluetooth and USB (the desire in the video looks like it does not support bluetooth rooting though), I thought it was worth mentioning if it changes anything
nzdcoy said:
I wonder how far they would get with a non-rooted,pin-enabled phone that has USB debugging turned off?
Click to expand...
Click to collapse
Exactly, and I guess that almost all (Androids atleast) comes with USB debugging disabled by default..
Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Moving to Q&A

A ton of difficult questions about Android

They are all about Android 4.3 and upper.
A pair of questions about unrooting/locking/unlocking/booting.
1) What are the benefits of rooting other than being able to a) set custom cpufrequency policies, b) being able to update your phone (to custom new ROMs like cyanogenmod) when your OEM has decided to stop supporting it, c) full filesystem access, d) tuning sysctl parameters?
I don't like the fact the rooting totally breaks Android's security model.
2) Do I understand correctly that a locked phone is the phone in which you cannot overwrite/replace/customize vmlinuz? or there are even stricter limitations?
3) Do I understand correctly that in order to change e.g. /etc files you don't really need a custom ROM, you can boot into TWRP and replace/edit/remove the needed files?
4) Why does unlock wipe all your data?
5) If the phone is locked, how bootloader/firmware understands that our bootloader is untempered? Does the bootloader have a digital signature? I have this question because let's imagine that I 1) unlock 2) change vmlinuz (allow superuser) 3) lock?
6) How does "oem lock" verifies that system data is genuine? Or it simply wipes everything clean? Does Android has some (RO) partition which always contains a genuine virgin ROM you cannot meddle with?
7) If I do "unlock" on my Nexus device, without changing anything or installing any 3d party bootloader (like TWRP), will I be able to update to new official ROMs via OTA updates?
8) Why every "lock" manual says that I need to upload a genuine official ROM - what if I've changed it and made it "rooted"?
Storage.
Why does Android has so many partitions?
What method is used to break the internal storage into partitions? Is it some kind of partition table (MS-DOS, GPT) or it's hardware based?
1. The purpose of rooting is to give you an access level equal to the product's development team. Rooting is basically an unofficial way of doing exactly what the developers are doing on a daily basis. You can either consider that people are going to root and that the community adds value and bug fixes to your product by independent development (Android); or you can actively take measures to lock down root access and maintain a a gateway to development in the belief that this doctrine maintains a unified experience, protects security of intellectual material, and provides better overall security (Apple).
There's pros and cons to each side. With the Android thought, you are offloading a lot of your development burden onto the community and getting R&D, patches, and extending product life in return - for free. You take the risk of lowered security, but usually make it back because the community is a larger workforce with greater man hours and a vested interest in the product. They provide you with answers to problems you don't even know about as long as you listen.
With the Apple thought, you maintain a strong control on making the product do exactly what you want. This makes the product work exactly as expected, which can be easier for the user. However, your design has to be VERY good for the community to accept it. You also suffer in that you lock the community out from enhancing your product, so you HAVE to be the one coming up with all the ideas. Also, if the community finds a breach in your security, it can be devastating. Look at how much energy and money Apple pours into preventing jailbreaks.
I wouldn't be too worried about the 'break in security model' as you say, unless the Android platform becomes fraught with virii. After all, consider that unix on your PC is essentially the same thing, and you request root access on it to install certain things.
2. I'll let someone else chime in with a better answer
3. with root access you don't need a custom ROM, you just need the ability to access root permission and a file browser that will get you to protected areas.
4. I'm not sure I'm thinking about the same stuff as you here. Rooting doesn't wipe anything from what I remember. Replacing the ROM does, but that's because the ROM 'installer' doesn't have anything to preserve user settings. I don't consider this weird since Windows didn't have a really decent migration package built into the installer until windows 8.
5. There's a counter that iterates. Research trianglemod for an example of this topic.
6. It's hard to say what the OEM has for tools without them releasing the tools to the public. They, of course, are going to have better tools than us. No, there is no read only partition that I'm aware of that contains a full ROM that you can dump back in place. I've gone so far as to fully wipe my Galaxy S3 to the point where it only had clockworkmod and a boot screen that never went away. If I went much further, I could probably brick the phone, requiring an external programming program. A full brick would remove interface to your PC, which I believe is a possibility.
7. A new OEM ROM update will do one of three things:
a. update the phone to the new ROM and most likely break all the apps
b. update the phone and wipe everything
c. partially update the phone to a state where it won't boot due to a corruption (I've been here, lol)
8. not sure what we are talking about here
9. Android is based on linux. Linux is designed with specific partitions to handle different tasks for storage, memory access, stuff like that. If you aren't happy with the design, you are free to do something else - you don't have to use Android on an Android phone, you can probably put FreeBSD or Slackware or something, or write your own kernel.

ROM and kernel flashing guide for beginners

XDA Kernel and ROM flashing beginners guide.
If you are reading this, you’ve found your way to the famous XDA Forums. The place where developers and users contribute to the spirit of open source Android development.
If you already have TWRP setup and running and just look for the next ROM to flash, this guide isn’t for you. If you wonder what this TWRP thingy is or what exactly the three letters, R O M mean, that float around these forums all the time, then read on.
This paragraph is about the basic geek terminology, used by developers. ROM stands for read only memory, which basically is the system partition of your device, which can only be read, not written. In everyday usage scenarios, where you browse the web, download some apps, or chat und Telegram, you will never get in the situation, where you have to write on your /system partition. If you plan to get your hands on one of those amazing custom ROMs, that add battery life, performance and beauty of use to your OS experience, the ROM is the smartest way of accomplishing this goal.
What a custom recovery is used for:
This is where the recovery comes into play. The recovery partition is pre installed by the manufacturer of your device. It is used for OEM software updates, wiping your cache and dalvic or performing a factory reset. Enough functionality for the average Joe, but this is XDA developers. Things get interesting, once you unlock the full potential of your device. To do so, you’ll need a custom recovery. Team Win Recovery Project (TWRP) is most common these days. It is fully optimized for touch screen input and offers various features, that even come in handy, if you don’t want to modify your phones software. Nandroids for example.
This is where things start to become really interesting. There are various recognized XDA Developers like Francisco Franco or Flar2 who focus their efforts on bringing custom Kernels to their supported devices. What is a kernel? Do I even need it and why should I bother changing it?
To say this clearly, the kernel is the heart of your software. You might use your phone with a broken Bluetooth driver, without caring to much, without a kernel installed your device won’t be able to boot. So what does the kernel do, if it is so essential for a proper working phone? We can describe it as the bridge between hardware and software. That latest processor and the wickedly fast RAM won’t do anything without something telling it how to unleash it ‘s potential.
That’s where the kernel comes into play. You can imagine the kernel as a moderator between the hardware and the software of your system. An example: You touch the screen to launch your favorite game on your Droid. This game is really challenging your hardware, so the processor has to run on a high clock frequency, otherwise the game would take ages to load. The kernel detects your input and ramps up the frequency by it’s in input boost driver. This is often a pre configured value, that is used as soon as some (touch) input is detected, that’s why it is often called touchboost. OEMs choose a middle frequency offering a good balance between power consumption and performance.
For our gaming scenario this isn’t enough, we need the full potential of the CPU and the GPU should get busy rendering all those pixels as soon as possible. This task is accomplished by the kernel. It is balancing the system frequency based on the load of the system, but that’s just an easy to explain example of what a kernel does. The kernel is doing a lot more things on your device. How should the phone know, how much RAM it can give to that messaging application you open every each five minutes? Simple answer, it doesn’t the hardware of your phone is just silicon ready to do your work. You can compare it to a young guy doing an internship at a company. The guy has some potential, but he gets lost in a moment, if there is nobody showing him what to do. This is where the kernel comes into play again. It calculates which task requires which amount of memory and decides, which task should be kicked out of your recent access and memory and, which is there to stay. The messaging application I just mentioned a few lines back for example should remain in memory. You use it all the time, so it doesn’t make any sense to generate some unnecessary CPU load, which eats up your battery in the long run.
As you can see the kernel is more than a boring piece of code. It basically drives your phone, so you really want a stable kernel.
Which different kernel development approaches exist?
There are various recognized developers who focus on UX features. This means they take the official stock kernel (be it a OEM or let’s say the one made by Lineage) and they add their features on top. For example a fading notification LED or a backlight dimmer, that allows to lower the minimum screen brightness further than the stock kernel allows.
These features focus on adding userspace features on top, which don’t touch the core functionality of the kernel, like CPU scaling or RAM management. These kernels are chosen by users who want additional kernel functionality without leaving the stability of the stock ROM in favor of a custom ROM.
On the other hand their are developers and users who want bleeding edge functionality, which brings new stuff to the table, but is to new and not deemed stable enough to be used in the mainline OEM kernel. A good example for such a feature is f2fs support. F2fs is a file system developed by Samsung. It’s main focus is to suite flash storage (like the SD cards in our smartphones), in terms of write speeds it is significantly faster, than the established and rock stable standard ext4. But it comes with certain downsides for example a ROM won’t boot with a data partition formatted to f2fs if the kernel doesn’t have the required f2fs commits. A year back their also were some major issues with root, which made a lot of users switch back to the stable ext4. However if you want to squeeze the last bit of performance out of your phone, the kernel is the way to go.
Kernel tweaking: A custom kernel allows you to modify certain parameters, which aren’t accessible for the using an official kernel. Some developers ship with their own app, which is optimized to tweak their own kernel. This ensures maximum compatibility, one of the reasons why those kernels are so successful across all XDA sub forums. You don’t have to use a kernel managing app to modify your kernel configuration, you could also use an init.d script, but this requires further knowledge. No matter how advanced your knowledge is, it doesn’t get any easier than using an application to set up the configuration of your choice.
Kernel tweaking fills another guide and their is already a really good one, that you should check it out. Further links will be put at the end of this guide.
To root or not to root?
Another controversial topic is rooting. While a lot of OEMs try to prevent you from doing so by locking the bootloader, a lot of enthusiast swear on the power root access unleashes. Often android root is compared to administrator privileges under Windows. This is an illustrative explanation, but isn’t accurate. Root goes far beyond what Windows Admin rights allow. The main difference that jumps right into your eye: Microsoft allows Administrator access out of the box. Root is blocked by all OEMs, you have to enable it manually (by flashing a root solution of your choice. More about popular root solutions and their main advantages and disadvantages down below.
So what does root do? It gives you full control over your device. One of the main advantages is to gain write access to your system partition, which normally is read only. The power of root is defined by the knowledge of the user, the more you know, the more you can make out of it. For beginnners root apps like Titanium Backup, Adaway, Better Battery Stats or SD Maid are interesting. They utilize the potential of root for you without having to dig to deep into the topic. However root isn’t enabled by default for a reason. Most big custom ROMs, don’t ship with root out of the box anymore these days. Back in the day root basically just gave you more control, without any major disadvantages. This however changed with the introduction of Safety net by Google.
The company developing the OS we all love, is trying to make Android safer and they are pushing this approach forward these days. If you just flash SuperSu, Safetynet gets triggered which results in being unable to use apps which use Safetynet to verify the integrity of your system. Mainly banking apps, but also Snapchat for example or that stupid game, that generated all the hype in summer 2016. You got curious about root or came to this forum, to figure out how to root your phone? Then the next paragraph deserves your attention.
Most XDA users used SuperSU developed by XDA legend Chainfire during the last years. A while ago Magisk by XDA Recognized Developer and contributor Topjonwu. It became very popular, when Safetynet started to break certain Apps. It allows to hide root from safetynet, but it includes much more. One of the key features is mounting modules systemlessly to your boot partition, that way your /system stays untouched and removing a certain module, doesn’t require more than disabling it and rebooting. What about the disadvantages of magisk? It isn’t as compatible as SuperSU, since that root solution was the standard for years. All the developer arranged their work around SuperSU, but most famous root apps, have already adopted to Magisk, so you won’t run into issues unless you are using really outdated apps, which is never a good idea.
Which one to choose is a decision you can make. Both work flawless and it really comes down to personal preference.
Since nobody is willing to read through 50 pages, I’ll just thank you for your attention. This Guide is on going WIP, so if there is anything you’d like to see being added, feel free to let me know, but make sure to tag me, otherwise I might miss your message in the storm of ongoing notifications. Have a great day and keep flashing.

Categories

Resources