System partition access issues after failed root attempt - Samsung Galaxy S7 Questions and Answers

Hi all,
I recently moved from Windows Phone to Android and have been enjoying fiddling with my phone. I rooted the phone using ODIN and CF Auto Root (CF-Auto-Root-herolte-heroltexx-smg930f.tar.md5). I used Titanium Backup to remove a lot of bloatware from my device, but ended up making a mess of things. I then flashed the stock firmware for my Telstra device from Sammobile (G930FXXU1APF2_G930FTEL1APF2_TEL).
Everything seemed fine, but I now cannot use Titanium Backup to integrate updates or move apps to the system partition. I have tried using ES File Explorer and an adb shell to do this also, but with no luck. The apps either do not work, or are installed back into /data/app. It seems to move the apk to /system/app (I can see it there), then removes the app from /data/app and then hangs. If I reboot the phone, the app is uninstalled (but the apk is still in /system/app). I have noticed via /proc/mounts that the /system partition is often mounted RO. Even when I remount RW after TB starts processing it immediately becomes RO.
I have set the TB to use indirect app loading, enabled USB debugging and unknown sources for apps.
Before I reflashed with the stock firmware I was able to move apps to the system partition (I did Gmail and Google Keyboard and they worked well). Could I have stuffed up my firmware flashing? I only used the AP file, not BL/CP/CSC/UMS that were included in the download.
I apologise in advance if I am all over the shop here with my description. I know enough to get myself into trouble but not enough to get out! And yes, first thing I did after flashing was to back everything up so I don't make the mistake again...

Related

i cant uninstall a corrupt app

ughh this is what happens when i get tooo adventurous
okay, exactly what happened,
i tried to edit the icons of some after market applications and put them onto a theme update for myself,
i got the apps off of my phone using appmanager,
one of which was hello im!
well that hello im app install unsuccessfully, only shows up in atrackdog and the applications list under settings, and refuses to be uninstalled, i even tried to download the real hello im! again over it but because it refuses to uninstall i get an error!
what have i done?
cd /data/app (or /system/sd/app if you've got apps on sdcard)
rm com.corruptapp.apk (probably com.helloim.apk)
no such file or directory
according to astro it reads com.multiplefacets.aol but that didnt work either
does anyonee know?
i really really dont want to start over and reset my phone because of this
backup your apps, and wipe your phone, then just install the one's that work, sincce you tried the easy solutions that seems to be the most likely to work now
or you can just use fschk in linux os....
sadly im runnin vista
okay i tried this
cd /system/app
rm HelloIM!.apk
and it actually found it, because that is where it is
but refused to delete it saying it is a read-only file system
YESSS I WINNNN!
MWAHAHAHAHA
i used the same technique that is used to manually delete the stock sounds and by doing so i was able to remount the system as read/write and delete that sucker!
http://forum.xda-developers.com/showthread.php?t=474939&highlight=delete+system+files&page=2
Awesome. Glad you got it without wiping.

[Q] Howto remove twitter, facebook and other bloatware

Hello,
I flashed to leedroid 1.3 and i use Titanium backup to remove it like they wrote on the Forum, but it doesn't remove them.
It gets rebooted and then hangs with black screen and android warning picture.
I need to remove the battery to restart the phone.
Any other ideas to remove twitter/facebook/Peep and other social media apps.
THNX for your knowledge input.
you can also manualy remove the apps by deleting them (or renaming their extention e.g. .apk -> apkx) with a root explorer, for example 'root explorer' or 'ES File Explorer' in the /system/app folder.
I can remove it, but it returns after reboot + on "pm uninstall com.twitter.android" I get "Failed"
You need to root your phone first. Visit the forum section dedicated to your phone, read a bit, read a bit more, root it, then wipe that bloatware off.
@Captkiwi just download z4root it works with 99% of phones-use it and buy rootexplorer, open it, go to system/app, click mount r/w and delete bloatware Good luck
Making phone to be S-OFF is crucial. This thread helped me S-OFFing it properly (made bootable USB with unetbootin), and now this procedure works... Previously it didn't while the phone was still S-ON.
Hope this helps people, been struggling with my phone for a month now... Finally it seems I control my hardware
Make sure USB Debugging is on
Install z4root by downloading the apk and allowing non-market apps. Find it on sd card and install with longpress or something.
After you root, install titanium backup free version.
You can use this to backup and then uninstall all the bloat you want.
Sent from my M860 using XDA App
Ok - looks like there are 2 main options
1) Install Titanium backup and delete bloatware from there (Rooted Phone)
..........This option doesn't appear to work all the time - is it because the bloatware doesn't show up or because its listed with and unusual name like---- SNS 1.0 -- that twitter hides behind?
2) Use "a" file explorer on a rooted phone and go to---- system/app ---and find the apps and delete them ....nope still cant find the bloatware....
.........try another folder ..... /data/app/ ....still nothing
Anyone got any more ideas?
I'm working on an ideos X5

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

/data restore uid mismatch reference

