Testing as android.uid.system user - android

I am developing an android app that will run under the android.uid.system user (the tablet manufacturer is signing the app for me so it will be able to run under this user id).
The problem I have is that it takes about 2 to 3 weeks each time I want the app signing. As I make code changes I want to be able to test them under the system user but it is not feasible for me to wait this long to be able to test/debug my changes - especially if they turn out to be wrong.
Is there any way I can test the app on the tablet as the system user (or mimicking system user privileges) without having to get it signed every time?
Further info:
I am developing on windows 7, using Eclipse IDE.
The tablets are running Android 4.4.2 and 4.4.4 (2 different models).
The tablets are not and will not be rooted.
Assume a fairly basic level of understanding of app signing on my part.
Thanks in advance

Root the device and install app to system/app folder
I have sorted this myself by rooting the device for development purposes and then copying the app from the data/app folder to system/app and then removing the it from data/app folder.
The device then treats it as a system app and so far all of the system level functions I have tried have been working (such as reboot device and set timezone).
This article helped (although I had to copy (cp) and remove (rm) rather than move (mv) the app).

Related

Why Android Studio update SDK is listing files from my mobile phone that is not connected anymore?

I used my mobile phone sometimes as debug device and an emulator whose has PlayStore but only that, nothing more, not even my account from Google. So upon trying to update A.S. it started taking longer, so I take a look at it and he is listing files from my mobile phone that was not connected via USB to the computer neither other ways.
What does my phone files has to do with android update? And the updates is taking forever running through all files from my phone, it appeared system/ WhatsApp/ Downloads/ etc with files I know for sure are only in my personal device not the emulator.
Why does A.S. list these files on Update?
There was a copy of my files inside \AppData\Local\Android\Sdk\platform-tools\ and AndroidStudio maybe thought it was important to look at it. Resolved by removing the files inside the folder with my name.

Automatically install an apk from sd card to device after every reboot of device

hi i am working to create an application that could'nt be deleted or uninstalled even after hard reset or formatting the device but that is failed in such rooting process ,
Now i want a code to install an app automatically from sd card after a hard reset or reboot of an android device ,
The application is to find a lost mobile so that even the lost device is resetted or formatted
my app helps a user to find his mobile
Thank you..
i am working to create an application that could'nt be deleted or uninstalled even after hard reset or formatting the device but that is failed in such rooting process
Build your own ROM mod that has your app pre-installed.
Now i want a code to install an app automatically from sd card after a hard reset or reboot of an android device
That is not possible, fortunately, for obvious security reasons.
AFAIK, There are 2 kinds of android app: System app and User app. If you want to prevent uninstalling from your app, it must be an system app.
If you are developing app for rooted phone (and your phone is rooted also), try to copy *.apk to /system/app then restart your phone.
Hope this helps.

In Android, preinstalled apps are always disable to uninstall?

Just that, I like to know is always all the preinstalled apps are with the uninstall button disable in Android.
If I am reading your question correctly, some of the pre-installed apps can't be uninstalled without rooting your phone using cyanogenmod or rooting your phone.
Some pre-installed applications can be uninstalled. For example in Android 4 (ICS) you can go to Settings -> Apps and select the "All" tab. There you can uninstall some of the preinstalled software.
Root the phone, put the APK into the /system/app folder and then unroot the phone. This is possible on a Droid 4 at least in theory. Not sure about other hardware models. If you can root and unroot the phones it should work.
This depends on the Device manufacturer. They have the possibility to install the app in any way they like before they freeze the image and flash it to the hardware in the factory.
For example some of the Branded apps might be installed under system privileges, but some of the more "friendly recommendation" apps might be free to uninstall.
From what i understand in ics apps in usolder can be uninsfreeled, apps in system folder instead of uninstall the button reads disable. Except for only s slight few only, these apps are reQuired by the os for the user to be able to"enable" a disable App, so i think i the app needs to be signed by the room cooker our needs top have a intent in the manifest like a launcher or home app (since if you disable your home launcher you bricked your phone, so you can't disable it, but if you give your app a intent label of copied from the Android source launcher then the phone will think it's a launcher, and not let you disable it, you will prob have to set the home launcher back to be default or Android will ask you witch launcher too use Every time user hits the home button, i was looking for the same answer found this page
Android 4.0 Api to Disable Apk Witch gave me the idea, currently thus reply is closest I've come to impinging the idea, i well be trying it soon, if you beat me to it, let me know tour results, and i well do the same.
And to install a app in /system/app a uninstall.zip won't do it, you need too root the phone, install the app, xfer it to system (i use system/app mover available in the play store free, the too secure ot Unindtsll app mover, and unroot, any way good luck.
P.s. I'm Not a Dev, i just understand the format format of the app language, and can c effectivly search for info, so please no code questions. i can't answer them, but google can.

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.

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