How to extract proprietary binaries from a device ? - Android Q&A, Help & Troubleshooting

I am following the Android CustomROM building guide by jackeagle.
But instead of cloning from the CM repositories, I have cloned from the Google repository. Now I'm at that part where we need to download proprietary binaries of the device for which we're developing.
I had read that those proprietary binaries can be extracted from the device, when it is flashed with the stock source it was released with. But unfortunately, I'm unable to understand how I can pull those files using adb.
I'm using Samsung Galaxy S Duos (GT - S7562) (for learning purposes). I don't need a device specific solution. I just want to know in general, how we can pull the device-tree, vendor and kernel for any given device from it.
Thanks in advance.

Related

[Q] Porting ClockworkMod to Samsung Galaxy SL

Hi I realize that there is no custom recovery for the Galaxy SL GT-I9003 so I want to try porting it. I have the essential packages for building Android under Arch Linux and also the SDK installed and configured with Eclipse.
I've read this guide regarding porting ClockworkMod but there are no instructions for Samsung phones that require initramfs. I have downloaded the opensource GT-I9003 package from the Samsung website which contains a kernel and platform tarball.
Could someone guide me as to what changes I need to make to that guide to get it to work? I assume I need to extract some boot.img from the opensource GT-I9003 package but there is nothing clear. Would building the kernel first help? Should I go ahead and check out the CyanogenMod tree anyway?
I'd really appreciate some help here.
Update: There is a progress thread on the port here.

[Q] How to add new device tree,new kernel source code to CM source & compile?

