I searched many solutions from web, like: using Magisk, using Xposed, FakeGPS, etc.
What I have tried is:
For FakeGPS, I install it as system app, enable developer mode and choose it as the GPU location provider. Result: no working, other apps still go through WIFI/GPS provider.
For Magisk, it requires installation through TWRP, but I am not allowed to rewrite recovery partition of my android phone. All I have is su command to get root access for system partition.
Any other solution that helps? I don't care how basic functionality the solution can support, as long as it really works for my case. I even accept the solution to dis-asm the critical library, change the value of Longitude/Latitude to hardcode values, re-compile and overwrite the corresponding library.
Mock GPS is an app you can you use with or without root.
Related
Currently, I am making an Android app which require Root privileges. Basically what it does is that it flashes a zip file via recovery[Custom Recovery's like TWRP,CWM]. The problem is that I don't know whether multiple Recovery's can be set up like Multi Rom on the same device. And if possible how do I find list of Recovery's that is installed on the device.
I am debugging an application on a rooted B&N Nook Glowlight. The app runs fine on a rooted B&N Nook SimpleTouch but crashes on the Glowlight.
It seems that the paths in use on the Glowlight have the wrong users assigned to them. How can I get a list of valid users on Android? On a standard *NIX I would just cat /etc/passwd but that file does not exist on this Android system.
I suspect that both devices are Android 2.1. If there is a command that will tell me this for sure, please let me know. The both devices are running Linux kernel 2.6.29 (armv71).
Edit: Note that I mean a list of system users, such as root, and app_12. This is how Unix traditionally handles separation of privileges, and I think is where the problem lies. I don't mean a list of Human user accounts. I'm looking for a CLI command, not an Android API call.
That's available via AccountManager.getAccounts(), if your app has the required permissions to view accounts at all.
From your description, it's possible your app is hardcoding a path that is correct for old Android versions, rather than using a newer, more correct way to get a file's path via Context.getFilesDir(). See http://developer.android.com/training/basics/data-storage/files.html .
I have been searching the internet wildly for an answer to this question.
We are creating custom android app for internal use only and we would be installing that on custom andoid devices. We would like to have full control of the device through the app. The end user of this device is not meant to use anything other than the app on this device. I have sealed out all the possibilities of getting out of the app except this one possibility where the program tries to update itself and asks for user permission.
Let me repeat again, This app is not meant to be put on market, only for use with custom devices designed for specific purpose. So security is not an issue here.
The device is rooted and we have done a lot of alterations with it. But I cant quite figure out how to make this update work.
If you have any ideas/solution please share it with me. I can do anything with my device, (even dig a hole in it if required :P) as they would be custom made, and would be packaged with us before going out. Just have to make it work.
If you are talking about internally installing the APK with like an update application specifically designed to update your other application which is not managed by Google Play you may want to look into this. So between xjaphx's answer and the link I just shared you will be able to install and maintain updates.
This is as simple as how it works.
Pre-condition:
Get devices rooted
Prepare Android development environment (Android SDK, platforms-tools)
A cable to connect PC and devices.
Steps:
Open command-line if Windows or shell if Linux
type: "adb push YourApp.apk /system/app"
That's done for installation of the app. Reboot and check whether your app works or not.
I have a rooted Android tablet. I've copied my native server application (Linux ARM ELF) to /data/tmp and it runs. There is only one thing missing: I want to launch the server when the tablet boots up. There are several circumstances, which makes the mission easier:
the device is already rooted, I can copy anything to it,
no installer required, the mission is completed, when the autostart is once set up,
my server program requires no settings, no files, no libs, no root right, nothing at all.
I don't wanna play with creating APK package, nor play with NDK. I am searching for the easiest way. It is OK, if there's different solution for different Android distros (I am insterested in current versions, 2.2 and 2.3).
Maybe I should use inittab? Anyway, I prefer "most official" solution, if we can talk "official" in case of a rooted device, let's say I'm looking for solution with "as less hack just as possible".
Update: I found this: http://www.androidenea.com/2009/08/init-process-and-initrc.html - I'll try it and close the question, if it's OK.
The easiest way is an APK. I believe you can create a service that launches on boot and then execute your ELF from there. Your APK can also provide a "configuration" app which lets you install/uninstall the ELF so all files can be cleaned up if the user removes the application APK.
The Settings on Android provides an option to add VPN manually.
Can this be done programmatically through some kind of an API?
I'm not looking for a way to connect to a VPN. I'm only concerned about configuring a VPN profile.
Please see this answer, it is not possible with the Android SDK.
This is not possible with Android SDK. However, some manufactures like
Motorola have their own flavor of android and in their SDK they have
made it possible.
See also this question -- Create VPN profile on Android. Briefly, we came to the conclusion that it's not only not possible with the Android SDK, but it's not possible even with a hacked SDK unless you have a rooted device (because the VPN profiles are stored via the system KeyStore, so you would need to be running as a system process to add / modify them).
However, there does appear to be a third-party VPN app that at least claims to do this without a rooted device, but it doesn't appear to be open-source and I can't vouch for it (see the comments here: http://code.google.com/p/android/issues/detail?id=8915).