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 .
Related
I am currently developing an AOSP ROM and I need to make a system app which is able to write data to CPU text files. The thing is I am able to do it while I have root access but the ROM needs to be flashed and provided to a non-root phone which should still be able to use that system app.
Could someone with prior experience please provide some guidance ?
In Jelly beans now you can add multiple user profile, i want this feature in my app but want to create/add multiple profile programmatically.
Is it possible?
Help me to get out of this.
Yes, this is possible, provided the device is rooted, and running only 4.1. Even then, it is an unofficial method that relies on executing terminal commands in a root shell.
I wrote the User Management app when this feature was originally discovered, and then later open sourced it in the interests of helping others. You can find the code on GitHub here.
Other than executing commands in a root shell, there is no method of achieving this AFAIK. The Android SDK does not provide any APIs for creating additional users.
We have made some changes in the "skia" library of Android OS (Froyo) and it works well in emulator.
It also worked when we pushed (replaced) the corresponding .so files in to a device.
Now we want to provide this service to the end users. Is it possible to make an application(apk) that people install to perform this task?
If not possible, then what is the best way we can provide the service to others?
If you have created a useful functionality that will be useful for a range of users you can submit your patch to Google code review (you can read how to do this here)
You cannot, unfortunately, unless
you are the device manufacturer (or Google)
you are developing a replacement system image, or target only rooted devices
I believe this would only be possible if the app has root access or you distributed a ROM to your users yourselves.
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.
(Sorry for my english)
I'm new using Android (in fact, I'm just testing android) and I have a lot of questions...
Well, let me explain you the situation. In this moment, in my job, I am writing my code with C# and run it on Windows Mobile 6, the apps are used to make sales, send bills, reserves, etc. The devices (iPAQ 216) are given to the salesmen, and they must use the apps and update them via internet.
Each salesman have a unique client list, unique data and (in some cases) an unique set of apps, which means that I need to prepare a different package for each salesman. Using a Microsoft tool (cabwiz) I can prepare automaticaly a different package for each one of the 150 salesmen. They download their specific package using a tool wirtten by me, and install it and everyone is very happy (maybe)...
Is that possible in Android? How? and if it is not possible, do you know an idea how to accomplish somewhat like that...?
It's not going to be as easy as cabwiz, I can tell you that. But it would be possible, theoretically, to write a script that modifies/generates the unique portions of the source and then compiles a new copy for each user.
If the only difference between the apps is the data on them, then there is no need to generate a different package for each user: have the app download the data from your server and save it after the app is installed. You could also make some modules (I can only guess what kind of functionality you're talking about with regards to different apps per user) only accessible to particular users.
Yes, it's possible however:
You may want to look into writing in java rather than C# as that's more officially supported on android
There are some limitations of the android APIs, in particular there are basic behaviors of the device that can't be altered - without rooting there's no equivalent to the "hook" functionality of windows.
Make sure you get devices with the menu option to enable installation of applications from 'unknown sources'; otherwise deployment will be a lot more difficult. At that moment, this amounts to avoiding AT&T, as their devices presently confine you to the android market or physical connection to a machine running the developer tools as distribution channels. (As a work around you can upload your apps to the market and not publish them, though that won't fully keep them private unless you also include something to require authorization when they run. You could also install the minimal set of dev tools on the salesmens' laptops)
You will probably want to learn about the command-line application build tools and scripting in order to generate a custom apk for each salesman. Once the devices are set to allow unknown sources, you should be able to email the salesman the apk (or a link to it) as an attachment. You should also be able to make the custom apk refuse to run except on a device matching some fingerprint data you've previously collected. While you can develop for android under windows, you may want to look into switching to linux in order to make some of this scripting a little more natively elegant.