Atempting to build an AOSP-based rom - and I've got a question. - Verizon LG G3

Hey guys...hoping someone here who is wiser than I can offer some information on how I might complete the task I am after. I've got limited knowledge in the rom-building department, but would really like to learn at least enough to "get my feet wet" so to speak, and so I'm trying hard to do just that. I would like to build a version of SlimKat based on the latest code available, and have it be compatible with our device (the VS985). I've gotten so far as to set up the Ubuntu build environment and everything, installing repo and initializing the directory with the SlimKat 4.4.4 caf (by doing repo init -u git://github.com/SlimRoms/platform_manifest.git -b kk4.4-caf), and finally repo sync'ing the whole thing.
I'm pretty sure that I need to eventually use the ". build/envsetup.sh" and then "brunch vs985" commands to begin the actual build process itself, but my main question now even after all the tutorials I've read is whether or not there are additional "device-specific" commands I need to run or things need to do or sync in order to make the final product compatible with our VS985. I found a tutorial on building CM11 for our device, and it talked about having to create a local_manifest.xml file and then repo sync'ing again, but this is pretty much where I got lost and where I'm still quite confused. Can anyone with prior AOSP building experience help me out with some idiot-friendly () pointers/instructions and explanations on where to go after repo sync'ing? I would seriously appreciate any help anyone can offer. Thanks!!

ohlin5 said:
Hey guys...hoping someone here who is wiser than I can offer some information on how I might complete the task I am after. I've got limited knowledge in the rom-building department, but would really like to learn at least enough to "get my feet wet" so to speak, and so I'm trying hard to do just that. I would like to build a version of SlimKat based on the latest code available, and have it be compatible with our device (the VS985). I've gotten so far as to set up the Ubuntu build environment and everything, installing repo and initializing the directory with the SlimKat 4.4.4 caf (by doing repo init -u git://github.com/SlimRoms/platform_manifest.git -b kk4.4-caf), and finally repo sync'ing the whole thing.
I'm pretty sure that I need to eventually use the ". build/envsetup.sh" and then "brunch vs985" commands to begin the actual build process itself, but my main question now even after all the tutorials I've read is whether or not there are additional "device-specific" commands I need to run or things need to do or sync in order to make the final product compatible with our VS985. I found a tutorial on building CM11 for our device, and it talked about having to create a local_manifest.xml file and then repo sync'ing again, but this is pretty much where I got lost and where I'm still quite confused. Can anyone with prior AOSP building experience help me out with some idiot-friendly () pointers/instructions and explanations on where to go after repo sync'ing? I would seriously appreciate any help anyone can offer. Thanks!!
Click to expand...
Click to collapse
It all depends. If the source you grabbed does not have anything specific for the vs985, then the build command itself won't work. The build scripts and configuration has to be modified to add that build command and even then, it means going into the source and making whatever changes you need to make it specific to the VS985.
Since it's AOSP, it should work no matter what, but that means anything that requires vs985 specific calls to make it work aren't there.
It's not just a magic command that makes it work. You have to go in and figure out what isn't and is working and make the necessary changes.
I'm assuming you are a programmer? If not, better learn.

iBolski said:
It all depends. If the source you grabbed does not have anything specific for the vs985, then the build command itself won't work. The build scripts and configuration has to be modified to add that build command and even then, it means going into the source and making whatever changes you need to make it specific to the VS985.
Since it's AOSP, it should work no matter what, but that means anything that requires vs985 specific calls to make it work aren't there.
It's not just a magic command that makes it work. You have to go in and figure out what isn't and is working and make the necessary changes.
I'm assuming you are a programmer? If not, better learn.
Click to expand...
Click to collapse
I see. I have had some very basic programming exposure, but I wouldn't consider myself anywhere near skilled and it's been a while haha. Well I do appreciate the info and I'll probably be best off leaving this to those much smarter than I Thanks!