I was getting ready to update my tablet and try the official ICS as well as the CM9 builds. Just before getting ready, I was apparently bitten by a bug in the busybox installer (1.20.0) which disabled all network access from my device. I also tried the platform.xml permissions change to add sdcard_rw but apparently something went wrong and I was left with no write access to either /mnt/sdcard/ or /mnt/sdcard/extStorages/SdCard/. I was therefore unable to find a way to run TitaniumBackup to get a consistent backup (no network for external backup, no local storage for even root-requesting mode), but wanted some sort of backup before wiping my tablet. I ended up finding an rsync binary, and via an adb root shell rsynced all of /data/app, /data/app_private, /data/media, and the wpa_supplicant file for wifi to the internal sdcard.
I have since wiped and installed the 8/10 CM9 release, and have all of my apps available. I've also restored the data and run the fix_permissions script from the CWM recovery. What I did was copy /data/app and /data/data back at the same time via a recovery adb shell. What I ended up with though, is the lib directory from each of the copied data directories being symlinked to an invalid target (lib -> /mismatched_uid/settings_NNNNN/fs_0, where NNNNN is an app id, and differs for each data directory). What this causes is for apps not only not having write permissions, but those that require libs fail at startup to even load their expected libraries are terminate immediately.
I realize after doing this that one can't restore apps and data at the same time via recovery - the fix_permissions script won't work until at least one boot cycle so that the system can process the new apks and assign app ids. I've rerun the script and the permissions are set appropriately, however I am still stuck with the broken lib directories for each of the effected packages.
Since I don't have any important data changes since the load, what I'm going to try doing is wipe /data/data and reload the content in recovery since they have now been assigned app ids. However, as a point of question, what, and when do the /data/data/*/lib/ directories get replaced with the broken symlink, and if when that situation is encountered is there anything that can be done besides reloading the data properly (or an uninstall/reinstall)? I couldn't find any trace of the previous contents of the ./lib/ directories. I've tried with a couple test cases using Titanium Backup to backup the app (even with the broken symlink), then uninstall the app and reinstall the app plus the data. This works, I presume because the appid is managed appropriately.
I tried again and it didn't work as I expected above. I re-copied the /data/data/ contents via adb in recovery, ensured that the lib contents were correctly linked (./lib/ owned by system, other dirs owned by app_NNN). However, after booting the device, I had the /mismatched_uid/ links reappear.
Any pointers on how to bulk restore the data and tie it to the app properly?
mrjoel said:
I tried again and it didn't work as I expected above. I re-copied the /data/data/ contents via adb in recovery, ensured that the lib contents were correctly linked (./lib/ owned by system, other dirs owned by app_NNN). However, after booting the device, I had the /mismatched_uid/ links reappear.
Any pointers on how to bulk restore the data and tie it to the app properly?
Click to expand...
Click to collapse
I'm having a similar problem with no wifi, and mismatched uids (and consequently no /data/data access -> crashing apps) on another device. I've been searching (and learning) for about two weeks now. Did you ever figure this one out?
tonestertm said:
I'm having a similar problem with no wifi, and mismatched uids (and consequently no /data/data access -> crashing apps) on another device. I've been searching (and learning) for about two weeks now. Did you ever figure this one out?
Click to expand...
Click to collapse
Did u try flash Pit file?
Sent from my GT-P6200 using XDA Premium
tonestertm said:
I'm having a similar problem with no wifi, and mismatched uids (and consequently no /data/data access -> crashing apps) on another device. I've been searching (and learning) for about two weeks now. Did you ever figure this one out?
Click to expand...
Click to collapse
No, I didn't directly figure it out. I ended up doing the restore, and using TitaniumBackup to backup all apps with the broken ./lib/, then uninstalled them all and reinstalled them. When reinstalling, the lib directory was correctly generated with a [newly] associated uid.

Galaxy S7 SM-G930F (6.0.1) - System Partition Size

Hi All
I am hoping someone can help... I have the Galaxy S7 (SM-G930F / 6.0.1 / UK / EE) and have come up with an issue.
I use Cerberus Apps in case my phone is lost - you are able to install this into the system to avoid someone wiping the phone and removing the software. To do this the phone must be rooted and then I usually use Link2SD to transfer the app to make it a system app. This has always worked on my old phones - but alas not this time.
The problem is that the system partition (4Gb) is full!! I have deleted all the language packs to try and clear some space - but it is still full! Strangely enough I also uninstalled an "Amazon" app which was listed as being a system app and quite large (from memory I think it was just under 100Mb)... but when I removed it and rebooted the system partition free space remained unchanged! It's possible that Amazon was a user app and I mis-read it... but anyway - I thought that the only way to clear some space was to resize the system partition - so I installed TWRP (3.0.2), have done a complete backup (system/efs/etc) apart from \data as this showed 0Mb and "failed to mount" when I tried to back it up originally.
So, my question is - can anyone help me to free some space from the system partition to allow Cerberus App to be stored there? I did think about uninstalling the VR Gear files as I dont have a VR device and assumed I could re-load these from Google Play if needed - but I do have the Galaxy Gear watch - so decided not to remove these files in case it screwed this up. Not sure which Google Apps I can remove and re-install if needed... so if anyone knows this, then that would be a help too
I thought you could resize the partition in TWRP but cant find any clear details on how to do this, so thought I'd ask here before I screw the phone up :silly:
Any ideas/help greatly received.
TWRP doesn't support encryption so that's likely why /data won't mount. Resizing partitions is typically done via Odin with PIT files, but it's very dangerous, so I wouldn't recommend it.
Luxembourg ROMs have around 130mb free system space, so there must be a ton of carrier bloat in yours. This doesn't sound right though, it's required that there is some space for expansion. Could you run the following command in a root terminal and post the results please?
df -k | grep system
CurtisMJ said:
df -k | grep system
Click to expand...
Click to collapse
Thanks Curtis - I left my phone at home today, so will try this tonight and post results. After deleting all the unwanted language files I have about 40Mb space free, but this still doesnt seem to be enough as when I run Link2SD and reboot the phone, Cerberus has vanished and has to be re-installed... although when it re-installs it shows it as an "update" which would indicate that it is installed already - just 'lost' ???
Will update tonight when I get a moment.
Thanks
That's interesting actually. It seems to be indicative of permission issues. The app was successfully moved to the system, but the permissions on its files were wrong and the system refuses to load it(Link2SD's fault, essentially) . It's still acknowledged by the app manager though, which is why it can be "updated". Can you try move it with something apart from Link2SD? I recommend titanium backup.
CurtisMJ said:
Can you try move it with something apart from Link2SD? I recommend titanium backup.
Click to expand...
Click to collapse
Thanks Curtis - I have Titanium Backup (free version) installed already so can give it a go - I have only used it for backups (a long while ago) and have never used it to relocate an app... is it fairly self explanatory how to do it?
Will look tonight when I get in
Thanks
Just tried with titanium myself and it fails in a similar manner. Seems Marshmallow is a little fiddly and Link2SD puts out a generic message when it has issues. Titanium just freezes. You'll have to do it manually
First you'll need to clear the system of failed attempts. Look in the /system/app and /system/priv-app with a root Explorer for Cerberus apks or folders. Next, look in the /data/app folder and find the Cerberus folder. Take note of this path.
Next, fire up a root terminal and enter the following commands. In my case I was moving Greenify.
mount -o remount,rw /system
cp - a /data/app/com.oasisfeng.greenify-1 /system/app/Greenify
Replace the data folder with your noted path. The system path can be anything.
Then reboot and the app should be system.
Hi Curtis
Thanks for spending so much time on this.
OK, I skipped straight to the manual relocation method that you said. Whilst the app is Cerberus the APK etc is called System Framework as I have installed the 'hidden' version rather than the one which shows as Cerberus on the phone. However using OI File Manager, when I look in /system/app and /system/priv-app folders there is nothing called Cerberus or System Framework... so I am assuming that there are no orphaned APKs or other files.
But, this is where the strange thing starts, when I look in the /data/app folder, it is empty... so I am guessing I am looking in the wrong place as there are loads of apps! I am looking from home then selecting data, etc... any thoughts?
Oh, I have checked that hidden files are shown too!
Thanks again
i used to install the same app on my S7
please follow this guide & let me know the result.
1- uninstall Cerberus App, Link2SD, TTb, etc. and reboot
2- install SystemCleanup.
3- from the app SystemCleanup swip to tab apps and remove some bloatware like Google books, music, games, google TTS.
4- Reboot & install Cerberus App, do not run it.
5- from the app SystemCleanup go to apps tab and move Cerberus App to system/app & reboot again.
6- That's all.
Click to expand...
Click to collapse
Hi Abuzar
Thanks for the help... I tried using System Cleanup and initially it didn't work... it didn't show System Framework after cleaning up which made me think it was uninstalled properly. But when I tried to re-install it I got a message asking if I wanted to update the the built in application... so I said yes and re-checked in System Cleanup and it was visible, so I tried uninstalling it and after a couple of attempts it succeeded.
Then I re-installed and it installed it as a new app and it was visible in System Cleanup as installed in /data. So, I moved it to /system and configured it. It now lists in System Cleanup as being installed @auto system+data... so I am assuming it has installed properly... but not 100% sure as it lists some of it in data - so not sure if after a reset it will wipe the user profile from Cerberus or not.
I took a backup in TWRP and thought I would do a factory reset and test it... but on the S7 using factory reset in O/S it asks for my samsung password etc so looks like it may delete my Samsung/Google account's so didn't proceed as I didn't want to delete any online info. So... I tried factory wipe in TWRP but it just said failed "could not mount /data and unable to find crypto footer" and a few more "failed to mount /data" errors... so I gave up and will have to assume its installed properly as a system app
Thanks for all your help.
Just as a final note, the system+data combo sounds normal. Under regular conditions, the system partition is read only, so in order to install any updates to system apps, Android actually installs them as data apps, but cross-references them to system apps and gives them the relevant permissions. You can remove the data part by selecting "Uninstall Updates" in the app info page.

Categories

Resources