[Q] Best way of Co-operation and Modification of Android - Android Q&A, Help & Troubleshooting

Hi!
Some guys and me are working on Android now for long time. Most times we had clear different parts we where working on, so two guys working on kernels, one on adaption of Android, one was testing and keeping contact to the community.
Now, cloning a kernel and merging some changes on drivers is a simple thing. And even changing a file on android, putting it into a git or simply on an ftp is easy too...
Well, now things have changed. Android is getting more complex and kernel work is mostly done.So we do more and more work in Android with more and more people.
Ok, one would say, take a plain android by using repo sync. Add your vendor parts for kernel and android and add them as a separate git. Ready you are...
Unfortunately that may work if you build your own device, based on plain naked android and a well supported mainlined kernel... But reality is different and chinese reality is even different^2. Hacking andoid devices where you do not have access to the OEM gits, kernels, not even datasheets or schematics is a hell of work... and all of these OEMs just checked out the complete android, put it in their own git and modified 1000 parts 'n pieces of it.
This isn't only a problem of bandwidth to upload such a monster, but all your friends supporting you have to clone that monster again. And after a while a new android version comes and you have great mess:
You cannot find differences from your old version to the new google version as many files have been changed by the OEM.
But you cant just "repo upload" cause google or CM might not be very eager to get dumb chinese deep down below android changes in their repos.
How do you team up with others and sync your android changes? Is there a good tutorial that handles not only the way it should be, but covers all these real-life issues?
I'd really appreciate your tips
Astralix

Related

[Q] Wanting to tinker with Android

I've been following threads on here for a few months, and now I think I want to try to learn more about how Android actually works. I'm familiar with IDEs and coding in general(not my strong point), so I think I could pick up some things pretty quickly. Where would you guys recommend I look for learning to code/tweak Android code*?
I kind of want to be able to say I'm running my own cooked up version of Android.
*please ignore this redundant word choice, please.
rougegoat,
There is a fork in the road right at your starting point, strangely enough. You could choose to study Android application development, or you could choose to look at ROM "development". They are almost worlds apart in both nomenclature, toolsets, and skills; and because of the breadth of skills that are needed in both domains, I have no doubt that there are people that are simultaneously geniuses in one of those areas of expertise, and a numb-skull in the other: that's how far apart they are.
The former is all about Java, Android API's, the "SDK", and an IDE such as Eclipse, and emulators and the device bridge; the latter has a distinct "Unix jock" nature to it: Android "NDK", (or CodeSourcery) toolchains, gcc, make, command-line and shell scripting, understanding dynamic linking and execution environments, and use of configuration management tools (git and repo).
When "code" comes up in the former, it's Java; in the latter, ANSI C (or any other native-compiler language, but C is most typical). In the latter case, if you are building source trees from public repositories, (say Cyanogen or AOSP) initially you won't spend any time at all with C - you'll be spending 95% of your time struggling with with the build environment(s) and trying to wrap your head around the mysteries of "git" and "repo" - and also deciphering Unix shell scripts (typically written in the "Bourne" or "Bash" shell dialect) when things go wrong or are poorly documented. And yes, they will go wrong; effectively diagnosing what happened when things go wrong requires solid Unix/Linux skills.
Your question as posed suggests that you are more interested in the OS/ROM side of things than App development; if that is the case I would suggest you:
-brush up or learn from scratch basic Unix/Linux skill sets (they map over to Android almost 1-to-1).
-If you are a Windows user, download VirtualBox, and create a VM with Ubuntu (8.0.4 or 10x); use developer.android.com as a reference for dependencies and setup. Make sure the virtual disk is plenty big: at least 30-40 Gb. Don't attempt to set up a native development enviroment in Windows/cygwin. ( Windows is a great place for the Android SDK and Android App development, but decidedly not for native code development for Android "ROMs"** ).
-Install both the CodeSourcery and the Android "NDK" (Native Development Kit) in your Linux VM, and try and build a smallish, but multi-file C source-code project that uses Makefiles using both of those toolchains. (Sounds easy, right? Wait till you try anything involving the standard I/O library with the NDK).
-Get your simple project code to run correctly on a real phone device.
- Then, download and build an HTC kernel from their (standalone) source tree - try and do it with both toolchains (CodeSourcery and Android NDK) - simply for the experience of setting up the environments correctly.
- Then, learn the basics of dealing with repo, download an Android source tree and compile it - using both toolchains (CodeSourcery and Android NDK)
- After succeeding with the above, try pulling code from someone else's "git" repository and merging it into an Android build tree - and getting it to build correctly.
The above looks like a pretty short list - but it represents many, many hours of effort. Good luck.
bftb0
** There might be folks that take issue with that statement about ROM-building and Windows. They might tell you, "just download so-and-so's kitchen, and start building ROMs", it works fine under Windows." There's nothing wrong with that, especially because it can be satisfying seeing something of your creation actually running on a phone in a short period of time - but you probably won't learn very much, and when things go wrong, you'll be stumped about how to go about fixing things. The difference between a "chef" and a "developer" is that the former merely assembles together pre-built executable programs and libraries - whereas the latter understands not only how to go about building those things when the sources are available, but also has the opportunity to change them.
Lucky for me that I'm a Slackware guy. I'd much rather learn the system then just have a pretty GUI that does it all for me. That's half the fun of it.
Thanks for the advice, I'll have to try that whole bit out and see where it gets me. A weekend project awaits!

