What is a Source code? - Vibrant Q&A, Help & Troubleshooting

What are source codes and why for we need them? Example?
Thanks!
Sent from my SGH-T959 using XDA App

how i define it may not be exactly correct, but i know it is partially.
a Source Code is like... a manager at a grocery store? Without the manager, it would probably be a bit wild.
Source Code is everything that runs on your phone, compiled into 1 thing, and we need it so we can make our phones more stable, faster, etc.
wait till someone else replies with a more intelligent answer lol, i know what it is. but its hard to explain it from my point of view.

xriderx66 said:
how i define it may not be exactly correct, but i know it is partially.
a Source Code is like... a manager at a grocery store? Without the manager, it would probably be a bit wild.
Source Code is everything that runs on your phone, compiled into 1 thing, and we need it so we can make our phones more stable, faster, etc.
wait till someone else replies with a more intelligent answer lol, i know what it is. but its hard to explain it from my point of view.
Click to expand...
Click to collapse
I see, but is a source code really a set of numbers that make the phone better?
Sent from my SGH-T959 using XDA App

Computer code or language code is the way we get computers/ phones etc. to execute certain commands or strings of commands that want to do in order to make the computer do a specific thing.
Source code is text written in a computer programming language. Such a language is specially designed to facilitate the work of computer programmers to work in a specific platform.
Once you have completed a program in source code it is then complied by another software to make it smaller and essentially encrypts the command source code language.
Releasing the source code allows programmers and developers to see exactly how the command structure is built, then the devs can better write custom applications without fewer bugs and less guesswork.
Right now on the vibrant, we are using source code from the captivate and the Euro I9000 platform which are similar but not exact to write custom roms.
Once we have the Vibrant source code we will then totally understand the command code structure and the devs will be able to write better roms.
Sorry this is abbreviated and simplistic explanation but at least you will understand the general overview

A source code is what is used to make an application, or game, or OS...etc.
For example: I make a program, and to make this program, I have to make a bunch of files and compile them together to make the program itself. And I'd give out the source code if I want others to update/add to my program and they can compile it themselves. It's the programming language which is used to make the program.
There are thousands of languages, such as C++, Java, Unix...etc.
In short, source code is for developers.

Thanks for your help everyone. Now I know :-D
Sent from my SGH-T959 using XDA App

Nabeel10 said:
Thanks for your help everyone. Now I know :-D
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
It's always good to know what these things are to avoid posting the wrong questions to the wrong thread. Glad you came here instead of just asking how to flash kernel source.
To reiterate...source code are basically the blue print of a device. By having the blue print, you can look over it and make adjustment to improve device performance....

OK, I must say some of these are close but still off...
Source code will never run on your phone. Source code is human readable programming language. It is the language used by software developers to write programs. Examples of such languages are c, c++, java, python, etc. Once programs are written in such a language they are still useless as no machine can execute that code natively. This is where another piece of software called a compiler comes in. A compiler turns the human readable code into machine executable binaries that can run on a machine. Compilers can compile for different architectures, for example x86, x86-64, ARM, etc.
The big deal with getting the source code is that developers get something they can tweak, modify and recompile. This makes the job of optimizing and adding features MUCH easier than doing so without source. There are ways to de-compile binaries (turning machine executable code into human readable code), but it's not always accurate, and the code produced with such methods is usually much less concise than the original source.

shrapnelx said:
OK, I must say some of these are close but still off...
Source code will never run on your phone. Source code is human readable programming language. It is the language used by software developers to write programs. Examples of such languages are c, c++, java, python, etc. Once programs are written in such a language they are still useless as no machine can execute that code natively. This is where another piece of software called a compiler comes in. A compiler turns the human readable code into machine executable binaries that can run on a machine. Compilers can compile for different architectures, for example x86, x86-64, ARM, etc.
The big deal with getting the source code is that developers get something they can tweak, modify and recompile. This makes the job of optimizing and adding features MUCH easier than doing so without source. There are ways to de-compile binaries (turning machine executable code into human readable code), but it's not always accurate, and the code produced with such methods is usually much less concise than the original source.
Click to expand...
Click to collapse
That helped too! Thanks!
Sent from my SGH-T959 using XDA App

