[Q] How to delete files/folders from /sdcard? - Samsung Galaxy Nexus

After rooting my Galaxy Nexus with Wug's Root Toolkit and sim unlocking with the Docomo hack, and then restoring my apps/data (can't recall if I restored from GN Toolkit or Root Toolkit), my camera app was messed up--could snap pix but they didn't save; and video always fc'ed. The solution turns out to be to rename or delete the DCIM folder. I couldn't delete--so I renamed. Now I am trying to delete that DCIM.old folder and contents (eating up 1+G on my storage), but cannot delete either individual files or the folder. I'm sure there is a simple solution, but I can't find it. Help (even with a condescending attitude ) much appreciated!
zzcat

If you use a file explorer, that has it's standard directory at / then all you need to do is navigate to /mnt/sdcard/ then make sure it's mounted as R/W and not R/O, if all that is the way I said it, you shouldn't have problems deleting anything, if so, use the ADB and type:
Code:
adb shell rm /mnt/sdcard/<Folder>
That should then do the trick

You could also try the following Apps:
- Rootexplorer (paid)
- Astro File Manager

familyguy59 said:
If you use a file explorer, that has it's standard directory at / then all you need to do is navigate to /mnt/sdcard/ then make sure it's mounted as R/W and not R/O, if all that is the way I said it, you shouldn't have problems deleting anything, if so, use the ADB and type:
Code:
adb shell rm /mnt/sdcard/<Folder>
That should then do the trick
Click to expand...
Click to collapse
FamilyGuy, thanks for the suggestion, the problem seems to be bad permissions and I can't figure out how to fix them. Tried the "fix permissions" from recovery, as well as when booted, to no avail.
Typing
adb shell rm -rf /[directory]
gives me "permission denied"
So tried
chmod 666 /sdcard/.../*
but get an "operation not permitted" message.
So I'm really stuck here...

familyguy59 said:
If you use a file explorer, that has it's standard directory at / then all you need to do is navigate to /mnt/sdcard/ then make sure it's mounted as R/W and not R/O, if all that is the way I said it, you shouldn't have problems deleting anything, if so, use the ADB and type:
Code:
adb shell rm /mnt/sdcard/<Folder>
That should then do the trick
Click to expand...
Click to collapse
Update: solved
boot into recovery mode
mount /data
adb shell
rm, rmdir etc. all work as expected from here, no need to chown or chmod anything
zz

I see you've solved this, but i thought i would throw this in anyway...
The easy way is to delete the files from /data/media
The sdcard directory is a symlink, so go to the true folder and you should have more success...

Sometimes the file ownerships get messed up after a cycle of recovering the OS and restoring files.
http://forum.xda-developers.com/showthread.php?t=1515291&page=2
If you have any other directories/files that you can't modify or delete, then boot into CWM recovery, plug in the USB cable, go into adb shell. Also make sure that /data is mounted in the CWM mounts menu. Then:
cd /data/media
chown -R media_rw.media_rw *
This fixed it for me and others.

cmstlist said:
Sometimes the file ownerships get messed up after a cycle of recovering the OS and restoring files.
http://forum.xda-developers.com/showthread.php?t=1515291&page=2
If you have any other directories/files that you can't modify or delete, then boot into CWM recovery, plug in the USB cable, go into adb shell. Also make sure that /data is mounted in the CWM mounts menu. Then:
cd /data/media
chown -R media_rw.media_rw *
This fixed it for me and others.
Click to expand...
Click to collapse
Thanks for this and other suggestions--my solution was trial and error, thrashing around in the dark (my unix command line chops are really, really rusty), and these are far more elegant. It's good to understand the underlying problem, your wisdom is appreciated.
Yes, permissions were messed up after rooting and applying a sim unlock hack, wiping and restoring from pre-unlock backup set. I see it so clearly now...

Problem can somebody help me?
Hello. I have a problem with my motorola defy+ running on gb 2.3.6 and is not ROOTED. Still he has an annoyng problem. After installing an aplication (not from the market) i saw that it didn't save data on the sd card. I uninstalled it and after a data factory reset i install apps such as temple run and Brother in Arms 2. At temple run it gave me this mesage
"File Access Problem Caution, unable to write files. This means your game progress can't be saved! Reason: Access to the path "/mnt/sdcard/Android/data/com.imangi.templerun/files/spaceholder.dat" is denied."
Also at Brother in Arms 2 the game didn't save. I rest the phone abouat 7-8 times.I changed the sd card. Note that the card was a 16 gb kingmax class 6 and put the 2 gb card that came with the phone. It all work smoothly. So what is the problem the sd card or the phone's software. Please answer i'm desparate and tired of wasting time.

This thread is about the Samsung Galaxy Nexus which has no external SD and uses a very different storage structure. I'm afraid we can't really help you here. Try the Defy forum.
Sent from my Galaxy Nexus using Tapatalk 2

zzcat said:
FamilyGuy, thanks for the suggestion, the problem seems to be bad permissions and I can't figure out how to fix them. Tried the "fix permissions" from recovery, as well as when booted, to no avail.
Typing
adb shell rm -rf /[directory]
gives me "permission denied"
So tried
chmod 666 /sdcard/.../*
but get an "operation not permitted" message.
So I'm really stuck here...
Click to expand...
Click to collapse
Before chmod the folder, you needed to be root by entering 'su' after 'adb shell' .
It worked from cwm, because cwm gives root access.
Linux/Android are all about permissions.
Sent from my i9250

cmstlist said:
Sometimes the file ownerships get messed up after a cycle of recovering the OS and restoring files.
http://forum.xda-developers.com/showthread.php?t=1515291&page=2
If you have any other directories/files that you can't modify or delete, then boot into CWM recovery, plug in the USB cable, go into adb shell. Also make sure that /data is mounted in the CWM mounts menu. Then:
cd /data/media
chown -R media_rw.media_rw *
This fixed it for me and others.
Click to expand...
Click to collapse
I tried your theory, and it didn't work, still get the message" unable to change ownership permission denied, in recovery mode.
we are still trying to find a solution, here is the discussion: http://www.slatedroid.com/topic/32434-i-got-my-smartq-t20/page__st__260 on Post # 277

rocketero said:
I tried your theory, and it didn't work, still get the message" unable to change ownership permission denied, in recovery mode.
we are still trying to find a solution, here is the discussion: http://www.slatedroid.com/topic/32434-i-got-my-smartq-t20/page__st__260 on Post # 277
Click to expand...
Click to collapse
Sorry to hear that. It sounds like the problem you are having is with a completely different device, so I can't really say why this may be occurring - I don't know how your device's file system is structured. This advice is specifically for the Galaxy Nexus. If a version of CWM exists for your smartQme device, I can't speak to whether it works properly and interprets commands the same way ours does.

cmstlist said:
Sorry to hear that. It sounds like the problem you are having is with a completely different device, so I can't really say why this may be occurring - I don't know how your device's file system is structured. This advice is specifically for the Galaxy Nexus. If a version of CWM exists for your smartQme device, I can't speak to whether it works properly and interprets commands the same way ours does.
Click to expand...
Click to collapse
it's a 9.8 inches tablet branded named called "LePanII'. it has ICS now, before we had Honeycomb 3.2.1.
The manufacture of this tablet did such a bad partitioning that the /system partition was left only with merely 4MB of free space in it.

rocketero said:
it's a 9.8 inches tablet branded named called "LePanII'. it has ICS now, before we had Honeycomb 3.2.1.
The manufacture of this tablet did such a bad partitioning that the /system partition was left only with merely 4MB of free space in it.
Click to expand...
Click to collapse
Good luck with your issue. I doubt it's related to the one we were having on the GNex though.

cmstlist said:
Sometimes the file ownerships get messed up after a cycle of recovering the OS and restoring files.
http://forum.xda-developers.com/showthread.php?t=1515291&page=2
If you have any other directories/files that you can't modify or delete, then boot into CWM recovery, plug in the USB cable, go into adb shell. Also make sure that /data is mounted in the CWM mounts menu. Then:
cd /data/media
chown -R media_rw.media_rw *
This fixed it for me and others.
Click to expand...
Click to collapse
Sorry if my question is dumb.
Does this command solve the problem for all the folders and sub-folders in sdcard? Thank you for your help!
Sent from my Galaxy Nexus

/data/media # chown -R media_rw.media_rw*
BusyBox v1.20.2-jb static (2012-10-25 21:29 +0100) multi-call binary.
Usage: chown [-RhLHP]... OWNER[<.|:>[GROUP]] FILE...
Change the owner and/or group of each FILE to OWNER and/or GROUP
-R Recurse
-h Affect symlinks instead of symlink targets
-L Traverse all symlinks to directories
-H Traverse symlinks on command line only
-P Don't traverse symlinks (default)
I got this after giving the commands from recovery in adb shell.
What does that mean?

Jar3112 said:
/data/media # chown -R media_rw.media_rw*
BusyBox v1.20.2-jb static (2012-10-25 21:29 +0100) multi-call binary.
Usage: chown [-RhLHP]... OWNER[<.|:>[GROUP]] FILE...
Change the owner and/or group of each FILE to OWNER and/or GROUP
-RRecurse
-hAffect symlinks instead of symlink targets
-LTraverse all symlinks to directories
-HTraverse symlinks on command line only
-PDon't traverse symlinks (default)
I got this after giving the commands from recovery in adb shell.
What does that mean?
Click to expand...
Click to collapse
OK solved, I forgot the space before the *!
Worked like a charm!!
Sent from my Galaxy Nexus

Related

Remove ALL Sprint Crapware? (Q from an ex-WinMo Poweruser)

I moved from an HD2 to the Evo this week (no more TMobile, woot!). I am very familiar with custom WMO ROMS, Hard SPL, blah blah...
I have nearly zero Android development, custom ROM knowledge, etc, however.
I'd like to flash a custom ROM based on the factory, without all the Sprint programs preloaded.
Clearly I need to root; I am on steady ground with that knowledge. After that? Not so clear. There doesn't seem to be a thread with the steps I need to proceed.
Any info would be invaluable, thanks!
(PS - side question: why does Android launch all sort of processes in the background seemingly at random?)
ifiweresolucky said:
I moved from an HD2 to the Evo this week (no more TMobile, woot!). I am very familiar with custom WMO ROMS, Hard SPL, blah blah...
I have nearly zero Android development, custom ROM knowledge, etc, however.
I'd like to flash a custom ROM based on the factory, without all the Sprint programs preloaded.
Clearly I need to root; I am on steady ground with that knowledge. After that? Not so clear. There doesn't seem to be a thread with the steps I need to proceed.
Any info would be invaluable, thanks!
(PS - side question: why does Android launch all sort of processes in the background seemingly at random?)
Click to expand...
Click to collapse
This should be in Q & A.. But unless someone creates a rom with the apps removed. Its easier to just do it yourself.
If you did toasts method of rooting. Boot into recovery and type this
adb remount
adb shell
cd /system/app
ls
This displays all apps on the phone. Do this to delete them.
rm NameOfApp.apk
rm NameOfApp.odex
It is caps sensitive and make sure you type the apk exactly as its written.
Jus10o said:
This should be in Q & A.. But unless someone creates a rom with the apps removed. Its easier to just do it yourself.
If you did toasts method of rooting. Boot into recovery and type this
adb remount
adb shell
cd /system/app
ls
This displays all apps on the phone. Do this to delete them.
rm NameOfApp.apk
rm NameOfApp.odex
It is caps sensitive and make sure you type the apk exactly as its written.
Click to expand...
Click to collapse
any reason adb remount isn't working for me? I do adb devices and my devices is there but when i type adb remount i get "remount faild: Invalid argument"
I started Toasts root directions, placing PC36IMG.zip on the base directory of the SD card. Shut down, loaded with the Vol Down and Power buttons. The bootloader checked the file on the SD card but then stopped on the white screen.
It seems it was supposed to proceed automatically? But I am dropped off with options on the white screen: FASTBOOT, RECOVERY, CLEAR STORAGE, SIMLOCK, and HBOOT USB.
Directions show Vol Up and Down for previous and next and Power for select.
Alright, I resolved this issue. I recopied the file to the SD card and made sure to eject drive before shutting the device down. Seemed to make all the difference! Proceeding with the remainder of Toast's directions now...
p-slim said:
any reason adb remount isn't working for me? I do adb devices and my devices is there but when i type adb remount i get "remount faild: Invalid argument"
Click to expand...
Click to collapse
I'm running in to the same issue...
rgordon3091 said:
I'm running in to the same issue...
Click to expand...
Click to collapse
i fixed it. you have to do this.
adb shell
mount /dev/block/mtdblock4 /system
cd /system/app
ls
Getting error trying to remove nascar..
Code:
rm Sprint_NASCAR.apk
rm failed for Sprint_NASCAR.apk, Directory not empty
Any ideas?
That's Linux trying to protect you. Essentially the rm command by default just removes one file at a time.
Try...
rm -r NameOfFolder
...to delete recursively.
Sent from my EVO 4G using Tapatalk
Go see the thread in the apps sub-forum about this. I have a post (#28, I believe) with the exact code to remove the bloatware. You can just copy any paste.
-------------
Sent from my HTC EVO 4G using Tapatalk Pro.
nick325i said:
Getting error trying to remove nascar..
Code:
rm Sprint_NASCAR.apk
rm failed for Sprint_NASCAR.apk, Directory not empty
Any ideas?
Click to expand...
Click to collapse
you shouldn't have a problem deleting the apk, because an apk is not a directory.
i deleted it without the same message.
p-slim said:
i fixed it. you have to do this.
adb shell
mount /dev/block/mtdblock4 /system
cd /system/app
ls
Click to expand...
Click to collapse
'
hmmm i put im adb shell then i got a "#" so i put in "mount /dev/block/mtdblock4 /system"
and i got mount:mounting /dev/block/mtdblock4 /system failed: No such file or directory
so what did i do wrong?
Found the issue. Thanks all
Jus10o said:
This should be in Q & A.. But unless someone creates a rom with the apps removed. Its easier to just do it yourself.
If you did toasts method of rooting. Boot into recovery and type this
adb remount
adb shell
cd /system/app
ls
This displays all apps on the phone. Do this to delete them.
rm NameOfApp.apk
rm NameOfApp.odex
It is caps sensitive and make sure you type the apk exactly as its written.
Click to expand...
Click to collapse
By the way, when I "cd /system/app" and then "ls" I see only NamesOfApps.apk. There are displayed no *.odex files. Is that normal?
thread dead?
IDK if this threads still monitored by anyone, but here's my question: I don't use adb, but I just rused root explorer to locate sprint crap, and added a .bak to the end of all of them to essentially 'disable' them. Is this a safe method? Will Android system waste energy looking for them anymore (they no longer show in app tray, but are they still using resources) ? Thanks much.
scottspa74 said:
IDK if this threads still monitored by anyone, but here's my question: I don't use adb, but I just rused root explorer to locate sprint crap, and added a .bak to the end of all of them to essentially 'disable' them. Is this a safe method? Will Android system waste energy looking for them anymore (they no longer show in app tray, but are they still using resources) ? Thanks much.
Click to expand...
Click to collapse
I was just about to say something similar. I had uninstalled Nascar using Titanium Backup, and the found out that I cant do the 2.2 OTA unless its there. TB didn't have the ability to restore it for some reason, so I got an APK from XDA, and put it in the system/app folder via Root Explorer. Then, I had to reset the permissions to match the other APK's, and it showed up and launched perfectly. Even did an update. Much easier than all that adb stuff, I think.
I used system app uninstaller for a buck on the market.. Easy and all there with the icons for easy to find and delete sprint and gapps.
Sent from my PC36100 using XDA App
scottspa74 said:
IDK if this threads still monitored by anyone, but here's my question: I don't use adb, but I just rused root explorer to locate sprint crap, and added a .bak to the end of all of them to essentially 'disable' them. Is this a safe method? Will Android system waste energy looking for them anymore (they no longer show in app tray, but are they still using resources) ? Thanks much.
Click to expand...
Click to collapse
Thats a good way.. If something goes wrong just have to rename.
Sent from my PC36100 using XDA App
Flash this zip and it should remove most of the Sprint apps. It will back them up to /sdx on your SD card so if anything is removed that you want, it will still be there. It's signed to work with RA.
http://grathwohl.me/uploads/android/evo/Sprint-Apps-Remover-signed.zip
I've seen a few people reference my post, but my post was really just trying to ask if anyone knew if, now that I've renamed them, and they don't run, they shouldn't be using up resources? Right, is that correct, or am I wrong in thinkin this?
And thanks cosine83, that's a really helpful post for a lot of people.

[OOPS!] bootloop due to adb push /data/app/<file>.apk, can not delete :(

Hello guys,
I probably did a stupid thing. I could'nt install an apk and figured that I could just push it to my android and see what happens. I didn;t think I would get in a bootloop though .
I had astrid.apk, it's modified so it is transparant. I could not install it in Android.
What i did:
Reboot in recovery
Did the fake flash to start Clockwork mod
Connect the Android to my pc with an USB cable
adb push astrid.apk /data/app
I read that about 1.2MB was written so I guess that went right.
Did I forget a / ?
Is the map app overwritten?
Well, next thing I did was a reboot and now I'm stuck in a bootloop.
I tried to delete the file (rm /data/app/astrid.apk, rm -r /data/app/astrid.apk). But it could not find file or directory.
I did this from the shell i starten with adb shell. And I tried it with adb shell rm ...
Did I screw up that /data/app map? What to do now?
edit:
I can do cd data. But when I do cd app (when in /data) then it says "you can't cd to app"...
it's adb shell, and while you are in there, press cd /data/app. while in the data folder, press 'ls' to list all entries. usually apk's have different names and stuff. look for the app and then press rm /data/app/... .apk
Make sure you are in recovery and have system mounted.
djind said:
it's adb shell, and while you are in there, press cd /data/app. while in the data folder, press 'ls' to list all entries. usually apk's have different names and stuff. look for the app and then press rm /data/app/... .apk
Make sure you are in recovery and have system mounted.
Click to expand...
Click to collapse
"can't cd to /data/app"
img824.imageshack <remove> .us/img824/5049/shellz.jpg
edit:
I think I have overwritten the whole app map with the file astrid.apk, d*mn.
"adb push astrid.apk /data/app"
I would say, just wipe and start over..
This is how I usually do the stuff:
adb remount
adb shell
cd /data/app
ls
look for app to remove
rm ....apk
I am no pro, wipe is easy!
I made a complete nandroid backup this afternoon, I just did a partial restore, "data" and everything works fine again!
Thanks for helping. Lesson learned:
Linux != Windows (a whole map is easily overwritten with a file).
I doubt that you have overwritten a folder with a file. But good that everything is ok now.
djind said:
I doubt that you have overwritten a folder with a file. But good that everything is ok now.
Click to expand...
Click to collapse
I did a cat /data/app and i saw a lot of strange things, also strings and it was clear i saw the contents of astrid.apk. SO I really think I did.

Swype Keyboard Issue

Well I was wondering if there was a way to get the original Swype Keyboard on a MIUI ROM. My friend told me about flashing it but I dont know how and where to get the file for it. Please help me, the Swype Keyboard BETA has issues and I want the original keyboard. Please post links..
If you got a nand back up you can use swype restorer
Or get one of the stock roms un zip it and take out the swype.apk and libswypecore.so and push them into the phone
I'll make it easy for ya:
adb shell
su
mount -o rw,remount /system
mv /sdcard/Swype.apk /system/app \\NOTE: use "cp" instead of "mv" if you want to keep the file on your sdcard as a backup for future use or whatever
chmod 644 /system/app/Swype.apk
mv /sdcard/libSwypeCore.so /system/lib \\NOTE: use "cp" instead of "mv" if you want to keep the file on your sdcard as a backup for future use or whatever
chmod 644 /system/lib/libSwypeCore.so
reboot
Click to expand...
Click to collapse
after your reboot, go to your language&keyboard settings, Swype should be available now.
EDIT: cleanup
pmcqueen said:
I'll make it easy for ya:
download attached files and push them to /sdcard/
(NOTE: before you move the libSwypeCore.so.zip, rename it to just libSwypeCore.so - I had to add .zip to be able to attach it here)
then run the following commands from ADB (or terminal emulator, you just don't need the adb shell command in that case):
after your reboot, go to your language&keyboard settings, Swype should be available now.
Click to expand...
Click to collapse
After " mv /sdcard/libSwypeCore.so /system/lib" I get the error " mv: can't rename '/sdcard/libSwypeCore.so': No such file or directory "
Please help!
I AM VS4 said:
After " mv /sdcard/libSwypeCore.so /system/lib" I get the error " mv: can't rename '/sdcard/libSwypeCore.so': No such file or directory "
Please help!
Click to expand...
Click to collapse
before moving libSwypeCore.so.zip from your PC to your phone, did you remove the .zip? sounds like it still thinks it's a zip to me.
how do I do that when it wont let me open the zip folder?
EDIT: cleanup
Thanks alot! It worked!! ;P
But the thing is that this Swype wont work! Everytime I swype a word a blue box flashes around it! Please help with this issue too!
did you reboot?
if so and it's still doing it, try clearing Swype data and rebooting again. if you're still having issues after that, let me know and I'll find a different apk for you to try.
yo im all for help and all but your really not allowed to distribute swype, its in the form rules, even if the phone had it, you would have to get it from your own phone, or as said get it from a stock rom,
Thanks for this post. My question no longer really has anything to do with Swype. Now its personal!! lol
When I copy and paste the
mount -o rw,remount /system​
command, it comes up showing the options for mount instead of executing the command. Is there by chance a syntax error in the typing or am I missing something?
Thanks
look in the market there is a app called remount you can use that to mount the system to read or read/write
Thank you!!!
Strange. Tried Remount app, no dice. Tried mount command, yet it still gives me a cross-link error when I try to run the "mv" command. I read that this error is due to the fact that it isn't mounted properly (I'm a complete noob at this stuff). The thing that puzzles me is I type
mount -o rw,remount /system and it always comes back with
Usage: mount [-r] [-w] [-o options] [-t type] device directory
which leads me to think there's some kind of syntax error.
It's to the point now that I just want to know why it isn't working as described in the post.
ok try this
mount -o remount,rw /dev/block/mtdblock3 /system
Thanks for the advice. I used the command you posted and it allowed me r/w access. But (there always seems to be a but...) when I tried to move files with the mv command I got a cross link error.
I ended up simply using the move function from root explorer (once I figured out what I was trying to do). Worked well.
ilostchild said:
yo im all for help and all but your really not allowed to distribute swype, its in the form rules, even if the phone had it, you would have to get it from your own phone, or as said get it from a stock rom,
Click to expand...
Click to collapse
Guess you didn't read the rules to well. If a custom rom is made for a device that has swype it can be included in rom
Just get swype from the website
Sent from my T-Mobile G2 using XDA Premium App
Spastic909 said:
Guess you didn't read the rules to well. If a custom rom is made for a device that has swype it can be included in rom
Just get swype from the website
Sent from my T-Mobile G2 using XDA Premium App
Click to expand...
Click to collapse
That's if them rom itself came from the stock kernal, not from asop kernal, think why cyanogen doesn't include it in his roms? But we are allowed to bring it back from our back up that has it,

Help needed. Rooting Desire Z

Ok, after using my phone for a while i decided to root it. Since I have the stock Gingerbread rom i followed the guide to downgrade to the stock froyo rom. http://forum.xda-developers.com/showthread.php?t=1178912
I reached the part Temp-Rooting to Backup However, when i run titanium backup it says Error: Sorry, I could not acquire root privileges. This application will *not* work.
What am I supposed to do? I followed the guide to the letter and everything up till that point was exactly as the guide said.
My phone's details are
Android version 2.3.3
Baseband version 12.56.60.25U_26.10.04.03_M
Kernel version 2.6.35.10-g7b95729
Software number 2.42.415.17
Here is what i did in adb
http://pastebin.com/jkxE55Yh
For some reason, new users are not allowed to post links in their replies. Nipqer, i redid all my steps and did what you told me.
here is the link of all what i did:
http://pastebin.com/Fze9uB33
First, thank you so much for linking a pastebin of what you've done, makes it so much easier to try help.
However I'd really like to see if there was any output after running 'adb shell /data/local/
tmp/fixsu.sh' so if you can get that ouput and post it, would be much appreciated.
You might have to run it from inside shell:
adb shell
cd /data/local/tmp
./fixsu.sh
-Nipqer
Thanks Nipqer and sorry for the late reply.
I did what you told me and this is what i got
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
adb server is out of date. killing...
* daemon started successfully *
# cd /data/local/tmp
cd /data/local/tmp
# ./fixsu.sh
./fixsu.sh
#
though i don't know if it helps with anything.
I just got confused because in the guide it says to install Titanium backup and backup my data. I have already done a manual backup myself but i figured doing a backup using Titanium backup will not hurt. I have used other programs like Root Checker Basic and it tells me that i don't have proper root access.
Can I just ignore this issue and go ahead with the downgrade? Or will there be some problems?
Thanks again in advance!
Hmm, it should give you root permissions after running fixsu.sh.
The lack of output shows it should've worked.
That part of the guide is entirely optional anyway, so If you already have what you want backed up, go ahead and downgrade.
-Nipqer
Nipqer said:
Hmm, it should give you root permissions after running fixsu.sh.
The lack of output shows it should've worked.
Click to expand...
Click to collapse
Well. fixsu.sh returned no error for me, too. But Titanium backup did not get root and trying to call "su", I got I/O error. And looking to dmesg, I seen corrupted file system.
After a bit of research I got the reason: rw remount succeeds, Linux thinks, that data are written to flash, but no data are written for real. Once data leave cache, they are lost and system "returns" to intact state.
I wrote a different fixsu.sh, which does not have this problem, but I am still failing to get root privileges, even with the latest Superuser+su. I got only a pop-up about refused root access. (But "su number_of_any_existing_uid" and then "su" in adb shell says says about permitted access.)
Here is my preliminary fixsu.sh:
Code:
#!/system/bin/sh
chmod 755 /data/local/tmp/busybox
chmod 4755 /data/local/tmp/su
/data/local/tmp/busybox cp -a /system/xbin /data/local/tmp/
mount -o bind /data/local/tmp/xbin /system/xbin
/data/local/tmp/busybox --install -s /system/xbin/
/system/bin/rm /system/xbin/su 2>/dev/null
/data/local/tmp/busybox cp -a /data/local/tmp/su /system/xbin/
/data/local/tmp/busybox cp -a /system/bin /data/local/tmp/
mount -o bind /data/local/tmp/bin /system/bin
/data/local/tmp/busybox cp -a /data/local/tmp/su /system/bin/
# /etc/* changes are needed only for some busybox utils, not for Superuser's su
/data/local/tmp/busybox cp -a /system/etc /data/local/tmp/
mount -o bind /data/local/tmp/etc /system/etc
/data/local/tmp/busybox echo "root::0:0:root:/data/local:/system/bin/sh" > /system/etc/passwd
chmod 0666 /system/etc/passwd
/data/local/tmp/busybox echo "root::0:0:root:/data/local:/system/bin/sh" > /system/etc/passwd
/data/local/tmp/busybox echo "root::0:" > /system/etc/group
chmod 0666 /system/etc/group
# Optional:
ln /data/local/tmp/busybox /data/local/tmp/xbin/busybox
And here is the code to recover "writable" state after reboot:
Code:
#!/system/bin/sh
mount -o bind /data/local/tmp/xbin /system/xbin
mount -o bind /data/local/tmp/bin /system/bin
mount -o bind /data/local/tmp/etc /system/etc
Unfortunately I can't tell you why it won't work. Might just be your partitions are too corrupted or something.
Have you tried a full power cycle (turn phone off, pull battery), it's helped other phones work in the past.
Otherwise I'd say just use adb to pull your entire /data dir, so you have everything saved and can mess round with trying to put it back in later.
-Nipqer
Nipqer said:
Unfortunately I can't tell you why it won't work. Might just be your partitions are too corrupted or something.
Have you tried a full power cycle (turn phone off, pull battery), it's helped other phones work in the past.
Click to expand...
Click to collapse
I tried to reboot without battery removal. Partition was "corrupted" before reboot and intact after reboot. I tried to write again. I again got corruption. And ffter reboot it was again byte-equal to the original system.img. It means, that not write actually happens. Linux kernel just assumes that data are written, but they are lost after leaving kernel cache.
Hopefully, Android mount command supports -o bind, so one can bind mount directories from /data and /system is seemingly writable then.
Nipqer said:
Otherwise I'd say just use adb to pull your entire /data dir, so you have everything saved and can mess round with trying to put it back in later.
Click to expand...
Click to collapse
I saved all mmcblk0p* before starting my experiments. It should be the most complete way to backup, but it does not easily allow partial restore.
utx said:
I saved all mmcblk0p* before starting my experiments. It should be the most complete way to backup, but it does not easily allow partial restore.
Click to expand...
Click to collapse
If you saved the data from the partitions, restoring would just be placing the apk in /data/app/ and then placing the data files back into /data/data/ - if you do it this way, you must run fix_permissions whether you saved it with or without preserving the permissions (owner, read/write/execute, et cetera). The app, when you put it on the different rom, will have a different UID (more than likely) than it did before and the data files permissions would be incorrectly set. Running fix_permissions should resolve that issue.
*EDIT*
I may of misunderstood what you meant by saving mmcblk0p*. How did you do this? At first I was thinking you just meant you did a tar backup of each partition, but after re-reading sounds more like you something like
Code:
# dd if=/dev/block/mmcblk0p# of=/sdcard/mmcblk0p#.img
Is that what you did? If so, are you trying to restore it by the same method?
Code:
# dd if=/sdcard/mmcblk0p#.img of=/dev/block/mmcblk0p#
If so, I'm not sure that would work properly… You might have to extract the data from it then copy it over to the partition...
I've had that problem after geting temp root. Titanium would say no root premissions. So I redid the steps after reboot...but I found the problem was that if you open titanium back up be for u root it will throw yu that msg so if yu have did that that's why so go back after you root in to applications and force close titanium and then reopen app then it shuld give you root premssions at least it worked for me but I still wasn't able to down grade and another thing are u using the gfree method kus that didn't work for me to get root... I had to use the freevo method to get temp root as gfree kept giving me errors after doing the adb coommands
sent from my Tmobile G2 Rush Vision
And if that dosnt work yu can use sdcard maid to back up your system apps n such or delete them ....
sent from my Tmobile G2 Rush Vision
Setherio said:
If you saved the data from the partitions, restoring would just be placing the apk in /data/app/ and then placing the data files back into /data/data/ - if you do it this way, you must run fix_permissions whether you saved it with or without preserving the permissions (owner, read/write/execute, et cetera). The app, when you put it on the different rom, will have a different UID (more than likely) than it did before and the data files permissions would be incorrectly set. Running fix_permissions should resolve that issue.
Click to expand...
Click to collapse
I am aware of this problem. But if one returns exactly equal /system as it was there before, the /data will need no change.
Setherio said:
I may of misunderstood what you meant by saving mmcblk0p*. How did you do this? At first I was thinking you just meant you did a tar backup of each partition, but after re-reading sounds more like you something like
Code:
# dd if=/dev/block/mmcblk0p# of=/sdcard/mmcblk0p#.img
Is that what you did? If so, are you trying to restore it by the same method?
Code:
# dd if=/sdcard/mmcblk0p#.img of=/dev/block/mmcblk0p#
If so, I'm not sure that would work properly… You might have to extract the data from it then copy it over to the partition...
Click to expand...
Click to collapse
It was just an abbreviation:
Code:
cd /dev/block
for PARTITION in mmcblk0p* ; do
dd if=/dev/block/$PARTITION of=/sdcard/$PARTITION.img
done
I guess, that the most straightforward way to restore that /data would be: First run
Code:
fsck mmcblk0p26.img
(on Linux machine) on that /data image (when you don't have root and custom recovery yet, you cannot backup /data in read-only mode, so the image is corrupted a bit for sure; if the fsck puts something to /lost+found, you can delete it after finishing of the rooting process). Then rename mmcblk0p26.img to userdata.img and add it to the PC10IMG.zip that restores stock system. Otherwise you will again fight with "partition in use" problem when trying to restore.
I did not test this method, as I did not understand the partition layout that deeply before I root. But there is no reason why it would not work.
Hello everybody,
for quite a while i am reading several guide for rooting my desire z (android 2.3.3, not branded, USB debugging activated, Fast boot deactivated). In Germany most of the guides refer to Setherio's guide. So working with the source is as usual the best.
Unfortunately - even after 3 tries, with factory resets, rebooting, removing the battery, etc. - I cannot gain a temporary root. neither titanium backup nor MyBackUp Root gain access for making a backup. So I ended up here. I am not sure, if Sayedamir had the same problem. Nevertheless, I appreciate every help.
This is what I have done so far:
http://pastebin.com/NKD6D7Av
Furthermore, referring to Nipquer's 1st post, I executed fixsu as described with following results:
http://pastebin.com/0EQS0UnF
I am not sure, if I should proceed with the downgrading without having a backup and I guess, when the backup isn't working (lack of temporary root), the downgrading would not work anyway?!
Hi Vince683,
Yes I had exactly the same problem. I too followed Setherio's guide and after 2 attempts I still couldnt get temp root. I ended up not being able to back up any of my apps.
However i suggest you back up your messages and contact as that was the only stuff I could back up. there are alot of apps in the market that do that and i guess they dont need root.
If backing up your app data is that not important you can proceed with the downgrade. It worked in my case. I guess the only nuisance would be that you have to manually install and configure all yours apps again.
Tell us how it goes.
Perfect, it worked. Thank you for encouraging me
And Cyanogenmod 7.2 works fine.
Vince683 said:
Perfect, it worked. Thank you for encouraging me
And Cyanogenmod 7.2 works fine.
Click to expand...
Click to collapse
You're welcome

[Q] Why can't I mount 'System' on Nexus 7 (2013) ?

Hi,
A few days ago, I did unlock and root my N7 (2013) using "Nexus Root Toolkit (v.1.6.8)" by WugFresh. I followed the instructions to the letter and everything went OK, it seemed. My N7 (JSS15J) is unlocked and I have root access, as confirmed by "Titanium Backup" and "Root Checker Pro" app.
However, my N7 cannot mount "System" - which is why I cannot delete any system app bloatware (also confirmed by "System App Remover" & Root Checker Pro app). When rooting my N7 (2012) and my SGS3, everything worked just perfectly and I never had these kind of issues...
I did factory-reset a number of times, went through the unlock/root process again, rooted again via UPDATE-SuperSU-v1.51.zip etc etc. - no dice. TWRP v2.6.0.0 is installed and working. I also installed & updated BusyBox, and I wiped of Dalvik - but still no root access to "System", or "mount".
As I just found out, "Root Checker Pro" actually explains why I can't mount "System" and/or don't have root access... I just don't know what to do about it:
Congratulations! You have root access!
Super User Application Status:
SuperSU application - version 1.51 - is installed!
System File Properties for Root Access:
Standard Location
Check Command: ls -l /system/bin/su:
Result: /system/bin/su: No such file or directory
Analysis: File /system/bin/su does not exist.
Standard Location
Check Command: ls -l /system/xbin/su:
Result: -rwsr-sr-x root root 112164 2008-08-01 07:00 su
Analysis: Setuid attribute is present and root user ownership is present. Root access is correctly configured for this file! Executing this file can grant root access!
Alternative Location
Check Command: ls -l /sbin/su:
Result: /sbin/su: Permission denied
Analysis: File system permissions restricted and denied access.
Alternative Location
Check Command: ls -l /system/xbin/sudo:
Result: /system/xbin/sudo: No such file or directory
Analysis: File /system/xbin/sudo does not exist.
Root User ID and Group ID Status:
Root user id:
uid=0(root)
Root group id:
gid=0(root)
System Environment PATH: /sbin /vendor/bin /system/sbin /system/bin /system/xbin
ADB Shell Default User:
ADB shell setting for standard access, stored in default.prop, is configured as: shell (non root) user - ro.secure=1
Results provided on your Nexus 7 device by Root Checker Pro version 1.3.4 from joeykrim in the Android Market - http://goo.gl/NcnHn
What did I miss?
Can someone please help me to install whatever is needed to gain root access to "System"? "System App Remover" app shows that "System" is not mounted but downloading a separate "mount app" did not do the trick either...
Thanks for your help & suggestions, guys!
System is already mounted or you wouldn't be running android.
What you probably want to do is "remount"
mount -o remount,rw /system /system
But if all you want is to remove apps, perhaps it is easier if you just use Titanium to freeze them first and once you are sure you don't need them you can delete them, but I would just leave them frozen.
sfhub said:
System is already mounted or you wouldn't be running android.
What you probably want to do is "remount"
mount -o remount,rw /system /system
But if all you want is to remove apps, perhaps it is easier if you just use Titanium to freeze them first and once you are sure you don't need them you can delete them, but I would just leave them frozen.
Click to expand...
Click to collapse
Thanks, sfhub... I'll give that a try!
Doesn't look good, I'm afraid:
C:\platform-tools>mount -o remount,rw /system /system
'mount' is not recognized as an internal or external command,
operable program or batch file.
Click to expand...
Click to collapse
Any further suggestions, please?
androidarmin said:
Doesn't look good, I'm afraid:
Click to expand...
Click to collapse
Seems like I tried in the wrong place... I'll give it another try; sorry
Well... downloaded a Terminal Emulator from Google Play..
But now I'm getting a "mount: Operation not permitted" error...
Googled a ton and found a lot of good advice... and even figured things out using ADB (hint: adb shell) - but nothing worked in the end.
Seems like my "SU" may be the culprit, but I'll figure things out when I have more time... meaning, on the weekend. Probably go back to stock and then start over. Seems to be the simplest way right now.
Thanks so far, guys!
androidarmin said:
Well... downloaded a Terminal Emulator from Google Play..
But now I'm getting a "mount: Operation not permitted" error...
Click to expand...
Click to collapse
In adb, you need to type su first to give yourself root privileges before you can mount /system
You need to mount system as read/write in order to remove apps from it.
Sent from my Nexus 7 (2013)
Thanks, sfhub & Muikkuman... I know/I did. Still doesn't work.
Sent from my GT-I9300 using Tapatalk 4
androidarmin said:
Thanks, sfhub & Muikkuman... I know/I did. Still doesn't work.
Click to expand...
Click to collapse
what happens if you do in a command prompt in your adb directory
adb shell
su
Yes this seem strange.
Sent from my Nexus 7 (2013)
My suggestion would be to update TWRP, back-up important data, format data in recovery, look for decent rom, flash rom/gapps/latest supersu.
Then go to 'advanced' in recovery and fix permissions. Reboot recovery and tick 'mount' 'system', respectively install root file explorer of your liking.
No quick solution but should do the trick..
My suggestion is DO NOT delete anything, period. Nurse disable from settings or use pm disable.
Deleting stuff is completely pointless and WILL cause you problems in the future.
androidarmin said:
Thanks, sfhub & Muikkuman... I know/I did. Still doesn't work.
Sent from my GT-I9300 using Tapatalk 4
Click to expand...
Click to collapse
Dont know if you got this sorted. i was having the same problem with my son's Nexus 7 and came across this tutorial for Total Commander
http://www.androidpolice.com/2011/0...ns-remount-rw-in-total-commander-for-android/
Great little short cut to get the job done and can now get Total Commander free on Google Play.

Categories

Resources