I want to add a custom OTA application to AOSP Settings placed in packages/apps/settings to manage updates in client side. I need to know how I can do this technically. If you know any opensource project or technical example, please refer to them.
I know how it is technically must be done, but I need a few live codes to learn it in practice.
I found the Updater package in Lineage OS project, and found it interesting. Anyone who wants to learn more about embedded OTA packages, is recommended to take a look at this package.
https://github.com/LineageOS/android_packages_apps_Updater
It can be easily integrated with AOSP project and has a standard structure of code.
Related
Ok, it's clear by question heading that I want to create android apps with HTML,CSS and JS. I know them very well and I just don't want to use SDK it's bulky, hard to understand and not User friendly just like other google products.
I have read this and many more articles but they lack when someone asks:
Can I Do it without that SDK?
So whilst you can easily code your entire project just using notepad,
compilation will need the Android SDK.
I just want to do it online or by installing a less bulky software that just packs my app in apk (like a zip). I know it's too much but if someone know how to do this exactly.
I'm pretty sure you need to use some Java to give your Android app functionality. JavaScript might work, but it depends on what exactly you want to do.
You also need other SDK tools to create APK packages. You could build your own tools to do that, since APKs aren't black magic (fortunately), but it would be tedious, cumbersome and fragile.
It's a lot easier to use an SDK to me.
Okay, here's where I'm at. I used Eclipse to import the code for the SMS/MMS app that is on Android devices. The code on GitHub is at https://github.com/android/platform_packages_apps_mms.git. I used the Import -> Git in Eclipse. Got the code into the environment. Had to manually paste the AndroidManifest.xml file into the project, and also copy over source and resource directories.
Basically, I want to get the Eclipse project to a point where I can run it on my device and it behaves JUST like the built-in app. THEN, I can modify it for my specific needs hopefully. I don't want to have to write all the SMS/MMS functionality from scratch if I can avoid it.
NOW, the problem is: A LOT of unresolveds. I keep reading various places where people are saying that some of the packages aren't REALLY in the SDK and are internal... Why the heck call it an "open source platform" when the source isn't available for the built-in apps that Google provides?! (If this is in fact the case). Further, why would they provide the code on GitHub for the MMS app if in fact not all the code is available and you can't compile it? Seems a little ridiculous to me.
I have read some answers to previous posts where I was just sticking my "toes into the water" so to speak, and people are saying that a lot of these packages are part of the firmware? Seems like there should be some base code for a texting/mms app out there somewhere.
Anyone know of any? (Open source, free, SMS/MMS Android code that I can easily obtain and that don't suck, if in fact I can't use Google's code?)
Thanks,
John
Mms as well as other system apps use private or hidden APIs that are not available through the SDK.
This has nothing to do with not being an open source platform, as you mentioned, but with the fact that you are trying to build the application in a way that is not supported and nobody says it was.
If you want to modify and build Mms, do it as part of the firmware build, using make, not importing the project to be built by the SDK in Eclipse.
The stock MMS app built into a device's original firmware, signed with a private key, and is able to use some private API.
Third party apps can't use the private API for various reasons, one being security. All the source is open if you wish to view it.
You can definitely build your own firmware, or ROM, as some call it, and run your own modified MMS app on it.
I don't know if you can make and install your own MMS app. You can find out by looking through the Play Store for similar apps or looking at the Android developer documentation to see what permissions and API are provided to third party apps.
Okay, here's the situation:
I'm developing an application for a client (or trying to do so). It requires much (if not all) of the same functionality as the built-in SMS/MMS application. So, I thought - HEY! Android is open source right? I can take the application and modify to my needs, right?
So, I found the code on github for the MMS/SMS application (for some reason, based on the AndroidManifest file, it calls my project I built, "ConversationList"). But I get TONS of errors involving the import com.google.android.mms.* package and a couple other packages.
Everyone keeps saying "it's a private/internal package", and "download the entire AOSP". But, HOW do I do this on Windows, and WHY can't I just download the appropriate packages to use in the program?
ALL I want to do is build a project in Eclipse deploy it to my phone, and then modify the necessary code. If Android is open source, why so many secret/internal packages? This is frustrating.
Any advice?
So, I found the code on github for the MMS/SMS application (for some reason, based on the AndroidManifest file, it calls my project I built, "ConversationList"). But I get TONS of errors involving the import com.google.android.mms.* package and a couple other packages.
AOSP applications like this are designed to be built as part of a firmware image, not as standalone apps.
But, HOW do I do this on Windows
Most likely, you don't. Cygwin might work. More likely, you will need to use OS X or Linux, such as running Linux in VirtualBox. And the result of your build will not run on anything, except as part of a firmware build that you use to replace the firmware on a device.
WHY can't I just download the appropriate packages to use in the program?
Because that application is designed to be built as part of a firmware image, not as a standalone app.
ALL I want to do is build a project in Eclipse deploy it to my phone, and then modify the necessary code.
Then find a project that is designed to be built as a standalone app as your starting point. Or, work on modifying the project you are trying to use to work as a standalone app, by ripping out all the functionality that depends upon things that are not in the app itself.
If Android is open source, why so many secret/internal packages?
They are not "secret". They are part of the firmware.
For example -- since you appear to be familiar with Windows -- it is entirely possible that "apps" like Control Panel are not designed to be built independently from the Windows OS. If you were able to download the source code to Windows and tried to load Control Panel into Visual Studio, it is eminently possible that you could not create some standalone CPANEL.EXE file just via that one project. Rather, you would need to use a customized Windows OS build process to build the whole OS, which would then contain a CPANEL.EXE that would run within that built version of the OS.
Most of the AOSP apps work this way. Some have been forked to create standalone apps -- K-9 Mail came from the early version of the AOSP email app. I have no idea if anyone has done this with the stock AOSP Messaging app or not.
You could instead fork TextSecure[0] as it is no system application but looks very similar to the stock messaging application. The AOSP application needs to be installed on /system/app which requires root and might not be what your customer wants.
Please note that this application is copylefted (GPLv3) so you'd have to give your client access to the source code under the terms of the GPL if you fork.
[0] https://github.com/WhisperSystems/TextSecure
I want to modify the core applications like Settings.apk and install on my own android phone.I don't want to publish it on market. I have following doubts
Where can I get source code for core applications?
What are the things I need to do this?
Please tell me steps to do this.
You can get the source code here: https://android.googlesource.com
Keep in mind that the packages there might not be the ones on your phone as each vendor can provide a replacement of their own, the Camera for instance is almost never the google app.
You will also have to decide which version you want since each OS version has revisions that take advantage of newer API's etc.
As far as what you need pretty much the same thing you need to build android apps, eclipse, the sdk, tools etc. http://developer.android.com
You will of course have to remove the application from your phone before installing the new one since your signing certificate will not match. There can be difficulties when you swap out your own version so be sure to save the original.
I have 6 months experience with Android, developing simple UI-based applications. Now I want to write applications targeting the Android core Kernel. For example, I want to develop a framework which is not present in Android. To achieve that, we have to write the code for the Kernel. I don't know where and how to start Android Kernel programming.
If anybody knows the way to start it please help me.
xda-developersA very awesome and very active place for anything smart smart phone related.
kernelnewbies
Generally good resource for starting out learning linux kernel(Which is what the android is built off of)
Building Android KernelAndroid Kernel Source
Linux kernel Online guide to driver development among many other related topics.
Update
For android source code you can check out one of the following...
or this question
or source.android.com
I personally dig this chrome plugin for browsing android source code.
If you are talking about platform level programming,i.e. framework extensions, native libraries and services there are a few places to start.
The first one is the new and updated official open source project page. The portions about contributing and porting provide some basic information on the platform architecture and what you need to work with the platform. The next step is to understand the build system for the platform and framework. There are some limited info available on the net if you google for it. The best way is probably to study some of the makefile templates available in the open source project in the build folder. For info on how to add your own modules using Android.mk files it is a good thing to study make files for existing projects such as the ones available in external in the open source projects.
Once you have gotten as far as the above. That is you know the basics of platform level development and how to build your own modules for the platform the next step is to study the framework extension example available in the open source project. Check out the vendor/sample/PlatformLibrary folder (edit, as of 2.2 the vendor stuff has moved to the device folder) in the open source project and read the readme file, study the code, build it and make sure you understand it. If you don't then JNI, shared libraries, the platform security model and the core framework are areas that could help you out.
I guess that since you are talking about kernel programming you are also looking for ways to hook up new hardware with the platform and expose that functionality using your framework extensions to the applications. Hardware is basically added as a standard Linux driver so getting it to work under Linux is a good first step. How to hook it into the Android framework after that depends on what type of hardware it is. You could either use a native process to control it (compare the camera service or radio daemon in the current platform) or just spawn a thread in the application that uses your framework extension. For hardware that does not require that much attention plugging it in using an Android HAL library could also be an option.
I hope that provides some initial pointers on where to look. The official mailing lists are otherwise the main source of info about platform level development. Especially Android porting and Android platform.
You should also check out http://pdk.android.com. I just found this site recently and it is extremely useful. I wish I knew about it sooner. I'm not sure how dedicated Google is to updating the site because as BMB mentioned the vendor stuff was moved to the device folder in 2.2 but there have been no changes to the PDK site to reflect that. Also, some of the links don't work but I was able to find all the pages by doing a site search in Google.
The best and very first place to start would be Google’s documentation on android
https://source.android.com/docs/core/architecture/kernel
Then kernel building
https://source.android.com/docs/setup/build/building-kernels
Xda isn’t so great for kernel creation but is good for kernel modification and backporting. Mostly what they do there is provide newer versions of android to older phones rom modification and changing the battery animation in the boot.img
Google also goes over the development of new things for an existing kernel.
It’s best to start at the begining,
Personally I started at xda and went backwards which took WAY longer and just complicated my setup process.