I assume the source code is already on the hand of samsung. why don't they just release it?
Sent from my SGH-T959 using XDA App

iynfynity said:
I assume the source code is already on the hand of samsung. why don't they just release it?
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
Samsung is a member of open handset alliance, and must comply with the provisions tied to GPL - they must release the source code within 60 days the firmware made public.
Hope this helps.
Sent from my Bionix powered Vibrant

iynfynity said:
I assume the source code is already on the hand of samsung. why don't they just release it?
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
maybe they want to hide all the bugs they couldn't have avoided.. or they may want to hide all that potential features that vibrant already have we don't know yet about
according to gnu general public license that all android os softwares fall under, source codes for any officially announced os should be released within 60 days.. hopefully samsung will release source codes for froyo soon-

Related

Question about Possible GPL Violation

If HTC provides an android ROM localized in any language (say Arabic for instance), then does that make it obligated by GPL license to share the localization code?
HTC has release HTC Magic in middle east and the ROM supports right-to-left Arabic in the standard android apps. So I'm wondering if they would publicly share the localization code.
I think the only GPL code is Kernel and kernel doesn't have localization.
Its pretty much screwed until they release Hero in the middle east which could be coming very soon, then we can just use their ROM, otherwise its nothing to do with the kernel its all with the rom
As other posters have said, only the Kernel is GPL'd and the Kernel 'only' provides the software to enable base functions like cpu, memory management, drivers (wifi, touchscreen, etc.). The actual applications that HTC provide are private and proprietory, which is all legal an above board.
Thanks all for your replies
Please note that I'm not complaining about extar (add-on) applications they have bundled with the rom, I'm basically concerned with the standard applications including the browser, message reader. I though these were open source and thus protected by the GPL license!!!
Contrary to what everyone else is saying, the kernel is NOT the only open-source/GPL portion of the Hero software.
Yes, the *HTC* software is closed-source, however, don't forget that it runs on top of Android, which (aside from certain google apps) is entirely open-source as well. I'm pretty sure that the localization is part of the Android code, and not something HTC developed themselves, thus you can get the localization source by downloading the Android OS source.
(I could be wrong about the localization being part of Android though.)
craig0r said:
Yes, the *HTC* software is closed-source, however, don't forget that it runs on top of Android, which (aside from certain google apps) is entirely open-source as well.
Click to expand...
Click to collapse
Sorry, but this isn't quite correct!
The Android Open Source Project has released the entire base source code for Android (which excludes the kernel) under an Apache Software License (ASL). This means that it is open source, and anyone can do anything with it including creating proprietary software, because the ASL is not a "copyleft" license.
What this means is that HTC could take the Android source code, make a number of changes under the hood, stick it on a phone, and sell it. However, under the terms of the ASL, they are *not* required to divulge their modified sources if they don't wish to do so. Effectively, this means that their customized version of Android becomes closed source.
In the context of the original question, what this means is that if HTC rewrote the "standard" Android apps to support Arabic they have absolutely no requirement to make the source code for those applications public. They might - they just don't have to!
Regards,
Dave
foxmeister said:
Sorry, but this isn't quite correct!
The Android Open Source Project has released the entire base source code for Android (which excludes the kernel) under an Apache Software License (ASL).
Click to expand...
Click to collapse
O I C
I had no idea. I thought it was GPL. But that makes sense, it's more appealing to handset makers that way.
foxmeister said:
Sorry, but this isn't quite correct!
Dave
Click to expand...
Click to collapse
Dave, i'm really disappointed
but sincerely appreciate your explanation.
regards///

[webOS] [Q] webOS Source code?

