Android install multiple apps as system apps - android

Is there any tool to install multiple apps(4 apps) as a system apps on android rooted device directly.
I done it using ES File Explorer but the problem is, how to install those apps as system apps in more devices (1000 or 10000 devices) quickly.
Is there any tool to do that kind of situation.

Finally I found the solution,
Connect device to PC using USB cable and enable USB debugging
Creating .bat file with these commands.
Save bat file where .apk file located and double click .bat file and execute.
adb remount
adb push apk-filename-here /system/app/
adb shell chmod 644 /system/app/apk-filename-here
adb reboot

Related

adb install system app

I am aware that using adb install command installs an app in the /data/app folder. Also I know the in order to install an app as a system app I need to push it directly to the system. Is it possible to use adb install directly to the /system/priv-app/ on rooted phones?
if I got your question, this should do the work:
adb root
adb remount
adb push apk-filename-here /system/app/
adb shell chmod 644 /system/app/apk-filename-here
adb reboot
See this or this link for more info.
You can not use adb to directly install app at /system/priv-app/. Even If you copy your .apk, .odex files to this path device can not recognize your app as system app. For this you have to use same certificate with which your system apps are signed.

Phone is rooted but can't pull files from /data/data folder

My phone Samsung Galaxy S5 mini is rooted. I'm trying to pull files from /data/data/myapp.package/ to folder on my PC.
adb pull /data/data/myapp.package E:\myapp\myapp.package
it gives me this error
adb: error: failed to copy '/data/data/myapp.package' to 'E:\myapp\myapp.package': Permission denied
I found many questions like mine but no answer solved my problem. Some suggested to execute this command adb root before pulling files. Some suggested to install adbd insecure app to enable root access. In fact after installing that app, phone disappeared from adb terminal. Both solution didn't work for me.
BTW, I can copy files using cp command from adb shell but I have to copy files to sdcard and then pull from sdcard. I'm looking for solution which allows me to copy files directly from /data/data/myapp.package to my PC
Any solution?
For your adb to be able to access /data/data directly (for adb pull), your adbd should be running as root - which can generally be done by adb root command.
adb root would not work on commercial devices like Samsung Galaxy S5 mini as commercial devices have ro.secure=1, i.e., the adbd can't be restarted as root due to a check of property called ro.secure. adbd insecure app circumvents this and restarts adbd in root mode to enable adb pull, etc. to work.
In short, if adbd insecure app doesn't work for you, it's not possible to do adb pull from /data/data in your existing ROM. It might be possible if you change the ROM / do some boot.img tweaks, but I would probably suggest trying latest version / different versions of adbd insecure app before going for ROM changes.
Read more on rooting here.
First you need to hit these two command from command line
adb root
adb remount
then
adb pull /data/data/myapp.package E:\myapp\myapp.package
This is my example pulling DB file from the root directory
adb -e shell "run-as com.example.project cp /data/data/com.example.project/databases/project.db /sdcard"
The key is run-as
Here's a one-liner that lets you pull a file without installing anything else and without having to copy it to a public location on the device to then pull it to your computer:
adb exec-out su -c cat /data/data/myapp.package/my_file.apk > my_file.apk
What this does:
adb exec-out runs a command and outputs the raw binary output
su -c runs the provided command as root
cat <file> prints out the file contents
> <file> redirects the output from adb (i.e. the raw file contents) to a local file.

Is it possible to Root Visual Studio Emulator Android?

I am currently using 'Visual Studio Emulator for Android' to run android apps on my computer, i find that after using multiple types of emulators bluestacks, genymotion, andy etc. That VS is the most stable and easy-to-use out of them all.
The only problem that i have compared to the other emulators is running apps that require root permission, with this being an emulator i know that its not possible to go the route of rooting via fastboot/recovery, this is the only method i know of rooting as thats how i normally do it on my phone.
I have tried most of the 'rooting' APK's (kingo,towel,frama etc) and none of those have worked.
So would anybody happen to know how i can get root access on Visual Studio Android Emulator?
I am trying to run a touch-replication app (Frep & RepetiTouch) but all of them seem to require root access.
Any advice would be much appreciated. Thanks
Yes, you can. Here are some basics before the steps. Fundamentally all Visual Studio Emulator has root access; if you do adb shell you will get a root prompt. The only thing that is missing is the su binary and access for applications to connect to root shell through su. You can get the su binary from superuser apk from clockworkmod and the access to the root shell through the su daemon.
Installing su binary
Download superuser apk from clockworkmod. Ideal way is to download the app from google play store and navigate to /data/app/ and copy com.koushikdutta.superuser to your pc through adb pull /data/app/com.koushikdutta.superuser <local_path_in_your_system>
Change the .apk extension to .zip.
Navigate to assets/x86/ and copy the su binary to /system/xbin in your emulator
adb push <location_of_su> /system/xbin
chmod with suid and rwx
adb shell
chmod 6777 /system/xbin/su
symlink to /system/bin
ln -s /system/xbin/su /system/bin/su
Run the su daemon
/system/xbin/su --daemon
Giving Access to Applications through su
Install the superuser binary by either dragging and dropping into
the emulator or using adb install <path_to_superuser_apk>
Download rootchecker free\basic or even a terminal emulator for that
matter. We just want to check if our device is rooted.
Run the rootchecker app to check root and you should be able to get
the prompt from superuser.

