[Q] install apk as system app - G Tablet Q&A, Help & Troubleshooting

Is there a way to install an apk as a system app? I want to 'unroot' a device but still run an app that requires root access. I'm unsure of how this can be done, any advise would be very much appreciated!
Thanks

I know that the Z4 root app has an option for temp root functions which goes back to an unrooted state once you reboot.
My guess is that you can run that, place your apk in the appropriate system folder, install the apk from there & then reboot.
But again I'm not to sure if temp root functions work on our G-Tabs & if it does if it's as simple as I explained. Worth a try I guess.
Again I'm assuming that your not already in a permanent root state. If so then you'll have to unroot completely first & then try what I mentioned above.
Unless someone has an easier method?

convert user apps to system apps
nikt said:
Is there a way to install an apk as a system app? I want to 'unroot' a device but still run an app that requires root access. I'm unsure of how this can be done, any advise would be very much appreciated!
Thanks
Click to expand...
Click to collapse
Titanium Backup Pro (paid version 3.8.1 and higher) has a function that allows one to convert user apps-->system apps (as well as system app-->user app ... though this sometimes causes initial FCs, which generally disappear with reboot).
Not sure if the effect will remain after unrooting.

Just to clear up a bit, not because an app its on /system it will have root access. If you want to run an app that needs root, you need root, thats it. You cant unroot and use the app after that.
So, no you cant do that. Its 2 different things installing an app on /system than having root for an app.

pmcnano said:
Just to clear up a bit, not because an app its on /system it will have root access. If you want to run an app that needs root, you need root, thats it. You cant unroot and use the app after that.
So, no you cant do that. Its 2 different things installing an app on /system than having root for an app.
Click to expand...
Click to collapse
So then how do proprietary apps like Sprint Nascar (as an example) run on an unrooted phone?

Why would Sprint Nascar need root permision?

pmcnano said:
Why would Sprint Nascar need root permision?
Click to expand...
Click to collapse
It probably doesn't or it might I have no idea. The op never pointed out which apps he wants to use.
However & this is a big however, as I have no idea which apps require root access, one has to assume that any of the preinstalled apps that come on our G-Tabs do in fact need root access, yet they can run on an unrooted device. Again I could be wrong.
That being said, how does one go about determining which apps require root access?

Thanks for the replies guys. The issue is supporting proxy servers on unrooted devices. There are several proxy apps that require root access as well as a kernel that supports proxy. If the proxy app were installed as a system app, would this have enough rights to access the kernel as required? I don't know enough about this but was led to believe this might work if it was running as system. Same for apps that use CIFS, like mount manager. I guess I'll give it a try and see what happens...!

Like I said, being installed on System doesnt have anything to do with having root or not.
Im 95% sure about what I am saying.
edit: I confirmed it..so 100% sure, if the app needs root, you will need root no matter where the app is installed.

Related

[Q] what exactly happens during the rooting process?