[Q] CM7 settings question

I have been looking for a good CM 7.1 based ROM and am having a hard time deciding on one. The main thing I am looking for is the advanced lock screen delay and timeout settings. I cannot tell if this is a difference between CM 7.1 and 7.0.3 or if it is just a setting that some ROMs have and some do not.
Can someone shed some light on this for me? Is there a way to add this functionality? (I care because work enforced a security lock on my phone for email access, but I don't want to have to type i tin EVERY time the screen goes off. iPhones and WinMobile don't. It seems to be a flaw in Android's ActiveSync).
Thanks in advance.
This feature is new in CM 7.1. However, other users have reported success using Delayed Lock + WidgetLocker apps from the market to effect the same functionality, though I am uncertain how well they play with the Exchange server's demands.
Alternately, if you really don't want this security lock feature at all then you can find versions of Email.apk that will just lie to the Exchange server about the phone's configuration. Then you can configure your lock settings however you like. Ah, the classic fallacy of a security model that trusts the client...
I actually like the security of the password. I just wish it behaved like ActiveSyns on every other type of device (Win Mobile, iphone, etc) and let you set a delay (defined by the system administrator) for when the device security locks, not every time the screen goes off.
I wish we had a good CM7.1 ROM. Oh Z, wherefore art thou?
Yeah, running a nightly (or a ROM that pulls from nightly) is currently the only practicable choice to get the feature.
I backported the feature's code to the CM 7.0.3 codebase and built a custom ROM for my own device. I wanted the feature but didn't want to run the unstable nightly on my primary phone. Well, "backport" isn't the correct term, because the feature was developed against 7.0.3 and was rebased to 7.1 for submission to the source repo. But you know what I mean (haha).
organophosphate said:
Yeah, running a nightly (or a ROM that pulls from nightly) is currently the only practicable choice to get the feature.
I backported the feature's code to the CM 7.0.3 codebase and built a custom ROM for my own device. I wanted the feature but didn't want to run the unstable nightly on my primary phone. Well, "backport" isn't the correct term, because the feature was developed against 7.0.3 and was rebased to 7.1 for submission to the source repo. But you know what I mean (haha).
Click to expand...
Click to collapse
Care to share?
rearview said:
Care to share?
Click to expand...
Click to collapse
You know, I realized after posting that I probably look like a jerk for not offering. I apologize. There are issues that seem to preclude this, however.
The target of the relatively minor code changes necessarily included one of the fundamental framework jars.
When I was developing the feature, I only compiled CM for the Droid Incredible. Didn't make sense to compile for platforms I can't use/test, especially given the next point.
It takes my machine 90+ minutes to compile a ROM for a platform.
I believe that if I gave you a flashable update.zip to replace the affected jars it would have a high probability of cacking your ROM and would result in bootloops. Not absolutely certain, but fairly concerned about the possibility. I believe you would have better luck running a nightly that people report as "relatively stable" in the forums (some nightlies are better than others).
When the feature was merged, I really thought CM 7.1 would be out soon. RC1 dropped a month *before* the new feature was merged. That sounds odd in retrospect, because most projects freeze feature additions before entering the RC phase of a release (ie. they accept bugfixes only).
I just assumed it was for an X10 since we were in the X10 forums. Since this phone isn't officially CM supported I'm at the mercy of ROM developers to make a nice CM7.1. There are a couple out there, and they all have issues. One is close, but the dev seems to have gone missing. I hope he returns soon.
Is modifying one jar file all that it would take? Which file? If I knew that I could possibly take the jar file from one of the CM7.1 ROMs for my device (which has issues) and put it into a 7.0.3 that works smoothly and be happy.
rearview said:
Is modifying one jar file all that it would take? Which file? If I knew that I could possibly take the jar file from one of the CM7.1 ROMs for my device (which has issues) and put it into a 7.0.3 that works smoothly and be happy.
Click to expand...
Click to collapse
I like your train of thought. Unfortunately, even if that were to work you would be unable to configure the feature, because the UI is in the CM Settings apk (ie. the apk that makes "CyanogenMod Settings" menu option appear in your Android settings). If you were to also grab the CM 7.1 settings APK and install it, then that would replace the old version. The CM 7.1 version has all sorts of changes, controls for other new features, and so forth; therefore, that would break much of your other functionality.
How conversant are you in software development? You may be able to join one of those CM 7-derived ROM projects for your platform. It should be relatively easy for someone with a CM dev environment configured for your platform to grab these patches via git cherry-pick and build a 7.0.3 "Gold Edition" with this feature added. Because it should be easy, you might be able to persuade one of those custom ROM developers to grab this feature and include it.
If you are interested, here are the links to my patchsets that were merged to implement the feature:
Framework Implementation
CM Settings UI
I believe the patches will merge "nearly cleanly" into a CM 7.0.3 derived branch. That is to say, if there are merge conflicts they will not be substantive and will merely involve wholesale cut/paste reordering of methods within the given class files rather than requiring a rewrite of any part of the actual implementation.
I know that this simple reordering is all I changed between my 7.0.3 development version and the 7.1-derived submission. Seems Steve Kondik did a little further rearrangement to accommodate other patches that had been accepted/merged while mine was pending. Same deal there: still should be relatively simple.
I'm not much of a developer, though I'm an IT guy with some unix background. I'll look at it.

[Q] Total Android Newb, where to go for basics?

[rooted NT using Albert's 4.5] old school IT guy, just don't know android
This site doesn't seem to be very welcoming of basic questions so I would like to find a place I can get up to speed. I'm reading and searching but most of the answers include elements that are over my head so I don't end up making much progress. I've also tried the basic Google searches for "android for dummies", "android basics", etc. Part of it is that I haven't used a smart-phone, iPad, or other similar device so a lot of the really basic stuff isn't 2nd nature to me.
Where can I go to get a basic understanding of setting up, configuring, and using android efficiently.
Things I would like to understand:
When ICS (CM9?) becomes available on NT, if I am running CM7 and do an upgrade will all the look/feel & organizing configuring be gone and need to be redone with the new OS (does this happen each time you do an OS upgrade)?
Configuring the launcher(s) to get better look, more efficient use. I have read the honeycomb & homescreen configuration threads but am unclear as to whether those options are available with a rooted NT or only if you have installed CM7.
Just basic efficient navigation. If I am bouncing back & forth between apps (like Dolphin & installing/configuring an app) I currently end up using the "N" key to go back to the launcher and "reopening" each of the apps. Don't know if there is a more efficient way to bounce between open app instances.
A sincere thank you for ANY help. And sure if you would rather ridicule me for my lack of knowledge or point out that there is a search button I can certainly handle that too.
Honestly, just play with it and explore. You're not going to break anything. In the unlikely event that you do simply reformat your device.
Sent from my Nook Tablet using xda premium
http://forum.xda-developers.com/showthread.php?t=1415812
Hi! Since i assume you are well aware of conputer operating systems
Android is a derivative of the Linux kernel which powers Ubuntu, Red Hat, Gentoo etc. Linux is based off of Unix as are other OS like Mac OS X. These Kernels use unix commands to carry out tasks underneath the X server interface (desktop). Android has a similar setup and you can issue commands from a terminal either on the tablet itself or in windows to install, remove and execute scripts and programs. ADB is the android equivelent of a com2 port if you will and that is how the NT and
Kindke Fire where originally rooted. You can use Indirects Adb script to root your tablet and even install Google apps. I know you already have one of Alberts cards but if you want to learn up on Android you should study up on ADB.
The version of Android that comes with the NT is fine if you just want
to consume books and media. This is Gingerbread 2.3 that
was developed specifically for the NT. Since Google requires manufacturers
to meet certain requirements to license the proprietary parts of
their software and apps and Barnes and Noble decided to forgo licensing
they could not include Google Apps on their tablet. This is why although GApps can be forced to run, there are still problems.
Cm7 is a heavily modified version of Android Gingerbread. It has the code in its
kernel 2.3 to run the Gapps without problems and allow full
Access to the market. Some of the "new" ICS roms that are
being built and distributed are actually based on Cm7 and the new
Code is being backported to work on the old kernel. This means whenever
A new feature is introduced to ICS, it has to be rewritten
to work on an old kernel. There is work being done to build
a working 3.x kernel which is what ICS will be based on.
I personally will wait and hope that development is completed
before i use ICS.
The launcher is what draws all the icons and gets you around. I personally like go launcher, others like ADW (cm7 default). Zeem launcher is lightweight and basic.
Just try a couple and use home switcher from marketplace to switch between then
Until you find the one tgat strikes balance between feautures and speed. Hope this helps you get started.
Thanks much for the help so far. I do appreciate it.
I have spent some time with the FAQ/Newb thread but will spend more time on it.
Check out the XDA wiki, or the CyanogenMOD wiki for the best vanilla-android questions. Things like how to set up the android SDK, downloading drivers, etc.. Anything from beginner to advanced should be found in one of those 2 places.
The search function here is sufficient. You just need to know what you are searching for. Basically typing in "android for newbs" is gonna return probably every post with the word android in it. Good luck finding anything in that mess. You need to be fairly specific.
A lot of people here are more than willing to help, so long as you post in the correct areas and at least try to search for an answer to your question.
Just spend a lot of time searching through XDA and using google searches. There is a TON of information out there, I know it seems a bit overwhelming at first, at least it did for me when I got my first Android phone. As long as you are willing to put into the time to research and use trial and error, you will be fine I would start with reading how to root the device that you currently have, from there learn how to install CMW and then worry about CM7 and other ROMs. As you are learning these things I believe a lot will fall into place.

Developer workflow?

Hi there! I was curious as to the ROM developer workflow. I'm somewhat familiar with building AOSP for x86 VMs and have done some skinning and manipulating system apk's ... but I have some other questions:
1. What distinguishes a ROM package from other zip installers, I guess since it is *nix, everything's a file and most ZIPs then just have the files changed?
2. Jokersax makes mention of doing all development on the device itself... What this workflow, just doing a lot of nandroid backups then, or just replacing things on the fly and hoping for the best?
3. What options exist for adapting system level native code, perhaps I guess I'm asking if, for instance, the camera works with Blur stock SBFs, how could one go disassembling the functionality and deriving CM9 compatible packages? Are the drivers that tightly coupled with the UI elements? That would seem impossible to maintain, and say what you want about Motorola, I couldn't imagine this to be the case.
Thanks -ap
Sent from my MB855 using xda app-developers app
antipasto said:
Hi there! I was curious as to the ROM developer workflow. I'm somewhat familiar with building AOSP for x86 VMs and have done some skinning and manipulating system apk's ... but I have some other questions:
1. What distinguishes a ROM package from other zip installers, I guess since it is *nix, everything's a file and most ZIPs then just have the files changed?
2. Jokersax makes mention of doing all development on the device itself... What this workflow, just doing a lot of nandroid backups then, or just replacing things on the fly and hoping for the best?
3. What options exist for adapting system level native code, perhaps I guess I'm asking if, for instance, the camera works with Blur stock SBFs, how could one go disassembling the functionality and deriving CM9 compatible packages? Are the drivers that tightly coupled with the UI elements? That would seem impossible to maintain, and say what you want about Motorola, I couldn't imagine this to be the case.
Thanks -ap
Sent from my MB855 using xda app-developers app
Click to expand...
Click to collapse
1) You are pretty much correct....and rom can be turned into a simple one file zip or vice versa
2) He actually uses the device along with a build machine. You can do some simple stuff on the device itself, but if you're going to get into decompiling jars or apks, you will need a bot or a PC.
3) Apktool (Linux/Windows) or Android Suite (Windows) will allow you to break down the apks like you are describing. I'm sure you can make a blur apk work with CM9 (obviously app developers on the Play market do manage to make both). I'm not very familiar with Blur/CM7, as I started work on ROMs after ICS had hit, and I really didn't see much real desire to do something that wasn't forward from where my phone was.
Mainly, you can do source work, which you are most likely familiar with the process of.
I do "port" work...taking the framework, apps and some other necessary functionality-related parts and making a new rom for my device with it.
If you are interested in the process, by all means get in touch with me via PM. We are in need of some people to help with a void that has been left by our team member Spleef taking on a second job.
Thank you so much for the extensive reply. I have about a kabillion personal projects, it would be perhaps interesting to ruminate some on the metadevelopment as it were, I do notice that the Cyanogen project seems to have a lot more ability to automate their workflows, it would be cool to try and get more people into those kinds of logistics to help out... Anyway, I'm trying to remain productive, I'm a long time lurker, and I can't bring myself to post unnecessarily to even get to the 10 posts I need to provide feedback in the development forums, but I'll try
I've been really inspired with the Clojure / Java community, especially "Leiningen" and things like Jenkins for continuous integration. Could be cool to try and think at this level, perhaps like a chrooted VM or something that enthusiasts could run to assist in build CPU times, or hell I dunno, this kind of thinking is all pie in the sky and is hell to set up possibly for little gain, although I'm encouraged that Bittorrent is being used a little more here and there perhaps to offload some of the hosting costs. FWIW I have used S3 in my own projects, and for various static sites I have, I've been hard pressed to pass 30 cents a month in hosting costs on S3, but this is all low traffic stuff and there's a lot of options out there with various kinds of advantages and disadvantages.
All in all, thank you all for your continued efforts, especially going into the later part of this year when JB will mature, and the possibility of ICS drivers being integrated. You guys rock!

