deleting system apps in recovery keeps them in running os - General Questions and Answers

I want to switch from supersu to superuser, and having an interesting problem that supersu somehow covered up. I have a Nexus 5x running the stock rom. With every months upgrade I would flash using fastboot, go into twrp recovery before first full boot and remove a bunch of unneeded applications in /system/app. When I would boot up those applications would be gone. Somehow this isn't the case with superuser. I can still go into recovery and remove them, but when I boot up all the applications are still in /system/app. If I go back into twrp they are still shown as being missing. I've tried installing es file explorer, but it's unable to delete the applications once the system is up. remounting /system doesn't work either. Any help?
Unrooting supersu caused all the applications to come back; so does supersu not really delete them either, but somehow prevents them from showing up following the recovery scheme or something?

bsd1101 said:
I want to switch from supersu to superuser, and having an interesting problem that supersu somehow covered up. I have a Nexus 5x running the stock rom. With every months upgrade I would flash using fastboot, go into twrp recovery before first full boot and remove a bunch of unneeded applications in /system/app. When I would boot up those applications would be gone. Somehow this isn't the case with superuser. I can still go into recovery and remove them, but when I boot up all the applications are still in /system/app. If I go back into twrp they are still shown as being missing. I've tried installing es file explorer, but it's unable to delete the applications once the system is up. remounting /system doesn't work either. Any help?
Unrooting supersu caused all the applications to come back; so does supersu not really delete them either, but somehow prevents them from showing up following the recovery scheme or something?
Click to expand...
Click to collapse
You aren't doing something right or you don't have something setup correctly. With root, you should be able to unintelligible them completely.
When you removed them, did you wipe cache and dalvik/ART cache before rebooting? If not then the system probably still thinks they are there because they still have data loaded into cache.
I recommend sticking with SuperSU, superuser doesn't work as well as SuperSU
Sent from my SM-S903VL using Tapatalk

I've been googling a bit more. As it turns out there are two system partitions for nougat; in nexus 5x and some other devices apparently. This became more apparent when the file recovery-from-boot.p; which I rename in order to prevent recovery from being overwritten is not renamed when booting the OS. Nougat apparently pulls the system files from somewhere else. So whatever Chainfire did makes it boot the same partition as visible in recovery. Fully unrooting brings all those apps/system partition back. Haven't been able to find a good post that tells me how to to circumvent this without SuperSU; or exactly how this works.

Related

[Q] Rooted Nexus 5 - Return to total default '/supersu'?

Hey guys,
I've done a little Google-ing but I can't find an answer to this one...
So I rooted my new Nexus yesterday but today I started to create myself some backups of the stock ROM just in-case I ever need or want them.
While I was doing this I went through the following process:
1. Ran Google's Factory Image: https://developers.google.com/android/nexus/images#hammerhead.
2. Installed TWRP through Fastboot.
3. Rebooted my bootloader.
4. Opened TWRP's File Manager.
5. Noticed a weird folder...
So from the steps that I have listed above, I'm pretty sure that It's safe to say that the only data/software that is held on my device's storage at the particular point in time is Google's (excluding TWRP), correct?
So back to this weird folder... I noticed a folder in the following directory "/" and it was called "supersu". Is this folder something to do with the Stock Google OS or is this some kind of left-over folder from the ROM that I had used yesterday (unlikely seeing as I have just ran the factory image)?
Here is a DIR Listing of "/":
boot
cache
data
dev
etc
firmware
licence
persist
proc
recovery
res
root
sbin
sdcard
supersu (the folder which raised my suspicion)
sys
system
tmp
usb-otg
Am I in the wrong mindset? Does Google's Factory Image re-format the whole device including "/" or does it just do certain DIRs? Is that "supersu" folder mine or did Google already have that?
Thanks,
LewisD94
EDIT: I know what it is!
TWRP have a built-in service that allows you to install SuperSU to your device without having to download or flash it manually, I'm pretty sure that this folder would have landed it's self on my device when I installed the TWRP recovery through Fastboot... It's the only thing I can think of, testing it now but flashing the Factory Image without a custom recovery. Will report back with results.
FIXED: It must be something to do with TWRP's SuperSU service as I previously mentioned...
I have just ran Google's Factory Image: (https://developers.google.com/android/nexus/images#hammerhead) and installed ES File Explorer then navigated to "/" and I no longer have the folder in question...
New DIR listing of "/"
I don't have that folder. I have the latest TWRP installed. I really wouldn't worry about it though. Just delete it if you don't use Super SU
Sent from my Nexus 5
SuperSU is superuser which grants root access to apps. It was likely left over from a previous ROM because unless you completely wiped the SD card it remains inert.
When you return to completely stock like in the general sticky everything is going byebye.
There are stock ROMs hanging around development that are deodexed or odexed whatever you want. Some of them even have goodies inside.
When you root and unlock bootloader, the super user is installed during the process. Nothing to worry about. SU acts as your phones front door security screening any elevated/administrative task. This is what sprint personnel look for when excepting returns on devices. They know if your rooted and you try to say there is a issue with your device, if they see SU installed they'll know it was probably you who caused it. Besides the main fact but you have nothing to worry about. If you go completely stock and re lock your bootloader, just delete the folder off your SD card.
Sent from my Nexus 5 using XDA Premium 4 mobile app
Must be a TWRP thing. I use CWM and I dont have a supersu folder.