ohlin5 said:
I see. I have had some very basic programming exposure, but I wouldn't consider myself anywhere near skilled and it's been a while haha. Well I do appreciate the info and I'll probably be best off leaving this to those much smarter than I Thanks!
Click to expand...
Click to collapse
I don't want to scare you off. If you feel like you want to learn something new, then don't hold back. I just wanted to let you know that it's not just a simple "grab the source from another phone and compile it for the G3". That's why you'll see different ROMs for each of the different phones. But, in the case of this phone, you all have to add the bump to the ROM in order for it to work and that is specific to each version of the G3. You can't take a bumped D850 (AT&T) ROM and just flash it onto a Verizon G3 (VS985). It won't work.
Now, bumping is not that hard as one of the posts on how to compile a ROM for the G3 gives you the instructions to "bump" your ROM, which is done after you've compiled it. Where it gets more difficult and requires some more tech savy and programming knowledge, is how to modify the ROM to take advantage of the hardware specific to the G3. The AOSP code pulled down for say CM11/CM2 is just that - AOSP. What you were doing was taking a completely different ROM's base source and trying to make that work on the G3. Not impossible by any means, but would require more than just a basic understanding of programming. You also need to understand how the Android OS works, etc. Again, not a trivial task by any means, but also, could end up being something that challenges you to learn more and eventually become a contributor to the G3 dev forums.
I myself am a programmer. I've been learning Android app development but I also wanted to delve into ROM building and was grateful to see the post on how to do so, so I'll be looking into that when I can, but I know it's not an trivial thing to master, but I'm a persistent person and most of my computer programming I learned was self taught when I was in high school on an Apple ][+ and //e. Those were the days when Apple wasn't so closed. Woz had a hand in wanting to keep it open - Jobs didn't. We all know who won on that count.
Any ways, if you are up to a challenge and like solving problems, programming is definitely the way to go.

I've been trying to build my own just for fun as well, but after I brunch, it doesn't create a zip.
I've been following this guide: http://forum.xda-developers.com/lg-g3/general/guide-how-to-build-cyanogenmod-11-d850-t2971538
I feel like it has something to do with my local_manifest.xml, but it's probably because I tried building CM12 and it's not as easy as just changing the branch...
Probably just going to start over from scratch with CM11 and see how it goes.

Related

[Q] how to port ics (serious learner)

Lemme get some things out of the way.. I am a noob. I have searched. I have read some of the results from the search. I am overwhelmed by the 20+ pages of results (lol). I am not 100% sure this is the correct forum for this (not sure where else would be ).. I believe this is one of those things where I need help based on my situation.. Ok, so here I go.
I wish to start porting ICS to my phone. That's my goal. I have general understanding of how linux works, but I do not know much about the android specifics of how they work, or what needs to be modified for this to work. I do not plan to use the kitchen tool as I wish to learn this the hard way. I believe this will help me become more understanding in what I am doing. However, at this point I don't and that's why I'm here. My phone model is irrelevant almost because its prepaid and usually the communities don't even recognize their existence.. at least that's how I feel about it. But I digress. My phone is the zte warp by boost mobile and I am here to learn hopefully the things that will get me started on porting ICS to this phone. I right now believe that the best thing for me to learn is how the android related files work because as it is, I only looked at guides on how linux works and I understand most of it. I'm not sure that's the best thing that will help me port ics, but I'm certain it is important.
Please help me figure out where I should start in learning how to port ICS to my phone basically.
Thanks XDA
anyone? I am quite serious about wanting to do and go into this but I have yet one thread that anyone's ever replied to.. (or post iirc) which puts a damper on me
Snake X said:
Lemme get some things out of the way.. I am a noob. I have searched. I have read some of the results from the search. I am overwhelmed by the 20+ pages of results (lol). I am not 100% sure this is the correct forum for this (not sure where else would be ).. I believe this is one of those things where I need help based on my situation.. Ok, so here I go.
I wish to start porting ICS to my phone. That's my goal. I have general understanding of how linux works, but I do not know much about the android specifics of how they work, or what needs to be modified for this to work. I do not plan to use the kitchen tool as I wish to learn this the hard way. I believe this will help me become more understanding in what I am doing. However, at this point I don't and that's why I'm here. My phone model is irrelevant almost because its prepaid and usually the communities don't even recognize their existence.. at least that's how I feel about it. But I digress. My phone is the zte warp by boost mobile and I am here to learn hopefully the things that will get me started on porting ICS to this phone. I right now believe that the best thing for me to learn is how the android related files work because as it is, I only looked at guides on how linux works and I understand most of it. I'm not sure that's the best thing that will help me port ics, but I'm certain it is important.
Please help me figure out where I should start in learning how to port ICS to my phone basically.
Thanks XDA
Click to expand...
Click to collapse
From my limited knowledge, I think it is a huge task undertaking, you can download Android source code from Google, the hard part will be the device driver development and porting for Linux kernel (and maybe portion of Android). If you are lucky, you can use the existing phone bootloader (or you have to port one). Understanding the inner of the phone (different chip set may need different device driver) will be another challenging task.
by the device driver development, you mean all the libs that go into the phone? Couldn't I just copy/paste the pre-existing libs that are already made for the phone? Also the phone im working with is a bit strange really.. noone has been able to compile the kernel from its source and get it to boot yet.. when it was compiled the zImage was different than that of the stock one.
And yeah, I have downloaded the aosp source.. I just need to know where to start at and the processes involved really
Snake X said:
by the device driver development, you mean all the libs that go into the phone? Couldn't I just copy/paste the pre-existing libs that are already made for the phone? Also the phone im working with is a bit strange really.. noone has been able to compile the kernel from its source and get it to boot yet.. when it was compiled the zImage was different than that of the stock one.
And yeah, I have downloaded the aosp source.. I just need to know where to start at and the processes involved really
Click to expand...
Click to collapse
To answer you question no the drivers and lib files are different for aosp based rooms then they are for the stock OEM from. The first step will be to get a working kernel. Without anything you do will be pointless
I'm somewhat interested in the same thing, and from what I've gathered, you'll need to do these things to begin ROM development:
1. Read every page on the AOSP site and grab a copy of the AOSP source. It probably wouldn't hurt to read the regular Android developer wiki as well.
2. Learn about Linux driver development:
http://lwn.net/Kernel/LDD3/ (this is apparently considered THE BOOK on Linux driver development)
http://www.freesoftwaremagazine.com/articles/drivers_linux
3. Learn pretty much every detail about your phone and its hardware, especially when it comes to how ROMs are installed on it. For example, my phone (the Droid X2) has a locked bootloader, so 2nd init has to be used to boot new ROMs, and this makes it so that we cannot update the kernel.
You can usually find this sort of information on your phone manufacturer's website. Sometimes they even post the source code to their phone's drivers, which is helpful.
4. Look at other ROMs (preferably for your phone) and see how they work. The source code is freely available for most popular ROMs.
For example: CyanogenMod keeps their source code in a public git repository: https://github.com/cyanogenmod
5. Get to work on porting!
I would highly recommend starting with something smaller, however, just as a start. One good jumping-off point is probably this guide: http://forum.xda-developers.com/showthread.php?t=1272270
If any part of this was wrong, or if I left something out, somebody feel free to correct me, I'm still a noob.
Thank you so much for your direction, however,, android kitchen.. im not sure about that because isnt that only ment for htc devices? My phone is made by zte
what device do you even have?
if it's stuck officialy on 2.1 or 2.2 there's no hope that if you even port it that it'll work
its the zte warp from boost mobile (prepaid). Btw if I compile an aosp ics launcher and put that on my phone whats the chances of that working?
edit: it uses 2.3.5
Well Sebastian responded on android forums, apparently zte is very bad at version control with their kernel sources. So when they complete one project, they use the same source for the next project, and what they release could be for anything. Apparently the blade source had the same issues, it took him a while to get them to correct the source
Sent from my N860 using Tapatalk
Yeah I noticed that there were ppl saying there were things similar but I'm not sure what will work or what won't.. guess its time to start a petition on zte to release the source code lol
edit: seems like zte's bein a bad company and violated the GNU GPL license for not providing a complete source code.. I compiled an email and sent it to someone who can proof read it and send it to the right person for this kinda thing.. danggit zte

Attempting to start developing

Im going to try and start to develop for the Rezound. Iv decided that I would to take on JB head on, i know its very unlikely that I will make a stable JB rom but i want to try at least, I have the SDK and jb source already i just dont know where to start with JB, if anyone could help that would be great thanks.
I think Joel has JB booting.
The best place to start is modifying other ROMs with the android kitchen. Gives you a feel for how things work.
GrayTheWolf said:
I think Joel has JB booting.
The best place to start is modifying other ROMs with the android kitchen. Gives you a feel for how things work.
Click to expand...
Click to collapse
Nope. jonman www.github.com/JB1tz
I knew it was jo-something.
Good luck! Glad to see you're getting your feet wet.
Looking forward to your JB ROMs in the near future.
The Beeb
Building from source is a lot different than building a kitchen ROM but as Wolf said you might want to start there to at least learn a few things and the program is pretty easy to learn. The kitchen requires a functioning ROM to build from so not sure you could do JB. The AOSP website has a lot of information about building from source but you'll find the directions they give are for building for the nexus devices. AOSP is strictly for Linux or MAC (maybe windows under a virtual machine) and is pretty straight forward for getting it setup, I used Ubuntu 12 but getting a Linux box setup is as far as I took it as I got bored of it all. One of the devs here should have a github repository for JB and maybe you can join in on that or find some instructions on how to use the JB source you have to build for the Rezound. I would contact wildstang83 he's a pretty friendly guy who likes to help. Also get on IRC and start asking questions.
AOSP for setting up a build environment:
http://source.android.com/source/initializing.html
Android Kitchen:
http://forum.xda-developers.com/showthread.php?t=633246
kzoodroid said:
Building from source is a lot different than building a kitchen ROM but as Wolf said you might want to start there to at least learn a few things and the program is pretty easy to learn. The kitchen requires a functioning ROM to build from so not sure you could do JB. The AOSP website has a lot of information about building from source but you'll find the directions they give are for building for the nexus devices. AOSP is strictly for Linux or MAC (maybe windows under a virtual machine) and is pretty straight forward for getting it setup, I used Ubuntu 12 but getting a Linux box setup is as far as I took it as I got bored of it all. One of the devs here should have a github repository for JB and maybe you can join in on that or find some instructions on how to use the JB source you have to build for the Rezound. I would contact wildstang83 he's a pretty friendly guy who likes to help. Also get on IRC and start asking questions.
AOSP for setting up a build environment:
http://source.android.com/source/initializing.html
Android Kitchen:
http://forum.xda-developers.com/showthread.php?t=633246
Click to expand...
Click to collapse
Thanks for all the info, I have linux mint and as far as i can tell everything is set up
gearlo said:
Thanks for all the info, I have linux mint and as far as i can tell everything is set up
Click to expand...
Click to collapse
Then you're pretty much at were I left off setting up my linux box. I was going to try building for the GTab 7+ and there is a github repository for it for CM9 and CM10. Was just starting to learn how to connect to it when I lost interest. There is supposed to be some type of tutorial on the github site but I couldn't find it. I am also not sure if you need eclipse installed or not to use it. This is where you would need the help of a dev or someone else who's set up a linux box. I also didn't see a github for JB for the rezound but I also didn't look all that well just did a quick search.
wildstang, joel, newtoroot, nilsp I know build from source, or at least they did for the incredible, so they would be good sources of information and I know they've helped others in the past so don't mind pm's.
https://github.com/
Here's a tutorial I found on building from source might be some useful info there:
http://www.xda-developers.com/android/compiling-from-source-the-easy-way/
Here's a tutorial for AOKP:
http://forum.xda-developers.com/showthread.php?t=1810297
Maybe antp or wolf would help you setup too as I noticed their posts in the AOKP build forum?

Want to start with AOSP JB 4.2 - experienced developers are welcome :)

