Rooting android “the old fashioned way” - Android Q&A, Help & Troubleshooting

[COLOR=var(--darkreader-inline-color)]So recently the oculus go virtual reality headset was bootloader unlocked and adb root was enabled. Given that the headset runs android, we’d like to get it rooted. However no at the moment custom rom exists, nor do I have the skills to develop one, and any custom rom developed would likely require serious modification to get running as the device is a standalone virtual reality headset. We’ve also tried magisk but it doesn’t work.[/COLOR]
The best option I can think of is to manually install a SU binary via adb push. However I’m not entirely sure where to find such a binary nor where to put it.
Please can you offer some assistance. While I’m certainly no Linux or coding noob, I’m pretty inexperienced with android and rooting.

Attached the SU binary ( 32bit & 64bit version )

If you boot into the recovery having Magisk installed doesn't root work?
It's android 7.1.1 "Legacy" SAR. So it should work as said here.
https://twitter.com/i/web/status/1174392824625676288

Related

Layperson’s dictionary of rooting terms : New to Android? Must Read!

WARNING:I AM NOT THE AUTHOR. I FOUND IT ON ANDROID AUTHORITY AND I FOUND IT GOOD SO I'M SHARING IT! THANX TO THEM
So, you’re new to the Android community. First off, welcome to the wonderful world of customizing your phone! Android’s all about the power to make your phone truly yours and if you dig deep enough, you’ll find a hundred ways to make your phone unlike anyone else’s on the planet. Or, at least, nearly unlike anyone else’s. The more you customize, the slimmer the chance people will have the exact same settings. If you’re a stickler for individuality, you’ve made the right choice by getting an Android. But, the moment you loaded up Android Authority, you already feel overwhelmed by new words.
What’s a ROM? What does root mean? What are all these funny words people keep throwing at each other and what is the meaning of life? We’re kidding on the last one, sort of, but just like any newbie, getting into the world of Android is intimidating. You can still your racing heart and wipe those sweaty palms on your pants because Android Authority’s got your back covered. We’ve put together a list of some of the high-sounding words that newbies frequently encounter and compile the words into some sort of easy-to-digest layperson’s dictionary of rooting terms. Come across a word that you don’t understand? Check out our list, it should be here.
ADB
The acronym for Android Debug Mode. Whenever your Android device is connected to your computer, ADB is the command line tool that helps your computer communicate with your device. ADB is part of the Android Software Developers Kit (SDK) and is often used in root tools, whether or not you’re typing the commands in yourself. Unless the instructions call for installing the SDK and running ADB commands, you won’t need to mess with it.
AOSP
Short for Android Open Source Project, you’re likely to see this in ROM descriptions. AOSP usually indicates that the ROM is based on the Android source code provided by Google itself, and not on some other ROM project or a company’s firmware.
Bloatware
Like it says on the tin, bloatware is software or apps that you don’t need, but come pre-installed to a device’s /system partition. What this also means is that you can’t remove them unless the device has been rooted. Usually, these are apps are sponsored by a company and are included by a carrier for profit. For example, the Photobucket app included on the G2 by T-Mobile is deemed by many to be bloatware, although, arguably, some folks do find the app useful. Bloatware is a subjective thing. Some person’s bloatware is another person’s lifeline.
Bootloader
A number of ROMs require your bootloader to be unlocked, but what in the world is it? The bootloader is the lowest level of software on your phone, running all the codes necessary to start up your operating system. Most bootloaders come locked, which prevents users from rooting their phones. This is because manufacturers want you to use the version of Android they’ve provided. With a locked bootloader on Android phones, you cannot flash custom ROMs. Unlocking your bootloader doesn’t mean rooting your phone, but it does allow you to root and to flash custom ROMs.
Boot loop
When your system re-cycles over and over without entering the main OS, your system is stuck in a boot loop and the phone is said to be boot looping. This may happen if you do not follow instructions. At other times, boot loops are caused by defects in the software code. Usually developers who are aware of this problem include boot loop patches that must be flashed after you flash the custom ROM.
Brick
You’ve probably heard this one a few times. It’s usually the result of tampering with the insides of your device and doing irreversible damage. A brick can be the result of a faulty flash or firmware update, a mod gone wrong, or being struck by lightning. Brick refers to a device that no longer functions, generally caused by a failed firmware or SPL update. Since the device no longer works as intended, it is often referred to as a “brick” or “paper-weight”, since that is all it is good for. Since any modification to the device’s software could potentially brick it, following instructions is very important.
BusyBox
BusyBox is an application that provides a standard set of UNIX tools. The default toolbox provided by Android is limited, so BusyBox is required to allow rooted ROMs or apps to use more advanced UNIX features.
Dalvik cache
Sometimes in flashing ROMs, wiping the Dalvik Cache through Recovery Mode is important, but just what is the 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.
Deodex
This term is most often seen on a custom ROM’s list of features. When a ROM has been deodexed, it means that its apps have been prepared for modification. Deodexed ROMs have apps that have been repackaged in a certain way. Developers of custom ROMs choose to deodex their ROM packages, since it lets them modify various APKs, and it also makes theming possible after the ROMs have been installed.
Flash
Flashing is the term used to install something on your device, whether it’s a ROM, a kernel, or something else that comes in the form of a flashable ZIP file. It is the process of applying a firmware image or a ROM, to your device and usually entails a very specific order of steps. If you don’t follow instructions, you may end up bricking your device.
Fastboot
Fastboot is a boot menu that you can do stuff from before Android is launched. From this menu, you can choose to boot into Recovery Mode, and more. Fastboot is a 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 in almost all production devices since USB support is disabled in the bootloader.
Firmware
A phone’s firmware is basically its operating system. A “firmware update” means that the operating system, the software that controls the phone, is updated. “Stock firmware” means that the firmware is unmodified: it’s the version of the operating system the phone’s manufacturer delivers.
HBoot
When you switch your phone, HBoot is loaded immediately and is mainly responsible for checking and initializing the hardware and starting the phone’s software. HBoot can also be used for flashing official software releases, as well as a few other things.
IMEI
The International Mobile Equipment Identity (IMEI) number 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 her or his network provider and instruct the provider 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#. When a procedure asks you to take note of your IMEI, make sure to store it in a safe place.
Kernel
The kernel is the heart of any Linux-based operating system. A kernel acts as the brain of the system and controls how the hardware and software interact. It also decides which activity your Android device should carry out at any particular instant.
NANDroid backup
Most how-to guides include this and all developers demand you to take a few seconds before flashing their ROM to make a NANDroid backup. NANDroid is a set of tools and scripts that will enable users who have root on access their Android device to make full system backups, in case something goes wrong or you would like to out an experimental ROM or theme. NANDroid will backup (and restore) the /system, /data, /cache, and /boot partitions. This backup can be restored later, whenever you want. NANDroid backups are created from the Recovery Mode, often with ClockworkMod Recovery.
Opensource
This term refers to software whose source code anyone is allowed to view, modify, or redistribute. In the context of Android, opensource refers to the approach of the design, development, and distribution of software. This offers accessibility to a software’s source code for modification, improvement, bug-fixing, and security-enhancement. The CyanogenMod project is based on this principle.
Overclocking
This term is used when users want to increase the speed of their device’s CPU or GPU. Overclocking can be done by installing special kernels designed for this purpose.
Radio
The radio on your device handles communication and sending and receiving voice and data. Flashing new radio firmware can improve your radio hardware’s reception and bring other benefits. You can flash radio firmware through Recovery Mode, just like how you would a custom ROM.
Recovery
Recovery is the software on your phone that allows you to make backups, flash ROMs, and perform other system-level tasks. The stock recoveries don’t do much, but if you can install a custom recovery such as the extremely popular ClockworkMod Recovery, you’ll have increased control over your device. Other popular custom recoveries also include 4EXT Recovery and TWRP Recovery.
ROM
In the context of Android, a ROM (acronym for “read-only memory”) or, more specifically, a “custom ROM” is a modified version of Android. Developers may give it extra features, a different look, enhanced performance, and others. It may even be a version of Android that hasn’t even been officially released yet. Some of the popular custom ROMs you may have heard of are CyanogenMod, Android Open Kang Project (AOKP), and MIUI.
ROM Manager
ROM Manager is an immensely popular app for root users, allowing users to flash ClockworkMod Recovery, install ROMs from their SD card, perform backups, and even download new ROMs over-the-air.
Root
Root refers to “administrator” or “full” access to the device. That is, your device earns enhanced privileges and can grant you more control in customizing it. The term referring to the process of gaining such administrative access is “rooting.”
With root access, you can mount the device’s internal memory partition as read/write, allowing you to do various things like USB or Wi-Fi tethering and uninstalling annoying bloatware. You can also enjoy certain applications that require root access, overclocking or underclocking the CPU, and more.
Some phones are easier to root than others. Certain phones require a tedious process to gain root access while other phones and firmware have easy and painless one-click methods. You can get root access by either installing the Superuser application or by flashing a custom ROM that already has root access included. Check out our section dedicated solely for guides on how to root your Android device.
Rooting, unfortunately, also voids your warranty, so you must be extra careful with whatever you do to your phone after you’ve rooted it.
RUU and SBF
ROM Upgrade Utilities (RUU) and System Boot Files (SBF, for Motorola phones) are files direct from the manufacturer that change the software on your phone. RUU and SBF are how the manufacturers deliver over-the-air upgrades and modders often post leaked RUU and SBF files for flashing when updates haven’t been released yet. They can also be handy when you’re downgrading your phone, especially when a rooting method is not yet available for the newest software version. You can flash RUUs directly from your HTC device, but Motorola users will need a Windows program called RSD Lite to flash SBF files.
S-OFF
HTC phones use a security feature called Signature Verification in HBOOT, the bootloader on HTC devices. S-ON (security on) will read-lock your /system and /recovery partitions, blocking you from performing certain root-level actions directly from Android. By default, your phone has S-ON, which blocks you from flashing radio images. You can disable this security measure with S-OFF (security off), although you risk bricking your phone in the process but will allow you to flash new radios. Rooting doesn’t require S-OFF but many rooting tools give you S-OFF in addition to root access.
Superuser
Since Android is a Linux-based operating system, Linux has something called root access. By rooting your Android phone, you gain superuser access. The superuser, or root user, is a special user account for system administration. Superuser is also the name of an app, which lets you grant or deny superuser privileges to other apps.
Wipe
Usually refers to wiping data and cache partitions of the device. Usually before flashing a custom ROM, developers will instruct users to perform a wipe. Not performing a wipe may result in problems with the ROM’s performance.
Zipalign
You’re likely to see this term on the list of a custom ROM’s features. Zipalign is a tool that optimizes the way an Android app (APK) is packaged. The Android device can interact with an application more efficiently, and in doing so, has the potential to make the app and the entire Android system perform much faster. Zipaligned applications are launched more quickly, and they use less amounts of RAM.
Congratulations! You’re now equipped with some basic rooting and Android knowledge. Now you can dive into XDA Developers and feel less like a noob. Using your newly acquired knowledge, you can make better informed decisions when looking for a ROM to power your Android device with. Good luck and happy hunting!
Got a rooting term that’s bugging you? Let us know in the comments and we’ll try adding it to our dictionary.
References
Diablo67. (2012, January 27). Android terms, slang & definitions (Read this before posting questions!) [Msg 1]. Message posted to http://forum.xda-developers.com/showthread.php?t=1466228
Gordon, Whitson. (2012, February 21). The always up-to-date guide to rooting the most popular Android phones. Retrieved from http://lifehacker.com/5789397/the-always-up+to+date-guide-to-rooting-any-android-phone
paul-ac. (2011, July 22). [Android ROM dictionary] Newbe friendly [Msg 1]. Message posted to http://forum.xda-developers.com/showthread.php?t=1180477
PolicyWonk. (2011, December 10). Root terms defined – ROM, shell, S-ON, etc. [Msg 1]. Message posted to http://androidforums.com/precedent-all-things-root/461024-root-terms-defined-rom-shell-s-etc.html
Static. (2011, July 30). Rooting dictionary [Msg 1]. Message posted to http://www.theandroidsource.com/questions-answers-forum/536-rooting-dictionary.html
TechCredo. (2011, February 11). Android ROM and rooting dictionary: All the terms explained. Retrieved from http://www.techcredo.com/android/android-rom-and-rooting-dictionary-all-the-funny-words-explained
ALL THE CREDIT GOES TO THEM! THANK YOU GREAT PEOLE
EDIT: 125+ VIEWS AND NO COMMENTS? :O
unlocking fastboot

