Can I install older version of a preinstalled app on a NON-Rooted device? - General Questions and Answers

Is it possible to install a different (older) version of a S Health app – without rooting and patching system with Lucky Patcher or else?
WHY? - Older version of S Health has a feature of SpO2 measurement (oximeter) on S5 while Marshmallow preinstalled S Health does not.
I tried uninstalling the app through adb shell via pm uninstall user 0 yada-yada but even though it looked like it did, I still couldn't install older version

Code:
adb shell via pm uninstall user 0 yada-yada
doesn't physically remove an app, but only hides it to user.
Knowing app's package name you can physically remove it by running
Code:
adb shell "rm -r '/data/app/<PKG-NAME>*'"

But I have a locked non-rooted device... or can I still do it that?
Code:
adb devices
adb shell "rm -r '/data/app/com.sec.android.app.shealth*'"
Also, is the end of the 2nd line correct or there is some typo? (*)

As I can see you have either none at all or only very little knowledge of Linux what Android is based on: the asterisk in the code-line of course isn't a typo, in Linux it represents a wildcard.

I see nothing bad in not knowing deeply Linux for average user. Anyway, thanks. It says "No such file or directory", also tried app-priv folder to no avail. Wherever preinstalled apps hide themselves on Marshmallow, it's not there.
Maybe will need to go asking to Samsung forum on XDA, maybe developers there know more knowledge in Samsung firmwares/ROMs.

AjvarXX said:
I see nothing bad in not knowing deeply Linux for average user. Anyway, thanks. It says "No such file or directory", also tried app-priv folder to no avail. Wherever preinstalled apps hide themselves on Marshmallow, it's not there.
Maybe will need to go asking to Samsung forum on XDA, maybe developers there know more knowledge in Samsung firmwares/ROMs.
Click to expand...
Click to collapse
Exactly, we all start at the beginning.
This might be helpful:
`adb pull` from app data directory without root access
`adb pull` from app data directory without root access - readme.md
gist.github.com

AjvarXX said:
It says "No such file or directory", also tried app-priv folder to no avail. Wherever preinstalled apps hide themselves on Marshmallow, it's not there.
Click to expand...
Click to collapse
My last 2 cents here:
You may check for the app in question is a user-app or not. You do this by running
Code:
adb devices
adb shell "pm list packages -3"
If the app isn't in the list returned then it's not an user-app but a system-app what can't get uninstalled without superuser rights, will say Android must be rooted.

Related

[Q] motorola i886, halfway rooted... i think