Hi all,
i want to start with AOSP 4.2 for our SGS3 i9300 - is anybody interested to develop and publish a AOSP based rom with me?
I'm a real application developer (C,C++,JAVA,PHP,MySQL,some Oracle PLSQL) and now its some cold out - i have time to do
some nice things
I think a team of 2 or 3 developers should be enough to develop on this rom, as we can use a lot from AOSP 4.1.2
### EDIT
As long as no one has found to help, here a short description of current progress:
- Code is pure based on AOSP 4.2 but some snippets of CyanogenMod to bring up hardware (camera,graphics,audio)
- Device is bootable (no other boot.img required anymore)
- Bootanimation is working
- Mount of partitions is working
- Deodexing is working
- adb, debuggerd and root access is working
Not working: a lot
- Graphic not working perfect, needs a kernel patch or a working gralloc/hwcomposer/hwconverter to work without laggy PMEM)
- Camera can not be activated due to a missing function call (undefined reference, maybe it can be solved with a newer driver)
- Audio: missing speaker device (Code have to reworked to work with stagefright and tinyalsa libs)
- USB/internal SDCard: cant be mounted (error message sounds like the device is mounted twice, have to find the error in init process)
- RIL not working (Java file from CM10 have to be integrated in frameworks/opt/telephony)
Currently, i'm working on the Graphic problem and USB part to bring up the device to a stable UI
Way to go man. Good luck to you!
Good luck ...!! Im waiting
Sent from my GT-I9300 using xda premium
Good evening,
Well how have you imagined that? Do you have build something like that before or would this be your first attempts to build up a rom from scratch? Do you know what's all necessary to contribute for that?
I would try to help you, but I have clearly to say that I haven't done anything like this before. I'm in the last term of my study of technical computer sciences, working in a company as application programmer for C/C++ and Java(Android). Due to my studies I have also some knowledge about hardware programming, down to read/writing some code in assembler. I would be interested to this if I get introduced to the topic and some help with the necessary tool chain wouldn't hurt too ^^.
greetings
hop3l3ss1990 said:
Good evening,
Well how have you imagined that? Do you have build something like that before or would this be your first attempts to build up a rom from scratch? Do you know what's all necessary to contribute for that?
I would try to help you, but I have clearly to say that I haven't done anything like this before. I'm in the last term of my study of technical computer sciences, working in a company as application programmer for C/C++ and Java(Android). Due to my studies I have also some knowledge about hardware programming, down to read/writing some code in assembler. I would be interested to this if I get introduced to the topic and some help with the necessary tool chain wouldn't hurt too ^^.
greetings
Click to expand...
Click to collapse
I have successfully built a rom in year 2010 for the LG-P500 device, based on CM7 and modified it in a strange way, so i included a lot of nice things
written from scratch - this rom was a unicate ... later, i developed the "Phoenix Launcher" for Gingerbread enabled devices, but its development is currently
frozen because its strange to support every or almost every device with a bugless launcher. In the last months i learned a lot about android and have to re-think about
what i'm able to do, and what i want to do. In the summer of 2011 i bought my SGS3, the first thing i was doing was to remove that samsung crap from my device and
have installed AOKP. So now it's time to do my own thing again - i want to have AOSP as i think for me its the best Android solution for myself and want to publish it
to other users who think "thats ok for me" too
In short, it doesnt matter if its your first rom - its enough if you know about basic things like "how is android doing all that nice things", "how to debug code", "how to fix
some bugs (even strange bugs)" and some experience with git and github. All other you can learn in a very short time - i've learned the most of things with try & error
andy572 said:
I have successfully built a rom in year 2010 for the LG-P500 device, based on CM7 and modified it in a strange way, so i included a lot of nice things
written from scratch - this rom was a unicate ... later, i developed the "Phoenix Launcher" for Gingerbread enabled devices, but its development is currently
frozen because its strange to support every or almost every device with a bugless launcher. In the last months i learned a lot about android and have to re-think about
what i'm able to do, and what i want to do. In the summer of 2011 i bought my SGS3, the first thing i was doing was to remove that samsung crap from my device and
have installed AOKP. So now it's time to do my own thing again - i want to have AOSP as i think for me its the best Android solution for myself and want to publish it
to other users who think "thats ok for me" too
In short, it doesnt matter if its your first rom - its enough if you know about basic things like "how is android doing all that nice things", "how to debug code", "how to fix
some bugs (even strange bugs)" and some experience with git and github. All other you can learn in a very short time - i've learned the most of things with try & error
Click to expand...
Click to collapse
This all sounds interesting for me and yes I like the idea of developing a own clean rom with some cool additional stuff, too. But what would be the first steps to a new rom? Have you begun with all the administration stuff like setting up a new gitrepo, make a to do list etc...?
I think Code debugging and writing some new stuff wouldn't be a problem for me but what are you meaning excactly with "how is android doing all that nice things"? How it build up, deep level architecture? Well, I know how the "normal" Linux system is working, how modules are getting loaded into the kernel... But how this is correctly working on android I have to learn at first and if there is a chance to do that I would do it
Currently on my S3 is SlimBean and till that there is still no update to 4.2 I'm happy with it, but exploring something new would be pretty cool
Do you have an IRC chat room or something like that? I've to go offline now, my girlfriend wants more attention.^^ But If you want, I' m willing to try to contribute to the rom
PS. I'm sorry for my bad English and hope its understandable, but outside from here you can talk to me in German ^^
If you want to help the AOSP experience on our phones the best place to do it is with the CyanogenMod guys. You'll find pretty much everything based on AOSP (including people that port Vanilla AOSP and AOKP) is using a CM kernel.
They're likely working on the merge now in terms of getting CM10.1 out (with Android 4.2) but most of our CM guys are pretty burned out on working with Samsung's subpar reference material to get basic stuff working (mostly HWC). If you think you could help with this, this would be provide a massive boost to the whole community that want to run these phones on an AOSP based ROM and they would be very grateful.
Gotta warn you though it sounds like it'll be an uphill struggle to get the rest of the stuff working right; unless Samsung release some decent sources for HWC.
Currently i have only downloaded the AOSP sources and started to integrate most of the configs. Currently it cant compile because AOSP is not AOKP/CM10
where i got the device and vendor directories, so i have to make some changes in the basic system. if it's compiling to the end, i open a fresh github account
and upload all my modifications. The compile process stops currently on audio,OMX plugins, graphics and camera - most of that are small pieces of changes
i have to make - i think, tomorrow (its monday in germany here) i can upload all and then we can start to develop on
andy572 said:
Currently i have only downloaded the AOSP sources and started to integrate most of the configs. Currently it cant compile because AOSP is not AOKP/CM10
where i got the device and vendor directories, so i have to make some changes in the basic system. if it's compiling to the end, i open a fresh github account
and upload all my modifications. The compile process stops currently on audio,OMX plugins, graphics and camera - most of that are small pieces of changes
i have to make - i think, tomorrow (its monday in germany here) i can upload all and then we can start to develop on
Click to expand...
Click to collapse
Wish i could help (just started learning JAVA ) ! gl with this awesome project
Nice to see you here, I remember you from the P500 forums.
Xda user krarvind should be able to give you some useful hints, you will have to contact him through the RD forum as his pm is locked down, or I could possibly put him in contact with you
slaphead20 said:
Xda user krarvind should be able to give you some useful hints, you will have to contact him through the RD forum as his pm is locked down, or I could possibly put him in contact with you
Click to expand...
Click to collapse
Thank you, it would be nice if you can contact him
andy572 said:
Thank you, it would be nice if you can contact him
Click to expand...
Click to collapse
Ok, will mention it to him
andy572 said:
Currently i have only downloaded the AOSP sources and started to integrate most of the configs. Currently it cant compile because AOSP is not AOKP/CM10
where i got the device and vendor directories, so i have to make some changes in the basic system. if it's compiling to the end, i open a fresh github account
and upload all my modifications. The compile process stops currently on audio,OMX plugins, graphics and camera - most of that are small pieces of changes
i have to make - i think, tomorrow (its monday in germany here) i can upload all and then we can start to develop on
Click to expand...
Click to collapse
How it's going forward?
Maybe it could be useful to publish the github link when it's ready and some more information like staus, on first post
In the next days I have some trouble with my exams ( in two weeks I'm completely finished with my studies ^^) but I think if there is something to do I'll find some time to work on.
Good Luck Dude~
I haven't tried AOSP yet.
Hope someday i can give it a go.:silly:
hop3l3ss1990 said:
How it's going forward?
Maybe it could be useful to publish the github link when it's ready and some more information like staus, on first post
In the next days I have some trouble with my exams ( in two weeks I'm completely finished with my studies ^^) but I think if there is something to do I'll find some time to work on.
Click to expand...
Click to collapse
current state:
- patched android/build so we can compile the kernel within the main compile process
- patched android/build main.mk file so we can use OpenJDK or Oracle JDK
- added android/vendor/aokp and android/vendor/samsung tree from AOKP (its the most useful directory structure)
- added android/hardware from AOKP so we have all that Exynos things that are needed, even by AOSP
- modified android/frameworks/native/include so a OMX Plugin header can be found
- modified android/libhardware and patched gralloc module
currently it compiles to the Webkit library, most of all apps, libs and binaries are building without errors - the next problem
to solve is the PRODUCT_COPY_FILES ****: nothing of proprietary files are copied to the android/out directory, seems like
a bug in android/build too.
For only 2 days trying to compile to the end without errors its a very good cut
here we go: it compiles to the end and a flashable "JOP40" zip could be created
tryed to flash, but it gives errors in CWM: have to remove the recovery folder and the recovery.sh file from etc folder in the ota zip file, but it doesnt boot up - got a black screen only.
do we need a new or patched kernel instead the CM10 smdk421x one?
Well does it have all the closed source libraries fron the phone? If not, it wont boot. Dont think i am calling you stupid, you obviously know what you are doing, but maybe you forgot. Idk. Check that. Try running a log cat and debug that.
Sent from my GT-I9300 using xda premium
b-eock said:
Well does it have all the closed source libraries fron the phone? If not, it wont boot. Dont think i am calling you stupid, you obviously know what you are doing, but maybe you forgot. Idk. Check that. Try running a log cat and debug that.
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
Thanks for the hint, yes i have all files included - i cant connect to adb, i see only small colored point on the top left side and a sensor
is red blinking (the one to the right of the speaker.
That would be the proximity sensor near the top front speaker. Cant connect, adb binary in /system/bin or xbin?
Sent from my GT-I9300 using xda premium

[ROM][DEV][WIP] Ubuntu-Touch port

I noticed that there is no current port going or started for ubuntu touch, so today i thought i would start that project.
the first thing i noticed was that ubuntu's documentation for porting is one of the worst things ive ever seen, so this will probably end up being kind of a guide until we get a working image or something.
first thing is you will absolutely need Linux. Im using ubuntu for ease of use, although I do build android on arch.
I set up a directory structure on my pc just for android development. i have ~/android/platforms/ in which i have cm11, ubuntu-touch carbon, etc.
so to summarize how i got this started:
Code:
$ mkdir ~/android/platforms/ubuntu-touch-phablet-4.2.2_r1
$ cd ~/android/platforms/ubuntu-touch-phablet-4.2.2_r1
$ repo init -u git://phablet.ubuntu.com/aosp/platform/manifest.git -b phablet-4.2.2_r1 && repo sync -j16
Now im really hoping that is the correct branch. I tried to follow the "porting guide" and its just full of out dated information that lead me to sync a few repos incorrectly. :silly:
after a few failed builds and some common error logs i finally figured i was on the wrong branch. This attempt shall be on 4.2.2_r1 as that appears to be the latest. (I hope)
anyway the rest is still in progress. My sources will be on github for people to help out.
Device
Kernel
also: im on irc on freenode at #oudhitsquad pressy4pie
[update]
i have a huge problem in the real world, so i will have virtually no time to get this updated for now. I am really sorry, hopefully i can get it going again soon
XDA:DevDB Information
Ubuntu Touch , ROM for the ONEPLUS ONE
Contributors
konnorrigby
Version Information
Status: Testing
Created 2014-09-24
Last Updated 2014-10-13
cool mate! thanks for that...cheers!
Nice. Would love to give a hand here, I'll visit the Ubuntu workshop at devcon this weekend to learn some new fresh information about porting. Maybe I'll give it a try later too.
Good news!
Looking forward to see the first builds getting ready for testing.
:good::highfive:
Mackis said:
Good news!
Looking forward to see the first builds getting ready for testing.
:good::highfive:
Click to expand...
Click to collapse
This will take a while. As you can see in OP, there are problems with the porting guide from Ubuntu. When I get back from devcon, I hope to know more about porting.
So turns out i was in fact syncing the wrong repo again. shame on me for following a ubuntu guide. it appears there is a 4.4_r1 repo also. Syncing again. I have a fairly slow connection. ill see what i can get done on 4.2.2_r1 though in the mean time
I have high hopes...
Would like to a working rom.. Wish you best of luck and hope its smooth sailing...
Thanks for scarifying your time and efforts for us
Couple of month ago I wanted to port it for my lenovo phone, but I gave up (sources limited)
Anyway, to say that I went on the IRC channel to get some support, they are willing to help (even though you have to be patient, it's IRC, hundreds of people connected nobody on their computer.). So they told me that (as you noticed) the porting manual is outdated, and they are now basing their port on AOSP. Tthis should not be a problem to use CM though.
So try to get some help there, they know what you have to do
I could give a hand, I have a good internet connection. Could you post all the command history you ran, so I can try on my side?
cheers
ive got some progress, i think.
ubuntu-touch has rebased to aosp rather than cyanogenmod, which makes things a lot more difficult.
if youve ever tried to build something that is not a nexus device against aosp it is a huge pain in the ass. Bacon has a lot of cm specific parts that need to built so it is difficult to get it to build w/ aosp. but to explain where i am currently, i synced 4.4_r1, and now since aosp doesnt build kernel and bacon requires kernel to be packed up with dtb and stuff, i went to my cm11.0 repo, did my ubuntu-touch modifications to kernel, did
Code:
lunch cm_bacon-userdebug && make -j32 bootimage
which (i think) gives me the correct bootimage. What we need now is the android part. i am building inside the ubuntu-touch-4.4_r1 dir with:
Code:
lunch aosp_bacon-userdebug && make -j32 systemimage
that eventually errors out to:
Code:
make: *** No rule to make target `out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar', needed by `out/target/common/obj/JAVA_LIBRARIES/qcmediaplayer_intermediates/classes-full-debug.jar'. Stop.
make: *** Waiting for unfinished jobs....
im not sure why because as far as i know, ubuntu-touch shouldnt be building java parts and that is the first part of building the java stuff in a regular android build. ive never ported ubuntu-touch before. so someone let me know if ive messed something up. i dont think there is something in the device makefiles that starts the java build.
any help
just in case, are you using opensources java or oracle one? I am pretty sure it doesn't work with opensource java. But i would expect that you get the error earlier...
I'm not sure if you already have this or not but Oneplus has aosp kernel sources at https://github.com/OnePlusTech/android_kernel_oneplus_one .
konnorrigby said:
ive got some progress, i think.
ubuntu-touch has rebased to aosp rather than cyanogenmod, which makes things a lot more difficult.
if youve ever tried to build something that is not a nexus device against aosp it is a huge pain in the ass. Bacon has a lot of cm specific parts that need to built so it is difficult to get it to build w/ aosp. but to explain where i am currently, i synced 4.4_r1, and now since aosp doesnt build kernel and bacon requires kernel to be packed up with dtb and stuff, i went to my cm11.0 repo, did my ubuntu-touch modifications to kernel, did
Code:
lunch cm_bacon-userdebug && make -j32 bootimage
which (i think) gives me the correct bootimage. What we need now is the android part. i am building inside the ubuntu-touch-4.4_r1 dir with:
Code:
lunch aosp_bacon-userdebug && make -j32 systemimage
that eventually errors out to:
Code:
make: *** No rule to make target `out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar', needed by `out/target/common/obj/JAVA_LIBRARIES/qcmediaplayer_intermediates/classes-full-debug.jar'. Stop.
make: *** Waiting for unfinished jobs....
im not sure why because as far as i know, ubuntu-touch shouldnt be building java parts and that is the first part of building the java stuff in a regular android build. ive never ported ubuntu-touch before. so someone let me know if ive messed something up. i dont think there is something in the device makefiles that starts the java build.
any help
Click to expand...
Click to collapse
Just post any further errors you'll get here and I'll try to get help at devcon this weekend. Keep it up!
b8e5n said:
just in case, are you using opensources java or oracle one? I am pretty sure it doesn't work with opensource java. But i would expect that you get the error earlier...
Click to expand...
Click to collapse
im using oracle, but that isnt the problem. Ubuntu-touch takes the java out so its not there for a reason but something is causeing it to want to build the java parts..
i think im going to go ahead and fork hammerhead which i know builds, and give it 1+1 parts.
konnorrigby said:
im using oracle, but that isnt the problem. Ubuntu-touch takes the java out so its not there for a reason but something is causeing it to want to build the java parts..
i think im going to go ahead and fork hammerhead which i know builds, and give it 1+1 parts.
Click to expand...
Click to collapse
Good Idea! Let us know
I met @ciwrl at devcon, he'll come here and tell you how to squash that problem.
Great to see someone working on it.
Will bookmark this topic
News?
This is exciting to see, I'd love to try Ubuntu touch on the OPO. I have Ubuntu, but I'm mainly in Linux Mint, or Kali. Let me know if there is anyway I can assist with testing, Web storage/hosting, etc.
@konnorrigby, as @ciwrl suggested at devcon, you should disable the whole java part from the build. Ubuntu doesn't need any of it to build and run.
Wow! I really want to see Ubuntu on my OnePlus one. really Excited. Good luck guys

ZTE Nubia Z7 Mini (NX507J) - ROM porting

This has been started for people interested in porting other ROM's for the Nubia Z7 Mini (NX507J). If you are interested in seeing/using/asking questions about ROM's that currently exist, please use the thread created by @Seyron here. I previously posted the following information on that thread, but feel a new thread will be better so the other can be used for people with questions about existing ones.
I'm not sure what you mean by a good background for going at it; however, I think having a good understanding of computers and even some basic programming is very helpful. As for myself, everything is self-taught. I'm pretty familiar with mac, PC, and linux. Even if you are completely new at it, there is lots of good information out there - I would just encourage you to start by learning from credible and well established sources. I have only tried porting for nubia Z7 mini - no other android. I previously used the iphone (and am frankly glad I now have android).
It really depends on whether you want to do a simple port (that's how I call it - don't know if there's an official way of calling it) or port from source. If you are doing a simple port, you can use any computer (mac, pc, linux); however, if you want to port/build from source it is by far the easiest to do it from Linux. There are many resources out there for building/porting from linux - most of which are using Ubuntu. I personally use Debian (which incidentally Ubuntu was created from; however, they are now each distinct and different), but you could use most any linux distro as long as you are comfortable using the command line. Also, if you are using linux, make sure you have enough hard drive space available (most recommended is at least 30GB) and have enough RAM (I have 16GB - minimum recommended is 8GB). It's also very helpful if you have a large swap set up as it makes building go faster. Once you have everything put together, compiling/building takes 3-5 hours depending on the specs of your computer. I have a 1.7ghz i5 in my computer and it is slow - 4-5 hour range for me.
For the sources list below, please note I have no affiliation with them and do not know them. Use at your own risk, I assume no responsibility for what may happen to your computer or phone.
I think some of the best (and frankly most detailed) information comes from the android source code website and from XDA-University.
https://source.android.com/index.html
XDA-University
For what I call simple porting, can be done on any computer - this was the site I started with and it seemed to work except that I kept getting boot loop issues. There are many other sites out there with nearly identical information. This person uses a PC, but you can adjust it quite simply for doing this on mac or linux too:
http://seekandroid.info/2014/05/porting-android-roms-for-your-phone.html
The following site/instructions are very interesting as they are different than any other site I found out there with porting instructions. I have not done it this way - primarily because I am concerned about "bricking" my phone. The method this person uses is the same; however, the files that they transfer are opposite to most any other site I've found. I have not used these instruction - be very cautious until someone else can confirm.
http://anythingsyouneed.blogspot.com/2014/06/how-to-port-custom-rom-rom-porting.html
This one seems interesting; however, I have not used anything on this website and have not used one of the Kitchen programs.
http://www.littlegreenrobot.co.uk/tutorials/how-to-cook-your-own-android-rom/
Android - excellent and very detailed. Personally I think most helpful to those with intermediate to advanced programming knowledge. Or at least have the ambition and time to learn.
https://source.android.com/source/building-devices.html
XDA-University - Truly amazing wealth of information, approachable for anyone from absolute beginners to advanced programers.
http://xda-university.com/as-a-developer
http://xda-university.com/as-a-developer/porting-aosp-roms-using-source-code
I've been busy and haven't had a chance to use these pages yet, but it's what I'm going to do next to try and solve the boot loop errors.
http://xda-university.com/as-a-user/zip-based-rom-tweaking
http://xda-university.com/as-a-user/how-to-recover-from-a-bootloop
If anyone has anything to add, please do. I'd be interested in seeing what else people use.
I haven't found the required sources to port from source, so I don't know if that's possible. Neither am I experienced in any of that.
In basic porting I do, however so far it has been unsuccesful for the Z7 Mini.
I have tried to port CM11S from the OPO, but it didn't work out, the phone became stuck in a bootloop, and logcat wasn't working to find out what's the problem of not booting. Might be dual-sim related but that should more likely run into a non-working sim/ril or a lot of crashes, not making it not booting at all.
I do wonder how they got the CM11 / Mokee with eng/ch languages to work. Tried using those as base too but that didn't do the trick.
To build completely from source you need to have the kernel source.
ZTE has not yet released it, but I'm hoping it will be released soon.
You can check here.
On Github there's a repo but it's apparently broken.
Anyway you can build cyanogenmod without having the kernel source (http://wiki.cyanogenmod.org/w/Doc:_porting_intro)
As soon as I get my own device I'll try that.
Nice, will follow this thread
I was trying to port the Z7 Max CM11 to the Z7 Mini, still work in progress because i'm new at this...
So, do you have any idea how the existing ROM's were ported then? If they weren't from source, we should be able to port others without getting the boot loop error - in theory. Not finding the kernel source is the main reason (besides finding the time) why I haven't worked on porting others. I also cannot find the vendor tree for the phone - which incidentally, may well be part of the kernel source. If you can port CM without source the others should be equally possible. Personally, I'm not interested in a CM based ROM (although a couple I listed in the other thread that I tried porting were CM based); I'm more interested in an AOSP based ROM. I wonder why ZTE has been so slow to release the kernel? Especially since they've released all the others (albeit not the other Z7's) and they have been so popular.
Also, as I stated in the other thread, I was able to get a couple to boot, but they were stuck in boot loop issues. I forgot to use logcat to see what the issue was.
@voetbalremco I agree with you, how did they get MoKee and MIUI to work? I tried using MoKee as base too - though didn't try MIUI. Does anyone know if it's possible to extract the kernel from the current stock ROM?
pierg75 said:
To build completely from source you need to have the kernel source.
ZTE has not yet released it, but I'm hoping it will be released soon.
You can check here.
On Github there's a repo but it's apparently broken.
Anyway you can build cyanogenmod without having the kernel source (http://wiki.cyanogenmod.org/w/Doc:_porting_intro)
As soon as I get my own device I'll try that.
Click to expand...
Click to collapse
pedrud said:
So, do you have any idea how the existing ROM's were ported then? If they weren't from source, we should be able to port others without getting the boot loop error
Click to expand...
Click to collapse
There are different ways to port a Rom...or you build it from scratch, so you compile everything. And for that you need source for every component.
Or you can use the various kitchens (this one for example) to repack and tweak an existent rom.
pedrud said:
Does anyone know if it's possible to extract the kernel from the current stock ROM?
Click to expand...
Click to collapse
You can do it with the kitchen above or using one of the tools available (like this one for example.
Probably everything can be done with dd (as mentioned in the cyanogenmod guide).
Hopefully my device will be her soon, so I can also try these as well
pierg75 said:
There are different ways to port a Rom...or you build it from scratch, so you compile everything. And for that you need source for every component.
Or you can use the various kitchens (this one for example) to repack and tweak an existent rom.
You can do it with the kitchen above or using one of the tools available (like this one for example.
Probably everything can be done with dd (as mentioned in the cyanogenmod guide).
Hopefully my device will be her soon, so I can also try these as well
Click to expand...
Click to collapse
Thanks for the resources! I think combining those two, plus the info on the CM website, and what's on XDA-University; I should be able to get this figured out. Now all I need to do is find the time.
Today my phone arrived! Tomorrow I'll pick it up and start to do some tests.
Sent from my Nexus 7 using Tapatalk
Here it is Kernel source code for NX507J
github.com/ztemt/Z7Mini_NX507J_H128_kernel
felipebarney said:
Here it is Kernel source code for NX507J
github.com/ztemt/Z7Mini_NX507J_H128_kernel
Click to expand...
Click to collapse
I thought that was the kernel that was either incomplete or broken. Do you know otherwise? I had seen it previously, but had read there were errors with it. If not, that's great! I also wonder if it has the "fixes" that ZTE has made for wifi, BT, etc in the recent updates.
pedrud said:
I thought that was the kernel that was either incomplete or broken. Do you know otherwise? I had seen it previously, but had read there were errors with it. If not, that's great! I also wonder if it has the "fixes" that ZTE has made for wifi, BT, etc in the recent updates.
Click to expand...
Click to collapse
I found on the nubia.cn, but i don't know if this have issues... Anyway last updated was 22 days ago, I hope they have fixed...
felipebarney said:
I found on the nubia.cn, but i don't know if this have issues... Anyway last updated was 22 days ago, I hope they have fixed...
Click to expand...
Click to collapse
Can you post the link where you originally found it? Thanks.
pedrud said:
Can you post the link where you originally found it? Thanks.
Click to expand...
Click to collapse
bbs.nubia.cn/thread-266348-1-1.html
:good:
felipebarney said:
bbs.nubia.cn/thread-266348-1-1.html
:good:
Click to expand...
Click to collapse
Thanks. Although, one person commented on the thread that it is nubia development and isn't open source yet. Won't know for sure and I'm not totally sure how to tell from looking at it. May have to keep waiting - or at least dig a little deeper. Thanks again.
So I started to try to build something with CM-11.
I thought I could put my steps here, in case someone else needs them (or has a better way to do it):
1) Get the repo uility:
Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
2) Initialize the repository:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
3) Sync the repository:
Code:
repo sync
This will take a while (the repo is pretty big).
I've taken some infos from the phone (build.prop, partitioning, kernel, boot.img).
I'll continue as soon as the repo is sync'ed.
Repo sync'ed, now build the environment:
Code:
. build/envsetup.sh
At this point we have to build the structure as explained here
Make sure you have the boot.img extracted (see previous posts about a tool).
Make sure you have the utility "unpackbootimg" installed.
I downloaded from https://github.com/osm0sis/mkbootimg/blob/master/unpackbootimg.c and compiled with:
Code:
gcc -o unpackbootimg unpackbootimg.c
Put it in your $PATH.
Then run the commands to create the directory structure:
Code:
./build/tools/device/mkvendor.sh nubia NX507J ../original/boot.img
"nubia" and "NX507J" come from the build.prop, respectively
Code:
ro.product.manufacturer=nubia
ro.product.device=NX507J
The result from the mkvendor.sh is:
Code:
[...]
Use the following command to set up your build environment:
lunch cm_NX507J-eng
And use the follwowing command to build a recovery:
. build/tools/device/makerecoveries.sh cm_NX507J-eng
...to be continued
pierg75 said:
So I started to try to build something with CM-11.
I thought I could put my steps here, in case someone else needs them (or has a better way to do it):
1) Get the repo uility:
Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
2) Initialize the repository:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
3) Sync the repository:
Code:
repo sync
This will take a while (the repo is pretty big).
I've taken some infos from the phone (build.prop, partitioning, kernel, boot.img).
I'll continue as soon as the repo is sync'ed.
Click to expand...
Click to collapse
This is great! Thanks. Are you using a PC or Linux and what OS? Those are the next steps that I want to take. I'm interested in doing it with carbon, omni, and maybe paranoid.
pedrud said:
This is great! Thanks. Are you using a PC or Linux and what OS? Those are the next steps that I want to take. I'm interested in doing it with carbon, omni, and maybe paranoid.
Click to expand...
Click to collapse
Obviously I'm using Linux
No windows here
Sent from my NX507J using Tapatalk
pierg75 said:
Obviously I'm using Linux
No windows here
Sent from my NX507J using Tapatalk
Click to expand...
Click to collapse
That's what I assumed, but hey, you never know. You know what they say when you make assumptions... What distro are you using?
Fedora and Debian...BTW I added few more steps in the previous message.
pierg75 said:
Fedora and Debian...BTW I added few more steps in the previous message.
Click to expand...
Click to collapse
Did you see the post by yiphoming on the other thread that CM11 already exists? Any other ROM's you're interested in?

Categories

Resources