[Q] Rooted Nexus 5 - Return to total default '/supersu'? - Nexus 5 Q&A, Help & Troubleshooting

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.

Related

[Q] Superuser Force Closing

I just rooted my Inspire. I'm trying to flash a ROM for the first time using ROM Manager. It says I need CWM Recovery installed before continuing. But it is installed as far as I can tell, it is. There's a folder for it on the SD card. I tried using Flash ClockworkMod Recovery and it causes Superuser to force close.
I've search every string of words I can think of and none of the threads coming up are related to my issue. Fast Boot is off. Debugging is on. I'm new to flashing ROMs, so I'm sure it's something simple I'm missing, but it is REALLY pissing me off.
One of the threads did mention a superuser zip file needing to be in the root directory of the SD card. I don't see one in mine, so I won't be shocked if that's the problem. But then, it becomes a matter of finding where to download that zip.
Please help.
oscarbum said:
I just rooted my Inspire. I'm trying to flash a ROM for the first time using ROM Manager. It says I need CWM Recovery installed before continuing. But it is installed as far as I can tell, it is. There's a folder for it on the SD card. I tried using Flash ClockworkMod Recovery and it causes Superuser to force close.
I've search every string of words I can think of and none of the threads coming up are related to my issue. Fast Boot is off. Debugging is on. I'm new to flashing ROMs, so I'm sure it's something simple I'm missing, but it is REALLY pissing me off.
One of the threads did mention a superuser zip file needing to be in the root directory of the SD card. I don't see one in mine, so I won't be shocked if that's the problem. But then, it becomes a matter of finding where to download that zip.
Please help.
Click to expand...
Click to collapse
You need to reinstall su.
It's not letting me install it for whatever reason.
There is a certain irony that running "Fix Permissions" to solve the force close issue CAUSES Superuser to force close.
did you unzip the file? What rom are you running? Do have sdk?
I unzipped the file. Moved to the SD. Tried installing it from there. Yes, I have permissions set to install from non-market sources.
I'm running, presumably, the AT&T stock ROM, unless the Simple Root S-Off program installed something different.
Don't know the answer to the SDK question.
Have you tried to clear out the 'data' for 'Superuser' application under application settings?
oscarbum said:
I unzipped the file. Moved to the SD. Tried installing it from there. Yes, I have permissions set to install from non-market sources.
I'm running, presumably, the AT&T stock ROM, unless the Simple Root S-Off program installed something different.
Don't know the answer to the SDK question.
Click to expand...
Click to collapse
As said try clearing data and cache.
If that doesn't work.
Uninstall su.
Download anrdoid SDK
Cope all the files from platform tools to tools
place su apk in tools folder
shift+right click on the tools folder, open command promp
use adb to push apk
Code:
adb devices( make sure it is connected)
adb remount
adb push ./(name of app) /system/app
Here's a possible reason I'm having a problem.
When I did the root, I used a spare SD card to make the gold card. I've been trying to flash a ROM with my regular SD card. Could that be what's causing it?
oscarbum said:
Here's a possible reason I'm having a problem.
When I did the root, I used a spare SD card to make the gold card. I've been trying to flash a ROM with my regular SD card. Could that be what's causing it?
Click to expand...
Click to collapse
no, the gold card is only needed to downgrade the radio/rom and pass the CID check.
So here's where I'm at....
It won't let me install the superuser fix above.
It won't let me uninstall superuser.
I even purchased the pro version for the Market, hoping that it might install a version over the version flashed there and that doesn't force close every freaking time I try to do anything in ROM manager.
In the meantime, I miss about 50% of the texts, emails and notifications on my phone because, of course, I don't HEAR them. And the bloatware is bogging down the phone.
So, are there any suggestions before I walk outside and throw this phone into the Atlantic Ocean?

I have screwed up

Epic 4G
Rooted my phone last night, everything went well. All I was going to do was make my phone compatible with netflix, so I edited my build.prop to do that. All that process did was make my Swype keyboard stop working.
The first time, I used ES File Manager to copy build.prop out of the system folder, pasted to SD card, edited it, cut it from SD card and I put it back in system, overwriting the build.prop that was in there. No problems. When I attempted to do that again, I got the error "build.prop cannot be moved!" I did the exact same process, only now it wasn't letting me do it.
So I was googling ways to restore build.prop, and someone said to flash a different rom. I attempted to flash Syndicate ROM. I followed all the instructions just as there were at Samsung Epic Hacks.com, and now my phone is frozen at the first screen that happens on boot "Samsung/ww w.samsungmobile.com"
I also attempted to reflash the Froyo update from Sprint, that had no results.
So you flashed a different ROM to the one you already were using without wiping?
If so then it's no wonder your device is now stuck in a boot loop. I would say go into recovery do a full wipe and reflash.
For future reference get Root Explorer and when you use that to modify build.prop it will automatically create a backup. No need to paste it onto SD etc...
Just remember to mount System R/W within the program.
Good Luck!

