Loading APK into tablet - android

I have an application that needs to run in Android 2.1 tablet.
1) is there a location I can place the apk where it will automatically be picked by the system installer?
2) How do I bring up the system installer to install the application? Where do I find this application
in Android 2.1 device.
3) How do I tell the system installer where the file is located?
4) I have been told You have to activate "Settings" -> "Applications" -> "Unknown source" but I don't see goto settings application, Manage Applications and I don't see this option Unknown Source. Is this needed and if so where is it?

1) is there a location I can place the apk where it will automatically be picked by the system installer?
No.
2) How do I bring up the system installer to install the application? Where do I find this application in Android 2.1 device.
There is no end-user "system installer" application that is launchable in the manner you seek. Neither iOS nor Android have the old Windows Mobile concept of "here's a .CAB file, please install it".
3) How do I tell the system installer where the file is located?
In code, you call startActivity() on an ACTION_VIEW Intent that has the proper MIME type and a Uri pointing to the file in question.
As a user, you download Astro File Manager or a similar utility from the Android Market and use that.
Is this needed
Yes.
and if so where is it?
Right where you are looking. If it is not there, then the device manufacturer -- possibly at the request of the carrier -- has disabled that option. It is possible that it is configured to be always on, so you are welcome to try installing something. However, if this is an AT&T device, for example, they force device manufacturers to disable this option.
All devices that legitimately have the Android Market allow installation of APKs over USB, either using the Android SDK (which you presumably have) or apps like the "Sideload Wonder Machine".

What tablet are you running? Some (like the Nook Color) have very limited settings and can only be used for adb purposes once rooted. Typically what you have to do is either upload your .apk onto the web, download it using the browser and install it from your Downloads section, or, if you have the Android Debugging Bridge installed, do:
adb devices
adb install my_app.apk
The first line should return:
Your_tablet's_serial_number device
and the second line should say success.

Related

How to create Apps in android which can't be uninstalled? Can we make System apps?

