[Q] Can't a newbie like me understand anything about Android on smartphones? - Touch Pro2, Tilt 2 Android General

I have read a few posts in this section, but it is totally impossible for someone like me (new to smartphones, flashing and the rest) to understand anything. Would you please explain some of the terminologies used here? Some of them are: kernel, 3g, port, system.ext2, BT... and thousands more.
Thank you very much!

you don't really "need" to understand any of that.
all you need to do is to learn how to download files, learn how to extract the downloaded file, learn how to copy them to an sd card, and learn how to run a program inside windows mobile.
if you can do all that, you should be set!!!
just follow steps 1-6 (ignore step 1b - the part about system.ext2) - http://forum.xda-developers.com/showthread.php?t=951962

Well noted AkumaX. Thank you very much!

XDAndroid is a project to port Android onto older HTC phones.
There are two main parts of XDAndroid, which combine to form a complete port:
Kernel/drivers: You can find packages to run Android on old HTC phones from a variety of sources, but whatever package you use, all rely upon the kernels/drivers created by the XDAndroid team to enable the basic hardware.
Android system: The Android system forms all of the parts of the phone's interface that you can directly interact with. Once the kernel/drivers have setup the hardware, you can add on an Android system port of your choice to form a complete build. Many system ports are available, both in terms of different versions (2.1 Eclair, 2.2 Froyo, 2.3 Gingerbread, etc.) and different starting points in the case of ports written by those outside of XDAndroid.
XDAndroid releases an "official" system port you can use, which is directly ported over by the XDAndroid team from the Android Open Source Project, and is very close to stock. Many of the alternative builds you come across are modifications of the XDAndroid system, containing customizations that deviate farther from stock Android, while others have different starting points altogether, and are ports of the ROMs found on official shipping devices that have already been customized (but still use the same basic kernel/drivers found here).
Android is a framework that runs on top of Linux. In order to get Android running on our devices, first we must get Linux running on the hardware with all drivers implemented, and then, we hook Android into these drivers. Thus, broadly viewed, the XDAndroid project is divided into two parts: the kernel/drivers and the Android port.
When you look at the files in your Android directory, you'll probably see something like the following:
zImage: The Linux kernel and drivers.
modules-###: Additional drivers for the kernel. Your system will load without this, but things like wifi may not work, or you may encounter instability.
initrd.gz: Used in the Linux boot process.
system.ext2: Most of the Android framework.
rootfs.img: Additional parts of the Android framework that are customized for our devices.
data.img: This file contains what would be your internal memory on a real Android device. Whenever you install a program it goes in to here. A new empty one will be automatically created if you don't have one.
haret.exe: Reboots you from Windows into XDAndroid.
startup.txt: Commands passed to XDAndroid on bootup that are customized by the user.
ts-calibration: Contains calibration information for the touch screen. If you don't have this file, you will be prompted to calibrate your screen on startup.
AndroidApps: A folder where if you copy any apks into it, they will be automatically installed on bootup.

manekineko said:
XDAndroid is a project to port Android onto older HTC phones.
-------.
Click to expand...
Click to collapse
Good explanation manekineko!...I believe this is what op was looking for.

there is light at the end of the tunnel, it wont take much longer if the devs keep up this good work, until there can be made stable and good builds with good battery life etc. when the time is there i will create an complete noob friendly installation guide (with pics and maybe even an vid).

I'm currently trying to figure out which one to install!

manekineko said:
XDAndroid is a project to port Android onto older HTC phones.
There are two main parts of XDAndroid, which combine to form a complete port:
Kernel/drivers: You can find packages to run Android on old HTC phones from a variety of sources, but whatever package you use, all rely upon the kernels/drivers created by the XDAndroid team to enable the basic hardware.
Android system: The Android system forms all of the parts of the phone's interface that you can directly interact with. Once the kernel/drivers have setup the hardware, you can add on an Android system port of your choice to form a complete build. Many system ports are available, both in terms of different versions (2.1 Eclair, 2.2 Froyo, 2.3 Gingerbread, etc.) and different starting points in the case of ports written by those outside of XDAndroid.
XDAndroid releases an "official" system port you can use, which is directly ported over by the XDAndroid team from the Android Open Source Project, and is very close to stock. Many of the alternative builds you come across are modifications of the XDAndroid system, containing customizations that deviate farther from stock Android, while others have different starting points altogether, and are ports of the ROMs found on official shipping devices that have already been customized (but still use the same basic kernel/drivers found here).
Android is a framework that runs on top of Linux. In order to get Android running on our devices, first we must get Linux running on the hardware with all drivers implemented, and then, we hook Android into these drivers. Thus, broadly viewed, the XDAndroid project is divided into two parts: the kernel/drivers and the Android port.
When you look at the files in your Android directory, you'll probably see something like the following:
zImage: The Linux kernel and drivers.
modules-###: Additional drivers for the kernel. Your system will load without this, but things like wifi may not work, or you may encounter instability.
initrd.gz: Used in the Linux boot process.
system.ext2: Most of the Android framework.
rootfs.img: Additional parts of the Android framework that are customized for our devices.
data.img: This file contains what would be your internal memory on a real Android device. Whenever you install a program it goes in to here. A new empty one will be automatically created if you don't have one.
haret.exe: Reboots you from Windows into XDAndroid.
startup.txt: Commands passed to XDAndroid on bootup that are customized by the user.
ts-calibration: Contains calibration information for the touch screen. If you don't have this file, you will be prompted to calibrate your screen on startup.
AndroidApps: A folder where if you copy any apks into it, they will be automatically installed on bootup.
Click to expand...
Click to collapse
Thank you so much for your explanations, manekineko. I believe that I am now ready to cruise through all the threads of this section without fear.
shatred said:
there is light at the end of the tunnel, it wont take much longer if the devs keep up this good work, until there can be made stable and good builds with good battery life etc. when the time is there i will create an complete noob friendly installation guide (with pics and maybe even an vid).
Click to expand...
Click to collapse
shatred, I am eagerly waiting for two things: (i) for the developers to release the perfect Android builds (my sincere encouragements to them by the way!!!) and (ii) for your installation guide.