Does anyone know where I can find the webos 3.0 source code. I would like to find the browser source code in particular.
Proprietary
HP's webOS is a proprietary software, so it's not opened source... though that could change. But I don't think HP would do that. Sorry, there isn't any source code available to the pubic at this time.
I thought Preware had functional kernel source? (meaning you could build a kernel and have all of the drivers "work"...)
Here is something to look at.
http://www.webos-internals.org/wiki/Main_Page
thanks
quickmirror said:
HP's webOS is a proprietary software, so it's not opened source... though that could change. But I don't think HP would do that. Sorry, there isn't any source code available to the pubic at this time.
Click to expand...
Click to collapse
Thank I was just wonder of someone had hacked the OS
Hacked
In what way do you mean hacked? The interface is proprietary but the sound services etc.. use opensource applications like PulseAudio.
That source can be found here:
opensource.palm.com/packages.html
http://opensource.palm.com/packages.html heres the source for some of it at least
My mistake
Sorry about that, Palm owning the OS slipped my mind. Thank you for the link.
On a positive note, the kernel source is there... which should have the driver source that could be migrated into the android kernel... Kernel & patches
if you download the SDK from HP it has some sample code and it has the browser as one of the examples
Browser source (webkit that is) is on the palm site
You can download one of the webOS Doctors and extract it using 7zip. Easy access to a lot of the code, since it's mostly javascript/css.
http://www.webos-internals.org/wiki/Webos_Doctor_Versions
The Browser app is in /usr/palm/applications/com.palm.app.browser/
The sourcecode will be released soon per the news about HP's decision to release it. ENYO 's source code will also be released

[Q] Who owns aosp source code???

i have always been under the impression that aosp is android OPEN SOURCE project..therefore anyone can use it, you shouldnt need "permission"..just proper credits....did anyone get permission from google to use the code in the first place? So could someone please explain to me who the hell owns this code...thanks
Firstly, I'm not a lawyer so if you use the source code for Android, make a million dollars, and Google comes after you, don't come to me.
Now that that's out of the way, in open source projects, the source code is usually owned by the author. For example, if someone decided to make an alternate version of an open source project, he/she would own that code.
But owning the code doesn't mean someone can do anything with it. The thing that makes Open Source code open are the terms of use, or license that accompanies it. Most open source licenses describe (among other things) that people are free to do whatever they want with the code as long as derivative works follow the same license, include the license text and are also made available in source code form.
But this is just a general explanation of common open source license terms. For more details, have a look at the license that ships with the Android source code. Since it can change you're better off just delving in and reading it.
Enjoy,
- chris
As Android is built off of Linux and filed with the GPL2 license that would be your best option. As for permission being asked that is an XDA rule as it is respect which is very lacking as of late. Also the reason for developers holding the best stuff to themselfs and other respectable developers that know what real development is. Using the work of others and adding a theme is not development neither is kang builds. Far too much of this going on.
cttttt said:
Firstly, I'm not a lawyer so if you use the source code for Android, make a million dollars, and Google comes after you, don't come to me.
Now that that's out of the way, in open source projects, the source code is usually owned by the author. For example, if someone decided to make an alternate version of an open source project, he/she would own that code.
But owning the code doesn't mean someone can do anything with it. The thing that makes Open Source code open are the terms of use, or license that accompanies it. Most open source licenses describe (among other things) that people are free to do whatever they want with the code as long as derivative works follow the same license, include the license text and are also made available in source code form.
But this is just a general explanation of common open source license terms. For more details, have a look at the license that ships with the Android source code. Since it can change you're better off just delving in and reading it.
Enjoy,
- chris
Click to expand...
Click to collapse
Thanks for taking the time to write that...I think I understand a little now
Sent from my PC36100 using XDA App

C++ For Android?

