Where to find the source code for getting AuthToken.
In the folder with the android source (core/java/android/accounts), I found the code only works stored in a database and extracts from it.
But I am interested in the code that makes a request to the server for AuthToken
I'm wondering which of the four methods (OAuth 1.0, AuthSub, ClientLogin and OAuth 2.0) use, because OAuth 1.0, AuthSub, and ClientLogin have been deprecated.
Related
Hello. I have the latest Android SDK and Eclipse w/ADT set up on my Ubuntu 10.10 box. I have tried many examples and wrote my own practice apps. Everything so far has worked well!
My goal is to modify the stock MMS app so that I can modify the Delete functionality to require a pin or password. This will help keep my 11 and 13 year old children's texting clean and under control. (yes, I understand that they could install another MMS app, but thats something I can watch for too)
I'm a well seasoned programmer (c/c++/php/bash) and I'm just learning java/Android API. I thought this project would be a great place to start...
My problem is, I can't build the mms app at all. I have used git to download the approriate sources:
Code:
[email protected]sktop:~/dev$ git clone git://android.git.kernel.org/platform/packages/apps/Mms.git
I then created a new workspace in Eclipse, and created a new Android project, where I imported from existing source. In the "problems" tab in Eclipse, I get:
Code:
1,464 errors, 112 warnings, 0 others (filter matched 200 of 1576 items)
Errors (100 of 1464 items)
Description Resource Path Location Type
AcknowledgeInd cannot be resolved to a type RetrieveTransaction.java /ConversationList/src/com/android/mms/transaction line 222 Java Problem
Description Resource Path Location Type
AcknowledgeInd cannot be resolved to a type RetrieveTransaction.java /ConversationList/src/com/android/mms/transaction line 222 Java Problem
...
...
Description Resource Path Location Type
Addr cannot be resolved AddressUtils.java /ConversationList/src/com/android/mms/util line 47 Java Problem
...
...
Description Resource Path Location Type
ArrayListCursor cannot be resolved to a type RecipientsAdapter.java /ConversationList/src/com/android/mms/ui line 208 Java Problem
...
...
etc
Basically tons of errors. Its almost like an include path isn't set properly somewhere.
Can anybody help me to get this to compile, then I can begin modifying and testing my changes!
thanks!
I think you'll need a good portion of the AOSP source tree to get all the base framework stuff needed to compile this.
Ok thanks, pulling down the AOSP tree now. I'll retry once its pulled down and report back here if I have more problems
Compile Mms Eclair AOSP using Eclipse
hello to all,
can anyone point me how to edit/compile a 'default/vanilla' mms app of AOSP using Eclipse?
I'm currently using ubuntu 10.04 with the with android sdk's for Eclair and Froyo and I was trying to compile the Eclair Mms
Hello,
I would like to know if the following is possible:
1) create an Android Java app that accepts some input parameters (args[], see point 2)
-this app is derived from a c++ GPL library using NDK (it is a kind of wrapper but it is not a library itself yet)
-it just writes a file to disk according to parameters
-it is GPL licensed too and the source is available
2) make the user install it
3) call it with dalvik.system.DexClassLoader from a commercial app, that is, invoke its main with args[] and then just read the file it has produced from the filesystem.
Is GPL fulfilled? Could I do it?
Any suggestions or opinions are welcome.
Thank you in advance
This is just a compilation about the topic and i have made it as much as noob friendly as i can. i will write it part wise when i get time. Hope it helps the community. if i missed something or wrote something wrong please point me out.
Do not forget to hit thanks if this helped
Linux Kernel and its Structure
PART I
Introduction:-
The Linux Kernel is as we all know is on of the most prominent example of free and open source software. Linux kernel is one of the most popular operating system kernel widely used by Linux distributions and variety of mobile devices. If was the result of a hobby of Finnish student Linus Torvalds and in 1991 he gave the birth to the Linux Kernel which redefined the concept of free and open source software.
The Linux Kernel is released under GNU General Public License version 2(GPLv2) and due to which more then a thousand people contribute to each kernel release. The large and dynamic developer and user community around Linux helps it to rapidly accumulate developers and users to adopt code from other free software projects to use with the Linux Kernel.
The main features of Linux Kernel are :-
1.Multitasking: several programs running at the same time.
2.Multiuser: several users on the same machine at the same time (and license for two users)
3.Scalibility: can run on super computers as well as tiny devices.
4. Multithreading: has native kernel support for multiple independent threads of control within a single process memory space and even has memory protection between processes, so that one program can't bring the whole system down.
demand loads executable: Linux only reads from disk those parts of a program that are actually used.
5.Free and open source:- All source code is available, including the whole kernel and all drivers, the development tools and all user programs; also, all of it can be freely distributed.
6.Multiple virtual consoles: several independent login sessions through the console, you switch by pressing a hot-key combination.
7.Supports several common filesystems, including minix, Xenix, and all the common system V filesystems, and has an advanced filesystem of its own.
8.An extensive networking support.
9.Modulatiry: Loads only those modules that are needed by the system, even at runtime.
10 Easy to code: Almost all the resources are available free, so users and developers can learn form existing codes already contributed by the community.
Defining System Calls:-
The main interface between the Linux Kernel and the user space is a set of system calls. Normally the system provides a library or API such as glibc, that provides the wrapper functions for the system calls. Kernel services like file operations, networking operations inter-process communications, threads, memory mapping etc are provided by over 300 system calls.
At present the system call interface is stable and only new system calls can be added by the Kernel developers. The user space applications usually never make a system call directly but rather it uses the corresponding C library function.
Getting Linux Kernel Sources:-
The Linux kernel Sources are free and open source as it is distributed by the GNU General Public License v2, you can get the source as released by Linus Torvalds at
HTML:
https://www.kernel.org
There are various versions available namely Prepatch, Minline, Stable, Longterm depending on the maintainers and stability status.
Thought many of the chip vendors supply their own kernel sources as you already have seen in case of Google device kernels maintained and distributed by Google. There are many sub-communities that maintain their own kernel, with usually new features or specific features, and my be stable or unstable.
The Linux Kernel sources can be downloaded at
HTML:
https://kernel.org/pub/linux/kernel/{version}/{branch}
as a full tarballs and patches.
But you can also get the kernel using the git version control system. Detailed description of the git version control system can be found here -
HTML:
http://git-scm.com/
The Linux kernel size vary from 500Mb to around 1Gb but you can get the kernel as archive in gzip, bzip2, xz depending upon the compression rate. The Linux core is pretty small but it contains thousands of device drivers, network protocol, many architectures, filesystems, documentations, firmware, scripts etc, so the large size of the Linux kernel.
The Linux Kernel is implemented in C as like all the UNIX system. A little assembly language is also used, but no C++ is used in the Linux Kernel. All the codes are compiled by gcc and a few alternative compilers, but ANSI C compile cannot compile the Linux Kernel as gcc specific extensions are used in the kernel code.
The main feature of the Linux kernel is that it has to be standalone, which means no user space code or part can be used in the Linux Kernel. The user space is then implemented on the top of the Linux Kernel. The Linux Kernel has to supply its own library implementations, and no standard C library functions are used in the kernel. But it provides its own similar C library.
The Linux Kernel is designed to be portable, and the kernel provides macros and functions to abstract the architecture specific details. The Linux Kernel never uses floating point unit as some of the architecture may not be compatible with it. The internal kernel API is not stable and can undergo changes between releases and so if you have to use the API then keep track of all the API available for the specific kernel release. An out-of-the tree compiled driver for a older version of the kernel may not work on the recent ones. Though the kernel to user space API does not change as it may break the existing scripts and program running in the user space.
GPL licensing and open source drivers:-
As mentioned earlier the Linux Kernel is licensed under the GNU General Public License version 2, which gives you the right to study, use, modify and share it without any cost. However it states that if the code is redistributed or shared modified or unmodified then it will be under the same license. More information about the GPLv2 can be found at -
HTML:
http://www.gnu.org/licenses/gpl-2.0.html
Thought there are a lot of propriety drivers that are available for different hardware. You cannot distribute a binary kernel that includes statistically compiled propriety drivers. Most of the common form of the propriety drivers can be found in the case of graphics cards, though open source drivers are also available for the same.
The main advantage of GPL licensed drivers is that you do not have to write the whole driver from scratch and you can reuse the code for similar free software. The GPL licensed drivers can be easily distributed inside a compiled kernel for example a Linux distribution. Free community contribution, support, testing can be attained. And the code becomes much more stable as many people review the code and contribute to it. Many device driver codes are also implemented in the user space. This is possible as the Linux Kernel provides a mechanism that allows the user space application to access the hardware directly. Certain drivers are handled partly in kernel space and partly in user space.
The user space drivers have a lot of advantages as you need no kernel coding skills to write a user space driver. User space drivers can be written in any language and they can even be kept propriety. The driver code can be killed and debugged without crashing the kernel, and moreover it can be swapped out for a much stable version without changing the kernel.
Part II
Part II
Overview Linux Kernel Source:-
The Linux Source structure is defined in this section. The directories give here are at the top level of the Linux source tree.
Makefile
This is the top level Makefile for the whole source tree. It defines a lot of useful variable and rules, such as the default gcc compilation flag. Here also we set the architecture and the version.
Documentation/
This directory contains a lot of useful information about configuring the kernel and all the help items. The help entries corresponding to the different configuration cannot be found here. They are located in the Kconfig files in each source directory. If you are starting out this folder you should now miss.
arch/
All the architecture corresponding codes are in this directory. Each architecture has its own directory underneath this directory. Some of the important sub-directories are -
Code:
arch/<ARCH>/mach-<machine>
machine/board specific code
Code:
arch/<ARCH>/include/asm
architecture specific headers
Code:
arch/<ARCH>boot/dts
Device tree architecture
block/
Block layer code
COPYING
This contains the license(GNU GPLv2)
CREDITS
This contains the main contributors are mentioned here.
crypto/
This is the cryptographic API for the use by the kernel itself
drivers/
In this directory we find all the device drivers of the peripheral devices. Only sound device driver is not located here.
firmware/
Firmware images extracted from old drivers are located here.
fs/
This directory contains the generic filesystem code, known as Virtual File System and also the code for each different filesystem are found in this directory. If you are on a Linux distribution, the root filesystem is probably ext4 filesystem. The code to read the ext4 filesystem can be found in
Code:
fs/ext4
.
include/
This directory contains all the kernel headers. During compilation a symbolic link from the asm-<ARCH> is created so the
Code:
#include <asm/file.h>
will get proper file for that architecture. There are other non-architectural specific header file.
init/
This directory contains the files main.c and version.c and code for creating an “early userspace”. The version.c defines the Linux version string.
ipc/
IPC stands for inter process communication. It contains the code for shared memory and other forms of process communications.
Kbuild
Part of the kernel build system.
kernel/
It contains the general kernel level code.
lib/
Routines of generic usefulness to all kernel code are here.
mm/
High level memory management codes are found here. Virtual memory(VM) implementation and early boot memory management are done here, as well as memory mapping of files, management of paging cache, memory allocation are done here.
net/
The high-level networking code is here. The low-level networking driver pass received packets up to and get get packets to send from this level, then it passes the data to the main application.
scripts/
This directory contains scripts that are useful in building the kernel, but does not include any code that is incorporated into the kernel itself.
sound/
Drivers for sound cards and other sound related code is placed here.
usr/
This directory contains code that builds a cpio-format archive containing a root filesystem image, which will be used for early user space.
tools/
Code for various user space tools
security/
Code for different Linux security models can be found here.
samples/
Sample codes
Hi,
i`m trying to develop simple ubuntu application. This application should connect to remove mysql server, query and display data in UbuntuListView. Project was created in Qt Creator 3.1.1 as QML app with c++ plugin (cmake).
In my cpp class, i connect to mysql server using QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL"); according to qt documentation.
On my desktop (ubuntu 14.04) application works fine (after installing libqt5sql5-mysql), but when i tried to run this application on my aquaris E4.5 ubuntu edition (using Framework ubuntu-sdk-14.10) i got this error:
QSqlDatabase: QMYSQL driver not loaded
QSqlDatabase: available drivers: QSQLITE
Open database: false
I have found package libqt5sql5-mysql 5.3.0+dfsg-2ubuntu9 (armhf binary) for utopic unicorn. In qt creator, under Tools->Options->Ubuntu, I clicked on Maintain button in Framework ubuntu-sdk-14.10 and install that package. But this didn`t solve my problem.
Do yo have any ideas ?
If you want to include said libaries, you need to ship them as .so files in your click package. Don't ask me how to do it (I don't know in this specific case), but simply installing it in your chroot won't work.
I have a specific client request where there is a custom carried board which is controlled by a iMX8 SOM. On this board there is installed the Android system because there are specific Android applications (Java and Kotlin) which need to be run. I need to create a background service which controls specific IO peripherals (I2C, GPIOs, UART, etc...).
I suppose that in order to make a background (using the board IO peripherals) service which runs at the start of the Android OS system is to develop a C/C++ application (CMake based project) which will be cross compiled using a toolchain for the iMX8 and will be started at system boot through the "init.rc" script, right? Have you any available guide/material for such purpose so that I can begin with the best-practice solution?
I already tried using Android NDK, but I have "permission denied" errors also when installing the app in the "system/priv-app" folder (with the correct permissions).
Which is the correct way to approach this kind of project? Thank you.