I have already created the default Android system images (like userdata.img, system.img, ramdisk.img) by following the instructions at Android page.
What I would like to create is customized Android system images from AOSP(by removing the apps & their code-dependencies, which are unnecessary for my target board, like the e-mail, browser) & run it on my target board so as to reduce the foot-print of the resulting system images & also speed-up the boot-up time of the target board.
Any pointers to do above mentioned customizations are welcome.
Edit this Makefile: build/target/product/generic.mk and remove the packages from the list. I won't bother going into how to compile, etc. Please note that doing this will not remove the code dependencies of the packages (you'll have to modify API in dalvik/ or frameworks/ which could get hairy), but it will eliminate the packages that are incorporated in the system image.
Related
I have a standard aplication. It uses resources - PNGs that are when programming in the DRAWABLE folder. They build up menus, buttons etc etc. ... Classic application nothing special.
And what I need to have is - "theme" support. Lets say I use this PNGs in my app:
menubutton.png
scrollbotton.png
arrwo.png
and these are in the DRAWABLE folder.
And I would like to be able to change the THEME of the app by changing this PNGs for different ones. Lets say I have PNG's with same names, but under a different url:
.../template1/menubutton.png
.../template1/scrollbotton.png
.../template1/arrwo.png
and than I have a another "template"
.../template2/menubutton.png
.../template2/scrollbotton.png
.../template2/arrwo.png
IMPORTANT: Of course all the PNGs have exactly same size, and name
So and the app shall have the functionality to download this PNGs and replace the ones that are currently in use. The important point is that the additonal PNGs from different templates HAVE to be availiable online - I dont want to ship the app with many templates that would not be used.
Can you please confirm this can be done and that it should not be a problem?
The Drawable resources are packaged in to the application and cannot be modified. You idea of using an SD card will work (or you can use the applications sandboxed directory), you just need to manually load the png resources (ex. myImageView.setBackgroundBitmap(...); [pseudo-code]).
As a note: If I ever open an application that immediately tells me to wait since it is downloading resources, I will force-close it and uninstall. Applications on Android, iOS, Windows, etc. should work right away without the need to download more resources. If you want a default "theme" then package it with the app, don't make the user download it (which will cause problems if the user is on mobile networks or doesn't have an internet connection when they open the app)
How to change Android emulator booting animation
The emulator uses an Android OS image to boot. You can't change this without changing the image. This isn't emulator specific, but for Android in general.
For more information on how to do that, you might look here, or just google "android change boot animation".
Once you have a new system image, run emulator -help-disk-images from your sdk/tools folder to see a ton of useful info about using disk images with your emulator. It tells you where to put the file, which differs depending on whether you're using the standard SDK or not.
That is not a string, it is a bootanimation. You can't set it to another text. You can change it so it is another animation though.
If you want to see other possible boot animations, google android boot animations.
For some reason, this is what most of my students and trainee ask about in every customization class.
The answer for that is - Of course you can modify that image .
To make a long story short:
You can actually do it for every device by storing a noncompressed zip file at /data/local/bootanimation.zip (just copy from CyanoGenMod and make sense of the animation layout and timing - that's the easiest way, and it explains much better than any explaination).
As I wrote in some other StackOverflow post, there are a couple of places you can do that (I disregard the encrypted case for the sake of simplicity):
system/media and /data/local/ .
The latter is preferable as it makes it easier to modify, and does not require the tedious
modification of the system.img (system partition) size.
Note that bootanimation.zip should be lowercase, and -0 compressed.
That is argueably the easiest Android customization (Well, if you have good graphic designers...)
That's not part of your application, is emulating an device. Remember that each android device have it's own Start up images and icons that can be related to the carrier or the brand of the phone, etc.
You cannot change that image, anyhow for what propose you want to change that?
Place a animation file in location /system/media/bootanimation.zip to override boot animation.
If you google around, you will find lot of tools to help you create boot animation (even from videos).
I've created an app which pulls data from a JSON file and displays it.
Now that app is specific for one sports team. I want to create the same app for 10 other teams.
Plus there will be an accompanying pro version of the app.
I'll be doing the same thing for the iOS version.
The only difference between the apps will be colors, logos and url of the data source.
I wanted to know if there was a better way to create apps. Instead of individually creating 40 different projects.
It will help me in updating the app as opposed to copy pasting the same code 40X.
Are there any special features available in eclipse and xcode to do that?
Thanks
I would simply swap out the resources for each team and rebuild the app.
For example, with Android, maintain an AndroidManifest.xml and a res/ subdirectory tree for each team. When it is time to build, simply copy over the resources into the project, overwriting the previous team.
I don't know of any existing tool to do this automatically, however.
Have you looked into using PhoneGap and just create a "mobile site" that detects the app that is connecting and adjusts the data/styles accordingly.
There's always the possibility of creating ONE app allowing the user to set the team preference upon first load, and swapping out resources programmatically.
With Titanium Studio you can write code using Javascript and it convert your code in native objective-c code, native android code, native html 5 code and soon also in windows phone code. It`s the best free cross platform IDE
Upon reviewing your responses, you seem to want a strategy to manage your resources. Since different OS has different resource requirements (screen-size, iOS 2x png for example). The most common strategy is to keep a separate resource structure and setup build target to copy/xcopy replace these image resources before build. Source control + an OSX build server would be most beneficial.
After creating these apps I've found the following way to be the most easiest way to create a similar app.
Android:
1. Select the project from the project explorer sidebar copy it and then paste it. Give it a new name.
Select the new project and then right click > Android Tools > Change Package Name.
Give it a new package name. Eclipse will give you an option to refactor the code, say yes.
Go to res/values and change all strings.
Change the icons and other images.
Go to src click the package and then refactor it. Give it the new package name.
Go to manifest file and rename any old names which might still be lingering.
I am programming an android application and I'd like to use the system icons for mail, phone, calendar and contacts inside this application. The problem is, that these icons differ from system to system (different android versions and different smartphones) and I want to keep the application and the system consistent. Is there an easy way to achieve this?
In XML use default android drawables from #android:drawable/... and in code use android.R.drawable....
You can use the standard drawable using
#android:drawable/[icon_name] in your xml file
android.R.drawable.[icon_name] in your java code
You can see different icon in your file system in
[SDK PATH]/platforms/platforms/[ANDROID_VERSION]/data/res
Some images are standard...like contacts, calendar :)
You can't keep system consistent. For what? New versions of Android are usually prettier than older ones (well, it's my opinion).
The only way to keep system icons same for your app - copy them into your drawables instead of using direct reference to them (like #android:drawable/).
First of all if you intend to use the default images (icons) for mail , phonr etc.
This default can be used as android.R.drawable.name in code or #android:drawable/ in xml from http://docs.since2006.com/android/2.1-drawables.php
But as this will vary from OS versinos to Versions.
So , if you need to use an unique GUI for the app for all versions and devices.
Please do not use android provided images , simply use your own graphics or images supplied in drawables resources explicitly by you for your app.
If you're ok with icons from each system you can get it via PackageManager and getApplicationInfo method.
If you're not, you should copy the resources from the platform into your own application.
While the compilation of Android source we can see an image file named persist.img being created. What is it and for what is it used?
persist.img is "persist" which contains data which shouldn't be changed after the device shipped, for example: calibration data of chips(wifi, bt, camera, etc.), certificates and other security related files. For sure even it's "persist" you still can replace it via fastboot, or change things if the devices is rooted, take it for your own risks
It's part of the Android build along with system.img, userdata.img, tombstones.img, recovery.img, etc.
You would alter it if you wanted to modify the build.