Need a head start in understanding RootKit - Android Q&A, Help & Troubleshooting

I rooted my Xperia - L successfully using the RootKit method. But, I am not happy with myself in the sense that just by going through the code, I did not really understand how the developer exploited CVE 2013-6282 bug to achieve root. I don't have any prior experience in Linux kernel development. As a side note, I could set up NDK and recompile the exploit successfully for ARM platform. Please guide me with appropriate pointers so that I can understand the code completely. What information do I need to have? Where should I start? Do I need to have driver development on *NIX?

Related

[Q] How to write drivers for Android?

Hi guys i have been trying to know about android driver development.. i know driver development is not an easy job but i'd like to learn.. Is there any tutorials for that or any simple examples??
[Q] How to write drivers for Android
Ashok,
Writing android drivers is no different then writing drivers for linux. In fact many linux drivers would simply just work on the android.
Here is a little reading list for you if you want to find out more about linux driver development:
http://kernelnewbies.org/New_Kernel_Hacking_HOWTO
http://www.ibm.com/developerworks/linux/library/l-linux-kernel/?
http://www.amazon.com/gp/product/0596100795
http://www.amazon.com/Linux-Device-Drivers-Jonathan-Corbet/dp/0596005903
Hope this helps
thanks for the tutorials and the book suggestions I appreciate the help.
If you are familiar with Linux kernel and Linux based development then it will not that tough for you since Android uses modified version of Linux kernel. For tutorial source for Android kernel go to:
http://android.git.kernel.org/
Please use the Q&A Forum for questions Thanks
Moving to Q&A
Memsgr religious
Mr.Wrong said:
If you are familiar with Linux kernel and Linux based development then it will not that tough for you since Android uses modified version of Linux kernel. For tutorial source for Android kernel go to:
Hello, sorry for raising the dead, but this topic is rare.
I have a project where I basically need to write a mouse cursor driver. Would you have any specific information on how the mouse is actually drawn on the system level, as in between activities/programs/windows/etc. ? And would it be possible to include this as part of an app, so that it can be downloaded by an average user? (not as vital)
Click to expand...
Click to collapse

[Q] What are the steps to port a ROM to an unsupported device?