We are providing one default app for our customers with android phone. Which user can not be uninstall. I have used Device Admin feature from this example But user can delete app by deactivate from settings.
Another possible way I have found to install app in System/apps folder like all google apps (I am not sure).
For that I need to root access, so I am planning to do following, But not sure how to implement it.
Programatically Root device
Install app in System/apps folder
Unroot device again
Like many System apps, How they are doing for such kind of feature ?
Please help.
I made custom Launcher, which can't be uninstalled.
Important: root the phone
install application as system application (install into /system/app) from recovery mode.
Optional: subscribe for package removal, check if user tries to delete your app - and don't allow him to do this action (close package removal activity)
I made archive, which can be installed from recovery mode. Also my Launcher requires custom Superuser application (I don't want see notifications from Superuser app, when my Launcher runs root commands - silently give root access to my Launcher).
What I have in result: Launcher application, installed as system app (can't be removed). Also I blocked other launchers installation, added white list of allowed applications (don't install applications, which can manage file system and modify something important).
This solution full of tricks, but it's easier to implement than custom ROM.
If you customize the ROM, and install it to device somehow (contact device manufacturer from China for ex., request target device drivers and build the ROM on device), you can sign your application with system key, place it with other system apps, and then it can't be removed. In this case root not needed, but it requires much more time and power to implement.
If you will root device programmatically, than you should have exploit, which makes rooting. And different devices are rooted differently.
It's simple there is something like Device Administrator but please note that user will be prompted to enable admin mode on installed app.
HERE you can find quite good example description and tutorial - please try.

Android: Fast way to "test" app

i m starting (or at least trying to) developing android application(s) and I m using eclipse for it along the android sdk.
Now I m wondering if there's a faster way to "test" and tryout something newly writen in the code than starting it in the emulator?
I'm wondering because I m running on 8gb ram and q9550 (quadcore) and it takes some time (let's say 20secs) to upload and start the apk and now
I'm wondering if this really is the only way to test since it requires huge amount of time, especially when I'm trying something new which doesn't work and thus I'm always gotta run it like this let's say like 20 times until I figure out what's wrong with my code...
You can connect your android phone using USB debugging mode and debug your code. If you can't do that, you can export an apk file (which is quick) and use dropbox/gmail to send it to your phone. I am not a big fan of emulator :)
Here's how to enable usb debugging
http://www.groovypost.com/howto/mobile/how-to-enable-usb-debugging-android-phone/
I would recommend running on your device rather than the emulator.
http://developer.android.com/tools/device.html
In short:
Turn on "USB Debugging" on your device.
On the device, go to Settings > Applications > Development and enable USB debugging (on an Android 4.0 device, the setting is located in Settings > Developer options).
Set up your system to detect your device.
If you're developing on Windows, you need to install a USB driver for adb. For an installation guide and links to OEM drivers, see the OEM USB Drivers document.
If you're developing on Mac OS X, it just works. Skip this step.
If you're developing on Ubuntu Linux, there is a detailed guide in the link above.
Now in eclipse, your device should be available to run on.
In the eclipse toolkit, you have the option to run it directly on a device. It's rather quick to do so.
Enable USB debugging as well as installation of apk from sources other than the market. Then assuming you have already setup the required drivers/settings to connect to your phone via ADB, you should be able to run it on the device and debug. In the run dialog, it will list all available devices and you can simply select the one you want to use.
If you already have a run entry (i.e. you've already run your application),
select your project
click Run -> Run Configuration
You should be in your application run configuration (on the left under Android Application -> Your_App).
In the Target tab, you should be able to select your device. It will likely already be in "Automatically pick compatible device...". On my setup, it will run directly on my phone if it's the only available device. You can select Always prompt to pick device which will let you choose every time.
Eclipse plugin (ADT) information: http://developer.android.com/tools/help/adt.html
Information about setting up your device: http://developer.android.com/tools/device.html
I know android emulator is too slow.
You can either use device or
try bluestacks it saves lots of time.
User device only when you want to test your app for particular device.
Here is what you are looking for :
http://developer.android.com/tools/device.html
To summarize:
Plug your phone to your computer with a USB cable.
Make sure the drivers are installed and your phone properly connected.
Make a Ctrl + F11 from eclipse.
It will build the apk, transfer it to your phone and then launch it automatically.
If you have unit tests, Robolectric lets you run them without using the emulator or the device.
you can download bluestacks as emulator, as it is really fast.
after then make settings in eclipse as window->preferences->android->build -> then uncheck the 3rd checkbox written as "skip packaging and...", then apply and restart the eclipse to take effect.
now open the bluestacks in background and just double click the apk file in bin folder of eclipse and bluestack will install it in 2 to 3 secs and you can directly see the result.
NOTE here that you have to only save the file ,you working on in eclipse and only double click on apk, and result will directly appears to bluestacks. Without uninstalling and reinstalling apk in bluestacks.
and you can delete your apk also, it automatically immediately create
a fresh version of apk (thus not required) as soon as you save all your files apk will be updated.
Google BlueStacks.
It runs on Windows and it's really fast.

Archos 43 Startup Wizard 3rd Party Apps Install

I contacted Archos and they said they don't give developer support because they use straight Android, so I am posting this question here. If someone knows of a better place, please let me know.
The company I work for is reselling the Archos 4.3 as a platform for our product. We have several APKs that we are installing in our production facility. I have some questions about different ways to do this. Can someone point me to a forum or maybe here is the place that can answer some specific questions about the Startup Wizard that can install 3rd party apps?
Our process is currently:
Connect Archos to PC
Touch screen calibration
Skip wizard
Mount as a drive on PC
Copy files to the .system/APK folder
Go to settings / recovery and turn on the startup wizard to run again
Reboot device
touch screen calibration (again)
Perform wizard including installing 3rd party apps
Now we are ready to ship
The problem is that his process takes a long time. We would like to shorten it. We did originally plan on using ADB to install our applications, but that was very unreliable. Sometimes ADB would get mixed up and we had to reboot the computer. Keep in mind we are making about 100 per day. ADB was really made for developers to debug and test and doesn't seem to be a real hardened production tool.
If we could change our process to be this:
Connect Archos to PC
Touch screen calibration
Complete wizard
Mount as drive on PC
Copy files to .system/APK
and here is the change if someone can tell me how to do it:
Just run the part of the wizard that installs 3rd party apps
Then we would be done. This would save us the reboot and having to do the touch screen calibration over again.
Does anyone know how to trigger just the process that the startup wizard uses to install 3rd party apps from the .system/apk folder?
I tried writing my own app that installs the APKs, but it makes you go through the UI of approving each app and installing them manually and that takes longer than the startup wizard. The startup wizard is somehow able to install everything in the .system/APK folder without asking the user to go through and approve each one. It assumes that since the user ran the wizard and said yes that they approve. It just shows a toast window that iterates through all of the APKs. There is also a .txt file for each APK that contains the work "shortcut" or "noshortcut" that puts a shortcut or doesn't on the home page.
Thanks....
What do you mean "part of the wizard that installs apps from the .system/apk folder"? There is no such part of that in the standard setup wizard. The closest thing I can think of is at the end of setup when you have configured your account, the restore of your installed apps from an older device. I'm also not sure what you mean by a ".system/apk" folder. Do you mean /system/app? If so, any .apks in there are automatically scanned and "installed" during the early boot of the device, well before setup wizard.
In general, currently Android is intended to be customized by building system images that are installed on devices. There are no facilities in the standard platform for automatically configuring a device without doing that by flashing an updated system image.
The stuff you are talking about installing from a .system/APK folder doesn't sound like anything that is in the standard platform. The only ways to install apps in the standard platform are through the app installer UI, through the shell with "adb install", and of course if you have the Google apps through the Market app. Manufacturers can certainly add their own customizations for installing apps other ways, though.

Install .apk without User action

I have one requirement of installing the apk without user intervention.
I know there is very straight forward way to install the apk programmatically but that requires the user action. I want the way where user action is not required and that will happen in background.
It is required because the user will have mandatory to install the apk.
I think there is no easy way to do this and it may require to write the own apk installer or some firmware.
Please share if you have some pointers on how to start with this.
Thanks in advance.
If you want to install apk without user Interaction than plug Your Mobile Cable with the computer & than run your code in the sdk AS & when the project install on the emmulator it will automatically install on the Devise also Try this.
Your only realistic option to actually do this on the device is to become your own android device distributor and flash devices with a custom(ized) system image where the "mandatory" apk is installed on the system partition - the way carriers do with their assorted non-removable built-in apps.

Does Developing Android Applications require a Rooted Device?

I am looking generally in to Android development.
I keep seeing information on root however I am unclear how this relates to general android app development.
I understand that there is an emulator however when I get to actually test the software on a phone does that phone have to be a rooted device or is this only required if you wish to edit the core features of the os?
Finally are there are any development disadvantages to rooting the device such as that is no longer behaves like other android phones I may deploy too?
Thank you
You don't need root to develop for Android.
The easiest setup is to run Eclipse with the Android Development Tools installed. Then, you can debug your application in the emulator, or register your phone with the SDK and debug directly on your phone. The only thing you need to do on your phone is check the development mode under Settings -> Applications
I can understand the allure of having a rooted device, but I can't really see a reason for changing the bootloader or os binaries. You can, however, change most of the default applications (including the Home application) with other applications available on the Market. For instance, OpenHome is about $5 and allows you to replace the home app, add themes, and replace many of the core apps (e.g. clock).
Rooting is only required, if you want to play around with advanced features or update your firmware, etc.
If you develop your software using the Android SDK you will be able to use it on your phone regularly (as long as you have the corresponding version). No rooting needed.
I have never heard of any problems according to your concerns. But I cannot deny that there are none. Though I personally don't expect that there are any problems with rooted phones.
On the Nexus S running Android 2.3, the /data folder is not visible in the DDMS File Explorer or the ADB shell, but it is visible in the emulator. This occurred with debug turned on in both the manifest and on the phone. I confirmed that debug mode was properly enabled by successfully stepping through the app using breakpoints and also by receiving messages from logcat.
Not being able to see the /data folder means that you will not be able to get your application's private data.

Categories

Resources