How to obtain admin rights android app - java

I'm developing an app for only one run, it picks some files and when this process is finnished I would like uninstall the app automactlly.
I was reading about that and without admin rights is not possible.
How can I obtain this admin Rights?
It's possible download an admin rights app from PLay Store?
Greetens

I was reading about that and without admin rights is not possible.
You would need to have root privileges to "uninstall the app automactlly".
How can I obtain this admin Rights?
You are welcome to try to root your device. This is off-topic for StackOverflow. But, there are many sites on the Internet, and one may have instructions for rooting your particular device. Of course, it would be simpler for you to just uninstall the app from your device manually.

Related

How do I build my apk as a system app on Windows?

I have seen many guides online for how to do this, but they are all assuming a linux environment. I am developing using Android Studio on Windows, and am having trouble following these guides. Specifically, I do not know where to find the platform.pk8 and platform.x509​.pem files required for making my keys. The guides all say they are located in build/target/product/security, but I assume this is the corresponding linux directory. Where can I find these files on my windows device?
To have a system app in Android OS you need to sign your APK by the same key which the OS is signed. These key in the Android open source project can find in
build/target/product/security
But each company has got its own key and you cannot access to those key!
You can build your own Android image and load it your own development bard which probably is not easy. Then you have a system key. you can find useful information here
But the main reason if being a system app is to have the privileges of a system app.
What are those privileges? granting all permission and have access to the restricted area and secure setting for example.
So there is another possible way to be a system app.
If you can push(copy) your APK to /system/priv-app/ folder, then Android will grant all system privileges to your app automatically. (to all application in /system/priv-app/ folder not just to your app) .
How you can push your file into /system/priv-app/?
When you have Android Studio probably you can run adb. you can find some information here
You can connect to your android device using adb and through your local network
adb connect deviceip:port
port by default is 5555 and you don't have normal type it.
For connecting to an Android device the device should in developer option. you can find some useful information here
when you connected to your device you check if your device is rooted and the system folder is mountable or not.
/System/ folder is protected by AVB and furthermore, you need to be a root user, so you use the following command
adb root
adb remount
if your device is rooted you can easily push your APK to system folder and have all privileges of a system app.
adb push <yourPackagePath> /system/priv-app/youtPackage/yourPackage.apk
if your device is not rooted you should search for how you can root your device

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.

How to disable the "uninstall" button in Android?

In Android some system applications cannot be uninstalled.
Is there any way to configure an application so that it cannot be uninstalled by the user?
I want to hide the uninstall button in app settings, like a system app such as this:
Not really - the only way to achieve this would be to create a custom ROM. The uninstallable apps are "system apps", or apps installed by default. Often, those are unneeded apps added there by the mobile network or the phone producer. Even those can be uninstalled though when you root your phone :)
Your app can disable the Uninstall button by requesting Device Administration permission from the user.
The user cannot uninstall until they remove the Device Administration permission in Settings. In this case your app's DeviceAdminReceiver will be called, giving your app a chance to react.
http://developer.android.com/guide/topics/admin/device-admin.html
I guess you're mainly looking for a technical solution. But as there is no purely technical solution for a wider audience, you might be open for alternatives:
The phone manufacturer and the telecom provider have means to pre-install apps on a phone that cannot be uninstalled. So one way would be to get in contact with them and see if one of them is willing to cooperate with you. You'll probably need to offer them something in return.

Installing Teamviewer silently on android device from a remote location using 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.

Restrict user to delete Android Application

i want to make such an application that user is not allowed to uninstall it. As our company is going to launch our own android phone and my application is going to preinstall in it..so that user wont be able to delete or uninstall it.
can anyone tell me how to achieve such a functionlity...?
If your company is going to launch its own android phone, put your application in the android source, like the other native applications (Settings, Gallery, etc). Also, modify the source, so that in Settings --> Manage Applications there is no entry for your application. If you install your application on a device by a installation manager or anything else then a user can uninstall your application. (You can't prevent this).

Categories

Resources