I am trying to root a motorola i886. Its a really wierd nextel iDEN PTT phone that is running (i believe) android 2.0 or 2.1 but has no touchscreen...
Basically I have been able to get a root shell (#) from 'adb shell' by pushing some program called psneuter to the phone and running it. Once I had this I could install apps via adb ok, but it seems like whenever I try to run any apps that require root they error saying they do not have root access.
As far as I can tell pretty much every rooting guide for every other phone has you putting 'su' and sometimes 'busybox' into /system/bin and 'Superuser.apk' into /system/app. I did both of these but still got the same errors about apps not having root. I tried a few different versions of these files I found from different sites to no avail. Running su on a terminal emulator on the phone itself would get the error "operation not allowed" or something like that. Then I found some other guide where you just copy 'sh' to 'su' and chmod su to 4755. When I did that I could get to a # prompt on the phone's terminal emulator app by typing 'su' but still got root errors for apps that need root.
I though maybe someone here would know something that I missed. As far as I can tell, I have applied the correct permissions to all these files or have at least tried every combination I can think of to no avail (shouldn't chmod 777 just make everything work?)
Also, does the phone usually come with a stock version of busybox on it? Do you need a specific version of these files for your device or version of android?
When an app on the phone tries to get root access is it just basically trying to run 'su' internally or something like that?
Also forgot to mention I have tried all the one-click-root apps and they do not work for this stupid phone. (well the super one click one was how I figured out how to get the adb shell root but the regular root button doesn't work...)
I can't help with your specific questions, but there is some info about rooting the i1, another iDEN with Android. Although it looks like the i1 is actually Android, and not the Motorola-altered, not-really-Android, proprietary software that the i886 has.
http://www.howardforums.com/showthread.php/1662431-Motorola-i1-Rooted
http://forum.cyanogenmod.com/topic/5520-ive-rooted-my-i1/
garbb said:
I am trying to root a motorola i886. Its a really wierd nextel iDEN PTT phone that is running (i believe) android 2.0 or 2.1 but has no touchscreen...
Basically I have been able to get a root shell (#) from 'adb shell' by pushing some program called psneuter to the phone and running it. Once I had this I could install apps via adb ok, but it seems like whenever I try to run any apps that require root they error saying they do not have root access.
As far as I can tell pretty much every rooting guide for every other phone has you putting 'su' and sometimes 'busybox' into /system/bin and 'Superuser.apk' into /system/app. I did both of these but still got the same errors about apps not having root. I tried a few different versions of these files I found from different sites to no avail. Running su on a terminal emulator on the phone itself would get the error "operation not allowed" or something like that. Then I found some other guide where you just copy 'sh' to 'su' and chmod su to 4755. When I did that I could get to a # prompt on the phone's terminal emulator app by typing 'su' but still got root errors for apps that need root.
I though maybe someone here would know something that I missed. As far as I can tell, I have applied the correct permissions to all these files or have at least tried every combination I can think of to no avail (shouldn't chmod 777 just make everything work?)
Also, does the phone usually come with a stock version of busybox on it? Do you need a specific version of these files for your device or version of android?
When an app on the phone tries to get root access is it just basically trying to run 'su' internally or something like that?
Also forgot to mention I have tried all the one-click-root apps and they do not work for this stupid phone. (well the super one click one was how I figured out how to get the adb shell root but the regular root button doesn't work...)
Click to expand...
Click to collapse
PM to me,i rooted sucefully, and install many applications with android SDK suite.
Regards.
geminis said:
PM to me,i rooted sucefully, and install many applications with android SDK suite.
Regards.
Click to expand...
Click to collapse
Wow, I can't believe someone found this thread and replied after so long. Thanks, but in the meantime I actually figured out how to root it fully and get root apps to work. I think i just tried different su's and superuser.apk's that I found on the internet until one worked...
Now, if you have figured out how to change the nextel push-to-talk chirp/beep sounds then let me know how you did that. I actually found the .wav files for the PTT sounds in some .apk in /system (phone.apk I think?) but for some reason changing them had no effect on the sound the phone makes when using the push-to-talk feature...
Its been 10 years but do you still have the firmware for this device? I need to flash it, it doesnt finish booting up
I don't have a full ROM .zip file for this phone, only some update .zips. But the first link result for a google search for "motorola admiral stock rom" worked for me for downloading a file.
Wrong phone, sorry.
Sorry but i don't understand. Isn't the Motorola admiral a different device? Does that zip work for the i886? If so, how do I flash it, because the i886 doenst have a recovery mode.
Oh, oops sorry, I was confusing this phone with another one. I looked and I don't have and firmware files for this, sorry.
OK, thanks for replying

[Q] Mounting file system, copying *.apks...

Hi all!
I've already written some little apps for Android and so I'm planning to create my first 'useful' app. But I'm undecided yet if there should be a PC- or Android-version.
One important thing: I don't ask for compile-ready code or anything, just how to do it the best way.
What should it do?
The user has some checkboxes where he can check if the filesystem should be mounted, if *.apks should be deleted (how can I get a list of all installed *.apk-files on the phone?) and so on.
If making a version for the PC I think there could be a lot of problems with ADB (on my notebook it's running fine, but other users could run in trouble, couldn't they?).
So my preferred way to go would be an Android-app. But how can I execute the commands the user checked? I know how to create text-files on the phone and how to read the content, but not how to execute commands like su, rm, mount -o and so on.
Could you just help me with this little point?
Thanks in advance,
Lunch
Nobody?
For listing apps installed, you can use the command "pm list packages". That'll give you package names. You can then use "pm uninstall {package name}" to uninstall them.
For running shell commands in apps, here's some info: http://stackoverflow.com/a/5686992
http://stackoverflow.com/a/6809955
https://code.google.com/p/market-enabler/wiki/ShellCommands
Hopefully seeing as you know a bit of Java programming the info at these links will make sense to you.
Thank you! Java is not a big problem, but it's my first combination of Java & Android.
So I'll try it and maybe I can make a runable and non-buggy program out of it.

Is it possible to return s10e to bone stock state after root/TWRP/lineageOS install?

I remember I was able to do this previously on some galaxy phones/tablets I owned, by flashing stock recovery and factory resetting the phone.
I ask because I was given brand new s10e by my company and I am a no-gapps lineage user currently. I wish to retain such a setup, but I am afraid of tampering with the phone and possibly being charged money if/when I decide to leave the company in the future?
By bone stock I mean to exactly the same state as when I received it- stock system, stock recovery, nothing noticably different? Or how far can I get, at least?
Thank you in advance for any guidance
Depending on your model, you might not even be able to do what you want.
But i see no reason to worry if you can by using Odin and correct firmware after.
But there can be issues such as Snapdragons not exceeding 80% charge (if you even can unlock the bootloader).
Chances are you have to keep it stock and ADB out the apps you don't like.
The phone is going to work better without Lineage unless i've missed that volte is now a go.
mindlery said:
Depending on your model, you might not even be able to do what you want.
But i see no reason to worry if you can by using Odin and correct firmware after.
But there can be issues such as Snapdragons not exceeding 80% charge (if you even can unlock the bootloader).
Chances are you have to keep it stock and ADB out the apps you don't like.
The phone is going to work better without Lineage unless i've missed that volte is now a go.
Click to expand...
Click to collapse
Hi!
I forgot to mention the model- its sm-g970f (exynos)
Can I remove google and samsung apps with adb and return them later without compromising the android system? Do you know of any good guide on how to do this?
As far as I understand you will trip Knox irreversibly if you unlock the bootloader. Hence you cannot get back anymore. The closest you can get to your needs is by disabling most Google and Samsung apps by ADB and install a theme that mimics AOSP. Then, a factory reset will get your device back to its original state. Check https://forum.xda-developers.com/galaxy-s10/how-to/galaxy-s10-s10-debloat-bloatware-t3912073/page40 for more info.
macchio said:
Hi!
I forgot to mention the model- its sm-g970f (exynos)
Can I remove google and samsung apps with adb and return them later without compromising the android system? Do you know of any good guide on how to do this?
Click to expand...
Click to collapse
You can disable any app, including systems apps WITHOUT root by following this guide.
First, make a make a backup list of all your currently installed apps via ADB:
adb shell pm list packages -f >C:\AppList.txt
For example, let's "uninstall" the Samsung Smart Switch app which can be found in the above AppList.txt file as
/system/preload/SmartSwitch/SmartSwitch.apk=com.sec.android.easyMover
Sometimes the app's name matches the package/file name perfectly, sometimes they are a little different and takes a bit of guessing.
The package name of the Samsung Smart Switch app is "com.sec.android.easyMover", with its path and file name "/system/preload/SmartSwitch/SmartSwitch.apk", as you can see at least the path and file name contains the name of the app.
To disable it via the "uninstall" command, enter:
adb shell pm uninstall -k --user 0 <package_name>
Example:
adb shell pm uninstall -k --user 0 com.sec.android.easyMover
OR
adb shell cmd package uninstall -k --user 0 com.sec.android.easyMover
Now, to re-enable the above "uninstalled" apps or any other specific one without a factory reset, simply copy and paste the app's package name from the AppList.txt into this command:
adb shell cmd package install-existing <package_name>
Example:
adb shell cmd package install-existing com.sec.android.easyMover
Simple as that!

How do you manually debloat and de-Google the stock OS?

I paid for a bootloader unlock for my Snapdragon Note 10 plus, but it turns out there are no stock based ROMs available for my particular model (non 5G version). I tried LineageOS on another phone, and I don't like it, and I need VoLTE because my carrier ditched 3G.
The bloat and Google apps don't have unisntall options, and this is my first foray into Android 10, though I've been tinkering with Android for many years. It used to be that you could uninstall YouTube and most of the other Google apps easily and the only hard part would be removing Google Play.
I'm guessing that I would need to run some scripts via ADB, or maybe use some Magisk modules. Or maybe even EDXposed.
I know this can get pretty complex, but searching the forums gives a lot of results from 8 years ago, so I haven't found much that's relevant yet.
The only thing what's needed to de-bloat a phone is to root its Android this because so called bloatware typically is installed as system-privileged app what means only user having super-user rights can remove / disable those apps.
Hint: Add Note 10 Plus to this thread's title thus mainly owners of such a phone get addressed.
AllanonMage said:
I paid for a bootloader unlock for my Snapdragon Note 10 plus, but it turns out there are no stock based ROMs available for my particular model (non 5G version). I tried LineageOS on another phone, and I don't like it, and I need VoLTE because my carrier ditched 3G.
The bloat and Google apps don't have unisntall options, and this is my first foray into Android 10, though I've been tinkering with Android for many years. It used to be that you could uninstall YouTube and most of the other Google apps easily and the only hard part would be removing Google Play.
I'm guessing that I would need to run some scripts via ADB, or maybe use some Magisk modules. Or maybe even EDXposed.
I know this can get pretty complex, but searching the forums gives a lot of results from 8 years ago, so I haven't found much that's relevant yet.
Click to expand...
Click to collapse
so, like the post if i helped. because i know it will help. no-root process.
problem is simple
download adb and fastboot from here
connect your phone to pc and check if adb is working by typing command adb devices
if it says waiting for device for a long time use another cable.
install this apk extractor app link ( usefull to see package names like com.android.chrome )
now, setup is ready lets uninstall those battery sucking bloatware.
enable usb debugging from developer option in settings. ( if not enabled click baseband version inside about phone section to enable it)
connect your phone to pc and type abd devices to conform if it is connected.
and then type
adb pm uninstall -k --user 0 <package name>
get package name from apk extractor and uninstall those bloatware.
[email protected] said:
adb pm uninstall -k --user 0 <package name>
Click to expand...
Click to collapse
Wondering why you suggest using this command: it's the most idiotic one I know of - yes I know it's spreaded hundreds of times on Internet and even here on XDA - when it comes to permanently uninstall an app this because this command doesn't completely uninstall an app: the data associated with the app still are kept.
The correct command is:
Code:
adb uninstall <PACKAGE-NAME>
jwoegerbauer said:
Wondering why you suggest using this command: it's the most idiotic one I know of - yes I know it's spreaded hundreds of times on Internet and even here on XDA - when it comes to permanently uninstall an app this because this command doesn't completely uninstall an app: the data associated with the app still are kept.
The correct command is:
Code:
adb uninstall <PACKAGE-NAME>
Click to expand...
Click to collapse
hello mr.idotic who??????????
first of all understand that it's a flagship phone so no problem with storage.
secondarily, it's a powerful command so, if an important app gets deleted then the command i have provided is helpful because we can reverse it easily and have app data.
mind your language please. i was just providing my experience, if you have any good suggestions mention it properly this XDA is community of respectful developers.

Options other than Titanium Backup for backing up/restoring all Android apps?

Currently running a OnePlus 8T + 5G with unlocked/TWRP bootloader which is not rooted, since neither of the two methods want to work on my specific version (KB2007; unlocked former T-Mobile).
Anyway, I'm trying to switch to another ROM but I'm wondering how best to backup/restore all of my apps. Loved using Titanium Backup way back in the day, but am I still correct in assuming that it doesn't work correctly without root access? If so, are there any non-root methods of backing up all or most of my apps along with their current configurations/etc to restore into the new ROM once it's installed? Obviously, most ROMs will support doing it through Google Play, but then it takes forever to log back in to each app, set it all back up, etc. If I've been missing some basic way of restoring all the apps with their configurations intact, please feel free to smack me upside the head with the answer =)
And my apologies in advance if I'm misusing any of the terminology. Before this phone, it has been at least five years since I even tried rooting/unlocking/etc, so I'm a bit rusty.
In the world of computers an app belongs to person who installed it, app's data are owned by the app itself.
Hence it should be obvious that only an user with elevated rights ( AKA Superuser or Root ) can perform a backup and/or restore.
Take note that a temporary root is enough to do the jobs.
Got it. So, in other words, figure out how to root the phone despite the troubles I've been having trying to do so. Unless there's some sort of temporary root privs available that I've never heard of?
To get a temporary root all you have to do is to add to Android OS the binary called SU
Example
Code:
adb push <LOCATION-OF-SU-BINARY-ON-COMPUTER> /data/local/tmp/
adb shell "chmod +x /data/local/tmp/su"
what then allows you to run Android shell commands when elevated rights are needed
Example
Code:
adb devices
adb shell "/data/local/tmp/su -c '<SHELL-COMMAND-HERE>'"
Am I correct in assuming that SU is the same as "switch/substitute user" in *nix? Does that mean I can run TB from the ADB shell, assuming I include the correct command line arguments? Something along the lines of doing a SUDO in *nix before running something that requires admin access or whatever.
I know this might be quite different from what you're looking for maybe?
In the future if you get a rooted rom, I use something called Migrate from the play store, it requires root and just copies all your data into a bunch of twrp flashable zip files.
Play Store
silentrawr said:
Am I correct in assuming that SU is the same as "switch/substitute user" in *nix? Does that mean I can run TB from the ADB shell, assuming I include the correct command line arguments? Something along the lines of doing a SUDO in *nix before running something that requires admin access or whatever.
Click to expand...
Click to collapse
SU in root context usually means super user, as a user with all privileges, but it's the same thing as super user, so yes.
Hello Everyone,
I too am interested in a backup solution for my Android smartphone.
I would happily root or temporarily root, but despite having a computer background that dates back to Unix, I am an Android novice and do not know how to perform these operations which to most people here seem elementary.
Could someone please point me to an easy to understand primer on either temporary root or permanent root.
I would be very appreciative and I am sure that there are other readers of this post who would benefit as well.
Thank you.
AndroidNewbie9000 said:
Could someone please point me to an easy to understand primer on either temporary root or permanent root.
I would be very appreciative and I am sure that there are other readers of this post who would benefit as well.
Thank you.
Click to expand...
Click to collapse
The thing is, that the "official" way to root a device nowadays usually includes a wipe of all user data. You basically have to decide that you want to do full backups before you use an app. This is a security measure so that an attacker cannot use the official way to e.g. access app-internal data on a stolen phone, like secret tokens of 2FA-apps. In order to backup existing app-internal data you either need to use the per-app-backup that the creators of that app did hopefully include or hope that the allowed to do adb backup. That can be used without root, but depending on your Android, apps either need to allow this explicitly or at least not explicitly disallow that in their manifest file.
In principle you can use exploits for non-official rooting to backup existing data that is blocked from adb backup - but this is only an option if you do not have the latest security updates in place and an exploit is publicly available.

Categories

Resources