Hey all,
I'm pretty new to android development and I was curious if anyone could tell me the benefits of learning C++ alongside Java (specifically while working with Android).
My first project that I'd like to accomplish seems a little arduous, though I do have help. I'm attempting to create an app that is used to catalog clothes, but also parses image data to detect the colors. In this way, it will be (hopefully, by some means) possible to have the app help match the clothes for the user. The inspiration for this is my extreme colorblindness.
Anyone who potentially has feedback regarding interpreting data from the camera on Android, feel free to pitch your two cents.
Read this. May help you. http://forum.xda-developers.com/showthread.php?t=2225668
Sent from my SonyX8 using Tapatalk 2
ScatteredHell said:
Read this. May help you. http://forum.xda-developers.com/showthread.php?t=2225668
Sent from my SonyX8 using Tapatalk 2
Click to expand...
Click to collapse
Thanks so much!
Sent from my HTC One using xda app-developers app
not sure you need c++ for your project
My experience with C++ (using Marmalade) is that if you need a lot of UI, than you are better off with the Java framework. Designing UI with Marmalade is a real pain. It's great for power hungry games and apps, but not for UI.
If you absolutely need to use C++, my advise it to start with the native Java and NDK, and only if you're not satisfied, look elsewhere. Even in Marmalade, which is supposed to be cross-platform, you will reach the point, too quickly in my opinion, in which the SDK doesn't give a cross platform solution to what you want (say use a downloaded third-party sdk, or request some OS function that the SDK does not offer), and you will have to implement specific OS "EDKs", so will have to know your native coding anyway.
Hi,
you should try Qt, though you need the android sdk/ndk, Jdk and Ant as well, but it works.
jrdemasi said:
Hey all,
I'm pretty new to android development and I was curious if anyone could tell me the benefits of learning C++ alongside Java (specifically while working with Android).
My first project that I'd like to accomplish seems a little arduous, though I do have help. I'm attempting to create an app that is used to catalog clothes, but also parses image data to detect the colors. In this way, it will be (hopefully, by some means) possible to have the app help match the clothes for the user. The inspiration for this is my extreme colorblindness.
Anyone who potentially has feedback regarding interpreting data from the camera on Android, feel free to pitch your two cents.
Click to expand...
Click to collapse
Get a book from fipkart to lear this. "Android Devlopment"
jrdemasi said:
Hey all,
I'm pretty new to android development and I was curious if anyone could tell me the benefits of learning C++ alongside Java (specifically while working with Android).
My first project that I'd like to accomplish seems a little arduous, though I do have help. I'm attempting to create an app that is used to catalog clothes, but also parses image data to detect the colors. In this way, it will be (hopefully, by some means) possible to have the app help match the clothes for the user. The inspiration for this is my extreme colorblindness.
Anyone who potentially has feedback regarding interpreting data from the camera on Android, feel free to pitch your two cents.
Click to expand...
Click to collapse
I would choose for this between two options: develop entirely in Java except for the portions that are computationally heavy, which can be implemented in C/C++ using JNI glue code. Or you may implement everything using a C++ based framework, like Qt, both for the creation of the UI and of the rest of your application. With Qt of course, the specific UI portion can be written using QML, which might be faster.
const_char said:
I would choose for this between two options: develop entirely in Java except for the portions that are computationally heavy, which can be implemented in C/C++ using JNI glue code.
Click to expand...
Click to collapse
I second this, with the sidenote that you should only use C/C++ if the computationally heavy code is actually time-critical.
I mean, at first glance, your project sounds like it won't be very taxing on the CPU anyway. So having a full Java version may still be fast enough, and the user wouldn't even know the difference. In that case C/C++ is not worth the trouble (JNI is very ugly, and you shouldn't use it unless you really have to).
C++
I think C++ is not for suitable for this application. Although i did not use it. But you may first take some tutorial then you can start. When face problem then discus this forum. I am sure somebody may help you.
Sorry for my English.
Thank you
you can get pixel color use this sample code.
jrdemasi said:
Hey all,
I'm pretty new to android development and I was curious if anyone could tell me the benefits of learning C++ alongside Java (specifically while working with Android).
My first project that I'd like to accomplish seems a little arduous, though I do have help. I'm attempting to create an app that is used to catalog clothes, but also parses image data to detect the colors. In this way, it will be (hopefully, by some means) possible to have the app help match the clothes for the user. The inspiration for this is my extreme colorblindness.
Anyone who potentially has feedback regarding interpreting data from the camera on Android, feel free to pitch your two cents.
Click to expand...
Click to collapse
you can get pixel color use this sample code.
String imageUrl = SOME_IMG_URL;
InputStream in = new java.net.URL(imageUrl).openStream();
Bitmap bitmap = BitmapFactory.decodeStream(in);
int pixel = bitmap.getPixel(x,y);
and.
int red = Color.red(pixel);
int blue = Color.blue(pixel);
int green = Color.green(pixel);
you can get average color value of SOME_IMG and you can catalog this.
it seems easy!

Anyone working on privacy or security oriented roms?

Hello
i am just on a fishing expedition here so please bear with me. I am interested in a rom that is geared towards privacy or security based on android. With all of the id theft and government hanky panky i have started researching this subject but the only thing definitive i have found is the "blackphone". I would prefer something a little less proprietary and more open source.
If you know of a project or can suggest any apps that could aid in my quest (privacy, encryption, etc) please let me know.
Thanks
darwinwasright said:
Hello
i am just on a fishing expedition here so please bear with me. I am interested in a rom that is geared towards privacy or security based on android. With all of the id theft and government hanky panky i have started researching this subject but the only thing definitive i have found is the "blackphone". I would prefer something a little less proprietary and more open source.
If you know of a project or can suggest any apps that could aid in my quest (privacy, encryption, etc) please let me know.
Thanks
Click to expand...
Click to collapse
If it is open source then it is open door... Simple as that. There is no secure ROM, for any Android based phone.
open source?
Solarenemy68 said:
If it is open source then it is open door... Simple as that. There is no secure ROM, for any Android based phone.
Click to expand...
Click to collapse
My understanding of the title "open source" is that the source code is open or available freely for developers to download and work with to fit their needs. This is in contrast to M....soft and A.... who hide their source code in a deep dark cave somewhere. Linux is a perfect example of this. There are several different variations of Linux that are modified for privacy and security as well as other purposes. It is well known that Linux is much more secure than standard out of the box OS's and this is directly attributable to the community effort for development and policing of the operating system........thanks to open source.
darwinwasright said:
My understanding of the title "open source" is that the source code is open or available freely for developers to download and work with to fit their needs. This is in contrast to M....soft and A.... who hide their source code in a deep dark cave somewhere. Linux is a perfect example of this. There are several different variations of Linux that are modified for privacy and security as well as other purposes. It is well known that Linux is much more secure than standard out of the box OS's and this is directly attributable to the community effort for development and policing of the operating system........thanks to open source.
Click to expand...
Click to collapse
The reason Linux is so secure in regards to virus and exploits is because so few people use it is not a target for the groups that create the virus and exploits.
What I meant by open door equals open source is simply that. As long as the source files are open source that can be reverse engineered by anyone and exploited. There was a news article about France and some other countries creating their own private internet to keep the US from spying on them. That is all good except they have not put human into the equation. As long as humans are involved in the programming and creation of secure systems, there will always be a backdoor or exploit. It is very easy to buy s person and have them give access to a secure system.
There is no such thing as a secure system. Hardened maybe, but never secure. The very nature and function of these phones make them insecure. If you want true security then a smart phone is not your best option. Especially not one like the ONE or others that are so heavily integrated in to social media.
Getting back on point.
I did not start this thread as a debate. I am looking for responses that address the issue posted as it is posted.If you feel like you can contribute something to the quest I am on feel free to .
Thanks
As forum rules state... the Roms here can only be open source else they will be deleted.
Sent from my HTC One using XDA Premium 4 mobile app

Categories

Resources