Hello everybody.
I have a noob question about compile cyanogenmod for my new device.
Now, i have: CMW recovery, Kernel source code on local computer, full repo cm source + toolchains.
How to add my device tree, kernel source code to CM source and compile CM7 ROm?
Thanks you, cheer
Anyone here?
Did you figure it out yet? I asked the same question and am waiting for an answer, tho I'm on CM 10, HTC Vivid. If I figure it out I'll post back and try and help.
nguyenhonganh said:
Hello everybody.
I have a noob question about compile cyanogenmod for my new device.
Now, i have: CMW recovery, Kernel source code on local computer, full repo cm source + toolchains.
How to add my device tree, kernel source code to CM source and compile CM7 ROm?
Thanks you, cheer
Click to expand...
Click to collapse
I met the same problem, does anyone can help?
Do you have a device tree? Or do you have an unsupported device? If you have an existing device tree from some other ROM, etc, then you just need to edit your .repo/local_manifest/roomservice.xml to pull in the trees that you need.
If you need to create a device tree, then it gets not complicated, as each device is different. The basic process is to create the necessary directories (device/manufacturer/model, kernel/manufacturer/model (may need to be kernel/manufacturer/device_family/model, for reference to that, see CM's repo for the LG G3) and finally vendor/manufacturer/device.
After you have the directories setup, you will need to actually start building the tree. The easiest way is to copy another devices files into your devices tree, and then edit the files. The closer the device you copy in is, the less work you will need to do to the files. Refer to sites like gsmarena.com, PhoneArena.com, etc for phone specs.
That's about as far as I can take you without dealing with a specific device. If you need more info, post back here with your questions, and post your device specs, or at least the model number,and I'll see if I can help.
rassawyer said:
Do you have a device tree? Or do you have an unsupported device? If you have an existing device tree from some other ROM, etc, then you just need to edit your .repo/local_manifest/roomservice.xml to pull in the trees that you need.
If you need to create a device tree, then it gets not complicated, as each device is different. The basic process is to create the necessary directories (device/manufacturer/model, kernel/manufacturer/model (may need to be kernel/manufacturer/device_family/model, for reference to that, see CM's repo for the LG G3) and finally vendor/manufacturer/device.
After you have the directories setup, you will need to actually start building the tree. The easiest way is to copy another devices files into your devices tree, and then edit the files. The closer the device you copy in is, the less work you will need to do to the files. Refer to sites like gsmarena.com, PhoneArena.com, etc for phone specs.
That's about as far as I can take you without dealing with a specific device. If you need more info, post back here with your questions, and post your device specs, or at least the model number,and I'll see if I can help.
Click to expand...
Click to collapse
I have a mt6750 devices... And there is a device from my company manufacturer.. Its a mt6750 device, it have cm device tree.. Both device working on same rom.. I can port that device rom but it always give me bugs.. So my question is how to use it?

[Q] Where to start for Android Kernel Development?

Hello Guys,
I see a lot of threads for starting with android rom development, but can anyone give me pointers for kernel development? I would like to start kernel development and do not know where to start. I am not interested in rom development at the moment, but that is because I assume that the android rom is like a user space app over the kernel. Please correct me if I am wrong. It would be great if you guys could point me to some beginner friendly kernel development tutorials. I am looking through Linux Device Drivers (LDD) book but am having a hard time comparing that with android. I have cloned mediatek 6589 source from android repository. I am submitting partial url cos I am not allowed to submit full url yet. URL(android.googlesource.com/kernel/mediatek/+/android-5.1.0_r0.2) since I am running a mtk6589 device (Walton X1/ Gionee Dream D1) and would like to understand where to start coding kernels for android. Any help would be greatly appreciated.
Oh and I would like mediatek specific help if possible. I have gone through some of the general kernel building and overclocking tutorials. I want to do some more enhancements if possible. Since mediatek seems to be the mysterious one with bare minimum source availability, I would like to take up that challenge
Thanks.
I don't have a tutorial for you but a small checklist. You need:
* Kernel source tree
* A config for your device (e.g. arch/arm/configs/*defconfig*)
* A cross compiler toolchain to generate ARM code (you can use the precompiled one from the Android source tree)
* A way to package your kernel into a boot image for your device - usually an Android boot image contains a compiled kernel (zImage), a compressed ramdisk for the root filesystem, and probably a device tree binary (dtb). Mediatek may do things differently.
* A way to install that boot image on your device - this requires an unlocked bootloader that allows custom boot images to be installed and started. Most devices use the fastboot tool for this.
Your first step should be to build a working kernel from unmodified sources. When you got that working, you can think about starting actual coding.
Thanks for the Pointer Mate
_that said:
I don't have a tutorial for you but a small checklist. You need:
* Kernel source tree
* A config for your device (e.g. arch/arm/configs/*defconfig*)
* A cross compiler toolchain to generate ARM code (you can use the precompiled one from the Android source tree)
* A way to package your kernel into a boot image for your device - usually an Android boot image contains a compiled kernel (zImage), a compressed ramdisk for the root filesystem, and probably a device tree binary (dtb). Mediatek may do things differently.
* A way to install that boot image on your device - this requires an unlocked bootloader that allows custom boot images to be installed and started. Most devices use the fastboot tool for this.
Your first step should be to build a working kernel from unmodified sources. When you got that working, you can think about starting actual coding.
Click to expand...
Click to collapse
Thanks man. Really appreciate the pointers. I do have some of the checklists done. Like
* Kernel source tree
** A cross compiler toolchain to generate ARM code (using the precompiled one)
* A way to install that boot image on your device
Now the problem is, my device still does not have its source code available. I got the general source tree from google which is not my device's so I dont have the defconfig. Is there a way to rip it out from a compiled kernel? Like using some sort of a decompiler? Also I will look around for zimage packaging tools. Thanks mate. Mediatek is apparently one hell of a problem child XD
syko_kickass said:
Now the problem is, my device still does not have its source code available. I got the general source tree from google which is not my device's so I dont have the defconfig. Is there a way to rip it out from a compiled kernel? Like using some sort of a decompiler? Also I will look around for zimage packaging tools.
Click to expand...
Click to collapse
If you're lucky, your existing kernel exposes its config in the file /proc/config.gz. If not, I don't know how to get a matching config - best is to avoid buying anything from GPL violators.

[Q][Help]Trying to Create Device Tree for ROM Building

Hello,
I'm trying to build a device tree for the Samsung Galaxy Tab A 9.7 (gt510wifi), by following CyanogenMod's porting guide here. I've managed to get a basic device tree going inside CM12.1's source tree, but I'm stuck at the part where I need to create the extract-files.shand the setup-makefiles.sh. The guide says to use other device trees as a reference for creating these scripts, but from what I can tell, each script is vastly different due to device discrepancies, and I'm unsure what to do at this point. I've searched everywhere online, but there doesn't seem to be any documentation whatsoever on how to create these files.
I'm no stranger to porting ROMs, as I've built SlimLP for my other devices, but I always had a pre-built tree created by another developer that I simply renamed files in to get it to work with SlimLP's sources.
Any help is greatly appreciated

Android source code for Alcatel pop c7

Where can I found the source code for build android for Alcatel pop c7 ?
I wrote a whole piece on how you could contact them, but they actualy shared sources for alott of their phone's and such already.
But that doesnt make it a ready 1-2-3 step compile android for yourself Ow no, Alcatel like many companies only comply by the licenses to share any source they used or modifications they made if required by lisences. If they have a NDA with Mediatek (wich they do) they are probably not required to include proprietary software, tools or sources they got from mediatek.
Think mediatek chipset specific header files, drivers, firmware (only binairy blobs might be shared). maybe they share enough for you to compile a working kernel and filesystem, but no signing keys, maybe the resulting files will run on a rooted, Custom firmware phone but No updates, some hardware not working, maybe the phone funstion doesnt work (due to missing specific code to use the mobile chipset).
Quick google, Alcatel shared it on sourceforge: https://sourceforge.net/projects/alcatel/files/ search for (ctr+f)
Code:
OT_7041_20141204.tar.xz
A quick look inside reveals alott of the expected sources, generic hardware support and specific drivers (in blob form it seems). A readme with instructions seem to be included, but very basic,
So, here you go. The "sourcecode". all 162MB of it. or go search on Baidu, maybe an ex dev leaked internl documents and firmware sources :fingers-crossed: maybe this is just what you needed, enjoy

Categories

Resources