Problems when updating a previously rooted Nvidia Shield Tablet [MOVED HERE]

[This was already posted, I just moved it to the Shield Q&A.]
As many of you may know, Nvidia has recalled their Shield Tablets. I'll be getting a replacement soon. I'll be rooting it as soon as possible when I get it, but first I have a few questions.
First of all, I rooted my tablet using a guide at IBTimes (that used info from XDA forums) installing CWM recovery.
After rooting I installed Link2SD, pretty much the reason I rooted, to save up some space on my internal memory. Everything was going fine, until I received the recall notice. I moved all my app files back to the internal memory, deleted Link2SD, ran a full unroot on SuperSU, (after a while of hanging on the "Please Wait" screen the app just crashed, it wouldn't load up and Root Checker said I had no root access after rebooting.
I don't know whether this was supposed to happen or whether it should have gone more smoothly, please give me an answer to this and tell me if it affected my system in any way) and fastboot flashed the stock recovery.img.
However when I tried to install the update, I got a red triangle error. After checking the log I got an error saying "Package expects build fingerprint of ... or ..., this device has ...."
I can't remember what the fingerprints were, but the first one was something that began with "nvidia/", had a bunch of numbers in the middle followed by an underscore, then it ended with "/release-keys".
However the device's current build fingerprint was exactly the same as the first, except that it cut off halfway through, right after the numbers and the underscore.
I tried resetting my cache, I tried a wipe of the user data. The only way to fix this for me was to re-install a bunch of stock images - recovery.img, boot.img, system.img, etc.
I don't want to wipe my data next time. So I ask for this in my answer:
- An explanation of what the error means
- How this error is caused
- A way to fix this error without wiping my device
- How to prevent this error
- If what happened to SuperSU in my case is normal and if it affected my device in some way
- And, if possible, a way to install the update successfully without getting this error and without having to unroot or remove CWM, and details on how to do this method and any risks.
Thanks in advance. An answer soon would be appreciated.
Quick answer:
- You don't need to restore to full stock before updating to the latest OTA. This is what I did, running a rooted stock system with TWRP recovery:
-- Go to Settings > About tablet > System updates and continue to click Check Now until the update has been found. I had to click like 4 or 5 times before it was found. It'll download automatically to your device (not your SD card), but I forget where that download location is... XD
-- once you've found your downloaded OTA.zip, copy it to a location you can easily find from your custom recovery.
-- reboot into custom recovery, flash OTA.zip, reflash superSU.zip, wipe cache NOT DATA, reboot
-- wait until device boots up, wait until the Optimizing blah blah process is done.
-- enjoy!
Additional thoughts:
- I've tried the Link2SD app, but I think it messes with my system in a way I don't like; personally I'd rather delete the apps I never use via custom recovery (see THIS THREAD on how to debloat your tablet for yourself!
- I think your error happened when you flashed stock recovery on top of the custom one. To prevent this next time, simply wait for either a flashable zip in THIS OTHER THREAD, or you can check to see if nVidia released any OTA3.1 recovery images if you want that full-stock experience.
Hope this helps!

FlashFire with HTC One A9?

Anyone used ChainFire's FlashFire with the One A9?
I've used it for backups successfully but have yet to restore anything with it (a little squeamish to do so :silly.
And I'll just add, if anyone has used it and could offer any tips or procedures that would be great.
FlashFire usage is straightforward, at least for me. I haven't flashed anything dangerous with it directly (bootloader, radio) yet.
It has handled flashing backups of system, boot, recovery, and even the 1.57.617.41 ota flawlessly.
Special thanks to @Chainfire!
Sent from my HTC One A9 using XDA Free mobile app
CSnowRules said:
FlashFire usage is straightforward, at least for me. I haven't flashed anything dangerous with it directly (bootloader, radio) yet.
It has handled flashing backups of system, boot, recovery, and even the 1.57.617.41 ota flawlessly.
Special thanks to @Chainfire!
Sent from my HTC One A9 using XDA Free mobile app
Click to expand...
Click to collapse
Were you already rooted? I'm rooted and xposed and want to update via flashfire. will it work?
theNdroid said:
Were you already rooted? I'm rooted and xposed and want to update via flashfire. will it work?
Click to expand...
Click to collapse
Of course. Root is required to use FlashFire. I use Xposed as well, and I've had no problems updating via FlashFire.
CSnowRules said:
FlashFire usage is straightforward, at least for me. I haven't flashed anything dangerous with it directly (bootloader, radio) yet.
It has handled flashing backups of system, boot, recovery, and even the 1.57.617.41 ota flawlessly.
Click to expand...
Click to collapse
Just for my edification, flashing a firmware update like 1.57.617.41 will wipe my data partition, correct?
eelpout said:
Just for my edification, flashing a firmware update like 1.57.617.41 will wipe my data partition, correct?
Click to expand...
Click to collapse
No not at all. Flashing the OTA will not wipe your data. I've done the .41 and .52 OTAs via FlashFire.
***Warning--if you're not currently encrypted, flashing the OTA will update your boot partition, so be sure to use the preserve recovery option in FlashFire and reboot to TWRP to patch your boot image, or your device will encrypt data on first boot.***
CSnowRules said:
No not at all. Flashing the OTA will not wipe your data. I've done the .41 and .52 OTAs via FlashFire.
***Warning--if you're not currently encrypted, flashing the OTA will update your boot partition, so be sure to use the preserve recovery option in FlashFire and reboot to TWRP to patch your boot image, or your device will encrypt data on first boot.***
Click to expand...
Click to collapse
meaning, flash this A9 boot image patcher from TWRP?
Or does using the EverRoot SuperSU option patch the boot image for us on the A9 (and then does one check "preserve recovery" using that or not)?
This can all get a bit confusing.
eelpout said:
meaning, flash this A9 boot image patcher from TWRP?
Or does using the EverRoot SuperSU option patch the boot image for us on the A9 (and then does one check "preserve recovery" using that or not)?
This can all get a bit confusing.
Click to expand...
Click to collapse
Yes, that's one way to disable forceencrypt. You could also flash the latest SuperSU or Magisk. Either one will disable forceencrypt by default. Of course, if your data is already encrypted, you won't have a problem, but I'd assume that you would like to have root, so I'd recommend SuperSU or Magisk+phh root.
CSnowRules said:
Yes, that's one way to disable forceencrypt. You could also flash the latest SuperSU or Magisk. Either one will disable forceencrypt by default. Of course, if your data is already encrypted, you won't have a problem, but I'd assume that you would like to have root, so I'd recommend SuperSU or Magisk+phh root.
Click to expand...
Click to collapse
i'm already unecrypted and rooted, but on firmware from last year. just trying to find the most efficient way to bring things up to date.
eelpout said:
i'm already unecrypted and rooted, but on firmware from last year. just trying to find the most efficient way to bring things up to date.
Click to expand...
Click to collapse
Ok, this post will go a bit off topic. That being said, I can offer two courses of action. I take no responsibility for anything in this post.
Safest--almost no risk (my personal preference)
1. Backup your data partition, including internal SD via TWRP to ext SD or USB OTG drive. Flash the latest RUU from HTC. Boot stock and apply OTAs until there are no more updates available. Fastboot flash the latest TWRP, and finally restore your data and flash the latest SuperSU via TWRP. Reboot your fully updated, rooted A9 with all your data still intact.
A little risky and untested to my knowledge--could result in a hard brick if something partially fails. FLASHING BOOTLOADERS IN FLASHFIRE IS STILL ALPHA FOR HTC DEVICES!!! This may work with s-on...but may require s-off.
Your system partition must have never been mounted r/w for this to work.
2. Download the OTA zips for your phone from the first update available to the latest and the latest SuperSU and TWRP. Use FlashFire to do everything in one shot. Select allow flashing bootloaders in FlashFire settings, select your OTAs for installation from oldest to newest (don't select restore boot and recovery), select TWRP and SuperSU for installation, disable everroot and preserve recovery. Cross your fingers and timidly press flash... If all is successful, you should have the same end result as option 1.
I STRONGLY recommend the first method, but if you're feeling lucky and decide to try the second method, please share how it goes, since this post is FlashFire related and this would be the ultimate test of FlashFire for our devices.
For me, I've found that though TWRP backups take more time, and DON'T preserve internal storage, it's still the most reliable and consistent way to backup especially for OTAs.
I've previously tried FlashFire restore but it doesn't seem to restore internal storage as claimed; deal-breaker.
The real problem is we want OTA automation to:
1) disable lock-screen (pattern or fingerprint) so emergency restore of /data don't fail to unlock after boot
2) restore OEM recovery
3) flash OTA and let it do its things of updating /system, /boot, etc
4) reflash SuperSU before normal system boot so /boot doesn't try to re-encrypt /data
5) restore whatever the original recovery was
6) boot
The problem always is catching the step between 3 -> 4 in some automated way. If the OTA goes all the way through, /data is encrypted and so time is wasted to go back to recovery after full-boot, wipe /data, restore /data, lost internal storage contents and PICTURES. If pattern-lock / finger-print lock is not disabled (1), you won't be able to get past the lock screen as it won't recognize the correct lock-pattern nor fingerprint. Solution is to adb shell in, and move/delete some files as root. PITA and I don't think FlashFire does this.
If you did manually restore /data, then /data is corrupted for some apps that use it such as Waze, LINE, KakaoTalk, Whatsapp, etc where they can't write to their data directories anymore. A reinstall of the app is the only way to fix it.
NuShrike said:
For me, I've found that though TWRP backups take more time, and DON'T preserve internal storage, it's still the most reliable and consistent way to backup especially for OTAs.
I've previously tried FlashFire restore but it doesn't seem to restore internal storage as claimed; deal-breaker.
The real problem is we want OTA automation to:
1) disable lock-screen (pattern or fingerprint) so emergency restore of /data don't fail to unlock after boot
2) restore OEM recovery
3) flash OTA and let it do its things of updating /system, /boot, etc
4) reflash SuperSU before normal system boot so /boot doesn't try to re-encrypt /data
5) restore whatever the original recovery was
6) boot
The problem always is catching the step between 3 -> 4 in some automated way. If the OTA goes all the way through, /data is encrypted and so time is wasted to go back to recovery after full-boot, wipe /data, restore /data, lost internal storage contents and PICTURES. If pattern-lock / finger-print lock is not disabled (1), you won't be able to get past the lock screen as it won't recognize the correct lock-pattern nor fingerprint. Solution is to adb shell in, and move/delete some files as root. PITA and I don't think FlashFire does this.
If you did manually restore /data, then /data is corrupted for some apps that use it such as Waze, LINE, KakaoTalk, Whatsapp, etc where they can't write to their data directories anymore. A reinstall of the app is the only way to fix it.
Click to expand...
Click to collapse
The solution for problem 1 can be handled in TWRP. The files can be deleted via TWRP's file manager or the built in terminal, which may be easier for some people.
Also, the solution for the corrupted data and internal SD is to create an image of the data partition (just like the system image backup option). This can be done via dd in TWRP or adb. It requires a large amount of storage and it takes longer, but I've had to do it, since I use VIP Access by Symantec for work. A normal file based backup in TWRP breaks that app. This also keeps the pin/fingerprint data intact.
If we could have that implemented in a user friendly manner, that would be great, but I'm sure CaptainThrowback and Chainfire both have bigger issues to deal with. I could probably figure out a solution, but the work wouldn't be worth it for my own benefit, since I'm fluent with the Linux command line.