gueyenono said:
I'm currently trying to figure out which one to install!
Click to expand...
Click to collapse
tell me your phone type, so an rhod-100? 200? 300? etc.
and tell me what you prefer more, an good battery life and an stable running system without camera support OR less stable system, bad battery life but with camera support.
Tell me and i will help you

shatred said:
tell me your phone type, so an rhod-100? 200? 300? etc.
and tell me what you prefer more, an good battery life and an stable running system without camera support OR less stable system, bad battery life but with camera support.
Tell me and i will help you
Click to expand...
Click to collapse
Uhm... You no longer have to choose. WisTilt2 pulled the latest commits from GIT into his test kernel.

arrrghhh said:
Uhm... You no longer have to choose. WisTilt2 pulled the latest commits from GIT into his test kernel.
Click to expand...
Click to collapse
yeah but if you activate the camera libs the phone wont go into deep sleep mode right? or is that fixed already?

shatred said:
yeah but if you activate the camera libs the phone wont go into deep sleep mode right? or is that fixed already?
Click to expand...
Click to collapse
Seems I was wrong about that. It was the other way around, if the libs are disabled the phone won't sleep.
However, with FRX05 there's no need for the libs. FRX05 + GIT kernel or WisTilt2's newest kernel is all you need for cam.

arrrghhh said:
Seems I was wrong about that. It was the other way around, if the libs are disabled the phone won't sleep.
However, with FRX05 there's no need for the libs. FRX05 + GIT kernel or WisTilt2's newest kernel is all you need for cam.
Click to expand...
Click to collapse
hmm yeah about that, i tried frx05 with wistilt2 latest kernels but it doesnt work for me, i think its an problem with my user conf... can you perhaps send me your user conf from frx05?

shatred said:
hmm yeah about that, i tried frx05 with wistilt2 latest kernels but it doesnt work for me, i think its an problem with my user conf... can you perhaps send me your user conf from frx05?
Click to expand...
Click to collapse
Same for FRX04... It's in my bundle.
If you remove all of the ln -s and bind mounts, should work just fine...

Related

