Tutorial/tool to modify a kernel to hide non-debuggable apps ? - Android

Ever since I've moved to AOSP based roms (SlimKat, CyanogenMod, OmniRom, Resurrection-Remix,...) , I've noticed that in the DDMS tool (a tool for developers) that it shows all processes, and not just debuggable processes, including all third party apps' processes and OS's processes.
This never occurred for me on stock roms, no matter which device or stock rom I've looked at.
This issue annoys me as a developer, since I usually run only a single app that I develop and when I go to DDMS to choose the app's process, I need to find it amongst many processes (even of WhatsApp) , and, provided it hasn't changed its position on the list, click it and debug it.
So I asked about this on some kernels forums, and usually people didn't mind about it (and for good reason - it can bother only few people).
I've found the next tweak which can do it, but since I'm a complete newb in creating/modifying kernels, I have no idea how to patch it:
setprop ro.debuggable=0
Click to expand...
Click to collapse
Found from here .
I've contacted a few kernel developers and one of them agreed to check it out. I've tested it on CM and it worked just as it was intended :
Only debuggable apps' processes were visible and ready to be debugged.
Anyway, I wish to ask whoever is an expert in developing/modifying kernels those questions:
1. Why isn't this tweak enabled by default?
I mean, this is not the normal way roms work. It's not like this on any stock rom I've seen, not even on Nexus stock roms...
I also don't get why it's this way even for "final/stable" version roms (meaning not nightlies or experimental ones), since you'd probably not need to be able to debug them (users won't give you their device just for that...) .
2. Can you please explain to me, step by step (but don't assume I know anything about kernels development), how to take a rom's zip, and change its kernel so that this tweak will be enabled?
Maybe I could make an automatic tool that does it, either in Java for desktop or for Android.
3. Is there any way to enable this tweak without modifying the kernel? Maybe by using a tool that works with it?
Or maybe, provided we got root, change something to enable it?

Related

[Q] Can't a newbie like me understand anything about Android on smartphones?

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...

[Q] Logcat enable/disable Application

I'm currently an Android developer and I would like to make an application that will enable and disable logcat.
The purpose would basically be to save battery for the standard user, and to fix logcat not working for developers.
I know of one method to disable/enable logcat which is:
logcat-disable
logcat-enable
Unfortunately, this does not work on all devices since it is based on the kernel.
Also, most (I believe all) devices have a /dev/log/main/ folder in which there is a file that has logs printed into it. I could also possibly attempt to delete the folder (which it will likely be re-created at reboot) or MAYBE change the file permissions for it to prevent the system from writing to it. This option may or may not work.
So, my question is more for kernel developers or those very familiar with kernel development/file structure.
Does anyone have any idea what file is generally modified when a kernel enable/disables logcat?
P.S. I was able to figure out the answer to my question on one kernel, but I doubt if it applies to all.
P.P.S. I'm aware that this is probably a pointless question since every kernel is different, but I'm not sure, so that's why I'm asking.
Thank you!

Rooting

Do Not Post Question in General Post in Q&A CLOSED
I'm not super educated, but I'm pretty sure I can explain the fundamentals of it (correct me if I'm wrong anyone)...
The Android operating systems runs ontop of a linux kernel... and just like any other linux distribution, there is a particular set of low level system files that you, the user, by default, don't have access too. This is to prevent you from breaking anything, as well as to prevent malicious software/intruders to compromise the security of your file system.
These same low level system files, however, are useful for many things. In order to make changes to a lot of things (overclock your processor, tweak speed and battery life, sometimes sideload applications outside the market; although most devices let you do this without rooting now, and in most cases install a non-stock system image).
This system image is known as a ROM; a rom can be pulled from another device and then modified to work on your own, or in some cases can be an original release from Google (Known as an AOSP) which is then 'cooked' by a developer to work on your device.
If you're familiar with reinstalling or installing Windows, it's a pretty easy concept. Once a device is rooted, a custom recovery can be flashed to the device. This custom recovery allows you to flash over your stock system image with a new ROM.
Rooting is basically taking control over your device for what can be installed, deleted, or altered.
Here is a link to give you much more info on rooting:
http://m.androidcentral.com/what-rooting

[Intensive Guide] Discovering your Mimmi -In progress-

For the Moderator who moved this thread, please contact me.
Click to expand...
Click to collapse
I am currently working on this: It is a work in progress. Many things will be updated as this goes on. I will publish it before it is ready mainly for you to know that I am doing this and to delete it before it is too late if you think it just isn't as good as I imagine it .
It could be useful to note that the dictionary may not be exactly correct, I can make mistakes and you can correct me too, if you are sure of what you say. Also, keep in mind that I define the concepts by what I understand from them and simplifying the language as much as I can for EVERYONE to understand every word.
Click to expand...
Click to collapse
Credits:
ShortFuse.org - SuperOneClick
ClockWorkMod Installer - rect2409, xda user
Contents:
1. Introduction
2. Dictionary -In permanent update as needed-
3. Getting started
/3.1 - Rooting
/3.2 - Getting your Recovery - CWM Recovery
/3.3 - Avoiding Baseband issues --Uncomplete--
1. Introduction:
Hey there, x10 Mini Pro community. First of all, the cheesy part, I would like to say thanks to the developers that have been in the main scenario since I came here, D4, slade, paul, nAa, TheMiltos, and lots of them whose usernames I should start looking for, but it is not like I do not recognize them. First, you may ask why would I make this thread if there is already another one, made by not less than one of the users I mentioned before. Well, I started on this community like on January 2011, when slade's Gingerbread was brand new and the Froyo ROMs were just getting a bit stable and ready for everyday use. I found it pretty difficult to start, since I've noticed that the support for newbies isn't kinda.. "the way" of xda. At least, when I was one of them, I felt pretty alone on this unknown roads, and also felt guilty to send a PM asking for help, not being able to post - and that was just when I finally decided to create an account... I spent hours and hours searching on Google, watching videos on Youtube, trying to understand what did they meant with all this technical language -disregarding the fact that my native language doesn't help at all (Luckily, my English is pretty good)-, reading blogs, and so on. I had to keep this intensive study for several weeks to, finally, get my very first custom recovery installed. And that was just the first step. Besides my own experiences -which are, by the way, the main reason for me to start thinking about a thread like this-, I noticed that all the particular problem solution threads just get lost within a month.
So, what am I looking for with this thread? What are the objectives?
-Full and friendly support for newbies to ask and be answered.
-Freedom to PM.
-Detailed step-by-step instructions, maybe even with screenshots later on.
-Some kind of a "dictionary" with words all over the Android development spectrum.
-Updated information.
-Make all of those lost tutorials and guides spread all over the x10 Mini Pro forums be compressed in one simple and extensive help center.
-End with the experienced ones complaining about newbies questions infinite cycle by creating this "encyclopedia".
-Maybe, just as an early idea, we could create a support team, whose purpose is pretty self-explanatory.
-Hope to add more objectives on the future.
2. Dictionary:
-Android Versions: Check Wikipedia for closer details on each version.
--> Cupcake 1.5: First public version of Android.
--> Donut 1.6: Initially the Stock version for our phones.
--> Eclair 2.1: Updated Stock version for our phones.
--> Froyo 2.2: Follow up to Eclair with some modifications
--> Gingerbread 2.3.x: Most widely used version by the moment.
--> Honeycomb 3.x: Version mostly for tablets
--> Ice Cream Sandwich: 4.0.x: Hybrid version, designed to unify Cellphones and Tablets OS.
--> Jelly Bean 4.1.x: It is still a rumor and it has not be released nor even confirmed yet, but it is still very likely to be true.
-APK: File extension used for Android-based applications. You can use them to install a specific application if you want to install it manually and not from the Market.
-Back-Up: It is a file made via Recovery that saves the ROM along with all the user data (Settings, applications, contacts, text messages...) on your SD to recover it later, just in case that something went wrong. It is sometimes referred as NAND Backup. NOTE: Every Back-Up is pretty heavy, and if you make another does not delete the previous one, so I recommend to delete the old/unneeded ones to save space on your SD.
-Boot: To turn on your phone.
-Bootloader: It is a part of the operating system that boots up your device and sets everything up to load Android, so your phone can boot and start as usual. Unlocking it allows us to flash custom kernel, which usually come with improvements compared to stock one.
-Brick: A Bricked device is a device that won't boot. It can be a full brick, when the phone just does not turns on, or a partial brick, where it turns on but it can not get to fully boot. A partially bricked phone can behave in many different ways while booting, for example, sometimes they get frozen at the Bootloader or sometimes they make a Bootloop. To Unbrick your phone means to get it back to normal from this state.
-CyanogenMod: Most commonly called by it's abreviation, CM. It is the most famous Android-based custom ROM, with both official ports to many devices and unofficial ports to almost every Android phone.
-Flash: To flash. It means to install something on your phone, this something can be a ROM, a Module for that ROM, can be almost anything. Any file we want to flash will be on a ZIP format, and it is made through your phones Recovery.
-Google Apps: Or GApps. Some of the apps developed by Google. They come in packages to flash them via Recovery. These apps include Android Market/Play Store, Google Maps, Youtube, Gmail, etc.
-Launcher: It is the application that is used by Android to show up your apps, homescreens, wallpapers, widgets, etc. Home Replacement Apps are alternative Launchers for you to install on your phone, and they can offer a major UI change (often used for more personalization).
-Overclocking: Commonly abbreviated OC. To overclock something means to make it run faster than the default speed set by the manufacturer. On computers, it can be applied to almost any component, on phones, it almost always is talking about the processor.
-OS: Short for Operative System. It is the "everything" of a computer. Mac and Windows are two really famous OS's you probably have used more than once. Well, Android is an OS too, and there are other OSs alternatives for phones too like Windows Phone, iOS and Symbian. The difference is much more than in the appearance thou, but it doesn't really matters to go further on this. Android haves different versions, and just like Windows haves Windoes 97, Windows XP, Windows Vista or Windows 7; Android has 1.6 Donut, 2.1 Eclair, 2.3 Gingerbread and 4.0 Ice Cream Sandwich (These are just examples, there are more).
-PC Companion, Flashtool, SEUS:
These are three common tools for your computer to update, flash or un-brick (alias revive) your phone.
--> PC Companion: Program by Sony Ericsson to update and save your Rom or parts (settings etc.) or to send media on your device
--> Flashtool: User-made program (credits to Androxyde and Bin4ry) to root, flash and set up many more things on your device.
--> SEUS (or Sony Ericsson Update Service): Program by Sony Ericsson to update or repair your official ROM. This is often the last chance to revive your bricked device, making me think if the "S.E.U.S." acronym is unintended or if it is actually made it to sound like the mythical god Zeus.
-Port: A ported ROM is a ROM, both custom or stock, that is available to some specific phone and someone manages to make it work for another device. Usually it includes changes like matching the desired device's screen and supporting it's own hardware.
-Reboot: Just turning off your device and then turning it back on, waiting patiently for it to completely load everything.
-Recovery: I usually call it a BIOS for my phone. It is not an application like Facebook or SMS, it is a program that can be optionally started while booting by pressing a certain key, in our case, we have to button-mash the "Back" button (Gamers will get that, it means to repeteadly tap the button). Your phone will enter a menu with black background and orange letters. Touch screen is not available here and the Menu button, the left one, serves no purpose at all. To control everything, you use the volume buttons at the side of your phone as Up/Down respectively, the Home button (the middle one) works as Enter and the Back button, the right one, is used to go back, as you might imagine. Recoveries are used to flash any flashable file to your phone. To exit and return your phone to normal, just back until the main menu and select Reboot Phone. It will reboot normally, and CWM will not show up unless you call for it with the back button.
-ROM: Its basically the OS that we install in our phones. It can be Custom or Stock: Stock ROM is the version that came with our phone, created by Google and then modified by your phone's brand company and then by your carrier, to go to your phone on it's original closed package. Also we have Custom ones, that are user-modified versions of Android. Every ROM in xda is a Custom ROM because they are developed by the user who uploaded it. We call it ROM because it resides in the ROM (Read-Only Memory) of our devices.
-Root: The first thing you must do over any Android device to get the full potential of itself, is rooting. Android, in basic terms, is based on Linux. Yes, that OS for computers you've probably heard of (If not, don't worry. You don't need to know about it.). And it is running just in your hand. On Linux, you need to get SuperUser permissions over a set password to make changes on the computer like installing programs and such things. On Android, you do not get his password and by default it is blocked, and rooting your phone means that you get this SuperUser access. Yes, if you are the one who goes exploring the phone 'till the last folder and modifying everything you possibly can, you will surely mess your phone up. But don't worry, if you just Root your phone and let TRUSTED apps to do their stuff, you are safe. What do I mean by trusted? With Root permissions you can do whatever you want on your phone, and so do Applications. You should just install applications whose developer you know you can trust, such as xda or market developed applications. Remember to always check the comments or posts people do reviewing their experience with that application, and beware if anyone tells so. Anyways, people is not that dumb and they have made the phone ASK for your permission before giving any new app the so called Root access.
-Run: To open a certain program or app. Can be used as "Running" for a certain program or app that is actually open, and so on.
-Stock: It refers to something that comes pre-installed on our devices, available when we just get them from the manufacturers.
-UI: The User Interface is the system shown on the screen of a device for you to interact with it.
-Undervolt: Usually abbreviated UV. It is the opposite of Overclocking, and, on phones, it consists of lowering the default voltage of the processor to make it run slower and thus decrease battery consumption.
3. Getting Started:
3.1 - Rooting
Steps:
-You can't imagine how easy and quick rooting can be. The first step, is to enable "USB Debugging" on your phone. I am going to be honest, I don't know what the **** is this, but keep it enabled. Always. Hehe. To do this, go to Settings and then under the Applications tab. Then, scroll down and go to Development. And there it is, you should tap "USB Debugging" once to get it checked and activated.
-Then, you need this software (Don't worry: it is free and very light, and you can just delete it after root). It is called SuperOneClick and this is the lastest version (2.3.3) until now. This is a screenshot of the interface that I grabbed from the original site. Install and open SuperOneClick, and continue to the next step.
-Now, with the USB Debugging enabled on the phone and SuperOneClick running on your computer, grab your USB cable that should have come along with your phone as your charger and connect with it your PC and your phone. On the phone it should show a message asking what to do, you should tap the option to charge the phone (This option is kinda "do nothing", it is the same as charging it from the wall). Now, go to SuperOneClick and click the big "ROOT" button. It should do all the work, so your task is to wait. Wait until it says it is ready and rooted, and then reboot your phone.
-Voile! Your phone is now rooted.
3.2 - Getting your Recovery - CWM Recovery
Steps:
-First, download this little program. It is a small Batch file (Commands for Windows) made by a user on this community called rect2409. On the original thread -Link under credits- you have a Linux version of this program, but I'm afraid have never used it and you will have to figure it out by yourself (Linux experienced-users encouraged to review over here). Extract the ZIP file and go into the folder you just extracted.
-Open install.bat. Batch files can be dangerous on the wrong hands but very useful on the right ones, so if any anti-virus or some kind of a security system tries to block this from working, tell them it is safe. You have my word (It wasn't even uploaded by me, so you can be sure I'm doing no trick here ). It will open a small black window with white text, follow it's instructions and answer it's questions. When it asks you for yes or no (Y/N), you have to write Y for yes or N for no and then press enter.
-When it says "If no errors are listed above then CWM has been installed. Finished.", you can close the window and delete everything you downloaded if you want. Everything you need on your phone is now there, so there's no problem if you want to delete this stuff.
-If you want to access CWM (That's how your new Recovery is called), you have to reboot your phone and at the "Sony Ericsson" text screen, press the "Back" button several times.
3.3 - Avoiding Baseband issues --Uncomplete--
Intro:
Your Baseband is a pretty large code that can be checked on your phone by going to settings and scrolling sown to "About phone". There, just like it says your Android version on a grey section, it should say your Baseband version on another. It should be a large code using both letters and numbers in a format like this ?????-????????-????? (? representing anything and - being itself, whatever it is called -I don't know it's english name-). What really matter are the last three digits, that have to be -015. If you have that, skip this step, because you are already done: The problem is when you have -006 (Like I had) or anything else, if it is possible. The point is that you NEED -015 Baseband version.
Steps:
-Of course, first make sure you have a wrong version of the Baseband, if you have the correct one, skip section.
-When you are sure you need to change your baseband, you have to change your "build.prop". Build.prop is a file hidden by the system, accessible via Root, that holds and manages some information and configuration about the phone. So, the first thing you need to do, is to get...
---To be continued---
Users who have helped:
karthiks.840 - ImInMunichBitch -
Click to expand...
Click to collapse
For Dictionary,
-ROM: Its basically the OS, we call it ROM because it resides in the ROM of our devices.
-Flashing: To install a new ROM. Basically any ROM will be in a zipped format. It can be flashed via any "Recovery".
-Recovery: A piece of program that can be optionally started on booting (In our devices by pressing "Back" button multiple times, when the device is turned on)
Just a quick suggestion: Everything you so far wrote is also applicable to the Robyn (X10Mini, E10i). If you keep it this general, you might consider posting this in the General Section, and maybe a mod could make it a sticky. Since this is not really about actual development, it looks kind of out of place in the development thread.
But keep up the good work
@nico444164: Thanks nico444164! This is probably the BEST thing I have ever seen on XDA - and I've been here since Mikevhl 's FroYo rom early 2011 (he was one of the main devs for x10 mini Pro) , followed by owain94 , slade87 , and paul-xxx who all slowly took over (over their predecessor's) one after another, slowly. I've never seen such a noob-friendly guide here at xda and I agree with your sentiment about it just not "being the way" it is here at xda. Frankly, it should be though and this thread by you is a hopefully a good indicator of/catalyst for xda slowly changing for the better. Cheers nico444164!
Suggestions for dictionary:
CyanogenMod:
Most famous Android-based custom rom of all times with many official and unofficial ports for many Android devices.
Brick:
Device doesn't boot anymore (fullbrick) or partially (halfbrick --> often bootloop to SE logo). Caused by wrong or incompatible changes in system related parts of Android (or many others as we know by now).
Stock:
--> Stock Rom: the operating system of our devices, how we get it from the manufacturer
--> Stock Kernel: same as Rom
Bootloader:
That part of the operating system, which boots up your device and sets everything on boot, so your Android can work as usual.
Unlock it allows us to flash custom kernel with improvements compared to stock one.
PC Companion, Flashtool, SEUS:
All three are tools for your computer to update, flash or revive your phone.
--> PC Companion: Programm by Sony Ericsson to update and save your Rom or parts (settings etc.) or to send media on your device
--> Flashtool: custom programm (credits to Androxyde and Bin4ry) to root, flash and set up many more things on your device
--> SEUS (or Sony Ericsson Update Service): Programm by SE to update your official rom (often the last chance to revive your bricked device)
Back Up:
Same as on a computer; saves the rom and its settings on your SD to recover it, when something went wrong (all usually via Recovery).
Android Versions:
--> Eclair 2.1: Stock version for our phones
--> Froyo 2.2: Follow up to Eclair with some modifications
--> Gingerbread 2.3: Mostly used version for our custom roms
--> Honeycomb 3.x: Version mostly for tablets
--> Ice Cream Sandwich: 4.x: Hybrid version for phones and tablets
APK:
File extension used for android based applications, if you want to install them manually and not from the market.
Launcher, Home Screen Replacement:
The application that is used by android to show up your apps, homescreens etc. Replacement apps take over those things (often used for more personalization).
A2SD, APP2SD, Link2SD:
Apps that allow you to free up your system memory by moving (non system) apps to your SD. Many custom roms implemented this in native settings.
GAPPS:
Commonly used google apps. Often in packages to flash them via recovery after installing a custom rom.
(Market/Playstore, Maps, Youtube etc.)
OC, UV:
-->Overclock (OC): used to get higher cpu values (decrease battery life but may increase performance).
-->Undervolt (UV): used to get better battery life by decreasing the voltage used by the cpu.
Just a few suggestions for this thread here.
I like the idea, would be a good sticky to new users, because this forum is
so high under development that many users forget that new ones may never heard of basic android knowledge.
Corrections are always welcome, hope my english is not that bad
Keep it up.
Marius
karthiks.840 said:
For Dictionary,
-ROM: Its basically the OS, we call it ROM because it resides in the ROM of our devices.
-Flashing: To install a new ROM. Basically any ROM will be in a zipped format. It can be flashed via any "Recovery".
-Recovery: A piece of program that can be optionally started on booting (In our devices by pressing "Back" button multiple times, when the device is turned on)
Click to expand...
Click to collapse
Added! Just changed some words I just thought should make a section for the users that help. Will do that in a few minutes.
SmG67 said:
Just a quick suggestion: Everything you so far wrote is also applicable to the Robyn (X10Mini, E10i). If you keep it this general, you might consider posting this in the General Section, and maybe a mod could make it a sticky. Since this is not really about actual development, it looks kind of out of place in the development thread.
But keep up the good work
Click to expand...
Click to collapse
Actually, that rooting process is kinda global. I thought about making this post a bit more general, but I wanted to start by little and taking my time, so maybe in the future I will ask someone to change it to General and I will add some info about each phone in details, if this gets to grow enough.
Also, I thought maybe this wasn't the place since it is not development, but:
-As a noob, I just checked this thread since I thought the others were exclusive for the Robyn.
-This is still particular to Mimmi.
-I have seen several tutorials and guides related to this on the Mini Pro development section, so I thought that if I am not the only one and it doesn't really hurts to have it here, it should be no problem. Besides, if this didn't work and get to be a real fail, it will just be forgotten with every other old posts out there
nightwing369 said:
@nico444164: Thanks nico444164! This is probably the BEST thing I have ever seen on XDA - and I've been here since Mikevhl 's FroYo rom early 2011 (he was one of the main devs for x10 mini Pro) , followed by owain94 , slade87 , and paul-xxx who all slowly took over (over their predecessor's) one after another, slowly. I've never seen such a noob-friendly guide here at xda and I agree with your sentiment about it just not "being the way" it is here at xda. Frankly, it should be though and this thread by you is a hopefully a good indicator of/catalyst for xda slowly changing for the better. Cheers nico444164!
Click to expand...
Click to collapse
Thanks for your message and support! And yeah, I hope noobs can find their basic ways here on xda, at a single and simple thread, as you might have wanted. I did, at least It would be only better if we could include all this novice people into this real complex world of development, even just as users.
ImInMunichBitch said:
Suggestions for dictionary:
CyanogenMod:
Most famous Android-based custom rom of all times with many official and unofficial ports for many Android devices.
Brick:
Device doesn't boot anymore (fullbrick) or partially (halfbrick --> often bootloop to SE logo). Caused by wrong or incompatible changes in system related parts of Android (or many others as we know by now).
Stock:
--> Stock Rom: the operating system of our devices, how we get it from the manufacturer
--> Stock Kernel: same as Rom
Bootloader:
That part of the operating system, which boots up your device and sets everything on boot, so your Android can work as usual.
Unlock it allows us to flash custom kernel with improvements compared to stock one.
PC Companion, Flashtool, SEUS:
All three are tools for your computer to update, flash or revive your phone.
--> PC Companion: Programm by Sony Ericsson to update and save your Rom or parts (settings etc.) or to send media on your device
--> Flashtool: custom programm (credits to Androxyde and Bin4ry) to root, flash and set up many more things on your device
--> SEUS (or Sony Ericsson Update Service): Programm by SE to update your official rom (often the last chance to revive your bricked device)
Back Up:
Same as on a computer; saves the rom and its settings on your SD to recover it, when something went wrong (all usually via Recovery).
Android Versions:
--> Eclair 2.1: Stock version for our phones
--> Froyo 2.2: Follow up to Eclair with some modifications
--> Gingerbread 2.3: Mostly used version for our custom roms
--> Honeycomb 3.x: Version mostly for tablets
--> Ice Cream Sandwich: 4.x: Hybrid version for phones and tablets
APK:
File extension used for android based applications, if you want to install them manually and not from the market.
Launcher, Home Screen Replacement:
The application that is used by android to show up your apps, homescreens etc. Replacement apps take over those things (often used for more personalization).
A2SD, APP2SD, Link2SD:
Apps that allow you to free up your system memory by moving (non system) apps to your SD. Many custom roms implemented this in native settings.
GAPPS:
Commonly used google apps. Often in packages to flash them via recovery after installing a custom rom.
(Market/Playstore, Maps, Youtube etc.)
OC, UV:
-->Overclock (OC): used to get higher cpu values (decrease battery life but may increase performance).
-->Undervolt (UV): used to get better battery life by decreasing the voltage used by the cpu.
Just a few suggestions for this thread here.
I like the idea, would be a good sticky to new users, because this forum is
so high under development that many users forget that new ones may never heard of basic android knowledge.
Corrections are always welcome, hope my english is not that bad
Keep it up.
Marius
Click to expand...
Click to collapse
Adding them right now And about the last thing you said, yes, it is so hard to join this community as you may all know, at least for users with no knowledge at all over any complex computer language. I consider myself an advanced-user, and even as that I had troubles at getting started. I can't imagine how hard it would be for a non-geek to flash something on their phones! EDIT: Added!
A very good guide for newbies! Will help a lot of people here! Ah, the old days, I remember, the first time I tried installing xREC I messed up and it wouldn't boot, scared the **** outta me xD had to do some reasearch before I could get back to normal. So this would be of great help!! Keep up the effort!
P.S: debugging mode is actually development mode. It allows transfer of data between the PC and the mobile. That's how you are able to run adb commands ( things like rooting, pushing APKs etc.) through the PC onto the phone!
Sent from my U20i using XDA
Wow... The guide is so complete... Even I don't know what I can add there xD
Hmm... How about adding some simple default tricks ?
I found that several user are asking how to backup their data... How about telling them how to upload their phonebook data to gmail and backup their apps through titanium backup ?
I think we can have some "unlocking bootloader" infos in here, as latter ROMs need to have custom kernel installed...
You can refer about the steps to unlocking bootloader in here :
http://forum.xda-developers.com/showthread.php?t=1462278
Hope that helped everyone
speedsys said:
A very good guide for newbies! Will help a lot of people here! Ah, the old days, I remember, the first time I tried installing xREC I messed up and it wouldn't boot, scared the **** outta me xD had to do some reasearch before I could get back to normal. So this would be of great help!! Keep up the effort!
P.S: debugging mode is actually development mode. It allows transfer of data between the PC and the mobile. That's how you are able to run adb commands ( things like rooting, pushing APKs etc.) through the PC onto the phone!
Sent from my U20i using XDA
Click to expand...
Click to collapse
Yees! That old days haha! I did exactly the same, me and my friend got our pretty new phones bricked
, so we were kinda.. O.O! Oh, divine SEUS. And about the Debugging stuff, I will add it tomorrow - Its kinda 2am here and tomorrow is another fun Wednesday to keep the awesome routine, hurray.
StardustGeass said:
Wow... The guide is so complete... Even I don't know what I can add there xD
Hmm... How about adding some simple default tricks ?
I found that several user are asking how to backup their data... How about telling them how to upload their phonebook data to gmail and backup their apps through titanium backup ?
I think we can have some "unlocking bootloader" infos in here, as latter ROMs need to have custom kernel installed...
You can refer about the steps to unlocking bootloader in here :
http://forum.xda-developers.com/showthread.php?t=1462278
Hope that helped everyone
Click to expand...
Click to collapse
It is not a bad idea to add the tricks, but this is quite a big job and I would like to finish keep my objectives clear and then start thinking of adding something else haha And bout the bootloader, yes, it will be added, my plan is to cover every single change available to your phone from complete Stock, Rooting and Installing Recoveries already written. Next I will introduce Custom ROMs, flashing aditional features like Hotfixes or Modules for specific ROMs, unlocking Bootloader, Custom Kernels, and so on. And maybe reviews about the best ROMs for the user to choose from what he best likes. Something like that is what I have in mind by now.
Sent from my U20i using XDA
Install CWM : error: protocol fault (no status)
rooted xperia X10 mini.
USB debug on
phone connected to pc in charge mode.
When I run install.bat for CWM (3.2 in manual), I get an error during first exploit. Here's the complete trace from install.bat:
Code:
ClockWorkMod Recovery Installer for X10 Mini Pro by rect2409.
Requirements and credits are listed in the README.txt file.
Please make sure requirements are met before continuing.
Please make sure that your phone is connected to your PC and USB debugging is en
abled.
Press any key to continue...
Is your device ROOTed? (Y/N):y
Starting ADB Server.
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Pushing exploit to gain ROOT access.
426 KB/s (585731 bytes in 1.341s)
error: protocol fault (no status)
Mount system as R/W.
Do you already have a recovery installed? (Y/N):n
Pushing recovery tar file.
1898 KB/s (5027840 bytes in 2.586s)
Pushing chargemon.
130 KB/s (1341 bytes in 0.010s)
Pushing busybox.
2175 KB/s (735308 bytes in 0.330s)
Setting permissions for recovery tar file.
Setting permissions for chargemon.
Setting permissions for busybox.
Mount system as read only.
Reboot phone.
Stopping ADB Server.
If no errors are listed above then CWM has been installed.
Finished.
After the error is displayed, I got sounds on my pc and phone just like when I disconnect usb then reconnect it. Then the program continue (ask whether a recovery is already installed).
I don't think CWM has been installed: actually, when i press back many times on my phone while starting, nothing happens : normal boot from SE.
Can anybody help ?
Looks like you haven't got the adb drivers so its not actually pushing anything. Can't remember how to install the, now but I think its a package included in flash tool that you use.
X10man
Sent from my Nexus 7 using xda premium
x10man said:
Looks like you haven't got the adb drivers so its not actually pushing anything. Can't remember how to install the, now but I think its a package included in flash tool that you use.
Click to expand...
Click to collapse
I have installed drivers found in flashtool drivers 1.0.2, but still get that same error :
Code:
Pushing exploit to gain ROOT access.
1111 KB/s (585731 bytes in 0.514s)
error: protocol fault (no status)
Please help.

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

Categories

Resources