Use adb pull to copy app's file from phone (not rooted)

I am using a MacBook as my development machine. My Android phone is not rooted. I want to copy my Android app's file from phone to my MacBook. I tried the following:
Connect Android phone to MacBook (Developer's option is enabled)
adb pull /data/data/com.my.app/app_data/data ~/Documents/my/app/
where /data/data/com.my.app/app_data/data is the file path on phone, and ~/Documents/my/app/ is the directory path on MacBook.
But the above adb pull command shows Permission denied.
I also tried to use su under adb shell, but it doesn't work either:
~$ adb shell
shell#xyz:/ $ su
/system/bin/sh: su: not found
So, how can I copy my app's internal file to my MacBook directory?
On a non-rooted phone you can not access the app private data directory (/data/data/com.my.app).
The only way to extract the data is to create a backup of the app data using adb backupp:
adb backup -f mybackup.ab com.my.app
For extracting the information from the created backup archive you can use the Android Backup Extractor. It converts the Android backup archive to a tar archive file.
Note: If the app specifies in it's manifest that backup is disallowed the described way does not work. In such a case the only way is to root the phone.
You have to navigate to your file with adb shell.
Then copy to sdcard:
cat yourfile > /sdcard/yourfile
Then exit from adb shell and now you can pull:
adb pull /sdcard/yourfile

Android: Difference between User vs System App development [duplicate]

I need create my app as system, because i need get permission android.permission.WRITE_SECURE_SETTINGS.
After install to virtual device (Eclipse) my app appears in '/data/app'. I try manually move him to '/system/app', set rights 644, but when i launch my app - toast 'App isn't installed'. After reboot (close virtual device and restart) my app disappeared from '/system/app'.
Add:
- 1. Why android can not see my application in '/system/app'?
- 2. Why after restart virtual device my app disappeared from '/system/app'?
What the best way make my app system on Eclipse Emulator and real devices?
The apps installed on your Android devices can be broadly categorized as system apps or user apps, based on their installation location. The user apps are just all your normal app installations through the Google Play Store, Amazon Appstore or sideloading. These go into the /data partition of your Android phone, which is the part of the internal memory made available for user data and apps.
System apps are basically the apps that come pre-installed with your ROM. In a standard Android user environment, the user doesn’t have write access to the /system partition and thus, installing or uninstalling system apps directly isn’t possible. The process isn’t as hard as it may sound. However, there is a catch.
In order to install an app as a system app on your Android device, your device must either be rooted, or have a custom recovery installed (or both). Usually pretty much everyone who has a custom recovery installed uses a rooted ROM, so we’ll just be using the method for rooted phones.
Go to below tutorial.it might help you.
Make Your app System App
You cannot make your app by default as the system app. There are some other ways though through which you could make other normal apps as system apps on rooted phones.
You can install an APK to /system/app with following steps.
Push APK to SD card.
$ adb push SecureSetting.apk /sdcard/
Enter the console and get the shell
$ adb shell
Switch to superuser. If your device is not rooted, get it rooted first. (If you don't know how to do that, just Google.)
$ su
Remount the system partition with WRITE permission.
$ mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Cat your APK from /sdcard/ to /system/ , some guys get a fail with cp command due to cp is not supported. So use cat instead.
$ cat /sdcard/SecureSetting.apk > /system/app/SecureSetting.apk
Remout /system partition back to READ-ONLY, and exit
$ mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
$ exit
Then reboot your device, the APK should have been installed on /system/app.
As stated here.
You can't make an application as system app on emulator.But you can make an app as system app on device.For that, you need to have the git repo set up on your pc,and after setting up repo, copy the app folder in repo folder/packages/apps and put it for compile.and you will get system.img in out folder of repo.Then you can flash the system.img on sd card, so that you will get your app as a system app.And this is the only way is there to make an app as system app.
If the device is not rooted, you cannot copy anything to the System or Data partitions.
With root do the following commands in a command prompt or linux shell and all should be fine:
adb push fileName /data/local/tmp
adb shell
su
mount -o remount, rw /system
cp /data/local/tmp/fileName /system/folderOfYourChoise
chmod 644 (if its an apk and you want the system to use it as a system app)
exit (exits the su shell)
exit (exits the adb shell)
adb reboot (to apply and see changes on the device)

Categories

Resources