I'm aware what rooting is and I'm benefiting from it on daily basis on my GT-I9100. However, what exactly happens during the rooting process? As I understand, (often) custom recovery(for example Clockworkmod recovery) is installed, an application for managing programs which might need root access(for example SuperSU) is installed, su utility for switching to root user is installed, but what else happens? Are there some file permissions changed during the rooting process?
All I know is I had to install supersu from playstore after rooting and then downloaded rom manager to get clockworkmod but idea I got was the rooting itself strips security from phone so that you can gain full access that samsung otherwise blocked. I havent looked in depth to see anything that the root itself installed but hey im a newbie with this sort of stuff
Sent from my GT-P3110 using xda app-developers app
m4rtin86 said:
I'm aware what rooting is and I'm benefiting from it on daily basis on my GT-I9100. However, what exactly happens during the rooting process? As I understand, (often) custom recovery(for example Clockworkmod recovery) is installed, an application for managing programs which might need root access(for example SuperSU) is installed, su utility for switching to root user is installed, but what else happens? Are there some file permissions changed during the rooting process?
Click to expand...
Click to collapse
You can install all these great programs from the Play Store that require root, also you have manual access (through file explorer) to your system files like frameworks, stock sounds, built-in apps and more. You can disable the annoying ads in the games, you can backup your app data (like progress in games, so you don't have to start over and over again), you can backup settings, change the system look (icons, sounds etc.) and much more. Otherwise you won't see any interface changes or unlock some hidden options. :laugh: Everything is done through the programs.
^The guy knows what you can do with root, he's asking what the details of the rooting process are.
I don't know either but I think you basically unlock the boot loader, then install SU.
Sent from my LG-P920 using xda app-developers app
LeighR said:
^The guy knows what you can do with root, he's asking what the details of the rooting process are.
I don't know either but I think you basically unlock the boot loader, then install SU.
Sent from my LG-P920 using xda app-developers app
Click to expand...
Click to collapse
Yes, sorry, at second reading I understood him. My bad.
italcrwd are
m4rtin86 said:
I'm aware what rooting is and I'm benefiting from it on daily basis on my GT-I9100. However, what exactly happens during the rooting process? As I understand, (often) custom recovery(for example Clockworkmod recovery) is installed, an application for managing programs which might need root access(for example SuperSU) is installed, su utility for switching to root user is installed, but what else happens? Are there some file permissions changed during the rooting process?
Click to expand...
Click to collapse
At a high level the following changes (and a few more I cant think of) are made to the device:
Access to previously read-only areas of memory are changed to read-write
A binary called busybox is pushed to the handset (the location varies depending on rooting method used)
Busybox is a set to linux like tools compiled spercifically for the CPU of the device (usually ARM)
The SuperUser or other 'Gate Keeper' application is installed to allow and monitor access to the busybox binary (this is optional but is normally done by default and is required for most root apps to function.)
In essence, your original post is almost spot on.

[Q] Confusion about unrooting

Well, hello. I'm most certainly a noob, although I do have experience with developing for android and using Linux on a PC system. I haven't done any rooting/unrooting/custom-firmware-flashing before, however.
I believe this question to be about Android devices in general and so I'm posting it here instead of a device-specific forum.
The short version of my question is:
Is it possible to install a custom firmware on my phone, but prevent apps installed in it from having root access?
The long version:
Having read about how the Android OS works, I understand that each app installed in a system basically has its own user account, and that's how privileges work: The OS simply doesn't allow this specific user/app to access other apps or hardware.
Unless I'm mistaken, rooting a phone makes all apps run under the same user account: root. Which means that all apps have access to every other app and all hardware on the device.
I found many web pages that explained that this is a security risk as malicious code could then use anything at all on the phone. This makes sense of course, that's why most applications on a Linux system don't run as root.
I understand why rooting the device is necessary to install a custom firmware on it, but what I haven't understood is why the device has to stay rooted afterwards. Isn't installing a custom firmware basically replacing the OS on the device? If so, couldn't I replace it with an OS that doesn't run everything as root but instead runs every app as its own user, like unrooted devices do?
I've searched this website and others for information on this but I haven't been able to find something that answers this question.
I found explanations for why unrooting is needed to install a custom firmware, but they didn't include why the resulting system can't be rooted.
I found guides on how to restore the original firmware on a device, which isn't what I'm looking for, although this process is called "unrooting" (the word seems to be misused here, but maybe that's just me).
I also found guides on how to trick certain applications, which won't run on a rooted device, into thinking that the device isn't rooted. However, the reason I'd prefer my device not to be rooted isn't to trick any applications but for security reasons.
What I'd basically like to do, is install custom firmware but, once that's done, ensure that applications I download from the Market or install directly don't have any more privileges than they've been developed to ask for. Is that not possible? I don't understand why not...
Gaining root access to your phone will not give a single app root privileges, for the most part you will use an app called superuser or supersu to allow or deny any app root access. (Sometimes baked into ROM)
But you have no worries, any app that you download from the market will not have root unless you give it
Sent from my Nexus 4 using xda premium
demkantor said:
Gaining root access to your phone will not give a single app root privileges, for the most part you will use an app called superuser or supersu to allow or deny any app root access. (Sometimes baked into ROM)
But you have no worries, any app that you download from the market will not have root unless you give it
Click to expand...
Click to collapse
Is that so? Thanks. It seems I was wrong at the very beginning of my logical process.
So, if I understand correctly, the lack of security isn't that anything installed has root access, but that it can have root access. Is that right?
Correct, even whatever custom ROM you are running has a built in app for lets say messaging, this will not have root access.
You just bow have the ability to do anything (mostly) to your device, but you don't have to
Sent from my Nexus 4 using xda premium

I need clockWorkMod SuperUser apk please

Hi, when cwm SuperUser done a update to app and binaries the root not work in my device, can someone give me SuperUser cwm.apk v0.9 or some work please, i searched but I didnt found
fernan2001 said:
Hi, when cwm supersu done a update to app and binaries the root not work in my device, can someone give me supersu cwm.apk v0.9 or some work please, i searched but I didnt found
Click to expand...
Click to collapse
http://download.chainfire.eu/204
r
Very thanks for answer, but the link is a .zip and I want an apk or can I put it (.zip) with default recovery and not have problems?
Extract that zip, apk is in there
Tapped from my RazR
DumbleCore said:
Extract that zip, apk is in there
Tapped from my RazR
Click to expand...
Click to collapse
thanks now I understand I dont knew that...but the apk is not that, I tested that app and not worked because I dont have root chainfire installed , the super user that I have is SuperUser of ClockworkMod, I need a previous version.
fernan2001 said:
thanks now I understand I dont knew that...but the apk is not that, I tested that app and not worked because I dont have root chainfire installed , the super user that I have is SuperUser of ClockworkMod, I need a previous version.
Click to expand...
Click to collapse
Look man, superuser is ROOT. Either your phone is rooted or it is not. A rooted phone can run apps that require it like ClockworkMod ROM Manager, Titanium Backup, Greenify, Wireless Tether for Root Users, File managers like Root Explorer or ES File Manager if you want to be able to access the system areas of the phone. So far as I know, there is no "SuperUser of ClockworkMod". If your phone is rooted (You will see superuser or "Super SU" in your app drawer. Here is a free app from the playstore that will tell you if your phone is rooted or not.
Root Checker
Install it and use it to see if your phone is still rooted or if you lost root somehow. If you still have root, then when CWM starts, it will ask for root privileges and the first time it asks, you will be prompted to grant it, once, for a certain time period, or forever. For stuff like CWM, root file managers, and Titanium Backup, you always grant root forever and you will not be asked again until the app updates and requires you to okay granting root privileged or not, then you grand forever and leave it alone.
If you find out you do not have root or lost your root, then you have to root the phone and the procedure is different for different devices, versions, and ROMS. For that kind of help, you have to search for rooting <your particular device and android version number>
Ohmster said:
Look man, superuser is ROOT. Either your phone is rooted or it is not. A rooted phone can run apps that require it like ClockworkMod ROM Manager, Titanium Backup, Greenify, Wireless Tether for Root Users, File managers like Root Explorer or ES File Manager if you want to be able to access the system areas of the phone. So far as I know, there is no "SuperUser of ClockworkMod". If your phone is rooted (You will see superuser or "Super SU" in your app drawer. Here is a free app from the playstore that will tell you if your phone is rooted or not.
Install it and use it to see if your phone is still rooted or if you lost root somehow. If you still have root, then when CWM starts, it will ask for root privileges and the first time it asks, you will be prompted to grant it, once, for a certain time period, or forever. For stuff like CWM, root file managers, and Titanium Backup, you always grant root forever and you will not be asked again until the app updates and requires you to okay granting root privileged or not, then you grand forever and leave it alone.
If you find out you do not have root or lost your root, then you have to root the phone and the procedure is different for different devices, versions, and ROMS. For that kind of help, you have to search for rooting <your particular device and android version number>
Click to expand...
Click to collapse
Thanks for answer, well I thinked that too, because my phone cant use root privileges if the aplication superuser isnt installed, however with te superuser aplication my phone have root privileges but with the previous version, with actual version my phond dont have root, even the people in google play say the same "with the new version my phone losed root" and similars comments...
maybe the root version (clockWorkMod) work in this way and need the app for work.
maybe this one??? http://d-h.st/l91
DumbleCore said:
maybe this one???
Click to expand...
Click to collapse
Thanks DumbleCore! I have root again
fernan2001 said:
Thanks DumbleCore! I have root again
Click to expand...
Click to collapse
Solved it? No problem

Can you unroot without flashing stock image?

If possible, I'd like to remove root from my stock image, leaving the recovery, so I can use it for a business app that doesn't operate with root. Can this be done?
crackface said:
If possible, I'd like to remove root from my stock image, leaving the recovery, so I can use it for a business app that doesn't operate with root. Can this be done?
Click to expand...
Click to collapse
Yes. Open SuperSU, and use the "Settings", "Full unroot" option. That'll remove SU and allow your app to run if it only looks if you're rooted.
Some applications, like "Good", don't just check for rooted device - they also check for evidence that the device is rooted. I fight this battle all the time on my Galaxy Tab - it's rooted, kind of, but Good can't tell.. but I can't use the root permissions without disabling Good, rebooting, then enabling root.
You've got to remove any evidence of busybox having been installed as well as any evidence of any rooting programs for Good to be happy.
See the Saferoot thread for an unrooting script which may work for you.

several apps having issues now on rooted Marshmallow

I'm currently rooted and restoring my apps, however it seems like with each new version of Android the external SD gets trickier and trickier. A lot of apps these days use the round about method of having you choose the card to write to via the file manager, unfortunately not all apps do this and one of them looks to be the ever popular Tasker. am I missing the option or am I screwed and have to rewrite all my tasks to write to the internal storage?
another issue is with Secure Settings mainly used in conjunction with Tasker... when I start it up it fails to recognize su and never prompts me via SuperSU for permissions to grant. anyone have any workarounds or fix for this?
lastly, is BusyBox still usable under Marshmallow? i loaded it up and everything seemed fine, but after a reboot Google Play Services, Amazon, Youtube and some others kept crashing.
My observations:
MyProfiles Pro not able to turn data ON/OFF with ROOT permissions even if the root permission is there for the app.
One Power Guard battery app works, but cannot tweak the profiles, it says root needed. I seriously doubt if it really is working.
njaustin123 said:
My observations:
MyProfiles Pro not able to turn data ON/OFF with ROOT permissions even if the root permission is there for the app.
One Power Guard battery app works, but cannot tweak the profiles, it says root needed. I seriously doubt if it really is working.
Click to expand...
Click to collapse
what I've realized is that SuperSU is running in systemless mode, which is causing some issues for outdated apps that were hardcoded to find 'su' in /system. some workarounds are putting a dummy file named su in /system or getting SuperSU to run in /system.
dimm0k said:
I'm currently rooted and restoring my apps, however it seems like with each new version of Android the external SD gets trickier and trickier. A lot of apps these days use the round about method of having you choose the card to write to via the file manager, unfortunately not all apps do this and one of them looks to be the ever popular Tasker. am I missing the option or am I screwed and have to rewrite all my tasks to write to the internal storage?
another issue is with Secure Settings mainly used in conjunction with Tasker... when I start it up it fails to recognize su and never prompts me via SuperSU for permissions to grant. anyone have any workarounds or fix for this?
lastly, is BusyBox still usable under Marshmallow? i loaded it up and everything seemed fine, but after a reboot Google Play Services, Amazon, Youtube and some others kept crashing.
Click to expand...
Click to collapse
I learned this the hard way in updating from LP to MM; do NOT restore your apps from a backup under LP. I did that, and was having nothing but issue after issue. Best bet, backup everything not an app, go back to the google play store, and reinstall everything from there. Any apk's you had you installed, install them fresh. I was literally to the point of shipping the phone back to T-Mobile and going to an S7 it was such a pain in the neck. After I learned after the 4th factory reset from LG Bridge, I've never had any issues since.
chernabog88008 said:
I learned this the hard way in updating from LP to MM; do NOT restore your apps from a backup under LP. I did that, and was having nothing but issue after issue. Best bet, backup everything not an app, go back to the google play store, and reinstall everything from there. Any apk's you had you installed, install them fresh. I was literally to the point of shipping the phone back to T-Mobile and going to an S7 it was such a pain in the neck. After I learned after the 4th factory reset from LG Bridge, I've never had any issues since.
Click to expand...
Click to collapse
Whenever you do a clean fresh flash Rom at the setup most rooms let you restore all your previous apps from google, no need to go to the play store it does it automatic. If you made a backup just restore the data.
Sent from my LG-H901 using XDA-Developers mobile app
dimm0k said:
what I've realized is that SuperSU is running in systemless mode, which is causing some issues for outdated apps that were hardcoded to find 'su' in /system. some workarounds are putting a dummy file named su in /system or getting SuperSU to run in /system.
Click to expand...
Click to collapse
Thanks. But can you give me little bit more details on that. How can I get SuperSU to run in /system? I checked settings of SuperSU app, but could not find.
Also I tried to create a new file called su in /system with Root Browser of ROM Toolbox, but it says 'failed'
chernabog88008 said:
I learned this the hard way in updating from LP to MM; do NOT restore your apps from a backup under LP. I did that, and was having nothing but issue after issue. Best bet, backup everything not an app, go back to the google play store, and reinstall everything from there. Any apk's you had you installed, install them fresh. I was literally to the point of shipping the phone back to T-Mobile and going to an S7 it was such a pain in the neck. After I learned after the 4th factory reset from LG Bridge, I've never had any issues since.
Click to expand...
Click to collapse
I have witnessed this, mainly with Google apps. after restoring the app with data the app would randomly crash... removing the app and installing it from Google fixes it, but I have not experienced this with non-Google apps. I'll keep this in mind the next go around when restoring my stuff.
njaustin123 said:
Thanks. But can you give me little bit more details on that. How can I get SuperSU to run in /system? I checked settings of SuperSU app, but could not find.
Also I tried to create a new file called su in /system with Root Browser of ROM Toolbox, but it says 'failed'
Click to expand...
Click to collapse
you won't be able to change SuperSU to be in systemless mode within SuperSU... look here for the non-systemless root method that you'll need to flash in TWRP. realize that if you do this flash that it most likely will break Android Pay. not sure if you need to mount /system as rw in Root Browser before you can create files there or if Root Browser does it for you automatically?
I am having issues with the camera in manual mode it keeps force closing
Sent from my LG-H901 using XDA-Developers mobile app
after doing some research and from my understanding, the bad news is that it looks like it's up to devs to add the feature of writing to the external SD via the Storage Access Framework (SAF). unfortunately it doesn't look like an easy task, as the developer of Tasker mentioned that he won't be implementing this since the number of external SD users are far and few =( and would revisit it if that number changes.
the good news for those of us smart and brave enough to root our devices, this is solvable via editing packages.xml and adding in one line for each app you want to "fix". this is documented here
justice26 said:
I am having issues with the camera in manual mode it keeps force closing
Sent from my LG-H901 using XDA-Developers mobile app
Click to expand...
Click to collapse
works fine for me here... are you using stock ROM?
dimm0k said:
you won't be able to change SuperSU to be in systemless mode within SuperSU... look here for the non-systemless root method that you'll need to flash in TWRP. realize that if you do this flash that it most likely will break Android Pay. not sure if you need to mount /system as rw in Root Browser before you can create files there or if Root Browser does it for you automatically?
Click to expand...
Click to collapse
I don't want to break stuff like Android Pay though I am not using it right now.
And about putting the file, in ROM Toolbox it says rwxr-xr-x for /system. Doesn't that mean write is there?
njaustin123 said:
I don't want to break stuff like Android Pay though I am not using it right now.
And about putting the file, in ROM Toolbox it says rwxr-xr-x for /system. Doesn't that mean write is there?
Click to expand...
Click to collapse
I believe non-systemless root only breaks Android Pay because of the way Android Pay is designed, as I believe it needs /system to be "pure". just want you to know that I have not done anything and have left everything as is, systemless root. seems like the only app I had that needed root was Secure Settings, which doesn't look like it will ever be updated anytime soon so I'm trying to ween myself away from that and do everything via Tasker without that plugin. as for you, if you're lucky, write to the apps you're having issues with and have them update it for systemless root. the issue is that their apps were looking for root specifically in /system, but with systemless root the su binary is now in /su/bin. as for putting a dummy su file in /system, I'm not entirely sure that would make your apps work and if it would break Android Pay if you did so. regardless, it doesn't hurt to try as you can simply remove the dummy su file to revert back to systemless. I believe those permissions you've listed for /system does does mean it can be written to, however it has to also be mounted as rw. check that via a terminal by issuing "mount | grep /system". you will probably see a ro in parenthesis or simply try to put a file in there.
dimm0k said:
I believe non-systemless root only breaks Android Pay because of the way Android Pay is designed, as I believe it needs /system to be "pure". just want you to know that I have not done anything and have left everything as is, systemless root. seems like the only app I had that needed root was Secure Settings, which doesn't look like it will ever be updated anytime soon so I'm trying to ween myself away from that and do everything via Tasker without that plugin. as for you, if you're lucky, write to the apps you're having issues with and have them update it for systemless root. the issue is that their apps were looking for root specifically in /system, but with systemless root the su binary is now in /su/bin. as for putting a dummy su file in /system, I'm not entirely sure that would make your apps work and if it would break Android Pay if you did so. regardless, it doesn't hurt to try as you can simply remove the dummy su file to revert back to systemless. I believe those permissions you've listed for /system does does mean it can be written to, however it has to also be mounted as rw. check that via a terminal by issuing "mount | grep /system". you will probably see a ro in parenthesis or simply try to put a file in there.
Click to expand...
Click to collapse
OK, so here is it: I was able to mount /system as rw with the terminal emulator in ROM toolbox and then create a dummy file named su. Rebooted the phone, both the apps still fail. I will write to the developers. For the time being, I am OK turning data on/off manually along with using MyProfiles for other things. And for the One Power Guard, I believe freezing many of the T-Mobile and LG junk using Titanium and having SetCPU with a little bit under-clocking have already made the battery better. So I can wait. Am also evaluating Craig's Root Battery App instead of OPG. Thank you anyways.

Categories

Resources