Hey all, since a lot of folks are wondering about custom roms for the DX, I decided to start this thread to document my exploits in trying to compile CM9.
Basically, I'm new to Android (had an iPhone 3GS for about 2 years) so I'm going to need a lot of help and this is really going to start of very basic. But since I had my Desire X and been on this forum, I have met more and more cool people that are actively trying to help development for our phone, like stereo8,maartenxda and yasir, so I'm sure we'll be alright. None of this would be even possible if not for LLior that made the CWM recovery for us. :good:
OK, so to build CM9 you need a build environment set up specifically for the job, there's many guides out there on how to do this, but I found this one (props to mbroeders, OP of the tut) pretty good :
http://forum.xda-developers.com/showthread.php?t=1566224
Basically, building CM9 is done in linux, Ubuntu being the most popular version, and I'll be using the latest Ubuntu 12. If you don't use Ubuntu as main OS, you can still try this, but you'll need to set up a good (!) portion of your harddrive to install it in a virtual environment, like VMWare Player (free). Mind you, we'll be downloading the CM9 source, which ended up being around 10 gig on my pc, and we'll be needing at least another 16 gig to actually build CM9. To be on the safe, I set aside 50 gig on my drive for the virtual Ubuntu-pc in VMWare.
The guide I'm using will show you how to set up a general build environment, but since we are talking about the Desire X, which is brand new and without official CM support (yet?), we are going to have to adapt it to make CM9 for our phone. Several people have already worked on this, mainly Lloir, so I got his permission to use the stuff he's already done. A big thanks btw, from one and all
And this is basically the first time I'm going to need help. To adapt the build system specifically for the DX, we'll need to make a local_manifest file that points it to device and vendor trees LLoir has made. The local_manifest is supposed to go in the .repo folder of your CM9 source.
How do I do this ?
Goto cm9 wiki and install all prerequisites. Then do a repo init of the main build tree(cm9) and then add the device trees to manifest.xml found in .repo. after that , you sync via repo sync and then you setup environment through envsetup.sh and then you build for protou by brunch protou. Debug the errors you encounter. That's about it. If it doesn't boot after successful build, then the device/hardware/vendor/kernel trees need some sorting out .
Regards.
Sent from my HTC Desire X using xda app-developers app
help for local_manifest - Llior ?
Morning, googled some more, and found a template for a local_manifest.xml file I'm adapting for the DX.`I prefer to go as much by the book as possible for now, apparently putting these in manifest.xml can mess up your source.
So far, I have :
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="Lloir/protou" path="device/htc/protou" remote="github" revision="ics"/>
<project name="LLior/XXXXXXXXXXXXX" path="device/htc/msmXXXX-common" remote="github" revision="ics"/>
<project name="Lloir/android_vendor_htc_protou" path="vendor/htc/protou" remote="github" revision="ics"/>
<project name="Llior/XXXXXXXXXXXXX" path="kernel/htc/msmXXXX" remote="github" revision="XXXXXXXXXXXX"/>
</manifest>
The XXXX need editing, not sure which repositories though
manifest
Here you go, you can see it for your reference...
Attachment
CM9 - first build - result
Yasir Javed Ansari said:
Here you go, you can see it for your reference...
Attachment
Click to expand...
Click to collapse
OK, using your manifest, I managed to set up the system to build with Lloir's device and vendor trees.
I had to edit the msm7x30.mk file in /device/htc/msm7x30-common though so the first section of it would point to /frameworks/base rather than /frameworks/native as in the original for it to build.
It then compiled to the end, I ended up with a boot.img, recovery.img, system.img and userdata.img, which I turned into a .zip file to flash in CWM.
It installs, but gets stuck on the HTC-logo screen, but I can't take a logcat -same as with stereo's paranoidandroid : logcat.txt says logcat cant be found in /sbin/sh- even when I create a sbin/sh folder with logcat.
Anyone know what I'm doing wrong ? I would really like to see what's going on during boot.
infernal77 said:
OK, using your manifest, I managed to set up the system to build with Lloir's device and vendor trees.
I had to edit the msm7x30.mk file in /device/htc/msm7x30-common though so the first section of it would point to /frameworks/base rather than /frameworks/native as in the original for it to build.
It then compiled to the end, I ended up with a boot.img, recovery.img, system.img and userdata.img, which I turned into a .zip file to flash in CWM.
It installs, but gets stuck on the HTC-logo screen, but I can't take a logcat -same as with stereo's paranoidandroid : logcat.txt says logcat cant be found in /sbin/sh- even when I create a sbin/sh folder with logcat.
Anyone know what I'm doing wrong ? I would really like to see what's going on during boot.
Click to expand...
Click to collapse
Stock Rom showed our device shares common config from msm7k and not msm7x30. I'll try another build with some modified things to see if it boots . One thing you can do is to compare lloir device tree with other trees of similar devices to verify whether we are missing something critical. Also did you use pre.built kernel ?
AND framework native is used in jelly bean , not ics. You're syncing jelly bean cm source and device tree is currently for ics. Recheck please.
Sent from my HTC Desire X using xda app-developers app
Yasir Javed Ansari said:
Stock Rom showed our device shares common config from msm7k and not msm7x30. I'll try another build with some modified things to see if it boots . One thing you can do is to compare lloir device tree with other trees of similar devices to verify whether we are missing something critical. Also did you use pre.built kernel ?
AND framework native is used in jelly bean , not ics. You're syncing jelly bean cm source and device tree is currently for ics. Recheck please.
Sent from my HTC Desire X using xda app-developers app
Click to expand...
Click to collapse
Hm, thanks for the input, Yasir. I was wondering about it, I just synced using the default.xml in the last post. I guess that means I was using the prebuilt kernel as well. Don't worry about the source code I synced, it's definitely cm-ics. As far as I can see, there aren't files relating to msm7k in Lloir's github. I'll see if I can find out about a device that uses the msm7k.
cheers :good:
EDIT : Yasir and me are working together on trying to get a CM9 to the Desire X, anyone that wants to help (preferably with experience) is welcome Use this thread to keep things organised. Thanks
update on CM9 - wip - all help welcome !
OK, update on what's happening :
Because our phone has a new Qualcomm processor there's no CyanogenMods out yet for any device that uses it, let alone by HTC, that we can compare it to. This could help us out a lot to get the device specific information and sources the build system needs to make us a CM9. This info and these files are contained in and referred to by the so-called device and vendor trees. Lloir has done the most work for the Desire X up to now in making these device and vendor trees, but since first test builds aren't booting, Yasir and me are going over them again.
By the way, if anyone knows more about why logcat doesn't work, that would be extremely helpful. All response I get is that logcat isn't in /sbin/sh. I tried adding it to a separate /sbin/sh folder in my test build, but no dice
Good news is I found out the MSM8225 chipset was designed to be fully backward compatible, both hardware and software, with the MSM7225A and MSM7227A phones, of which Qualcomm sold about a 100 million. So, I've begun studying the device and vendor trees for the HTC Explorer (Pico), which is a MSM7225A model. Important because it has the compatible 7225A chipset and uses the ARMv7 cpu instruction set - which is the same as the Desire X.
We'll keep you guys posted, also when we need testers. :good:
Ours is cortex a5, that's why it is compatible with msm7227. But the not booting issue is probably due to some thing missing or wrong in device.mk. the board config is ok. And kernel source is also available on htcdev and git simonsimons23. The device tree and vendor mk files need correction. At least that's my thinking.
Sent from my HTC Desire X using xda app-developers app
Yasir Javed Ansari said:
Ours is cortex a5, that's why it is compatible with msm7227. But the not booting issue is probably due to some thing missing or wrong in device.mk. the board config is ok. And kernel source is also available on htcdev and git simonsimons23. The device tree and vendor mk files need correction. At least that's my thinking.
Sent from my HTC Desire X using xda app-developers app
Click to expand...
Click to collapse
OK, I'll leave the boardconfig for now (am checking the files alphabetically) and move on to device.mk If I see anything I don't get or differs from the pico source (has official CM9), I'll let you know here or through pm. I was thinking the same about the device and vendor trees, it's our starting point and we're stuck here already lol. I know about the githubs, I'll check the changes (if any) simonsimons made.
I was thinking though : don't we need the 1.18 kernel to do this ? I already flashed the updated kernel with the 1.18 ruu. I checked on htcdev and it only lists the 1.14 kernel source. Or is there a way to get it from a running phone ?
missing logcat....
Hi Guys,
I don't know why logcat is missing, but to obtain kernel messages you could run the "dmesg" command instead.
I would like to participate in DX porting. I got intermediate knowlegde in android, but I'm really good in linux and kernel stuff.
Are you guys hanging around in IRC somewhere so we cant talk directly?
currently I am compiling lloirs tree. It is running for some time already...
hang loose
maze
atmel-touchscreen.kl is not in any git
Hi Guys,
I still try building the stuff, but atmel-touchscreen seems to be missing so I decided to remove it from
htc/protou/device_protou.mk. Now it continues compiling ....
( device/htc/protou/prebuilt/usr/keylayout/atmel-touchscreen.kl:system/usr/keylayout/atmel-touchscreen.kl)
Any progress OP??? I did a recent build with some mods on weekend but it failed to boot. I'm highly suspicious that its a kernel issue although i cant say for sure. If any one manages to boot it, even if its till the boot animation, DO POST AND SHARE, coz then its easier going forward.
Regards
neXus PRIME said:
Any progress OP??? I did a recent build with some mods on weekend but it failed to boot. I'm highly suspicious that its a kernel issue although i cant say for sure. If any one manages to boot it, even if its till the boot animation, DO POST AND SHARE, coz then its easier going forward.
Regards
Click to expand...
Click to collapse
got a logcat? or even a kmsg? you can get the kmsg by rebooting into TWRP mount system and open the file manager in advanced and going into /proc grab last_kmsg from in there, you can also find me on IRC Most days, (except tonight i'm working )
-Lloir
I'm sorry guys, haven't been able to do much for this project anymore...no time (holidays and starting training to become system administrator), not to mention I spilled coke all over my Macbook Pro
Lloir said:
got a logcat? or even a kmsg? you can get the kmsg by rebooting into TWRP mount system and open the file manager in advanced and going into /proc grab last_kmsg from in there, you can also find me on IRC Most days, (except tonight i'm working )
-Lloir
Click to expand...
Click to collapse
Doesnt even get past the splash screen (the one with HTC red letter sentence about private build). I used the prebuilt kernel which i have used in recovery. I'll try getting kmsg though.
Regards
neXus PRIME said:
Doesnt even get past the splash screen (the one with HTC red letter sentence about private build). I used the prebuilt kernel which i have used in recovery. I'll try getting kmsg though.
Regards
Click to expand...
Click to collapse
You can still logcat on that screen if adb sees it
Sent from my HTC One X+ using Tapatalk 2
nopes. I have QtADB running in background with logcat ON all the time. Thats how i can never miss if it gets to boot. But i didnt check kmsg though.
My laptop is in a mess right now and i have jellybean source synced by mistake over night. Now i gotta go back to ICS and it will again take a day to sync as the net is crappy here.
I got a ramdisk hack for you when I get home to enable very early adb. If I had the DX I would do it for you guys, but I'll help where I can. Don't be afraid to pm me if you need to.
Sent from my HTC One X+ using Tapatalk 2
Lloir said:
I got a ramdisk hack for you when I get home to enable very early adb. If I had the DX I would do it for you guys, but I'll help where I can. Don't be afraid to pm me if you need to.
Sent from my HTC One X+ using Tapatalk 2
Click to expand...
Click to collapse
Tell me, should I use pre built kernel or use HTC provided sources?
Related
Hi I have found the way to port ICS to the galaxy players. :
http://www.freeyourandroid.com/guide/compile-ics
The problem is that I can't find the binaries for the galaxy player. Where I can find them?
arent they located in /system/bin?
Need root first though
(I would help out with this, but dont really know how to do it, and i dont have the player yet)
zaclimon said:
Hi I have found the way to port ICS to the galaxy players. :
http://www.freeyourandroid.com/guide/compile-ics
The problem is that I can't find the binaries for the galaxy player. Where I can find them?
Click to expand...
Click to collapse
Will this actually boot and run? If it's that "easy", then why don't more devices have ICS? If you can extract the binaries and cook up a rom, I would be happy to test it . Also, if I have time later this week, I'll try to follow those instructions and then post my results. If everything works on the first try, I'll be very surprised but not at all dissapointed . Thanks for sharing this
Dyskmaster said:
Will this actually boot and run? If it's that "easy", then why don't more devices have ICS? If you can extract the binaries and cook up a rom, I would be happy to test it . Also, if I have time later this week, I'll try to follow those instructions and then post my results. If everything works on the first try, I'll be very surprised but not at all dissapointed . Thanks for sharing this
Click to expand...
Click to collapse
Well maybe because people don't know how to do it. And as for the current rom the major problem is the hardware acceleration and the camera. Maybe We can find it (The binairies) at opensource.samsung.com
It should be easier than phones because you don't have to worry about not screwing with voice, data, and stuff like that. Just get it on and get all the apps working correctly. Radios are always the hardest.
I've also been triyng to compile the source for the player but i wasnt able to do so, the thing is that the source compiles fine with the pre-adjustments it comes with, i mean the androidboard.mk ( i think thats the name of the file not sure), but when i changed the variables for a armv5 build, which is the core of the device and the ones that comes in the same file on the opensource.samsung soource, it just doesnt compile and throws some kind of errors about some libraries that i didnt touched. i dont know what i had been doing wrong.
I Also found this video in which they show whats in every folder, and how to build and add packages from source to the build:
http://marakana.com/forums/android/general/269.html
This is a detail process description from the official android site to build from source, very similar like the one zaclimon found:
http://source.android.com/source/initializing.html
The source from samsung doesnt have all the drivers, just the alsa audio driver, i guess we gonna have to find a way to get the binaries like cyanogen did, maybe get some scripts they use and try to do it ourselves:
http://wiki.cyanogenmod.com/wiki/Sa...le_CyanogenMod_(Linux)#Copy_proprietary_files
it is done through the adb, but the thing is to get those files, maybe we could ask that fellow some help for this step, since he has the experience.
sodomywar said:
I've also been triyng to compile the source for the player but i wasnt able to do so, the thing is that the source compiles fine with the pre-adjustments it comes with, i mean the androidboard.mk ( i think thats the name of the file not sure), but when i changed the variables for a armv5 build, which is the core of the device and the ones that comes in the same file on the opensource.samsung soource, it just doesnt compile and throws some kind of errors about some libraries that i didnt touched. i dont know what i had been doing wrong.
I Also found this video in which they show whats in every folder, and how to build and add packages from source to the build:
http://marakana.com/forums/android/general/269.html
This is a detail process description from the official android site to build from source, very similar like the one zaclimon found:
http://source.android.com/source/initializing.html
The source from samsung doesnt have all the drivers, just the alsa audio driver, i guess we gonna have to find a way to get the binaries like cyanogen did, maybe get some scripts they use and try to do it ourselves:
http://wiki.cyanogenmod.com/wiki/Sa...le_CyanogenMod_(Linux)#Copy_proprietary_files
it is done through the adb, but the thing is to get those files, maybe we could ask that fellow some help for this step, since he has the experience.
Click to expand...
Click to collapse
The core is a ARMv7 right? because the hummingbird processor is a ARMv7. Maybe it did failed because of that? I found the gpu drivers from the opensource. Check in the kernel folder. If I can give you the gpu file if you want. Well tell me what files you are missing i'll find to give it to you. (Well I don't know how to program so I try do to my best.)
EDIT: Also its seem that to compile ICS is more difficult than the other versions. We do need ubuntu to extract the binaries right?
EDIT2: People are saying that it's easier to build from CM9 than from the source. It is right or it's the same thing?
http://forum.cyanogenmod.com/topic/38960-build-your-own-cm9ics-preview-on-ubuntu-and-perhaps-debian/
Galaxy S Phone
Shouldn't you just be able to modify a Galaxy S ICS port and take out the data and other stuff you don't need?
zaclimon said:
The core is a ARMv7 right? because the hummingbird processor is a ARMv7. Maybe it did failed because of that?
Click to expand...
Click to collapse
Well, i configured it with the files of the samsung source, and it said ARMv5, we need to know which one it is, probably faild because of libaries compatibilities for that architecture.
zaclimon said:
EDIT: Also its seem that to compile ICS is more difficult than the other versions. We do need ubuntu to extract the binaries right?
EDIT2: People are saying that it's easier to build from CM9 than from the source. It is right or it's the same thing?
Click to expand...
Click to collapse
Maybe it is easier than the official source, they modify the source and takes out some things that cellphones dont need 'cause the source it's made for all devices, so it could be smaller and easier to compile, i'm gonna try this port and let ya' know, it will take a while since the source it's huge
Would be great if a couple of us do it, if you can @zaclimon try it, you don't need ubuntu, if you know which libaries that command has (sudo apt-get install build-essential). I have debian and i compiled the source just fine, debian has a minimal installation (no X11) but to compile source you dont need anything else! Let me know if anyone else it's triyng we could excahnge some ideas!
sodomywar said:
Well, i configured it with the files of the samsung source, and it said ARMv5, we need to know which one it is, probably faild because of libaries compatibilities for that architecture.
Maybe it is easier than the official source, they modify the source and takes out some things that cellphones dont need 'cause the source it's made for all devices, so it could be smaller and easier to compile, i'm gonna try this port and let ya' know, it will take a while since the source it's huge
Would be great if a couple of us do it, if you can @zaclimon try it, you don't need ubuntu, if you know which libaries that command has (sudo apt-get install build-essential). I have debian and i compiled the source just fine, debian has a minimal installation (no X11) but to compile source you dont need anything else! Let me know if anyone else it's triyng we could excahnge some ideas!
Click to expand...
Click to collapse
how many MB or GB the source has because I can't exceed my download's limitations?
EDIT: I'm a linux newbie. Is Ubuntu is the same thing as debian? Because Ubuntu is debian based right?
EDIT2: nevermind I'll be using ubuntu
alltellmobile said:
Shouldn't you just be able to modify a Galaxy S ICS port and take out the data and other stuff you don't need?
Click to expand...
Click to collapse
I don't know if we can (we should ask permissions) but it's definitly possible.
zaclimon said:
EDIT: I'm a linux newbie. Is Ubuntu is the same thing as debian? Because Ubuntu is debian based right?
Click to expand...
Click to collapse
Yea Ubuntu should be pretty much the same.
Wish I knew how to program, because i would help out.
alltellmobile said:
Yea Ubuntu should be pretty much the same.
Wish I knew how to program, because i would help out.
Click to expand...
Click to collapse
You can help I follow the tutorials there:
http://www.freeyourandroid.com/guide/compile-ics
http://marakana.com/forums/android/general/269.html
Ok i was reading the first tutorial and got to the part about binaries for graphics acceleration; wouldn't we have to get ours before we compile it. Also i only have the US version of the galaxy player and if i made an image i couldn't test it because we don't have a custom recovery for ours.
alltellmobile said:
Ok i was reading the first tutorial and got to the part about binaries for graphics acceleration; wouldn't we have to get ours before we compile it. Also i only have the US version of the galaxy player and if i made an image i couldn't test it because we don't have a custom recovery for ours.
Click to expand...
Click to collapse
Oh that's true well you can try to port a custom recovery?
zaclimon said:
Oh that's true well you can try to port a custom recovery?
Click to expand...
Click to collapse
HaHa I'm not that good. that sounds way more complicated
hey guys, i've been following this thread and hopefully i can be of some help...
i'm currently in the process of pulling the system files from the original gingerbread build from the SGP...it looks like there will be some trial and error here comparing that of the nexus s build...correct me if i'm wrong, but is this where most of the proprietary libraries are located for the device?
i'm willing to engineer a generic build, described in the video tutorial and making the necessary adjustments for the ARMv7 board...
this is my first attempt at compiling Android source, so maybe we will have something or maybe i will have a good ol' brick...thanks for the great tutorial and video @zaclimon this has definitely shed some light on porting ICS for SGP
jdale38 said:
hey guys, i've been following this thread and hopefully i can be of some help...
i'm currently in the process of pulling the system files from the original gingerbread build from the SGP...it looks like there will be some trial and error here comparing that of the nexus s build...correct me if i'm wrong, but is this where most of the proprietary libraries are located for the device?
i'm willing to engineer a generic build, described in the video tutorial and making the necessary adjustments for the ARMv7 board...
this is my first attempt at compiling Android source, so maybe we will have something or maybe i will have a good ol' brick...thanks for the great tutorial and video @zaclimon this has definitely shed some light on porting ICS for SGP
Click to expand...
Click to collapse
Yes they are supposed to be there. But I have download all the source code of the firmware from opensource.samsung.com
Me and sodomywar are working with the internationnal version of the SGP4. If you want to join you're welcome.
EDIT: No problem for the tutorials.
alltellmobile said:
HaHa I'm not that good. that sounds way more complicated
Click to expand...
Click to collapse
Google is your friend
So this is where i'm at currently. I'm trying to compile and I got this error:
Code:
build/core/base_rules.mk:166: *** system/extras/ext4_utils: MODULE.TARGET.EXECUTABLES.setup_fs already defined by device/samsung/galaxyplayer. Stop.
Does anyone know how to remove that error?
EDIT: nvm I managed to remove this error.
I've tried porting several roms to my devices and every time I try to flash I always get status 0 or some type of error! I can't logcat from recovery because some things do not work completely with clockworkmod I have. I even manually tried porting the same method that android kitchen does and still run into the same problem. I have no idea what I should try next? This is really making me made. I get no help at all after searching and searching every where!
android kitchen
http://forum.xda-developers.com/showthread.php?t=633246
all in one guide
http://forum.xda-developers.com/showthread.php?t=1273718
And some other methods and still no luck!!
You are right. There is no guide. It's trial and error. Logcat helps and if you know what certain files do that helps too.
It's simple:
grab the sources from github, add your device and vendor folder, add the device to the list in the mk files, lunch, and build.
openetna is a repository with many bugfixes, as you will have them.
Easy ****!
mDroidd said:
It's simple:
grab the sources from github, add your device and vendor folder, add the device to the list in the mk files, lunch, and build.
openetna is a repository with many bugfixes, as you will have them.
Easy ****!
Click to expand...
Click to collapse
Thats great if building from source
but i think he is talking about porting roms that are not AOSP.
The problem with a porting tutorial is that all devices and roms are a bit different so there will never will be a tutorial to get this done 100%. They are great guides to give you a start but it can take a lot more to get things ported.
if the device architecture is similar
Ex... Evo 4g to Incredible
than porting is fairly easy
being able to logcat is very necessary when porting roms
getting that working is your first step.
I always gave up on porting just because i dont have the patients to do it.
Exactly. I've ported several roms from the E3D and Sensation to the Rezound, and they are easy because the processor is the same. All you really need to get it booting is the kernel in most cases.
mDroidd said:
It's simple:
grab the sources from github, add your device and vendor folder, add the device to the list in the mk files, lunch, and build.
openetna is a repository with many bugfixes, as you will have them.
Easy ****!
Click to expand...
Click to collapse
Not that simple if you have to make a device tree from scratch like I'm doing
I've a question!!
I have an HTC Explorer (based on Qualcomm MSM7227) and I'd like to build a rom (AOSP or Cyano)...
I've downloaded Kernel Source Code but after hours of researches I haven't found a guide for merge a rom with a kernel..
can you help me?
thank you!
Can we port a rom from HTC desire to Motorola defy....is it easy??
HIT THANKS IF IVE HELPED
extremists said:
Can we port a rom from HTC desire to Motorola defy....is it easy??
HIT THANKS IF IVE HELPED
Click to expand...
Click to collapse
That's about as hard as it gets.
Unless building from source its not as difficult.
Sent from my PG86100 using Tapatalk
wes342 said:
That's about as hard as it gets.
Unless building from source its not as difficult.
Sent from my PG86100 using Tapatalk
Click to expand...
Click to collapse
Do u know how to port??
HIT THANKS IF IVE HELPED
The thing is there's also no real guide on how to make your own public repo for devices who don't have one .
E.g. Galaxy R
Herpderp Defy.
So I found out how to build from cm7 sources and it is a no go... I do not know how in the world you guys can port any roms. How do you get your files up on git hub any way? There is more to it then just compiling from cm sources..
Here's a slightly outdated one
EmoBoiix3 said:
The thing is there's also no real guide on how to make your own public repo for devices who don't have one .
E.g. Galaxy R
Herpderp Defy.
Click to expand...
Click to collapse
Just so its clear... this (slightly outdated) guide would be (the best I've found) for building a device tree (that you may elect to throw up on github) that can be used to build AOSP.. the same device tree probably could build CyanogenMod or MIUI fairly easily (minimal editing) but you are correct... no exact guide bc its not an exact science (lots of different devices out there with lots of different device configurations; even kernels different some are ti omap, some are qualcomm msm, etc.). Basically you build a tree to define your hardware.. AOSP, CM or MIUI will build themselves based on this definition (device) tree.
http://www.kandroid.org/online-pdk/guide/build_new_device.html
Now after you follow this guide, google the various build errors you get (one at a time) and perfect your tree until you get basic bring up... then perfect it some more until you get all your modules working (will take some aosp kernel cooking as well)... then perfect it some more... in a few months you should have something pretty decent (and learn tree building a bit more; we all learn by doing ) Best advice I have for you; going through the same thing myself.
Also wouldn't be a bad idea to download Hardware Info apk (Sleek Apps) and email yourself the info it spits out. That way you at least have a list of some of the hardware you are trying to define.
Rob
mDroidd said:
It's simple:
grab the sources from github, add your device and vendor folder, add the device to the list in the mk files, lunch, and build.
openetna is a repository with many bugfixes, as you will have them.
Easy ****!
Click to expand...
Click to collapse
How exactly do you do this? How do you build it completely specifically for your device?
Sorry, I'm a complete noob on building from scratch and Linux. Could anyone shed some some light?
Thanks you guys
I need help upgrading a device tree to a Jelly Bean device tree. Please pm me for more details. Thanks
Read this thread: http://forum.xda-developers.com/showthread.php?t=1762641
onlychevys said:
Read this thread: http://forum.xda-developers.com/showthread.php?t=1762641
Click to expand...
Click to collapse
Thanks for your response, I already looked at that forum and its about compiling Jelly Bean from source. I didn't see anything about updating a device tree to Jelly Bean. Thanks
He you tried building with your ICS device tree and seeing what doesn't work?
jd3107 said:
I need help upgrading a device tree to a Jelly Bean device tree. Please pm me for more details. Thanks
Click to expand...
Click to collapse
Look in your manifest.xml and change from ics to jellybean, then repo sync and you should be synced to JB. If you are wanting to build CM10 it will be your local_manifest.xml located in your .repo file. You will have to type ctrl h to show hidden files to see your .repo file
onlychevys said:
Look in your manifest.xml and change from ics to jellybean, then repo sync and you should be synced to JB. If you are wanting to build CM10 it will be your local_manifest.xml located in your .repo file. You will have to type ctrl h to show hidden files to see your .repo file
Click to expand...
Click to collapse
No that's pulling down Jellybean sources, not making sure your device tree is Jellybean compatible. Still correct and a required step, just not exactly what the OP was looking for.
Sent from my SCH-R760 using Tapatalk 2
thewadegeek said:
He you tried building with your ICS device tree and seeing what doesn't work?
Click to expand...
Click to collapse
Thanks, the problem I am having is the only device tree I have found for my device is gingerbread 2.3.7. I'm not sure if I build one for jellybean before ICS. Thanks for all your help.
onlychevys said:
Look in your manifest.xml and change from ics to jellybean, then repo sync and you should be synced to JB. If you are wanting to build CM10 it will be your local_manifest.xml located in your .repo file. You will have to type ctrl h to show hidden files to see your .repo file
Click to expand...
Click to collapse
Thanks, I will try this. Does this work for changing a 2.3.7 device tree to jellybean as well? Thanks for all your help.
jd3107 said:
I need help upgrading a device tree to a Jelly Bean device tree. Please pm me for more details. Thanks
Click to expand...
Click to collapse
Just changing the device tree to comparable with jellybean isn't going to enable you to build jellybean. There are still many kernel changes, framework edits, and system library changes. For the most part, you can get jellybean to build for just about any device. Its once the device tree is updated and have a working build that's the hard part, because now you have to fix it all.
If you want guidance on how a device tree is updated from versions. Check out a device that had gingerbread as well. Look at the tree changes to build ICS, then look at the changes from ICS to jellybean. You can also do a diff from gingerbread to jellybean on said device. See what changed and attempt those changes keeping in mind your own device specific elements.
Sorry if this isnt the answer you were looking for. Its better then the real answer of you need to figure it out by trial and error like everyone else. All devices are different.
Sent from my Galaxy Nexus using xda premium
lithid-cm said:
Just changing the device tree to comparable with jellybean isn't going to enable you to build jellybean. There are still many kernel changes, framework edits, and system library changes. For the most part, you can get jellybean to build for just about any device. Its once the device tree is updated and have a working build that's the hard part, because now you have to fix it all.
If you want guidance on how a device tree is updated from versions. Check out a device that had gingerbread as well. Look at the tree changes to build ICS, then look at the changes from ICS to jellybean. You can also do a diff from gingerbread to jellybean on said device. See what changed and attempt those changes keeping in mind your own device specific elements.
Sorry if this isnt the answer you were looking for. Its better then the real answer of you need to figure it out by trial and error like everyone else. All devices are different.
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Lithid,
Thanks for your reply. I am going to do what you said and do a comparison of gingerbread, ICS and Jellybean. Hopefully I can get the tree built and go from there. Any place you know of where I can get info on the kernel changes I will need? Or do I have to trial and eror that as well? Thanks
jd3107 said:
Lithid,
Thanks for your reply. I am going to do what you said and do a comparison of gingerbread, ICS and Jellybean. Hopefully I can get the tree built and go from there. Any place you know of where I can get info on the kernel changes I will need? Or do I have to trial and eror that as well? Thanks
Click to expand...
Click to collapse
You would need to find a phone with a similar architecture type. You could sift through those commits. Most should be spot on but nothing is absolute.
lithid-cm said:
You would need to find a phone with a similar architecture type. You could sift through those commits. Most should be spot on but nothing is absolute.
Click to expand...
Click to collapse
OK thanks I appreciate all your help. I will give it a shot! Thanks guys
lithid-cm said:
You would need to find a phone with a similar architecture type. You could sift through those commits. Most should be spot on but nothing is absolute.
Click to expand...
Click to collapse
I know I'm lacking in understanding some of the term's used, but some of the comments made in this thread have made me consider options I hadn't thought of before. The tablet I use mentioned in my signature, might be the focus of my previous efforts for upgrading to Android 4.1, (which it would appear that the manufacturer has no intention of doing), but my focus is now directed toward other models of this brand that have, or will, receive an update. Once I find the likely candidate to focus my attention on, I'll get the old (Android 4.0) ROM and the new (Android 4.1) ROM and compare my 4.0 to see what the differences are.
I know it will be far more than the device tree that needs changes, but it's a step in the right direction. Which would at least indicate some movement. It seems like I started my quest for JB so lonmg ago, but it's only been a few weeks of pouring over page after page of mostly disappointing search results. Maybe theres light at the end of the tunnel after all. Perhaps a bright light. Maybe I'll walk into it...
k.
I just got done initializing the AOSP JB_SOURCE for the Nexus 7, and am getting ready to attempt a first build, I'd also like to be able to compile CM10 and who knows maybe others but CM10 for sure. My question (although I'm pretty sure the answer is yes) is do I now have to make a new SOURCE directory for CM10 and repeat the process of downloading the whole thing locally for each build I'd like to attempt i.e. CM10, AOKP,MIUI
ect. If so the 150gb I used to create my virtual hard drive isn't going to be enough. I apologize in advance if this question is posted in the wrong place
and I did search first. Thank you.
Vektor67 said:
I just got done initializing the AOSP JB_SOURCE for the Nexus 7, and am getting ready to attempt a first build, I'd also like to be able to compile CM10 and who knows maybe others but CM10 for sure. My question (although I'm pretty sure the answer is yes) is do I now have to make a new SOURCE directory for CM10 and repeat the process of downloading the whole thing locally for each build I'd like to attempt i.e. CM10, AOKP,MIUI
ect. If so the 150gb I used to create my virtual hard drive isn't going to be enough. I apologize in advance if this question is posted in the wrong place
and I did search first. Thank you.
Click to expand...
Click to collapse
For each different ROM type (aosp cm etc.) you need different source code as they are different ROM
Sent from my LG-P350 using xda premium
Sorry it took so long, Thanks for the response. So it seems that for each particular flavor of Android I need the whole source repo synced to my machine.
That doesn't apply to different devices does it? I have an SGS 3 d2spr, and a Nexus 7 it would be fun to run a self built os for each.
Vektor67 said:
Sorry it took so long, Thanks for the response. So it seems that for each particular flavor of Android I need the whole source repo synced to my machine.
That doesn't apply to different devices does it? I have an SGS 3 d2spr, and a Nexus 7 it would be fun to run a self built os for each.
Click to expand...
Click to collapse
No it doesn't apply you just need different device folders and when you compile you use the folder you want.
Sent from my LG-P350 using xda premium
Ramdisk Hijack - what is it?
- We are trying to load a custom ramdisk in order to be able to load a non-Sony based ROM on a locked bootloader using 2nd-init. This is a work in progress.
How can I help?
- My source code is here: https://github.com/keiranFTW/huashan_ramdisk-hijack also, you will find how to install this on there too.
You'll probably wonder why I'm trying to hack the stock ramdisk in - because my phone is my only device, I also need to use it as a phone. Once I can fix things this way I can move to using CyanogenMod Ramdisk.
Progress? CyanogenMod is currently booting on the phone but there are lots of non-working features.
This is not a ROM, do not install this unless you know what you are doing.
On completion I will give you this in form of an update.zip
#keiran
Any developers willing to help me out here?
I am busy with personal work, will check this out later... FYI you can't boot everything on same kernel... Specific kernel patches are required for some ROMs... Without those patches crucial rom features may not work...
Sent from my C6902 using xda app-developers app
DooMLoRD said:
I am busy with personal work, will check this out later... FYI you can't boot everything on same kernel... Specific kernel patches are required for some ROMs... Without those patches crucial rom features may not work...
Sent from my C6902 using xda app-developers app
Click to expand...
Click to collapse
I know this, and some of these kernel patches can be loaded as a module or even the ROM source code edited to suit the needs of the stock kernel.
Edit: I have had many people asking me if kexec could work, and the answer is no, probably not. Why? Because it requires a in-kernel patch as well as a module and so it is not possible to get it to work as we cannot flash a new kernel.
I have an idea and I'll start to merge changes soon
Sent from my C5303 using Tapatalk
I am not experienced in kernel dev but maybe i can contribute in limited extent.
Unluckily, i also got "NO" in bootloader unlockable and very dissappointed to see that.
I hope someone will be able to find an alternative.
Have you looked at this?
http://www.xda-developers.com/android/locked-bootloader-xperia-s-and-want-cm10-no-problem/
Work in peace...
OP
can you link me to some good references about chroot? I got the basic understanding, want to try it on linux on my laptop.
Closest analogy i can draw is the linux live cd, which runs the OS live without installation. If thats the case, and if we succeed in this process, we could use some partition to dump cm and run it from there.
But lets not get too far, im still in infancy stage.
Regards
Yasir
finally Got the basics of what you are doing... You are essentially doing the same thing letama atis112 and company did to run cm10 usng stock kernel, but hijacked stock ramdisk to run cm ramdisk.... Seems a good idea but will only work for CM10 (4.1 based) and later when locked bootloader gets 4.3, we could get cm10.2 as well. If you are doing the same thing they did, then hopefully it will work soon. If its something different, then wish u luck, ill keep tracking ur progress.
Yes, he is trying to have it done the same way as letama, atis and others with one minor difference - we don't have pre_hwconfig.sh, so he's trying with chargemon. Older ramdisk Keiran's github worked fine, but after some commits he made it doesn't boot. When I try with older ramdisk and newest step2.sh, everything except sdcard works fine. I have an idea - what if we kill every process with every possible way(killall5, pkill,etc) and then start it manually, by calling them from /system/bin? Maybe it's the way.
Some offtop here:
Maybe the kernel from leak works on locked BL's? If DooM haven't changed anything in it - it's very possible. Maybe someone with 4.3 leak on their phone would try locking the bootloader?(Of course only if that person knows how to unbrick, if something goes wrong).
MrSteve555 said:
Yes, he is trying to have it done the same way as letama, atis and others with one minor difference - we don't have pre_hwconfig.sh, so he's trying with chargemon. Older ramdisk Keiran's github worked fine, but after some commits he made it doesn't boot. When I try with older ramdisk and newest step2.sh, everything except sdcard works fine. I have an idea - what if we kill every process with every possible way(killall5, pkill,etc) and then start it manually, by calling them from /system/bin? Maybe it's the way.
Some offtop here:
Maybe the kernel from leak works on locked BL's? If DooM haven't changed anything in it - it's very possible. Maybe someone with 4.3 leak on their phone would try locking the bootloader?(Of course only if that person knows how to unbrick, if something goes wrong).
Click to expand...
Click to collapse
I assume you have the same issue of unlockable BL? anyways, i am waiting for 4.3 so that after playing with, we can try and run cm10.2 at least... + miui
I've redone your work, and i can succesfully hijack ramdisk...
I've CM booted up, but:
1. graphical glithes (i know the solution)
2. no baseband
3. no sdcard (inner, external)
But it's improvement
Source: https://github.com/dh-harald/hijack-ramdisk-huashan
dh.harald said:
I've redone your work, and i can succesfully hijack ramdisk...
I've CM booted up, but:
1. graphical glithes (i know the solution)
2. no baseband
3. no sdcard (inner, external)
But it's improvement
Source: https://github.com/dh-harald/hijack-ramdisk-huashan
Click to expand...
Click to collapse
If my girlfriend would let me and I was near you I would kiss you right now :*
Jokes aside, I think I might be able to fix SD card and the rest
Sent from my C5303 using Tapatalk
I dont think any processes with late_start class are working... This would explain SD and also network.
Try:
/system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
/system/bin/qseecomd
/system/bin/secchand
Anything really..
When I was hijacking ramdisk before but loading the stock ramdisk just for testing I also lost network as well as sdcard, and I'm sure that I lost WiFi too. A possible solution would be *not* to stop these services maybe?
Sent from my C5303 using Tapatalk
New source code is at: https://github.com/keiranFTW/huashan_ramdisk-hijack
- Updated to work with Android 4.3
- Using 2nd-init instead of chroot
- Recovery included (not sure if working)
#keiran
hijack
Hy
I modified the hijack source and recompiled the cm10.2 was.
hijack
dev tree
vendor blobs
I made a new thread on xda.
bagyusz said:
Hy
I modified the hijack source and recompiled the cm10.2 was.
hijack
dev tree
vendor blobs
I made a new thread on xda.
Click to expand...
Click to collapse
Hey,
Thanks, your changes have helped a lot, so I have expanded on them to make it possible to integrate into AOSP more easily. I also use /system/bin/chargemon instead of system/bin/wipedata, it is earlier in boot process.
I also might want to note that you are not killing all processes, you need awk {'print $2'} instead of awk {'print $2'}
But yeah, great work.. you did what many others couldnt.
My repositories:
dev tree
vendor blobs
hijack
Feel free to add pull requests, and i can add you to the repository if you like.
Keiran
If only this could be done in other devices, as I also have a locked Xperia, but it's a Live Walkman. Unfortunately it also has the Unlock Bootloader: "NO", so if could also be ported to other devices it would be great. Not forcing or pushing you, but trying something more updated than 4.0.4 would be great
is this...?
@KeiranFTW & @bagyusz
sick work guys way to not never give up and accomplish what was thought to not be possible goes without saying one of the best development breakthroughs this year!
hey, in either of your opinions would this in some way be portable to our locked as **** bls on S4 Verizon and AT&T? We havent had ASOP capabilities or 4.4 for that matter yet and everyone is stuck on safestrap 4.3 stock kernels. Any help on this would be much appreciated. Its either trying to port this method or trying that new AnyKernel2.0 today not trying to hard brick heh
msm7x27
KeiranFTW said:
.
Click to expand...
Click to collapse
would this method work on any msm7x27 after pointing partitions ?? @KeiranFTW
deleted.
I still don't know what you're talking about. eace
Sent from my C5303 using Tapatalk
concerning hijack
KeiranFTW,
i am sorry to bother you with what may or may not be a 4 square dev question(s).
can i attempt something similar without building custom kernel? ( i read evrything i can but, lack funds for proper hardware so am limited.)
can i alter the insmod-ing of kernel modules to come as close to the beginning of the boot process as possible and have hardware functional in spite of slaying zygote/android userspace ?
this thread http://forum.xda-developers.com/showthread.php?t=1937328 outlines a means to
mount?load? a loop device from init.rc
my thought is as i have a gt-p5210 x86 device it might be possible to fire up (no matter how ugly)
a livecd or straight forward ext4 linux.img.
I would be interested in any insight/ideas you may have toward that end.
thank you for your time.
m