LG Sunset (LG33L) deleted wrong app question

I know this is probably a shot in the dark, but the phone was rooted with kingroot and working great, I decided to be an idiot and factory reset. I must've deleted a system app that made the phone function properly. The lock screen doesn't work. The recent apps button does nothing either. Also, when I restart the phone it starts the whole factory reset process over. Does anyone have any idea what LG app may govern these things? The phone works besides this, but that is pretty major stuff. I know it's a cheap phone but I thought it was worth asking.
CaptainPatterson said:
I know this is probably a shot in the dark, but the phone was rooted with kingroot and working great, I decided to be an idiot and factory reset. I must've deleted a system app that made the phone function properly. The lock screen doesn't work. The recent apps button does nothing either. Also, when I restart the phone it starts the whole factory reset process over. Does anyone have any idea what LG app may govern these things? The phone works besides this, but that is pretty major stuff. I know it's a cheap phone but I thought it was worth asking.
Click to expand...
Click to collapse
If you can find a copy of your stock firmware, you can:
1) extract the system apps from the firmware(they'll be in the /system/app and /system/priv-app folder, extract the ones that you don't currently have on the device), then push those apps to the corresponding folder on the device using adb push or by using an app that has a root browser.
2) extract the /system/app folder and the /system/priv-app folder, then use adb push to push them back to /system on the device.
3) extract the entire system.img from the firmware then use adb shell and a dd command to dd the system.img on the device to replace the corrupted system with a complete system.
Or you can get copies of what you don't have from another member here with the same device and firmware then use those to replace the deleted apps
After getting them back to where they go, boot to recovery and wipe cache but don't factory reset.
It's always best to disable or hibernate system apps first to determine whether they are needed, if disabling/hibernating them cause issues then you know they can't be deleted, in this case, re-enable/unhibernate the app. If disabling/hibernating an app doesn't cause an issue, then it's safe to remove/uninstall that app. Do this process one app at a time and you'll figure out what you have to keep and what can be gotten rid of. And remember, after removing or adding system apps, you have to boot to recovery and wipe cache partition (and/or dalvik/ART cache if you have custom recovery). Failing to do the wipe will definitely cause issues.
@CaptainPatterson, I added more info.
I DO NOT PROVIDE HELP IN PM, KEEP IT IN THE THREADS WHERE EVERYONE CAN SHARE