[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?

[Q] Cooking ROMs... I still don't get it

Hello,
I'm willing to try and build a custom rom, but I've been diving through the site for a few days and I still don't get it. I believe I do have the required background to do this: programming, linux, etc. and I have wide experience as a phone user, etc. It's just that either I'm not reading what I need or the way I want it. The problem, I believe, is that all I find are guides telling me to install this and those tools and then open this and that and voila! you got your rom. But they're not explaining WHAT exactly goes into those roms, or what is expected to go there, what's the purpose of those contents, etc., and I can't really catch with that. I feel at a loss and hate wasting my time turning around for nothing.
1. I don't understand the difference between a flashable rom and one that is meant to be installed through recovery, although I can see they're different. Do they both models contain the same kind of data? Is there any restriction to what one model can contain over the other one? If so, how would I convert from one to the other? But please, don't tell me to use this or that tool. I just need the theory behind it. Something of sorts like: "You need to extract this or that from this tarball, then mount this image, then the directory tree there goes in that directory over the other model of rom"
2. update-binary: Okay I guess this is run when installing from recovery, and this takes care of installing the rom, right?wrong?. Is this a per-rom thing, per-device thing? generic? If it's per-rom, how to generate it? do I need to compile something? Is there any generic source code that can be used as a start?
3. Although I have a basic understanding of how the Linux directory tree works, I know Android works on top of a heavily modified Linux. So can you explain briefly how the directory tree works? For instance, I believe /data/data is where Android apps install to, in /system/bin or xbin I can find busybox binaries/symlinks if present. /dev and /proc look the same as in Linux. I don't know about /sys. Also how are both rom models deployed to this tree? What is basically being copied?
4. If I were to compile a kernel, where do I find the Android kernel sources? or is it just a generic Linux kernel? where can i get a basic config for the device? Last time I checked my device hadn't /proc/config.gz but maybe I could get it from another rom with it enabled or something. What toolchain and where to get it? Oh and if you know of a native arm version of gcc or whatsnot, I'd prefer that. Setting up IDEs or toolchains is a nightmare. I don't like crosscompiling. But crosscompiling or not, a directory with all needed binaries without needing to set up system variables nor other stuff, would be amazing.
I surely have a lot more questions that I can't get from the back of my mind now, and I'll have yet more as you explain. But the point of my questions was mainly trying to explain the degree of the loss I'm at, so you can assist me better.
If it looks like a foolish petition, well, that's because I'm quite stubborn and can't catch things that don't go my way. I really need to understand the basics before I can move into actually doing something. I want to build a rom for the right reasons(to me). It's not just about packing a set of apps or themes with it, but about learning and doing other stuff like trying to fix things that are not supposed to work for the device in that Android version, etc.
If you can't help, congrats for reading through here anyways But any help is greatly appreciated :good:
oxiroxt said:
Hello,
I'm willing to try and build a custom rom, but I've been diving through the site for a few days and I still don't get it. I believe I do have the required background to do this: programming, linux, etc. and I have wide experience as a phone user, etc. It's just that either I'm not reading what I need or the way I want it. The problem, I believe, is that all I find are guides telling me to install this and those tools and then open this and that and voila! you got your rom. But they're not explaining WHAT exactly goes into those roms, or what is expected to go there, what's the purpose of those contents, etc., and I can't really catch with that. I feel at a loss and hate wasting my time turning around for nothing.
1. I don't understand the difference between a flashable rom and one that is meant to be installed through recovery, although I can see they're different. Do they both models contain the same kind of data? Is there any restriction to what one model can contain over the other one? If so, how would I convert from one to the other? But please, don't tell me to use this or that tool. I just need the theory behind it. Something of sorts like: "You need to extract this or that from this tarball, then mount this image, then the directory tree there goes in that directory over the other model of rom"
2. update-binary: Okay I guess this is run when installing from recovery, and this takes care of installing the rom, right?wrong?. Is this a per-rom thing, per-device thing? generic? If it's per-rom, how to generate it? do I need to compile something? Is there any generic source code that can be used as a start?
3. Although I have a basic understanding of how the Linux directory tree works, I know Android works on top of a heavily modified Linux. So can you explain briefly how the directory tree works? For instance, I believe /data/data is where Android apps install to, in /system/bin or xbin I can find busybox binaries/symlinks if present. /dev and /proc look the same as in Linux. I don't know about /sys. Also how are both rom models deployed to this tree? What is basically being copied?
4. If I were to compile a kernel, where do I find the Android kernel sources? or is it just a generic Linux kernel? where can i get a basic config for the device? Last time I checked my device hadn't /proc/config.gz but maybe I could get it from another rom with it enabled or something. What toolchain and where to get it? Oh and if you know of a native arm version of gcc or whatsnot, I'd prefer that. Setting up IDEs or toolchains is a nightmare. I don't like crosscompiling. But crosscompiling or not, a directory with all needed binaries without needing to set up system variables nor other stuff, would be amazing.
I surely have a lot more questions that I can't get from the back of my mind now, and I'll have yet more as you explain. But the point of my questions was mainly trying to explain the degree of the loss I'm at, so you can assist me better.
If it looks like a foolish petition, well, that's because I'm quite stubborn and can't catch things that don't go my way. I really need to understand the basics before I can move into actually doing something. I want to build a rom for the right reasons(to me). It's not just about packing a set of apps or themes with it, but about learning and doing other stuff like trying to fix things that are not supposed to work for the device in that Android version, etc.
If you can't help, congrats for reading through here anyways But any help is greatly appreciated :good:
Click to expand...
Click to collapse
I am not terribly knowledgeable about all of this, but I will take a crack at it. Others can feel free to correct me.
1. "Flashing" is usually done through the recovery from a zip with an update script inside. That script is in a language called "edify". Read more about Edify Here and Here.
The only other common way that I know of installing a ROM is through fastboot in the bootloader, but that is normally only used with official factory images. Also, I think Samsung ROMs are often flashed with a proprietary program called Odin.
2. I think that the update-binary is standard across all recent devices. I think it is just an interpreter for the Edify scripting language. Old versions of android used a somewhat different scripting language and required a different file. You can probably pull the binary out of another recent zip and use that. The main thing you have to worry about is the update script (instructions for what the zip does) and the folder structure of the zip.
3. I am not confident to explain much here, but the apps and their data are stored in different places. User apps are stored in /data/app with app data stored in /data/data, I think. System apps are installed in /system/app. There is more files stored on the "sdcard" partition which can be internal or external, depending on the device.
4. Kernel sources are usually provided in the source code from whatever repo you are using. Different ROMs use different bases. Here is some info about grabbing the AOSP kernel sources with git: http://source.android.com/source/building-kernels.html
Many of the more popular ROMS have specific build instructions on their individual github pages (Cyanogen, Paranoid Android, etc), so you might what to look at those, too. Also, depending on the individual devices, there might be proprietary binaries sourced from the device or hardware manufacturers for things like camera drivers, graphics chips, etc.
If you want a walk through of the basic build process google has a tutorial. The last time I checked there seemed to be some outdated info, but it might give you a general idea of the build process. http://source.android.com/source/initializing.html
Hopefully someone more knowledgeable can give you more info, but that is all I got
synesthete said:
I am not terribly knowledgeable about all of this, but I will take a crack at it. Others can feel free to correct me.
1. "Flashing" is usually done through the recovery from a zip with an update script inside. That script is in a language called "edify". Read more about Edify Here and Here.
The only other common way that I know of installing a ROM is through fastboot in the bootloader, but that is normally only used with official factory images. Also, I think Samsung ROMs are often flashed with a proprietary program called Odin.
2. I think that the update-binary is standard across all recent devices. I think it is just an interpreter for the Edify scripting language. Old versions of android used a somewhat different scripting language and required a different file. You can probably pull the binary out of another recent zip and use that. The main thing you have to worry about is the update script (instructions for what the zip does) and the folder structure of the zip.
3. I am not confident to explain much here, but the apps and their data are stored in different places. User apps are stored in /data/app with app data stored in /data/data, I think. System apps are installed in /system/app. There is more files stored on the "sdcard" partition which can be internal or external, depending on the device.
4. Kernel sources are usually provided in the source code from whatever repo you are using. Different ROMs use different bases. Here is some info about grabbing the AOSP kernel sources with git: http://source.android.com/source/building-kernels.html
Many of the more popular ROMS have specific build instructions on their individual github pages (Cyanogen, Paranoid Android, etc), so you might what to look at those, too. Also, depending on the individual devices, there might be proprietary binaries sourced from the device or hardware manufacturers for things like camera drivers, graphics chips, etc.
If you want a walk through of the basic build process google has a tutorial. The last time I checked there seemed to be some outdated info, but it might give you a general idea of the build process. http://source.android.com/source/initializing.html
Hopefully someone more knowledgeable can give you more info, but that is all I got
Click to expand...
Click to collapse
OMG Finally some light! THANK YOU, THANK YOU, THANK YOU for all the info. I didn't get much right now, I'll need to read through your post a few times before I get it all, haha. I'll be sure to check the links too. Thank you!

[ROM][27Aug][GNU/Linux] Sailfish OS 1.1.6.27 (community port)

Announcing Sailfish for the Sony Xperia SP
This is not Android!
This should be thought of as a development experiment. It may be useful if you are a developer and want to write/port apps the the Sailfish operating system. It is not an end-user product, however, if you wish to experiment and try something different then feel free!
Please do not contact Jolla Care or Jolla Developer Care, as this is not the Jolla phone
Update 15 Feb 2016
I've uploaded a new version of SailfishOS 2.0.0.10 to the Mega folder, called sailfishos-huashan-release-2.0.0.10-1.zip. This is again based off CM-12.1, the same release as stated below. This release fixes a kernel bug which lets a lot of the Sailfish system crash. This also fixes the wlan connectivity, startup-wizard which sets the themes, on-screen keyboard not popping up, and SIM unlock never asked. I've got a fix for the backlight in the works.
Update 14 Feb 2016
A very experimental CM-12.1 based SailfishOS 2.0.0.10 build is uploaded to the Mega folder linked below.
This version is based off cm-12.1-20160212-NIGHTLY-huashan.zip. I want to stress that many things in this build are broken.
Update 05 Feb 2016
This port is heavily outdated. I do not have much spare time on my hands to continue porting but I will try to post a nightly version soon.
This version was based on Sailfish 1.1.6 and CM-11.0, but the world has moved on to Sailfish 2.0 and CM-12.1, and so must this port.
There's a photo up on imgur:
http://i.imgur.com/Vg3SZ6w.jpg
Special thanks to:
All Cyanogenmod devs, since SailfishOS uses drivers from Cyanogenmod to talk with the phone's hardware
Everyone from the SailfishOS team/community, sledges and mal- in particular.
Known issues:
Half the backlight doesnt work, this is clearly visible at the top of the screen
Bluetooth isn't turned on, cause i've put no effort in for that so far
Camera doesn't work, cause it's not hooked up to interface.
No recovery inside hybris bootimage (you need to flash manually to return to cm/use recovery)
Settings hangs for few seconds on first start (this seems to be related to bluetooth not being set up)
What works:
Texting, calling, data over mobile network (2g and 3g tested, 4g should work but is untested)
Wifi, GPS (does take a while to get a fix though), most of the sensors (proximity, lightsensor etc)
The half of the display backlight that does work is adjusted based on lightsensor input.
Charging, bottom ledbar basic functionality, audio works, audio via 3'5 jack also works.
Installation:
Insert default warranty void message here. Your warranty is now void
I have not tested this on locked bootloaders, but since I needed to modify the kernel, I guess that you need an unlocked bootloader.
Note this is not an offical Sailfish OS build, and the Xperia SP is not the Jolla phone, so please don't report bugs to Jolla. If you want to report a bug, search for it first on bit.ly/port-bugs, if your bug is not yet there, you can add it there or post it in this thread (I'll try to keep the xda thread and bugzilla in sync).
The Sailfish OS image does not provide recovery, and since the Xperia SP does not have a recovery partition, you need a seperate bootimage with only recovery on it to flash cm/stock/sailfishos upgrade.
The Sailfish OS image is based on a specific version of Cyanogenmod 11, which you will need to flash first.
You can find all the required files in a Mega folder: http://mega.nz/#F!7YhSTDIA!Akpjs8s3qT5_nEkN04fQ-Q
You can find a bootimage with only TWRP recovery in it called recoveryboot.img
This image can be flashed with fastboot (with phone turned off, hold vol up and plug in usb), then `fastboot flash boot recoveryboot.img`. After that reboot the phone (fastboot reboot), and it will boot into recovery. If you already have recovery from cm, then you can use that as well.
First do a full wipe (make a backup first if needed, TWRP can do this , then install CM11, the specific version you need is called: cm-11-20150712-NIGHTLY-huashan.zip
There is no need to reboot cause you wont use CM11 anyway, so just proceed and flash the Sailfish OS image, which is called: sailfishos-huashan-release-1.1.6.27-UNOFFICIAL-maikel-201508201214.zip
Flashing Sailfish OS is not as fast as flashing cm11, but it shouldn't take more than 10 minutes.
Then reboot. The first boot may take some time, during which the Sony logo is not displayed (WIP).
If the boot takes more than, lets say five minutes, try a reboot. You can power off the device by holding the power button until the LED bar turns red or the display brightness goes back to full, when the leds and display turn off the device is powered off.
If this doesn't work you can remove the back cover and press the little button in the little hole for 5 seconds, the device will vibrate thrice and the phone will be forced off.
If you want to return to your previous rom or restore a backup, use the recoveryboot.img using the commands stated at the top of this document, to boot into TWRP.
FAQ
You can find a FAQ which mentions most common user questions for SailfishOS here: http://forum.xda-developers.com/jolla-sailfish/general/qa-sailfish-n4-thread-devices-t2727330 . It's mainly aimed to the Nexus 4 and 5, but it's fairly applicable for all other ports as well.
Sources
In order to comply with the GPL, the kernel sources used for this port are available here:
CM-11.0 based port: https://github.com/maikelwever/android_kernel_sony_msm8x60
CM-12.1 based port: https://github.com/maikelwever/android_kernel_sony_msm8960t
edit: make links + sailfish 2.0 notice, kernel sources, 2.0 link
You rock! Very interesting project. Sailfish is an unknown world for me (and for most of us I think), I might try this ROM out sooner or later.
Why do we need to install CM11 first? Is it based on it?
Goob job bro!!!!
But I'll try this port later since it's kinda buggy
Hope you will fix those bugs.
Tomoms said:
Why do we need to install CM11 first? Is it based on it?
Click to expand...
Click to collapse
SailfishOS uses libhybris to communicate with the hardware, which in turn is talking to the Android HAL (like hwcomposer), to avoid having to write drivers for each phone, which would be pretty much impossible due to the proprietary blobs used on almost every phone.
The libhybris build included in this SailfishOS port is based on CM11, so that's why you need that.
CM12 based SailfishOS is currently experimental, when that gets more stable I will try to make a CM12 based build.
I tried the earliest version that was available on your git earlier this month, working great, just that it gets frustrating when Settings try to crash when you just opened and i just can't seem to install openrepos Warehouse from the command line...
boylush said:
I tried the earliest version that was available on your git earlier this month, working great, just that it gets frustrating when Settings try to crash when you just opened and i just can't seem to install openrepos Warehouse from the command line...
Click to expand...
Click to collapse
Installing packages from command line was fixed in the version linked in this thread. This had to do with some repositories that were unavailable (cause they pointed to local disk of buildmachine), causing zypper to hang on updating.
Those packages have been moved to the community buildserver, which hosts the packages online, thus fixing the hang you experienced while trying to install openrepos. If you still experience problems with the latest build: try a 'zypper rr adaptation0' before installing an app. If it complains about missing libsailfishapp, do a 'zypper ref' and try installing again.
Ninja edit: I'm considering bundling the openrepos warehouse with the zip, since I use it a lot myself as well, and we are in the process of enabling the official Jolla store (without Android support though), which should smooth out installing apps as well.
maikoool said:
Installing packages from command line was fixed in the version linked in this thread. This had to do with some repositories that were unavailable (cause they pointed to local disk of buildmachine), causing zypper to hang on updating.
Those packages have been moved to the community buildserver, which hosts the packages online, thus fixing the hang you experienced while trying to install openrepos. If you still experience problems with the latest build: try a 'zypper rr adaptation0' before installing an app. If it complains about missing libsailfishapp, do a 'zypper ref' and try installing again.
Ninja edit: I'm considering bundling the openrepos warehouse with the zip, since I use it a lot myself as well, and we are in the process of enabling the official Jolla store (without Android support though), which should smooth out installing apps as well.
Click to expand...
Click to collapse
OMG Sailfish uses zypper? I must try this thing ASAP!
Can we install Android apps in it somehow?
Tomoms said:
OMG Sailfish uses zypper? I must try this thing ASAP!
Can we install Android apps in it somehow?
Click to expand...
Click to collapse
Yes Sailfish uses zypper, and also has pkcon (from PackageKit) available as a frontend. Sailfish is based on Mer, which is it's own Linux distro, so don't expect the huge amount of packages that are available on desktop Linux systems that use zypper. Multiple community members provide repositories with builds of common unix tools that are not bundled by default (openrepos) though. As far as I know, Mer is closest to OpenSUSE with the package guidelines (I'm no expert on this though).
Android apps are supported on the official Jolla hardware using AlienDalvik. AlienDalvik is proprietary and not gratis software and thus not available for community ports like this one. I just added a link to a XDA thread with a Sailfish user FAQ to the startpost, which goes into this subject in more detail and provides anwers to other common questions.
There are multiple community projects going on to provide support for running Android apps, which I'll look into when all the Sailfish native stuff works properly.
There's apkenv, which is a very basic way to run some Android games on Sailfish ports.
There's some way to run full Android in a chroot and pipe the UI to a Sailfish app window.
And then there's shashlick, from the KDE team, which tries to map Android UI to QT.
I have not tested any of these three (yet), and there may be more options than this available.
maikoool said:
Yes Sailfish uses zypper, and also has pkcon (from PackageKit) available as a frontend. Sailfish is based on Mer, which is it's own Linux distro, so don't expect the huge amount of packages that are available on desktop Linux systems that use zypper. Multiple community members provide repositories with builds of common unix tools that are not bundled by default (openrepos) though. As far as I know, Mer is closest to OpenSUSE with the package guidelines (I'm no expert on this though).
Android apps are supported on the official Jolla hardware using AlienDalvik. AlienDalvik is proprietary and not gratis software and thus not available for community ports like this one. I just added a link to a XDA thread with a Sailfish user FAQ to the startpost, which goes into this subject in more detail and provides anwers to other common questions.
There are multiple community projects going on to provide support for running Android apps, which I'll look into when all the Sailfish native stuff works properly.
There's apkenv, which is a very basic way to run some Android games on Sailfish ports.
There's some way to run full Android in a chroot and pipe the UI to a Sailfish app window.
And then there's shashlick, from the KDE team, which tries to map Android UI to QT.
I have not tested any of these three (yet), and there may be more options than this available.
Click to expand...
Click to collapse
man i was waiting for this thing :fingers-crossed:
A small review of this OS:
The flashing process isn't very short, but in my case the OS booted in less than 30 seconds
There are only 10 - 12 installed apps: Settings, Contacts, Camera, Telephone etc.
The terminal emulator is fully-featured but it has got a bug: the screen orentation is the opposite of the real one (when the phone is horizontal, the terminal is vertical and vice versa). But as I've just said, it happens only in terminal.
WiFi doesn't seem to be working, but SIM card signal works (2G and 3G - no LTE); mobile data - I don't know.
The GUI is shiny and transparent and the whole OS is based on gestures. There's a little tutorial after the first boot thats help you understand how to use the phone fastly. I didn't open the Jolla store as I couldn't use mobile data at that moment.
During my 10-minute-long test, the screen randomly locked by itself; there is another bug: when the screen is locked, backlight doesn't turn off unfortunately.
A strange thing of Sailfish is that the app you're using is always fullscreen, there's no notification/status bar at all. The navbar also doesn't exist, as you can go back and to homescreen with gestures.
The developer mode is also interesting, it lets you connect to your phone remotely over the network.
Basically, this port of Sailfish at the moment is a very early alpha, but it's the dream of the geek: a full Linux experience with command-line package manager etc. I hope to see improvements in the future
will follow this thread closely...........
finally something new and different to use.
cheers
avi.singh9993 said:
will follow this thread closely...........
finally something new and different to use.
cheers
Click to expand...
Click to collapse
And now the Jolla Store should be enabled! \o/ Please try it out and tell us 
This looks really good, if it will ever be in daily driver state this will be my go to rom
sledges said:
And now the Jolla Store should be enabled! \o/ Please try it out and tell us 
Click to expand...
Click to collapse
yeah i would love to try, but i need my phone as a daily driver many important work related.
why don't you all post on official facebook page, i'm sure 90 percent people do not know about this and are willing to try and submit bug reports which in turn helps in faster development of this project.
avi.singh9993 said:
yeah i would love to try, but i need my phone as a daily driver many important work related.
why don't you all post on official facebook page, i'm sure 90 percent people do not know about this and are willing to try and submit bug reports which in turn helps in faster development of this project.
Click to expand...
Click to collapse
Why don't you post please? DIT - doing it together!
sledges said:
Why don't you post please? DIT - doing it together!
Click to expand...
Click to collapse
well i asked my friend to post it,
many people saw it but unfortunately not much of a positive feedback.
now it's onto developer and his hardwork to develop and make it atleast daily driver. then some people will be interested in trying it
Tomoms said:
A small review of this OS:
The flashing process isn't very short, but in my case the OS booted in less than 30 seconds
There are only 10 - 12 installed apps: Settings, Contacts, Camera, Telephone etc.
The terminal emulator is fully-featured but it has got a bug: the screen orentation is the opposite of the real one (when the phone is horizontal, the terminal is vertical and vice versa). But as I've just said, it happens only in terminal.
WiFi doesn't seem to be working, but SIM card signal works (2G and 3G - no LTE); mobile data - I don't know.
The GUI is shiny and transparent and the whole OS is based on gestures. There's a little tutorial after the first boot thats help you understand how to use the phone fastly. I didn't open the Jolla store as I couldn't use mobile data at that moment.
During my 10-minute-long test, the screen randomly locked by itself; there is another bug: when the screen is locked, backlight doesn't turn off unfortunately.
A strange thing of Sailfish is that the app you're using is always fullscreen, there's no notification/status bar at all. The navbar also doesn't exist, as you can go back and to homescreen with gestures.
The developer mode is also interesting, it lets you connect to your phone remotely over the network.
Basically, this port of Sailfish at the moment is a very early alpha, but it's the dream of the geek: a full Linux experience with command-line package manager etc. I hope to see improvements in the future
Click to expand...
Click to collapse
I agree totally that it's the dream of a geek. I've noted all your comments and will try to fix them. Thank you very much for taking the time to test!
Spasik said:
This looks really good, if it will ever be in daily driver state this will be my go to rom
Click to expand...
Click to collapse
That's what I'm aiming for too!
avi.singh9993 said:
yeah i would love to try, but i need my phone as a daily driver many important work related.
why don't you all post on official facebook page, i'm sure 90 percent people do not know about this and are willing to try and submit bug reports which in turn helps in faster development of this project.
Click to expand...
Click to collapse
Sorry, but I couldn't care less about Facebook. I'm pretty convinced that everyone that is willing to try something like this is already on XDA anyway. Hopefully the work related part will be better possible when Android app emulation or something similar finally makes it to community Sailfish builds.
PS: I've been a bit busy with other things lately, sorry for not responding that fast. I'll try to roll a build with fixes and the latest Sailfish (1.1.7.28) asap.
This has changed the mac of my device
can I ask how's the development going?
If someone could port the only rom i would like to be ported on the SP: ColourOS, it will be AMaZING

Some Hacking in Yoga Book

Hi folks.
I'm an Android firmware developer (you can see my posts here in xda) that got a yoga book yesterday. For me it works at it should (by now) but my hacker soul speak to me and said: "at least take a look to see what you can get from this device". I don't have many time, so I can't spend time doing roms or fixing things by myself, but I can share with you some info I get and help you with my knowledge if someone is interested in "play" with this device.
First of all, I'm not responsable of anything that you can break following these steps. Almost all of them are tested and with some common sense you will not break anything, and if you break anything I will try to help you to fix it (if you are polite), but this is a work in progress and hacking and the possibility of brick the device is always there.
I only have the Android version without LTE, so I only tested in my Book.
So, here we go:
1) Secret codes:
I get this codes decompiling EngineeringCode.apk with apktool. Be carefull with them:
####0000# - Display version info
####7599# - Display hardware info
####8375# - Display baseband info
####1111# - Factory test
####2222# - Display SN
####7777# - Factory Reset???
####5993# - Display internal frameWork version
####7642# - Cut the power off to reload the PMIC - This command shutdowns the device. Just press the power button to reboot.
####5236# - Display LCD name
####2834# - ES close test
####8899# - open the ums mode default for debug
####3333# - offline log
####3334# - offline modem log
####9527# - Mediaplayer setting
####78646# - RunIn test
####6020# - switch country code
####59930# - Display current country code
####8746# - Enter engineering mode
####4227# - Enter engineer test
####357# - DLP_TEST
To use these codes, open the contacts app, press the search button and enter the code in the search bar.
2) OTA Images
You can get OTA images directly from lenovo servers. Just open your browser and paste this url:
http://fus.lenovomm.com/firmware/3....WW06_BP_ROW&action=querynewfirmware&locale=en
Change device model if needed (LenovoYB1-X90F or LenovoYB1-X90L)
Change curfirmwarever to a valid OLD firmware, this way you will get the next one in age.
Change locale if needed.
With this url you will get a download url at the end of the result page. In this case: http://tabdl.ota.lenovomm.com/dls/v...S000426_1705080316_WW06_BP_ROW_WC80C2A0F2.zip
These images are not full ota images, they are diff versions. This means that we can't use them to mod the image, or recover a bricked device, but this is a first step
3) Custom images
We don't have real sources to build a custom image (the lenovo's open source files are useless), but this doesn't mean that we couldn't modify stock images to take out useless apks or get better performance.
We can get this using an Android Kitchen and a full update image for the device.
As Android kitchen you can use SuperR kitchen (https://forum.xda-developers.com/ap...chen-superr-s-kitchen-v1-1-50-v2-1-6-t3597434)
As full image, I only tested the one here (https://easy-firmware.com/index.php?a=browse&b=category&id=19521) because I can't download any newer one.
I tested uncompressing it, deodexing the apks and doing a new image. But I don't test it in the device because I need to install twrp to flash the new image and I don't have time to test. But this should work, I did it many times so if someone is interested I can give steps to do it and support for testing.
If someone can get the latest full images, send then to me and maybe I can get some time to do some tests.
PD: Probably we could use this as a base to get LineageOS 14.1 working: https://github.com/latte-dev/android_device_xiaomi_latte/tree/cm-14.1
So, if you are interested in some hacking with the Yoga Book, contact me and we could team to get the most of this device.
First of all thank you for your post, it´s really useful
if you could somehow manage to boot windows on this machine it´s by far the greatest war we have right now.
Il promise you a lunch or dinner on Lisbon whenevere you want!
joao1979 said:
First of all thank you for your post, it´s really useful
if you could somehow manage to boot windows on this machine it´s by far the greatest war we have right now.
Il promise you a lunch or dinner on Lisbon whenevere you want!
Click to expand...
Click to collapse
Sorry, my knowledge of Windows is only user level . Install it in personal computer to play games .
But I really don't know why people wants to run Windows there, it will go slowly than Android and its less touch oriented... but I suppose that this is a chat for another thread
corvus said:
Sorry, my knowledge of Windows is only user level . Install it in personal computer to play games .
But I really don't know why people wants to run Windows there, it will go slowly than Android and its less touch oriented... but I suppose that this is a chat for another thread
Click to expand...
Click to collapse
in my particular case, i´l admit that is for football manager the touch version
joao1979 said:
in my particular case, i´l admit that is for football manager the touch version
Click to expand...
Click to collapse
Have you tried running it through Crossover? It may be in its infancy but i have got a few apps running OK with it.
I have the full "YB1-X90F_USR_S000196_1611040312_WW06_BP_ROW" I can upload somewhere if anyone can suggest a good site to do so without signing up? The file is about 2.5gb
It will be great if we could get the latest version, because maybe these older versions have older files that we have updated in our tablets.
Mixing files could give unknown problems
The current TWRP is based on the new Yoga Tab 3
I am starting to think they do not do full roms for this in the same way they do for a lot of their other devices.
We know the otas are available from tabdl.ota.lenovomm.com/dls/v6/ and are named according to the 2 builds that it bridges. As easy-firmware had the december full rom under the file name B1-X90F_USR_S000196_1611040312_WW06_BP_ROW-flashfiles.zip I had hoped that I could work out the file path to pull it down.
There were some interesting ideas here, https://forum.xda-developers.com/android/help/how-download-stock-roms-lenovos-ota-t3109507 but it seems there is a difference between phonedl.ota and tabdl.ota
Queries to full roms that work for phones, don't seem to work for the yoga book.
Anyone with more web knowledge able to pick this up? I am not sure the files are there but I feel they should be.
Good luck
Update: the downloads seem to be hosted via CloudFront. An Amazon service, but I can not find out a way of listing the available files. The latest full rom would be
http://tabdl.ota.lenovomm.com/dls/v6/YB1-X90F_USR_S000426_1705080316_WW06_BP_ROW_WC80C2A0F2.zip
But the Last 8 chars are random and we do not know what they are.
So we have two hopes. First work out the right query to the link from fus.lenovomm.com or two find a way of listing files available in tabdl.ota.lenovomm.com/dls/v6
Not sure I have got much further but ill keep trying when I can.
Hey, I should mention that I have some files that you may find helpful; I got them from the easy firmware website. They're all the .img files for each partition in Android (ie. boot.img, cache.img, config.img, factory.img, recovery.img, system.img) as well as: biosupdate.fv, bootloader, firmware.bin and gpt.bin. However, these of course aren't in the normal "flashable .zip ROM" format. So unless you know how to take apart these .img files they aren't very useful. If you need any more help or have any other questions about how far we've come on our own, feel free to ask. danjac also has great knowledge of our efforts.
Yes, I know how to use them, unpack, modify, etc. But what I want is the latest version, no a old version (I hav these files too). If you have them I can do some changes, debloat, etc.
Anyway, I see little interest in custom roms in this forum ( probably because it's not a device with a lot of users or the users are not the techy kind), so I prefer to help others with info than do a custom rom that only 2 or 3 people will use. Doing custom roms is a time hungry task and probably it doesnt worth the effort. Anyway this device is not full of bloatware like samsung ones, so it useable as it is.
As I said in my first post if anyone is interested I can give some hints and support to modify the full image (but only the latest one).
It's so sad that there are only a few interested owners of this tab - it's such a nice device but i fear the day lenovo decides to end their support for it. There will be no custom roms to switch to and keep the device alive - it will be a soon to be bit of old tech garbage BTW. I still use my Asus Transformer Prime because of the nice community
@NiffStipples I fully agree. This device is so powerful and its a suprise that it is invisible to the "market". In my humple opinion the normal ROMs aren't that bad besides missing updates but I would love to see all the power served through a custom rom. unfortunately programming is not my business
Stefan
Broomfundel said:
Have you tried running it through Crossover? It may be in its infancy but i have got a few apps running OK with it.
Click to expand...
Click to collapse
Interesting - is Crossover good (and does it require factory reset)?
Hi, It works well with some things and not others. Often the why and where are not obvious. It is basically "wine" the layer that allows some windows apps to run on a linux install. Tweeked to work with android. Just an install to put crossover on. Then another install (Within crossover), to put you app on crossover. If it doesn't work out of the box, there windows libraries you can switch out and dependencies you can install. (Eg: directx , .net) Even if your not technical. I would say get on the beta program and give it a try.
Hi! what do you mean by "lenovo's open source files are useless"? do you refer to this packet on lenovo's suppport site? download.lenovo.com/consumer/open_source_code/lenovo_yb1_x90f_l_osc_201608.zip
I've entered the Android YogaBook's BIOS and noticed that VT-X is enabled by default! With Limbo x86 we could get a fully working virtualized Windows or Linux, if it wasn't for... KVM. It seems like it's not enabled in Lenovo's default kernel. Could we get to recompile the kernel with this option on? i'm not a big android/ROM expert but i surfed the open_source_code folder from Lenovo and it seemed, to me, that we could rebuild the Kernel at least.
This could really change things!
morrolinux said:
Hi! what do you mean by "lenovo's open source files are useless"? do you refer to this packet on lenovo's suppport site? download.lenovo.com/consumer/open_source_code/lenovo_yb1_x90f_l_osc_201608.zip
I've entered the Android YogaBook's BIOS and noticed that VT-X is enabled by default! With Limbo x86 we could get a fully working virtualized Windows or Linux, if it wasn't for... KVM. It seems like it's not enabled in Lenovo's default kernel. Could we get to recompile the kernel with this option on? i'm not a big android/ROM expert but i surfed the open_source_code folder from Lenovo and it seemed, to me, that we could rebuild the Kernel at least.
This could really change things!
Click to expand...
Click to collapse
How did you enter the bios? Can you boot from usb?
anyone managed to use swiftkey keyboard?

Porting AOSP to custom-built device

Hi everyone,
as title suggests, I'd like to "port" clean AOSP to be able to install and run it on the custom device.
Basically, the situation is following: I got a custom device, based on rockchip rk3288 SoC. The device currently runs Android 5.1 successfully. I'd like to update Android to version 6 (got AOSP sources and AWS builder image up and running), but the company that created Android v5 for us no longer exists.
Thus I am here to ask for advice(s) on how to proceed (or whether it even is a good idea to do that myself, given the fact that I have zero experience with Android ROMs development), possibly a step-by-step guide on what to do.
The question is, do I just find drivers for hardware components present in the device (usb hub, ethernet, etc.) and just somehow "link" those to existing sources (of AOSP) and just run the build with different parameters? Or do I need to build a whole new kernel for the given device-OS combination?
Thank you for any advice or opinion!
Well this is an interesting one. There are several routes you can take here.
If you have the kernel source code, and the source code for the drivers, you could probably build the kernel from source and use it to boot Android, however, as that's unlikely, you're looking at a more regular porting process, which usually consists of pulling the vendor blobs from the existing Android system, building AOSP/Lineage with those blobs involved, and hacking together a new ramdisk that HOPEFULLY will be compatible. It's a very long and very tedious process, but it's certainly possible.
From that you'll then get in to the debugging stage of finding out what works out of the box, you'll very well need to make changes to AOSP for it to work on that SoC.
abtekk said:
Well this is an interesting one. There are several routes you can take here.
If you have the kernel source code, and the source code for the drivers, you could probably build the kernel from source and use it to boot Android, however, as that's unlikely, you're looking at a more regular porting process, which usually consists of pulling the vendor blobs from the existing Android system, building AOSP/Lineage with those blobs involved, and hacking together a new ramdisk that HOPEFULLY will be compatible. It's a very long and very tedious process, but it's certainly possible.
From that you'll then get in to the debugging stage of finding out what works out of the box, you'll very well need to make changes to AOSP for it to work on that SoC.
Click to expand...
Click to collapse
Thanks for pointing in the right (or at least some) direction! I found some guide on porting ROMs which I followed, basically like you said. So I just replaced some files in System image. Will flash later today, so maybe I will get some results!
abtekk said:
From that you'll then get in to the debugging stage of finding out what works out of the box, you'll very well need to make changes to AOSP for it to work on that SoC.
Click to expand...
Click to collapse
So I was following this tutorial, although found some irregularities, let's say: For example, none of those 2 folders contained init.d/ directory, thus I didn't update it. Also, I haven't found META-INF folder therefore haven't updated updater-script.
Basically, when I did (or at least what I think I was doing was that I took /system partition from our current ROM, that is working on that custom device and replaced stuff in there by stuff from the new system I wanted to port. My idea from what I've read was that i took kernel (and boot/recovery) from the original, working ROM and "injected" the new system onto it. Is that correct? Is that what I needed to do? Because the problem is, I cannot boot into the system (might as well be because of Kernel version, because I am trying to port Android 6 on Kernel 3.10. which was used in the current ROM running Android 5). It looks like the device is stuck in bootloader, or "somehow doesn't know what to start" (sorry, I can't put it better), displaying only my device's logo.
When I connect it to the computer via USB cable, running adb devices shows me that device, but when I try to access shell using adb shell I got error saying that /system/bin/sh wasn't found, which made me thinking that somehow the /system partition isn't "linked" properly, like I stated in the beginning.
Was I doing everything correctly? Do I need to do something above that? (maybe do you know about some tutorial). I am trying to port AOSP 6 Android.
Thank you!

Categories

Resources