Need experienced dev help w/ adb root vs. flashing *.tar (/system) root through Odin

I was originally rooted by using invisiblek's original "stock" root, which contained some Sprint stuff, so I opted to do a clean start from a stock Verizon rom, but to save time I rooted using the adb script method from GS3DebugFSRoot http://forum.xda-developers.com/showthread.php?t=1792342 instead of Root66, which requires a 1.5 GB image download then must be flashed through Odin.
I did this to avoid some of the strange app behaviors from the rooted "Sprint" rom, but after rooting through adb with an automated script, some root apps don't function properly, even though they're getting root permission.
After doing some research and restoring my sprint NAND backup several times to compare, the main things I noticed are:
1. After rooting through adb, the Superuser.apk app is installed in /data/app (which is a user app location) as opposed to /system/app in the case of the flashable root method.
2. Superuser.apk is called com.noshufou.android.su-1.apk instead
3. Superuser.apk from a flashed rom has these permissions (seen using root-expl)
rwsr-sr-x, but the adb method file xxxxxx.su-1.apk has these permissions rwxrwxr-x
4. The owner of the file is "root" when flashed through Odin, but "system" when rooted with adb.
Otherwise, the su binary itself is ok, it is a newer version and larger in size compared to the flashed versions, but it has the right permissions and is located correctly in /system/xbin.
I tried deleting the xxxxx.su-1.apk in /data/app and copying Superuser.apk to /system/app, to make it a system app, reset permissions and "owner" and "group" to root, but lost root after rebooting, so had to start back from my NAND backup again.
Does anyone know how to make Superuser a system app in the /system/app folder without losing root?
Also, I'm not sure this is the cause, but Titanium Backup has a hard time detecting root every time I start it, and has to be restarted multiple times, which wasn't a problem when flashed root w/ Odin, and most importantly, DroidWall is not blocking ANYTHING, whether it's in whitelist or blacklist mode, which it did when I used Odin to flash a rooted rom. I've tried everything, bu to no availe, can a dev that might have an idea what is going on here, help me with this and point me in the right direction to look for what to fix to get DroidWall to work, and if that is causing these issues, to get Superuser installed in the right folder?
Thank you
Nvm, I can't seem to find it again, I know I saw it somewhere though. If this was the OG Droid or Droid 2 I could tell you how to adb push no problem, but it's my first Samsung device. I don't know if anything is different, and I don't wanna be responsible for a brick :S

deleting system apps in recovery keeps them in running os

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.

data/app problem, apps disapeared but folder seems OK