7 Pro stuck in boot after removing Magisk

I've been having a bunch of problems recently with my rooted 7 Pro including Magisk Manager constantly "keeps stopping", not being able to access Hide to add new applications, banking apps starting to detect that I'm rooted and camera issues: the camera app not starting, the camera not popping up automatically and the image being usually reversed and occasionally upside down as well, depending on the app I'm using.
Given that Magisk appears to be dead/dying, having lost its developer to Google, I thought I'd start by getting rid of that and then performing a firmware upgrade in necessary to see if that fixes the other issues.
I uninstalled the Manager then ran the uninstall zip within TWRP. Rebooting though hangs on the initial "ASUS" screen.
I can get back to TWRP ok so I guess I'm not bricked yet. My next thought was to try a system upgrade but I seem to need to know the exact version I need, which, seemingly, I can only get via a working phone?
From the back, it says only model I002D along with SN and IMEIs.
I've done a TWRP backup to the external uSD card, and I have a syncthing copy of all of the internal memory that I can access without root.
My questions:
1. Is there something there which can help my figure out which firmware I need to download?
2. Is there any way to install this without wiping the phone?
Please see this post.
When I try to burn rom with TWRP, img burns but it doesn't start and zip gives an error and cannot burn.
When I first burned custom ROM (unofficial AEX), it did not start, so when I deleted the data from TWRP, it seems that I deleted things that should not be erased, so even if I burn it from the zip file, with the error message in the image below I...
forum.xda-developers.com

Categories

Resources