Cornerstone for CM10 in progress, could use some help

I'm working on a JellyBean port of Cornerstone. It is currently building with CM10, but does not work very well at all. I'm not sure if this has to do with the resolution of my tablet, 1900x1200 TF700T, which I tried to account for, but may have screwed up. I could use some help on this, as I have very little time and not much experience with building Android from source. Specifically, any advice on toolchains/testing code without needing to do an entire build would be appreciated. What would be more appreciated is if I could get some help with the project itself to get it to a stable place, and perhaps to include a path for continuous updates with as new releases come out.
https://github.com/emil10001/cornerstone
My current build environment is an Ubuntu VM, just using the commandline. I write the code and try a build. It usually fails and I go in and fix the errors that it gives me. This process means that I spend about 1-10 minutes coding and 2 hours waiting for it to build and fail. At present, it's actually building just fine, but it isn't working very well.
I really like the idea of Cornerstone and would like to see it working on newer builds. I am also reaching out to the Cornerstone Google Group, but they have been fairly silent for months. https://groups.google.com/forum/?fromgroups=#!topic/cornerstone-dev/Gz345pbd-co
Thanks,
John
I did talk with them a while back and the did say they're working on updating the codebase to support jellybean.
I had a quick glance at your fork.
This way its really hard to test, you could better just fork frameworks/base from android and then modify the files instead of the copying the changed files.
That would make it easier to test, view what changed, etc.
You could also use gerrit.
mmm path/to/it will do a quick rebuild.
I've had the apps up on github.com/sgt7 but they haven't been updated since way too long, will update them when I find some time.
Sent from my GT-P1000
...
Thanks for the tips!
The reason that I am keeping them separate is mainly for sanity, I wanted to try to keep the cornerstone stuff outside the main android code so that I can keep the android codebase relatively up-to-date, and also very obvious about what's a part of cornerstone for anyone that wants to grab the source from me. I'm also wondering if it's possible to pull part of this, say frameworks/base, into Eclipse (without it taking a day and a half to build the workspace).
Also, with gerrit, I wanted to keep this separate from the CyanogenMod stuff, mainly due to the comments that Dianne Hackborn made on G+ to Steve Kondik. I have a feeling that that's what killed the project.
I'd also really like to see how this works on a 1200x800 device, since that's what Cornerstone was originally designed for. I'm thinking that I screwed up the data in the xml resources, and that that's a big reason as to why it looks so funky on my device.
emil10001 said:
Thanks for the tips!
The reason that I am keeping them separate is mainly for sanity, I wanted to try to keep the cornerstone stuff outside the main android code so that I can keep the android codebase relatively up-to-date, and also very obvious about what's a part of cornerstone for anyone that wants to grab the source from me. I'm also wondering if it's possible to pull part of this, say frameworks/base, into Eclipse (without it taking a day and a half to build the workspace).
Also, with gerrit, I wanted to keep this separate from the CyanogenMod stuff, mainly due to the comments that Dianne Hackborn made on G+ to Steve Kondik. I have a feeling that that's what killed the project.
I'd also really like to see how this works on a 1200x800 device, since that's what Cornerstone was originally designed for. I'm thinking that I screwed up the data in the xml resources, and that that's a big reason as to why it looks so funky on my device.
Click to expand...
Click to collapse
Just checkout a new branch with the modified code, that's what version control is for.
Also, i believe it should be fine now if there is some sort of a whitelist implementation, and only few apps are supported by it. (*le Samsung Mutli Window)
cdesai said:
Just checkout a new branch with the modified code, that's what version control is for.
Also, i believe it should be fine now if there is some sort of a whitelist implementation, and only few apps are supported by it. (*le Samsung Mutli Window)
Click to expand...
Click to collapse
What happens when you try to use an unsupported app anyway? I have Note 2 with the multiview hack and every app I've tried with it has worked, though I've never tried anything like say Angrybirds, just google voice and Trillian and stuff like that.
Is this still something that you are trying to work on? GOD I would love cornerstone on my tf700!!!
Need some help testing/coding ect? I would love to help, not an advanced dev but working on my android chops daily.
I am available to help with testing.
Am a rom developer.

Categories

Resources