Hello Android lovers
I'll try to make it as simple and easy as I can, I searched a few hours on google, XDA and everywhere but can't find any answer.
I have a Asus Zenfone 2 with BORETS Stock ROM with android 6.0.1 and it worked fine since this week and a bad app update.
I updated MinMinguard to 2.1 and after reboot i got black screen... I can only press power button and see the reboot panel, and reboot, etc...
So I used TWRP to delete MinMinGuard in "data/app" folder, but first time I used it and I did some mess, copied some "com.xxxxxx" in another "app" folder inside the same, so like "data/app/app/com.xxxxx". before finally delete MinMinGuard folder.
And it worked, reboot was ok, apps was ok, all fine.
But I wanted to make it all clean, delete copied "app" folder in "data/app" but since everything is ****ed up. Android boot fine but I loose nearly all apps. Just left Asus apps every other is out, even playstore, google apps and stuff... So I can't do anything...
So, "data/app" folder is NOT empty
- each app folder have "base.apk", "lib" and "oat" folder (seems normal)
- tried to install ROM again a few times (to at least got play store and install apps again) did not worked
- formated cache and dalvik, after reboot I got "optimizing" popup and 88 apps instead of 135 before the mess.
- modified chmod of "app" folder because it's maybe just a reading problem as the folder is not empty.
And I'm out of idea................
I'd like not to format data/system as my backup is not up to date... And I don't even know if it''ll save the stuff...
If I have to format all, can you tell me how not to loose all my data (hard and ugly backup ), I saw a "data/data" folder, seems it will do the trick...
And about SMS I saw "/data/data/com.android.providers/telephony/databases/mmssms.db", will this work ?
Thanks a lot for your help
I'll have to move for 2 days and without my phone I'll have some troubles... ^^'
Nicopol. said:
Hello Android lovers
I'll try to make it as simple and easy as I can, I searched a few hours on google, XDA and everywhere but can't find any answer.
I have a Asus Zenfone 2 with BORETS Stock ROM with android 6.0.1 and it worked fine since this week and a bad app update.
I updated MinMinguard to 2.1 and after reboot i got black screen... I can only press power button and see the reboot panel, and reboot, etc...
So I used TWRP to delete MinMinGuard in "data/app" folder, but first time I used it and I did some mess, copied some "com.xxxxxx" in another "app" folder inside the same, so like "data/app/app/com.xxxxx". before finally delete MinMinGuard folder.
And it worked, reboot was ok, apps was ok, all fine.
But I wanted to make it all clean, delete copied "app" folder in "data/app" but since everything is ****ed up. Android boot fine but I loose nearly all apps. Just left Asus apps every other is out, even playstore, google apps and stuff... So I can't do anything...
So, "data/app" folder is NOT empty
- each app folder have "base.apk", "lib" and "oat" folder (seems normal)
- tried to install ROM again a few times (to at least got play store and install apps again) did not worked
- formated cache and dalvik, after reboot I got "optimizing" popup and 88 apps instead of 135 before the mess.
- modified chmod of "app" folder because it's maybe just a reading problem as the folder is not empty.
And I'm out of idea................
I'd like not to format data/system as my backup is not up to date... And I don't even know if it''ll save the stuff...
If I have to format all, can you tell me how not to loose all my data (hard and ugly backup ), I saw a "data/data" folder, seems it will do the trick...
And about SMS I saw "/data/data/com.android.providers/telephony/databases/mmssms.db", will this work ?
Thanks a lot for your help
I'll have to move for 2 days and without my phone I'll have some troubles... ^^'
Click to expand...
Click to collapse
If you still have TWRP, create a nandroid backup using the backup feature in TWRP, then save the backup on external sdcard or on PC. Then use the wipe feature in TWRP, then select the "advanced wipe" option then select the system partition, data partition, cache partition and dalvik cache, then swipe the slider to wipe, then you're ready to flash whatever custom ROMs are available for your device. After flashing your ROM, you can extract your data from the TWRP backup that you created and restore the data of your choice back onto the device.
Or, you can flash your original stock firmware. The easiest way to find what you need to do this is to do a Google search for:
"Return to stock (your model number)"
That should find the needed files, tools and instructions. After restoring stock firmware, start over with getting the device rooted and TWRP installed. Then you can extract the data of your choice from your TWRP backup and restore it on the device.
Sent from my LGL84VL using Tapatalk
Droidriven said:
If you still have TWRP, create a nandroid backup using the backup feature in TWRP, then save the backup on external sdcard or on PC. Then use the wipe feature in TWRP, then select the "advanced wipe" option then select the system partition, data partition, cache partition and dalvik cache, then swipe the slider to wipe, then you're ready to flash whatever custom ROMs are available for your device. After flashing your ROM, you can extract your data from the TWRP backup that you created and restore the data of your choice back onto the device.
Or, you can flash your original stock firmware. The easiest way to find what you need to do this is to do a Google search for:
"Return to stock (your model number)"
That should find the needed files, tools and instructions. After restoring stock firmware, start over with getting the device rooted and TWRP installed. Then you can extract the data of your choice from your TWRP backup and restore it on the device.
Sent from my LGL84VL using Tapatalk
Click to expand...
Click to collapse
As obvious as it was I forgot about the nandroid backup... ^^'
Thanks a lot for detailled steps
Edit : I made a backup of system and another backup of data. formated only system. flashed Borets ROM again. Started good but like a fresh new phone.
So I restored only data (folder "data/app" was empty) and again everything is messed up...
I'll go with fresh install and install back every apps (damn annoying), it seems "data/data" was fine so I hope all apps data will be safe... SMS is the most important...

Categories

Resources