[Android ABC] What's a Bootloader,ROM,Kernel,Firmware,ADB,Root etc

Android ABC​
I've gathered some info for newcomers to the Android world.
Copied over from my thread at androidforums...
I've tried to keep it relatively simple. So if you want more info, follow the links!
And please if you want anything added, do post!
I hope this helps someone....
Inventory:
Bootloader
Kernel
CWM
Firmware
Flashing
Rooting
Custom ROMs
ADB
Baseband
Dalvik
init.d​
What's A Bootloader?
Taken from: Android 101: What is a bootloader? | Android-Does.com
In literal terms, the bootloader is code that is executed before any Operating System starts to run. Bootloaders basically package the instructions to boot operating system kernel and most of them also have their own debugging or modification environment. Think of the bootloader as a security checkpoint for all those partitions. Because if you’re able to swap out what’s on those partitions, you’re able to break things if you don’t know what you’re doing.
As the bootloader kicks off before any piece of software on your device, it makes it extremely processor specific and every motherboard has it’s own bootloader. This is one reason that all Android phones have different custom ROMS developed due to high variance of processing hardware present on the device.
Android Bootloader
Every Android phone has a bootloader that instructs the operating system kernel to boot normally. But you need to understand one thing here that as Android OS is an open source OS and is available on a variety of different hardware, every manufacturer has their own version of bootloader specific for the hardware present in it’s environment. At its most basic level, your Android smartphone is like a hard drive, made of up several partitions. One of those partitions holds the Android system files, another holds all the app data you accumulate (which is how you’re usually able to update without losing all your stuff), and others to do more behind-the scenes stuff.
A lot has been said about bootloaders being “locked” and even the developer-friendly Nexus devices shipped with a locked bootloader (Nexus devices and a couple tablets are easily unlocked with a single command).In fact, a lot bootloaders are locked and encrypted, meaning simple commands like “fastboot oem unlock”, won’t do a thing.
Why are Bootloaders Locked?
A bootloader is usually locked on an Android device because although it’s an open source OS, still the manufacturers want you to stick to their Android OS version specifically designed for the device. In order to apply this concept, manufacturers lock the bootloader. With a locked bootloader on Android devices, it is virtually impossible to flash a Custom ROM and forced attempts void warranty as well as usually end up in bricks. Therefore, the first step is to always unlock the bootloader.
Why keep a bootloader out of reach? One of the biggest reasons is that the carriers and manufacturers don’t want to have to support hacked phones. The other is that a lot of time and money is spent developing these things. HTC Sense ain’t cheap. Neither is TouchWiz. But Samsung and HTC both have managed to find a middle ground with the modding community, and pressure is on other companies to do so as well.
Also a very good read about bootloaders: http://www.tested.com/news/feature/1879-know-your-android-bootloaderwhat-it-is-and-why-it-matters/
---------------------------------------------------------------------------
What's a kernel?
Taken from: Android A to Z: What is a kernel? | Android Central
A kernel isn't something unique to Android -- iOS and MacOS have one, Windows has one, BlackBerry's QNX has one, in fact all high level operating systems have one. The one we're interested in is Linux, as it's the one Android uses. Let's try to break down what it is and what it does.
Android devices use the Linux kernel, but it's not the exact same kernel other Linux-based operating systems use. There's a lot of Android specific code built in, and Google's Android kernel maintainers have their work cut out for them. OEMs have to contribute as well, because they need to develop hardware drivers for the parts they're using for the kernel version they're using. This is why it takes a while for independent Android developers and hackers to port new versions to older devices and get everything working. Drivers written to work with the Gingerbread kernel on a phone won't necessarily work with the Ice Cream Sandwich kernel. And that's important, because one of the kernel's main functions is to control the hardware. It's a whole lot of source code, with more options while building it than you can imagine, but in the end it's just the intermediary between the hardware and the software.
When software needs the hardware to do anything, it sends a request to the kernel. And when we say anything, we mean anything. From the brightness of the screen, to the volume level, to initiating a call through the radio, even what's drawn on the display is ultimately controlled by the kernel. For example -- when you tap the search button on your phone, you tell the software to open the search application. What happens is that you touched a certain point on the digitizer, which tells the software that you've touched the screen at those coordinates. The software knows that when that particular spot is touched, the search dialog is supposed to open. The kernel is what tells the digitizer to look (or listen, events are "listened" for) for touches, helps figure out where you touched, and tells the system you touched it. In turn, when the system receives a touch event at a specific point from the kernel (through the driver) it knows what to draw on your screen. Both the hardware and the software communicate both ways with the kernel, and that's how your phone knows when to do something. Input from one side is sent as output to the other, whether it's you playing Angry Birds, or connecting to your car's Bluetooth.
It sounds complicated, and it is. But it's also pretty standard computer logic -- there's an action of some sort generated for every event. Without the kernel to accept and send information, developers would have to write code for every single event for every single piece of hardware in your device. With the kernel, all they have to do is communicate with it through the Android system API's, and hardware developers only have to make the device hardware communicate with the kernel. The good thing is that you don't need to know exactly how or why the kernel does what it does, just understanding that it's the go-between from software to hardware gives you a pretty good grasp of what's happening under the glass. Sort of gives a whole new outlook towards those fellows who stay up all night to work on kernels for your phone, doesn't it?
---------------------------------------------------------------------------
What's CWM?
Taken from: AddictiveTips » Blog ArchiveWhat Is ClockworkMod Recovery And How To Use It On Android [Complete Guide]
ClockworkMod, abbreviated as CWM, is a popular custom recovery for Android phones and tablets developed by Koushik Dutta (Koush), a well-known name in the Android dev community. ClockworkMod recovery allows you to perform several advanced recovery, restoration, installation and maintenance operations on your Android device that aren’t possible with the stock recovery, and is one of the most common ways used to gain root access, back up device data, install a custom ROMs, kernels, themes, mods and more. However, for anyone new to Android customization and hacking, some of its options might prove to be a tad confusing. In what follows, we will cover all that this recovery is capable of doing, and how to do it.
About Android Recovery
All Android devices ship with a recovery console that is basically a partition on the device’s internal memory and can be booted into. The stock recovery of almost all Android devices provides a few basic yet handy options that allow you to factory reset your device and also to recover its operating system using an official ROM in zip format, but that’s all you can do with it. That’s where a custom recovery comes handy.
A custom Android recovery basically replaces the stock recovery with one that lets you do all you can do with the stock recovery, plus a plethora of more options to give you a lot more control on your device. With a custom recovery, you can install official and unofficial ROMs as well as other updates including apps, themes, kernels etc. using zip files, wipe not just user data but pretty much every partition on your device, mount the storage card for USB mass storage access without leaving recovery, partition your SD card, wipe Dalvik cache and battery stats, fix permissions, perform, manage and restore backups and so on.
Introduction To ClockworkMod
ClockworkMod recovery is one of the most widely used custom Android recoveries that is available for most mainstream Android devices. It is our custom recovery of choice here at AddictiveTips and almost every custom ROM that we install on our devices is done using this recovery.
ClockworkMod recovery has been developed by Koushik Dutta (also known as Koush) – the same guy who brought us the Android ROM Manager. He can be found at his blog hacking away at Android devices and at Twitter.
CWM options explained:
[REF] CWM - Clockworkmode menu options & Partitions– GENERAL KNOWLEDGE - xda-developers
---------------------------------------------------------------------------
What's Firmware?
Taken from: What is Firmware, Rom and Firmware Flashing ? - I Teach Android
What the heck is this firmware? Definition of firmware is permanent software programmed into a read-only memory
In Simple words, you can understand it like windows for pc , in case of android we are going to do same thing – installing firmware (Froyo,Gingerbread, ICS, Jelly Bean etc.) on your phone. All phones have their different firmwares and installing tools regard less to the Andriod version (Froyo,Gingerbred). So never think that we can install any firmware on any android phone like we do in PCs.
Wiki link for even more info: Firmware - Wikipedia, the free encyclopedia
---------------------------------------------------------------------------
What's Flashing?
Flashing refers to the overwriting of existing data on ROM modules present in an electronic device with new data. This can be done to upgrade a device or to change the provider of a service associated with the function of the device, such as changing from one mobile phone service provider to another or installing a new operating system.
In simple words flashing is called installing firmware on your phone.
---------------------------------------------------------------------------
What's Rooting?
Taken from: Rooting for Android: What, why and how? | Ubergizmo
WiKi link: https://en.wikipedia.org/wiki/Rooting_(Android_OS)
When carriers and manufacturers sell you your device, it is almost certain that the device would come with certain software restrictions in place. There are a variety of different reasons why they might do that – some claim that this is done to protect the user, preserve the device’s warranty (this policy will vary from manufacturer to manufacturer), prevent users from getting rid of carrier bloatware apps or simply because the manufacturer would prefer if your device was distinguishable from the competition based purely on its user interface (i.e. Samsung’s TouchWiz, HTC Sense UI, etc).
Whatever their reasoning may be, chances are if you are looking to customize your device on a deeper level, you’d be out of luck and this is where rooting comes into play.
Rooting is essentially a process that allows users of smartphones, tablets or other devices running on Android to gain “superuser” access to the software. This will allow the user to perform administrative tasks such as writing to locations normally restricted by the system which in turn will allow for deeper customization. For iOS users, rooting on Android devices could be thought of as a close equivalent to jailbreaking your device.
---------------------------------------------------------------------------
What are custom ROMs?
Taken from: Custom ROMs For Android Explained - Here Is Why You Want Them
A stock ROM is the version of the phone's operating system that comes with your phone when you buy it.
A custom ROM is a fully standalone version of the OS, including the kernel (which makes everything run), apps, services, etc - everything you need to operate the device, except it's customized by someone in some way.
So what does the "customized" part mean? Since Android is open source, developers are free to take stock ROMs, modify them, strip them of garbage, optimize them, add things, and pretty much do whatever their imagination and skills allow.
---------------------------------------------------------------------------
What is ADB?
Taken from: Android 201: What is adb? | Android Central
According to Google "Android Debug Bridge (adb) is a versatile tool lets you manage the state of an emulator instance or Android-powered device." That certainly sounds like Google, doesn't it? To put it simply, adb is two different applications -- one running on your computer (Windows, Linux or Mac) and one running on your phone. When your phone is connected, and USB debugging is enabled, you can issue commands and communicate with the phone using your computer screen and keyboard.
Your Android phone uses a modified Linux kernel and tools as a base. This means that quite a few Linux commands can be sent via the adb server (the one running on your computer) to the adb client (the one running on your phone) and they will be executed. In our example picture, I've sent the "top" command over the wire to my phone, and my phone sent me back the information and printed it to my terminal.
This can be awfully handy for debugging things that aren't going right, as well sending those weird commands you need when you're hacking away in the middle of the night. Chances are, if you aren't actively debugging something or trying to break hack at your phone, you won't have much use for adb. And that's OK -- there's more than one way to have fun with an Android device.
----------------------------------------------------------------------------
What's baseband?
Baseband is the Radio or Modem version depending upon the Phone Model, Carrier and Android Software Stack version. The Radio/Modem file is flashed via Recovery tool (other options are ADB/ODIN). The mismatched Radio/Modem and ROM will lead to things not working. You need to find the matching Radio/Modem for the particular ROM you are running.
The radio firmware controls basic low-level functions like network connectivity, Wi-Fi, and GPS. Upgrading Radio firmware will fix connectivity issues, increase range or performance, decrease battery usage, etc. Incorrec tRadio frimeware can disable some functions in your phone such as MMS, 3G Data, VM Notifications, etc. Network operators/carriers select the correct version of the Radio firmware that is suitable for the phone, network and bandwidth.
There is also Modem and Baseband Radio Processor chipsets in Mobile phones. Usually, Google, Phone Manufacturers and carriers develop various types of modem firmware/software that controls the functions of these chipsets.
Firmware is the overall version of the Android system on your phone. Baseband version is the version of the radio embedded in the device. Since Android is based on the Linux operating system, they show you the current version of the Kernel used in the heart of the system. The Build number is just an indicator of which numerical version of the current overall system was built by developers for your device.
You cannot update any of these from the official web site. Updates to the Android system are pushed to the phone over-the-air by the manufacturer or the cell phone carrier. The only other way to update or change an Android phone it to install custom modified ROMs in place of the existing system firmware. That usually requires rooting the phone and a fairly considerable knowledge of how to hack hardware.
----------------------------------------------------------------------------
What's Dalvik?
http://www.techopedia.com/definition/4262/dalvik
http://butterflydroid.wordpress.com/2011/09/22/what-is-dalvik-vm-heapsize-benefits-and-downfalls/
Dalvik is named after a fishing village in Iceland where ancestors of Dan Bornstein, the person who wrote the VM’s original code, lived. Dalvik is designed for fast execution speeds and operatation in resource-constrained environments like those in mobile devices (with limited memory, CPU and battery power). A Dalvik VM is designed to run multiple instances of itself with each instance hosted on its own separate process and running one application each. When one instance crashes, other concurrently running applications don’t suffer.
Although Android apps are written in Java, they are first compiled into the Dalvik Executable (DEX) format to make them run on the Dalvik VM. DEX files are generally smaller than compressed .JAR (Java Archive) files, making them suitable for mobile devices.
The main difference between Dalvik and a typical Java VM is that the former is register-based while the latter is stack-based. Register-based VMs require fewer instructions than their stack-based counterparts. Although the register-based VMs also require more code, they are generally considered to exhibit faster startups and have better performance than stack-based VMs.
The Dalvik source code license is based on the Apache license. That means, it is free to modify and hence attractive to mobile phone carriers.
What's init.d?
init.d is a folder located at /system/etc
To keep it simple, it allows the user to run scripts at system startup/ boot.
You can adjust many different things/settings with scripts. You can tweak system settings, prolong battery life etc.
To enable init.d and to get some scripts, go here: http://forum.xda-developers.com/showthread.php?t=1881401
----------------------------------------------------------------------------
great job brother, do much to newcomers become familiar with android and they need to know :highfive:
woooow , thats nice and great thread ...... thx ..... but between that , can u continue explain many things like what each android device need to boot up and what the most commen partitions in android devics , and getting deeper in android world ad then give some tut about adb using
thx so much
Good stuff, thanks!
Great guide for android noobie who want to learn how to root
add CID and MID ... ?
Hey -- a really great resource. great work.
could be nice to include CID, MID, etc.
also, would like to understand why ROM has to be built for specific carrier variant of phone.
Example: HTC ONE M8 has multiple different ROM threads -- ATT, Tmobile, Verizon, etc. While I understand there are some small frequencies support differences between an M8_tmobile and M8_Verison, why doesn't a Rooted with S-off M8 care whether it's a ATT or Verizon model?
thx
Thanks iONEx, this post helped me some. I already have 20 years of experience with Linux on PCs and Macs, so I already understood concepts like Bootloader, Kernel, Rooting, Flashing, Firmware, and init.d. I've had to flash a new BIOS on several PC motherboards, so I understand the difference between nonvolatile storage in firmware mounted on an integrated circuit of the motherboard versus nonvolatile storage in a physical spinning magnetic hard drive connected to the motherboard via a SCSI or SATA bus and controller. I rooted my first Android (a Motorola Atrix) a year ago, so I also understand CWM, Custom ROMs, and ADB. But your explanation of Baseband and Dalvik was new and helpful to me.
Right now I'm running Paranoid Android on my Oneplus One and using the Settings app in it, I see that I have Android version 4.4.4, ParanoidAndroid version 4.6-BETA6, Baseband version MPSS.DI.2.0.1..., Kernel version 3.4.0-ParanoidAndroid (Mon Nov 3 21:55:14 UTC 2014), Build number pa_bacon-userdebug...).
I found your post while trying to understand more about my OPO that I rooted a few days ago. I installed TWRP, F-Droid, Busybox, MultiROM, and a few other major customizations on it, but I feel like there's still a whole lot that I don't understand at all. For example, in this thread [forums.oneplus.net/threads/unofficial-beanstalk-rom-for-bacon-lollipop-5-02-r1.247146/#post-9394373] I commented that I was unable to get Beanstalk 5.0.2 to function reliably on my OPO.
From chineel's reply "The Steps To Have Better Experience With OnePlus One With Lollipop ROMs" though, I realized that I must still be missing some important concepts, so I started searching for a comprehensive picture of my OPO and of Android phones in general, and although your post helped some, I'm still looking for a much more comprehensive understanding of this device.
I do understand that the nonvolatile storage in my phone must be partitioned into several mutually exclusive sections and that's how it's possible for me to wipe (using TWRP) all of the partitions (Dalvik Cache, System, Data, and Cache) except Internal Storage and flash a new ROM like Beanstalk and yet I still have the contents of /sdcard/ as they were before I wiped and flashed. Obviously, /sdcard/ as mounted in ParanoidAndroid and Beanstalk must be on the Internal Storage partition that did not get wiped.
But when chineel wrote that I should download latest “Cm Nightly” and “(CM Nightly Is for Modem and firmware Update only ) you can Just Flash Firm ware Update [s.basketbuild.com/filedl/devs?dev=chineel&dl=chineel/BeanStalk/bacon/Full-CM-12.01.18-modem-flashable.zip] Instead of...”, that's when I realized that when I flashed a new ROM, I was apparently still leaving something aside from the Internal Storage partition untouched: the modem/baseband/radio?
And so if I flash the latest CM nightly from [download.cyanogenmod.org/?device=bacon&type=] then I'll end up doing what I have not been doing before which is to also change the modem/baseband/radio. Is that right?
So then if I flash a new ROM (like Beanstalk) AFTER flashing the CM Nightly, then I'll be replacing the ROM (from the CM Nightly to Beanstalk), but I won't be changing again the modem/baseband/radio that was changed when I flashed the CM Nightly. Is that right?
If so, then where in this partition system is the modem/baseband/radio firmware (which is apparently separate from the whole ROM) stored in nonvolatile storage? Is it also on Internal Storage? Or is it stored on a separate integrated circuit (like the BIOS is on a PC) or on some other hidden partition?
And what about flashing the kernel? When I flashed my PA ROM, I got a new kernel with it, without explicitly installing from TWRP a new kernel. So sometimes flashing a ROM gives you a new kernel and sometimes flashing a ROM does not change the existing kernel? Is that right? And so is it also possible to flash a ROM and then subsequently flash a kernel and that second flash replaces the kernel that was part of the ROM of the first flash?
I just need to understand where all of this information is getting stored (in which partitions). I know I flash a ROM, then I flash GAPPS, then I flash a kernel, then I flash a modem/radio/baseband. But I can't tell; is all that software going to the System partition? If so, then why don't all the later flashes completely write over all the earlier flashes?
TL;DR
My real question here is what to read for a comprehensive explanation of all these pieces and how they fit together and why flashing sometimes replaces something that was there before, but it doesn't replace everything (like the modem/radio/baseband)? I think I need a book or something. Can you recommend one?
Thanks, and sorry for the long post.
iONEx said:
Android ABC​
I've gathered some info for newcomers to the Android world.
Copied over from my thread at androidforums...
I've tried to keep it relatively simple. So if you want more info, follow the links!
And please if you want anything added, do post!
I hope this helps someone....
Inventory:
Bootloader
Kernel
CWM
Firmware
Flashing
Rooting
Custom ROMs
ADB
Baseband
Dalvik
init.d​
What's A Bootloader?
Taken from: Android 101: What is a bootloader? | Android-Does.com
In literal terms, the bootloader is code that is executed before any Operating System starts to run. Bootloaders basically package the instructions to boot operating system kernel and most of them also have their own debugging or modification environment. Think of the bootloader as a security checkpoint for all those partitions. Because if you’re able to swap out what’s on those partitions, you’re able to break things if you don’t know what you’re doing.
As the bootloader kicks off before any piece of software on your device, it makes it extremely processor specific and every motherboard has it’s own bootloader. This is one reason that all Android phones have different custom ROMS developed due to high variance of processing hardware present on the device.
Android Bootloader
Every Android phone has a bootloader that instructs the operating system kernel to boot normally. But you need to understand one thing here that as Android OS is an open source OS and is available on a variety of different hardware, every manufacturer has their own version of bootloader specific for the hardware present in it’s environment. At its most basic level, your Android smartphone is like a hard drive, made of up several partitions. One of those partitions holds the Android system files, another holds all the app data you accumulate (which is how you’re usually able to update without losing all your stuff), and others to do more behind-the scenes stuff.
A lot has been said about bootloaders being “locked” and even the developer-friendly Nexus devices shipped with a locked bootloader (Nexus devices and a couple tablets are easily unlocked with a single command).In fact, a lot bootloaders are locked and encrypted, meaning simple commands like “fastboot oem unlock”, won’t do a thing.
Why are Bootloaders Locked?
A bootloader is usually locked on an Android device because although it’s an open source OS, still the manufacturers want you to stick to their Android OS version specifically designed for the device. In order to apply this concept, manufacturers lock the bootloader. With a locked bootloader on Android devices, it is virtually impossible to flash a Custom ROM and forced attempts void warranty as well as usually end up in bricks. Therefore, the first step is to always unlock the bootloader.
Why keep a bootloader out of reach? One of the biggest reasons is that the carriers and manufacturers don’t want to have to support hacked phones. The other is that a lot of time and money is spent developing these things. HTC Sense ain’t cheap. Neither is TouchWiz. But Samsung and HTC both have managed to find a middle ground with the modding community, and pressure is on other companies to do so as well.
Also a very good read about bootloaders: http://www.tested.com/news/feature/1879-know-your-android-bootloaderwhat-it-is-and-why-it-matters/
---------------------------------------------------------------------------
What's a kernel?
Taken from: Android A to Z: What is a kernel? | Android Central
A kernel isn't something unique to Android -- iOS and MacOS have one, Windows has one, BlackBerry's QNX has one, in fact all high level operating systems have one. The one we're interested in is Linux, as it's the one Android uses. Let's try to break down what it is and what it does.
Android devices use the Linux kernel, but it's not the exact same kernel other Linux-based operating systems use. There's a lot of Android specific code built in, and Google's Android kernel maintainers have their work cut out for them. OEMs have to contribute as well, because they need to develop hardware drivers for the parts they're using for the kernel version they're using. This is why it takes a while for independent Android developers and hackers to port new versions to older devices and get everything working. Drivers written to work with the Gingerbread kernel on a phone won't necessarily work with the Ice Cream Sandwich kernel. And that's important, because one of the kernel's main functions is to control the hardware. It's a whole lot of source code, with more options while building it than you can imagine, but in the end it's just the intermediary between the hardware and the software.
When software needs the hardware to do anything, it sends a request to the kernel. And when we say anything, we mean anything. From the brightness of the screen, to the volume level, to initiating a call through the radio, even what's drawn on the display is ultimately controlled by the kernel. For example -- when you tap the search button on your phone, you tell the software to open the search application. What happens is that you touched a certain point on the digitizer, which tells the software that you've touched the screen at those coordinates. The software knows that when that particular spot is touched, the search dialog is supposed to open. The kernel is what tells the digitizer to look (or listen, events are "listened" for) for touches, helps figure out where you touched, and tells the system you touched it. In turn, when the system receives a touch event at a specific point from the kernel (through the driver) it knows what to draw on your screen. Both the hardware and the software communicate both ways with the kernel, and that's how your phone knows when to do something. Input from one side is sent as output to the other, whether it's you playing Angry Birds, or connecting to your car's Bluetooth.
It sounds complicated, and it is. But it's also pretty standard computer logic -- there's an action of some sort generated for every event. Without the kernel to accept and send information, developers would have to write code for every single event for every single piece of hardware in your device. With the kernel, all they have to do is communicate with it through the Android system API's, and hardware developers only have to make the device hardware communicate with the kernel. The good thing is that you don't need to know exactly how or why the kernel does what it does, just understanding that it's the go-between from software to hardware gives you a pretty good grasp of what's happening under the glass. Sort of gives a whole new outlook towards those fellows who stay up all night to work on kernels for your phone, doesn't it?
---------------------------------------------------------------------------
What's CWM?
Taken from: AddictiveTips » Blog ArchiveWhat Is ClockworkMod Recovery And How To Use It On Android [Complete Guide]
ClockworkMod, abbreviated as CWM, is a popular custom recovery for Android phones and tablets developed by Koushik Dutta (Koush), a well-known name in the Android dev community. ClockworkMod recovery allows you to perform several advanced recovery, restoration, installation and maintenance operations on your Android device that aren’t possible with the stock recovery, and is one of the most common ways used to gain root access, back up device data, install a custom ROMs, kernels, themes, mods and more. However, for anyone new to Android customization and hacking, some of its options might prove to be a tad confusing. In what follows, we will cover all that this recovery is capable of doing, and how to do it.
About Android Recovery
All Android devices ship with a recovery console that is basically a partition on the device’s internal memory and can be booted into. The stock recovery of almost all Android devices provides a few basic yet handy options that allow you to factory reset your device and also to recover its operating system using an official ROM in zip format, but that’s all you can do with it. That’s where a custom recovery comes handy.
A custom Android recovery basically replaces the stock recovery with one that lets you do all you can do with the stock recovery, plus a plethora of more options to give you a lot more control on your device. With a custom recovery, you can install official and unofficial ROMs as well as other updates including apps, themes, kernels etc. using zip files, wipe not just user data but pretty much every partition on your device, mount the storage card for USB mass storage access without leaving recovery, partition your SD card, wipe Dalvik cache and battery stats, fix permissions, perform, manage and restore backups and so on.
Introduction To ClockworkMod
ClockworkMod recovery is one of the most widely used custom Android recoveries that is available for most mainstream Android devices. It is our custom recovery of choice here at AddictiveTips and almost every custom ROM that we install on our devices is done using this recovery.
ClockworkMod recovery has been developed by Koushik Dutta (also known as Koush) – the same guy who brought us the Android ROM Manager. He can be found at his blog hacking away at Android devices and at Twitter.
CWM options explained:
[REF] CWM - Clockworkmode menu options & Partitions– GENERAL KNOWLEDGE - xda-developers
---------------------------------------------------------------------------
What's Firmware?
Taken from: What is Firmware, Rom and Firmware Flashing ? - I Teach Android
What the heck is this firmware? Definition of firmware is permanent software programmed into a read-only memory
In Simple words, you can understand it like windows for pc , in case of android we are going to do same thing – installing firmware (Froyo,Gingerbread, ICS, Jelly Bean etc.) on your phone. All phones have their different firmwares and installing tools regard less to the Andriod version (Froyo,Gingerbred). So never think that we can install any firmware on any android phone like we do in PCs.
Wiki link for even more info: Firmware - Wikipedia, the free encyclopedia
---------------------------------------------------------------------------
What's Flashing?
Flashing refers to the overwriting of existing data on ROM modules present in an electronic device with new data. This can be done to upgrade a device or to change the provider of a service associated with the function of the device, such as changing from one mobile phone service provider to another or installing a new operating system.
In simple words flashing is called installing firmware on your phone.
---------------------------------------------------------------------------
What's Rooting?
Taken from: Rooting for Android: What, why and how? | Ubergizmo
WiKi link: https://en.wikipedia.org/wiki/Rooting_(Android_OS)
When carriers and manufacturers sell you your device, it is almost certain that the device would come with certain software restrictions in place. There are a variety of different reasons why they might do that – some claim that this is done to protect the user, preserve the device’s warranty (this policy will vary from manufacturer to manufacturer), prevent users from getting rid of carrier bloatware apps or simply because the manufacturer would prefer if your device was distinguishable from the competition based purely on its user interface (i.e. Samsung’s TouchWiz, HTC Sense UI, etc).
Whatever their reasoning may be, chances are if you are looking to customize your device on a deeper level, you’d be out of luck and this is where rooting comes into play.
Rooting is essentially a process that allows users of smartphones, tablets or other devices running on Android to gain “superuser” access to the software. This will allow the user to perform administrative tasks such as writing to locations normally restricted by the system which in turn will allow for deeper customization. For iOS users, rooting on Android devices could be thought of as a close equivalent to jailbreaking your device.
---------------------------------------------------------------------------
What are custom ROMs?
Taken from: Custom ROMs For Android Explained - Here Is Why You Want Them
A stock ROM is the version of the phone's operating system that comes with your phone when you buy it.
A custom ROM is a fully standalone version of the OS, including the kernel (which makes everything run), apps, services, etc - everything you need to operate the device, except it's customized by someone in some way.
So what does the "customized" part mean? Since Android is open source, developers are free to take stock ROMs, modify them, strip them of garbage, optimize them, add things, and pretty much do whatever their imagination and skills allow.
---------------------------------------------------------------------------
What is ADB?
Taken from: Android 201: What is adb? | Android Central
According to Google "Android Debug Bridge (adb) is a versatile tool lets you manage the state of an emulator instance or Android-powered device." That certainly sounds like Google, doesn't it? To put it simply, adb is two different applications -- one running on your computer (Windows, Linux or Mac) and one running on your phone. When your phone is connected, and USB debugging is enabled, you can issue commands and communicate with the phone using your computer screen and keyboard.
Your Android phone uses a modified Linux kernel and tools as a base. This means that quite a few Linux commands can be sent via the adb server (the one running on your computer) to the adb client (the one running on your phone) and they will be executed. In our example picture, I've sent the "top" command over the wire to my phone, and my phone sent me back the information and printed it to my terminal.
This can be awfully handy for debugging things that aren't going right, as well sending those weird commands you need when you're hacking away in the middle of the night. Chances are, if you aren't actively debugging something or trying to break hack at your phone, you won't have much use for adb. And that's OK -- there's more than one way to have fun with an Android device.
----------------------------------------------------------------------------
What's baseband?
Baseband is the Radio or Modem version depending upon the Phone Model, Carrier and Android Software Stack version. The Radio/Modem file is flashed via Recovery tool (other options are ADB/ODIN). The mismatched Radio/Modem and ROM will lead to things not working. You need to find the matching Radio/Modem for the particular ROM you are running.
The radio firmware controls basic low-level functions like network connectivity, Wi-Fi, and GPS. Upgrading Radio firmware will fix connectivity issues, increase range or performance, decrease battery usage, etc. Incorrec tRadio frimeware can disable some functions in your phone such as MMS, 3G Data, VM Notifications, etc. Network operators/carriers select the correct version of the Radio firmware that is suitable for the phone, network and bandwidth.
There is also Modem and Baseband Radio Processor chipsets in Mobile phones. Usually, Google, Phone Manufacturers and carriers develop various types of modem firmware/software that controls the functions of these chipsets.
Firmware is the overall version of the Android system on your phone. Baseband version is the version of the radio embedded in the device. Since Android is based on the Linux operating system, they show you the current version of the Kernel used in the heart of the system. The Build number is just an indicator of which numerical version of the current overall system was built by developers for your device.
You cannot update any of these from the official web site. Updates to the Android system are pushed to the phone over-the-air by the manufacturer or the cell phone carrier. The only other way to update or change an Android phone it to install custom modified ROMs in place of the existing system firmware. That usually requires rooting the phone and a fairly considerable knowledge of how to hack hardware.
----------------------------------------------------------------------------
What's Dalvik?
http://www.techopedia.com/definition/4262/dalvik
http://butterflydroid.wordpress.com/2011/09/22/what-is-dalvik-vm-heapsize-benefits-and-downfalls/
Dalvik is named after a fishing village in Iceland where ancestors of Dan Bornstein, the person who wrote the VM’s original code, lived. Dalvik is designed for fast execution speeds and operatation in resource-constrained environments like those in mobile devices (with limited memory, CPU and battery power). A Dalvik VM is designed to run multiple instances of itself with each instance hosted on its own separate process and running one application each. When one instance crashes, other concurrently running applications don’t suffer.
Although Android apps are written in Java, they are first compiled into the Dalvik Executable (DEX) format to make them run on the Dalvik VM. DEX files are generally smaller than compressed .JAR (Java Archive) files, making them suitable for mobile devices.
The main difference between Dalvik and a typical Java VM is that the former is register-based while the latter is stack-based. Register-based VMs require fewer instructions than their stack-based counterparts. Although the register-based VMs also require more code, they are generally considered to exhibit faster startups and have better performance than stack-based VMs.
The Dalvik source code license is based on the Apache license. That means, it is free to modify and hence attractive to mobile phone carriers.
What's init.d?
init.d is a folder located at /system/etc
To keep it simple, it allows the user to run scripts at system startup/ boot.
You can adjust many different things/settings with scripts. You can tweak system settings, prolong battery life etc.
To enable init.d and to get some scripts, go here: http://forum.xda-developers.com/showthread.php?t=1881401
----------------------------------------------------------------------------
Click to expand...
Click to collapse
Thanks, good info
teejbee said:
Thanks, good info
Click to expand...
Click to collapse
Strewth! Not only did you quote the ENTIRE OP post in order to reply with a 3 word thank you but 2 people actually thanked you for it. I might print that out and hang it on my wall. :laugh:
Hi, what does the "Allow bootloader unlock" (or similar) mean in advanced settings on s7 and some other devices? My phablet also has this option and I turned it on without any changes after typing oem unlock. With selfmade cwm I can root my phone, if its allowed to unlock or not.. is this setting only a placeholder or did someone get the real function? M a ybe this is important for nexus devices only, or not. I do not know.
Gesendet von meinem SM-G900F mit Tapatalk
Edit: sorry for asking in xperia forums.. used tapatalk and saw the title is matching my purposes.. did not see the xperia section, but my question you can answer, too. Sry
louiscar said:
Strewth! Not only did you quote the ENTIRE OP post in order to reply with a 3 word thank you but 2 people actually thanked you for it. I might print that out and hang it on my wall. :laugh:
Click to expand...
Click to collapse
hahahahahahaha :laugh:
Dear, Can I make a custom ROM for my Android TV that can use the TV remote and IR key?
I mean, after installing a custom ROM like Lineage OS, do the remote and inputs work properly?

[Help] How to get Stock ROM for non open source device

I have an android device running Android 5.1.1 but on a proprietary build that doesnt include GApps.
What i want to do is root the device, but in order to do so with Magisk, I need the Stock ROM boot.img file which I cant find anywhere because they arent open source like Samsung ect. There is also no TWRP build for it, official or ortherwise.
The device is a Rand McNally OverDryve 8 Pro.
Anyone have any ideas on how to get the boot.img file without having exising root or TWRP? Maybe with adb without root though, unless some way to gain root shell without root device.
Or can anyone point me to a DETAILED, uptodate guide on how to compile TWRP myself, inculding setting up the build envirment and which version of Ubuntu I should use. I have tried previously with some older guides using Ubuntu 12.01 or somthing but lots of sync and repo issues and such and i gave up as im jist learning on the fly and not capable of deep troubleshooting.

Busybox - Incorporate custom binaries

Hello,
I was just wondering, how would I go about adding several binaries to a busybox installation.
For ex: I would like to add "exa" to use instead of ls, "fd" in replacement for find, the text editor "micro", as well as possibly git (although I would guess that adding too many additional binaries would make busybox too dense)
I know a good deal about android development, c programming, and shell scripting, so I don't by any means expect someone to "do" this for me or recompile it for me. Just the steps necessary (if it's possible to do this effectively), or an alternative solution in which would accomplish this objective.
Currently I have a (working) solution using termux boot, that copies the files to "/system/xbin" on boot. It works fine... however I can't help but feel like this is not the best way to go about it.
If it matters: I am on a Google Pixel, rooted, on a custom rom (resurrection remix, android oreo build) with TWRP recovery installed.
Thanks,
HLTDev

Curiosity Question about system and Installation

I know this is going to seem like a dumb question, especially without root access. But why couldn't you install an entirely new system inside the already running system. For example, magisk (to my understanding) creates a seperate image on the disk to access from startup. Why wouldn't it be possible to apply the same concept with the phone already loaded and put the phones officiall hardware in like a sleep state. This could run like an emulator...just on android and emulating android. This could allow access to apps you couldn't use on newer devices plus so much more possibilities. I understand you would need a powerful operating system even with the official system in a sleep state but wouldn't the new phones be capable of running this. Even if it isnt a full system emulator, just one for running apps.
@Jaredkp92
Magisk does atually replace the included boot image with a modified version. Emulating android inside android could be possible, havent seen it, but it would likely need root access which defeats the entire purpose of keeping it stock plus it has other disadvantages.
@Jaredkp92
On A/B-ed devices it should be possible to run 2 different Android versions.

Categories

Resources