Installing Teamviewer silently on android device from a remote location using java - java

I want to install the TeamViewer software automatically on client's android device remotely using java. I have researched about a number of third party tools for automatic installation of software but the problem is that each one of them needs user interaction/permission in one or the other way.
In my app I will disable the touch of the device after the user logs in and an animation will be displayed based on the real time data from the server. I want to install the software assuming that no user is present at the other end and no response should be needed to install teamviewer.(My app will not there be on Google play.)
I am very new to android development, but through my research I found that .exe file can not be installed on Android as its a Linux based OS.I was planning to keep the Application(.exe) file at server and then try to install it issuing some adb command from my code.
Can someone please tell me how is it possible? How should I proceed? Please help.
Thanks in advance for any help.

There are two way for installing an App on an Android device:
Via ADB. This requires Debugging to be enabled on the device, and the computer the Java program is executed on requires an USB connection to the device (and proper USB drivers) and the device must be "ADB-paired" with the computer if the device has at least Android 4.2. Furthermore you need ADB which is part of the Android SDK and therefore not present on a regular PC. You could ship a version of ADB with your program but ADB is platform specific (Windows, OSX, Linux, ..) therefore you would have to include multiple versions and select on.
Vis Google Play. Once the user is logged-in any app from the play store can be installed to the users's device via web interface. As the Google log-in credentials are required a user must be present to enter them.
Conclusion: What you want is nearly impossible, especially the "without user interaction" part.

You can't install a app from other app without user interactions, that would a big security problem.
The one app that can it is Google Play for obvious reasons.

Related

Android: how to install a downloaded application from our app similar to a playstore

I have an app which runs Web-View and it's sort of similar to play store. I can download applications with that to a specific folder but I'm not finding any method to install that app by itself by giving permissions of course.
similar to blackmart alpha or 9 apps etc.
You can Open an Intent to install the app on download Completed.
But results in a prompt which asks user to install or cancel.
Or
You can execute an adb shell command within your app to install the app silently but you would first have the user to toggle Usb debugging on their phones. But this may result your app to be one linked with security issues and Google Play Store may deal it as Vulnerable and marks it as a Virus.
So deal wisely.

Uninstall app from android device without permission

I developped launcher for an android MDM system. I control this mdm system with Api, so I need help to know how can uninstall/install app into device that use this mdm system in background and without the installer permission.
I also need to delete the apk file from android device storage after the install.
How can I do this programmatically in java?
Any one have solution?
For security purpose without the installer permission we cant install/unistall application in android.
It may require device rooted & make your app system. Read this for reference.
Note: this is not recomended if you want publish your app to playstore

How to make a system app in Android code

I'm trying to make a app that works like a parental control, but doing so, I got stuck in system app permissions, looking about it, I am not able to find anything that tells me that it is possible to do without using a specific ROM for my app. But in the Play Store, has a lot of apps that makes that. In my app, every time that I try to block connectivity, using ConnectivityManager, he gives me:
java.lang.SecurityException: Neither user 10228 nor current process has android.permission.MODIFY_PHONE_STATE.
And the permission is in the manifest. In the manifest, he gives me the error:
Permission is only granted to system apps.
So, I'm asking, how to make a system App in Android code without root the device?
how to make a app that it is a system app in Android code without root the device?
The closest thing to what you describe is for you to create your own custom Android ROM, where your app is pre-packaged as a system app, and convince people to install your ROM on their device, replacing their existing Android installation.
Otherwise, this is not possible. This should be obvious: if everyone could write an app that made themselves be a system app, there would be no value in having a distinction between regular apps and system apps.

How to run Java app in Android

Is it possible to run java app (jar) in my android application? Because I need to create PDF, the problem is if I generate PDF in android, only can show with small image, if it contains large image in many pages, it will be error. So I think, I can generate PDF in java and then included to android app.
Concernig the mentiones app JBED:
Well honestly, I could not find any credible source for this tools JBED, so I would really be very cautious (e.g. who is the developer?)
In the manifestfile (in Androidmanifest.xml, where every app has to state what rights it needs to run, see How to view AndroidManifest.xml from APK file?) there are many rights mentioned (what could be necessary, as the app wants to run as an emulator), so a java application might want to send an SMS, record audio, take pictures and place calls -- so the emulator would need those rights as well.
But then the app also registers the "android.intent.action.BOOT_COMPLETED" event (i.e. autostart after boot) and this would go against every description of the tool.
Ah yeah and giveaway: The apk has a folder "certs" that has some (root-)certificates. But those are not the real certificates of the authorities, e.g. Versign. If one installs the app and by that those certificates the trust you might have in https-connections is lost because those who made the fake certificates can create own, false certificates that your phone would trust.
I assume (or am pretty sure) this is a spy tool, but I could be wrong. The (rare) testimonials that claim the tool ran perfectly will probably be the same person that posted the tool under a different name.
Andreas
You can import java Third-party libraries into Android app, follow the steps here.
I am not sure whether it will work,but just try.
If your program is a console program, the answer is yes.
Install Jvdroid from Google play. Click terminal and then write this command: java -jar YourJarFileName.jar
The simplest way would be to some install terminal emulator and then install java and then you can run java apps on standard java. You can even install full Linux distro with x server without rooting the phone, then connect to it from x client and you have Linux desktop on android. Once I've even installed eclipse for java development on it and everything worked. I tested this setup last time in 2014, but I'm pretty sure you can do this nowadays as well. The app with Linux I get from play store as well app for the x client. The app I used back then was "Debian no ROOT" or smthg like this. You need to check what's currently available to make this setup in Google Play store according to your android version and your preferences. Last time I've checked there was a lot of different tools for this kind of task. Lastly I've even successfully installed TF and keras on my android phone using terminal emulator.
You can use JBED. JBED is an .apk Android application which run java games and app on your android Device. JBED is a java android emulator, by using
this application we can install .JAR/.JAD/Java/J2ME/MIDP app on android phones.
You can do it quite easily as there are many ways to run java apps on android. Specific application called Java Emulators can do it quite easily.
These are four most popular java emulators for android viz, JBED, PhoneME, Jblend and NetMite. These are arranged in order of their preference. You can use phoneme for non rooted device, however if your device is rooted try any of the remaining three applications.

How can I save my Android application so that the end-user can execute it without the Android SDK

I have recently started programming for the Android platform. I have a simple application which I would like to email to someone so that they can execute the application and check how it works.
I am currently using the Emulator in the Android SDK to execute my application but the person who I am emailing it to does not have Android SDK and it would be a mission to send the whole project folder.
Is there any way that I can send just one file such as an .exe or something that would allow the recipient to execute the application to see how it works.
Thanks so much for your help in advance guys
The "exe" for android is called apk. I suggest you to look at this question. You'll need to build the apk and sign it in order to be able to run it.
If you just want to send it to a user for testing purposes, you can enable the setting in the target android device to allow "unknown sources" (I don't know the proper english name, as I don't have an english android here at the moment). You can find this in the app settings.
In your development environment look for the apk file created by eclipse. Then connect your smartphone to the pc and copy the apk over. Start up a file manager and click on the apk and it will install just like any other app.
If you want to deploy it properly, you have to sign it and probably follow the procedures from google. Since I don't have a fully deployable app yet, I can't say what the procedures is for that, but the google site is very helpfull on all aspects about android programming.
Check the "bin" folder in your project path. There you will have a .apk that you can share with your clients.
If they execute it in an Android mobile phone the application will be installed.

Categories

Resources