First a short question. What is the device configuration.(For example:https://github.com/TeamICS/android_device_htc_heroc) Which information does it contain? I don't think it's the whole Rom, but they update it, change stuff and so on?
Now my actual question:
I want to port a Kernel+System on an unsupported device.
Where do I have to start. Is there a difference between building it from source or port one from a similar device? Is one solution slower, more complicated or anything? There are many tutorials for porting, just bundle a system with a working kernel, but what to do if I want to have the Kernel also?
How do I extract the Device Proprietary Files without an github of the device?
Links, short explanation of the steps or anything else would be helpful.
I am sorry if this post seems to be ill informed, but I am searching and searching and can't find really helpful information..
chaoskoch said:
First a short question. What is the device configuration.(For example:https://github.com/TeamICS/android_device_htc_heroc) Which information does it contain? I don't think it's the whole Rom, but they update it, change stuff and so on?
Now my actual question:
I want to port a Kernel+System on an unsupported device.
Where do I have to start. Is there a difference between building it from source or port one from a similar device? Is one solution slower, more complicated or anything? There are many tutorials for porting, just bundle a system with a working kernel, but what to do if I want to have the Kernel also?
How do I extract the Device Proprietary Files without an github of the device?
Links, short explanation of the steps or anything else would be helpful.
I am sorry if this post seems to be ill informed, but I am searching and searching and can't find really helpful information..
Click to expand...
Click to collapse
First off what device do you have?
This link might be helpful
How to Port Android to Another Device
Now in regard to your questions i'll do my best to answer them best I can. The device configuration think of it as a fingerprint every fingerprint is unique (Although some a very similar), basically when building from source is tells the build what device you want the version of android your compiling to run on. They update and change the device configuration to reflect changes in the different versions of Android (Going from Gingerbread to ICS for example). Porting Kernels is not easy if you don't know C, things about embedded systems, basic Linux knowledge, among other skills but take a look at Guidance regarding Kernel porting, and what do you mean by port system? Here is a basic place to start for kernels AOSP Building Kernels and Building Your First Kernel. Yes their is a difference between porting a kernel and building from source, porting implies taking a kernel from device A and porting it to device B, while building from source means your building directly for device A. Porting in your case is probably going to be harder then building from source. If you want to have the kernel also again you have to modify it to run on the device you are porting it too. To extract proprietary files you have to hook your device up to your computer, turn on usb debugging, and using ADB run these commands:
Code:
cd ~/android/system/device/motorola/sholes/ # Replace Motorola and Sholes with your vendor such as HTC, Samsung, etc. and your device codename
Then run:
Code:
./extract-files.sh
Look at this guide for more info Compiling ICS from Source. Hope this helps you in some way :good:.

[Q] Android kernel development environment setup?

Hallo i am trying to look into android goldfish code and probably make some changes in it. As it is a long way to go for me i am actually unable to decide the tools that i need to set up. I come from an IDE based programming experience so am always trying to find a walk through tutorial to get goldfish kernel code in eclipse CDT to browse and code but no luck.I have followed the post source.android.com/source/building-kernels.html and built the kernel accordingly. i know that its a basic linux kernel and so tried it along the lines of this post wiki.eclipse.org/HowTo_use_the_CDT_to_navigate_Linux_kernel_source but am still not confident of my setup. can some one please guide me through my new venture into this wild, vast and crazy field ?
crouchtiger said:
Hallo i am trying to look into android goldfish code and probably make some changes in it. As it is a long way to go for me i am actually unable to decide the tools that i need to set up. I come from an IDE based programming experience so am always trying to find a walk through tutorial to get goldfish kernel code in eclipse CDT to browse and code but no luck.I have followed the post source.android.com/source/building-kernels.html and built the kernel accordingly. i know that its a basic linux kernel and so tried it along the lines of this post wiki.eclipse.org/HowTo_use_the_CDT_to_navigate_Linux_kernel_source but am still not confident of my setup. can some one please guide me through my new venture into this wild, vast and crazy field ?
Click to expand...
Click to collapse
Yes, you'll need a Linux environment, mostly 64-bit based, compiler toolchain and some additional packages/libs.
For more info: http://forum.xda-developers.com/showthread.php?t=1748297

[Q] How do I upgrade a device tree and kernel for Lollipop?

I know it's not as simple as it looks, otherwise everybody could do it, but at least can someone point me in a vague direction?
Just out of interest, how do you upgrade a device tree to support newer Android versions? Anything in particular which might prevent Android from functioning correctly?
I've acknowledged SELinux as a problem already.
I'm new to running device trees and kernels but I do know my way around Linux (I know how toolchains works, and I can build Android and kernels, for example) and I know C++, C and Java.
I've 'Google-d' the matter, but to no avail – there appears no clear way to do it.
+1 this question
i want its answer too:good:

Development of Ubuntu Touch for Xperia Z2

Hello.
I am very keen in getting the Ubuntu Touch ported to my Xperia Z2 phone. Obviously, I'll need all the help and guidance possible.
What I currently have? developer.ubuntu.com/en/start/ubuntu-for-devices/porting-new-device/
I'm using the official porting guide as checklist. Below are what I have accomplished so far with the guide
Setup my Development Environment
Have built for Nexus with success to see if my environment is up and running (the building threw no errors, so I assume it "works", since I have no means of testing because I don't have a nexus handset)
I have added repos regarding under how to enable a new device.
I have done the first part of the Device specific changes using the check-config script, the _defconfig file in the kernel (this is Sony Xperia Z2 kernel: CyanogenMod/android_kernel_sony_msm8974 , right?)
When I did the build ( just to test so far what I've done ) I got the error that, its using the pre-compiled kernel, or something like that.
Now my questions:
How do I tell it which kernel to use, and where?
Where is the pre-compiled kernel and which is the precompiled: the one from the vendor/ (which I got from extracted binary from sony official) OR the /kernel/sony/msm8974 ?
I've gone looking around to see if I could perhaps follow the pattern used in the porting to the Xperia Z, since they're in the same series. Yet, I hardly could follow what exactly the 'porter' did. I was interested in finding answers to the 'What?', and 'Where?' of the porting done, but couldn't get solid answers.
I ask this here with the hope that, a developer who's been through the porting process will be able to offer assistance. I've been in touch with Mamenyaka, and along the lines, he'll be assisting too. But since he isn't available all the time, I ask this here.
Concerning the above list of questions, please, any assistance will be appreciated.
Its understandable, yet unfortunate, that the official ubuntu porting guide has been made to be so broad and so generic its hard to streamline what it says with a specific device. With this thread, I hope to get very specific instructions precisely tailored to the Xperia Z2 and to accommodate being extensive, instructions for the Z line series.
thanks
EDIT: my error log so far pastebin.com/Wax18UFK
seanmavley said:
Hello.
I am very keen in getting the Ubuntu Touch ported to my Xperia Z2 phone. Obviously, I'll need all the help and guidance possible.
What I currently have? developer.ubuntu.com/en/start/ubuntu-for-devices/porting-new-device/
I'm using the official porting guide as checklist. Below are what I have accomplished so far with the guide
Setup my Development Environment
Have built for Nexus with success to see if my environment is up and running (the building threw no errors, so I assume it "works", since I have no means of testing because I don't have a nexus handset)
I have added repos regarding under how to enable a new device.
I have done the first part of the Device specific changes using the check-config script, the _defconfig file in the kernel (this is Sony Xperia Z2 kernel: CyanogenMod/android_kernel_sony_msm8974 , right?)
When I did the build ( just to test so far what I've done ) I got the error that, its using the pre-compiled kernel, or something like that.
Now my questions:
How do I tell it which kernel to use, and where?
Where is the pre-compiled kernel and which is the precompiled: the one from the vendor/ (which I got from extracted binary from sony official) OR the /kernel/sony/msm8974 ?
I've gone looking around to see if I could perhaps follow the pattern used in the porting to the Xperia Z, since they're in the same series. Yet, I hardly could follow what exactly the 'porter' did. I was interested in finding answers to the 'What?', and 'Where?' of the porting done, but couldn't get solid answers.
I ask this here with the hope that, a developer who's been through the porting process will be able to offer assistance. I've been in touch with Mamenyaka, and along the lines, he'll be assisting too. But since he isn't available all the time, I ask this here.
Concerning the above list of questions, please, any assistance will be appreciated.
Its understandable, yet unfortunate, that the official ubuntu porting guide has been made to be so broad and so generic its hard to streamline what it says with a specific device. With this thread, I hope to get very specific instructions precisely tailored to the Xperia Z2 and to accommodate being extensive, instructions for the Z line series.
thanks
EDIT: my error log so far pastebin.com/Wax18UFK
Click to expand...
Click to collapse
Hello,
if you are still working on this project:
Your Problem was not that you used the prebuilt kernel, your problem was that the script doesnt use mkabootimg correctly. For sony device you have to use another command.
Friend i would love to see ubuntu on my z2
share a link which may be helpful
https://wiki.ubuntu.com/Touch/Devices/minato

Categories

Resources