Related
1) How do I remove hard linked files on the X10 Android file system? I also need to identify them with the "ls" command, but it doesn't work the same as linux by listing the count in the ls listing of hard links to a specific file. The reason is, when I try to move a file in /system/app, it tells me it failed due to cross-device link - likely because the OS knows the link will fail if I move the file to my /sdcard directory. I want to remove the hard-link.
2) Is there a listing of all the options available to the commands in the /system/bin directory? It seems the ls command, for example, is a stripped down version of the ls that comes with linux.
Thanks.
what method are you using to move the files in system/app? you should be able to move them using root explorer, or copy out using dd if= of= statements then rm, the xperia system does not seem to like cp and mv commands
I'm using:
Code:
mv /system/app/Facebook.apk /sdcard/backup/system/app
...it fails. A dd works, because it just does a block copy and doesn't move the file. I'll try moving it with Root Explorer.
I'd prefer an actual command instead of using an app on the phone, as I've connected the phone to my PC with the USB cable and using adb.exe.
FYI, I tried Root Explorer, for some reason it can move the file just fine! My phone is rooted and I'm running the adb shell with super-user access.
use this:
busybox ls -l
busybox cp
busybox mv
Or even better, use "busybox --install /system/bin" and let it install all the symlinks for you
aln688 said:
I'm using:
Code:
mv /system/app/Facebook.apk /sdcard/backup/system/app
...it fails. A dd works, because it just does a block copy and doesn't move the file. I'll try moving it with Root Explorer.
I'd prefer an actual command instead of using an app on the phone, as I've connected the phone to my PC with the USB cable and using adb.exe.
FYI, I tried Root Explorer, for some reason it can move the file just fine! My phone is rooted and I'm running the adb shell with super-user access.
Click to expand...
Click to collapse
biktor_gj said:
use this:
busybox ls -l
busybox cp
busybox mv
Or even better, use "busybox --install /system/bin" and let it install all the symlinks for you
Click to expand...
Click to collapse
Thanks for the tip, you've just explained what busybox is. I always wondered why Titanium Backup wanted Busybox for it to run properly. I'll try these commands out.
UPDATE: Nice, I get VI as well! I was wanting that. I got fedup editing a file on the PC and pushing it back to the phone. Thanks.
I finally got my NookColor to sideload apps via ADB. The first thing I did was install Root Explorer and I rebooted the NC.
However, using Root Explorer, I do not have access to the cache or data directories. The response that I get is "Mounted as r/o" and "Your phone doesn't appear to be rooted. ..."
Did I miss something in the process and I'm not really rooted?
Also, I've noticed that the command adb remount gives back an error message as well.
Any thoughts?
Thanks!
See http://forum.xda-developers.com/showthread.php?t=857636
Assuming that you've already install the SuperUser apk
You need to push the su file into /data/local
use the following ADB commands:
Code:
adb push su /data/local/
Then
Code:
adb shell
# cd /system/bin
# mount -o remount,rw /dev/block/mmcblk0p5 /system
# cat /data/local/su > su
# chmod 6755 su
# ls -l su
-rwsr-sr-x root root 26264 2010-12-01 10:27 su
Use the su file from the attachment in the thread below
http://forum.xda-developers.com/showthread.php?t=665974
Thank you, Sapienta.
I noticed the Superuser comes down as a zip and the instructions say to boot into recovery mode and flash ... does that translate to renaming the zip to apk and installing via adb (as I've done with other apps)? Or do I need to figure out how to do the recovery boot/flash?
Ya sorry about that. I should've been more clear. Ignore everything from that page just download the attachment. You need to push the "su" file into /data/local and then chmod it to 6755 per the instructions from the first link I post and you're good to go.
EDIT NVM, I got it
Well, actually, you were quite clear the first time, I had just forgotten about the first link. But now, when I try to install the file (after renaming the zip to apk) via ADB I get an error message that says file does not contain AndroidManifest.xml. But I know the file is there ... I can see it when I view it with 7Zip. So, I guess I'm being dense today, but what am I missing?
indeana said:
Well, actually, you were quite clear the first time, I had just forgotten about the first link. But now, when I try to install the file (after renaming the zip to apk) via ADB I get an error message that says file does not contain AndroidManifest.xml. But I know the file is there ... I can see it when I view it with 7Zip. So, I guess I'm being dense today, but what am I missing?
Click to expand...
Click to collapse
Inside of the zip file there should be two files, a file called "su" without an extension and the Superuser.apk.
You'll want to push the su (the file is actually a raw binary) to your NC using the steps provided. You'll also want to install the Superuser.apk after pushing the su binary.
Thank you, antoniouslj. Yesterday I installed SU first and then pushed su but Root Explorer kept erroring out. So just to be sure I'm clear, the steps would be done in this order:
1. Push su -->
adb push su /data/local/
2. Change permissions -->
adb shell
# cd /system/bin
# mount -o remount,rw /dev/block/mmcblk0p5 /system
# cat /data/local/su > su
# chmod 6755 su
# ls -l su
-rwsr-sr-x root root 26264 2010-12-01 10:27 su
3. Install Superuser
Then do I adb Root Explorer or should Root Explorer be installed before I do the steps above?
indeana said:
Thank you, antoniouslj. Yesterday I installed SU first and then pushed su but Root Explorer kept erroring out. So just to be sure I'm clear, the steps would be done in this order:
1. Push su -->
adb push su /data/local/
2. Change permissions -->
adb shell
# cd /system/bin
# mount -o remount,rw /dev/block/mmcblk0p5 /system
# cat /data/local/su > su
# chmod 6755 su
# ls -l su
-rwsr-sr-x root root 26264 2010-12-01 10:27 su
3. Install Superuser
Then do I adb Root Explorer or should Root Explorer be installed before I do the steps above?
Click to expand...
Click to collapse
That's exactly what I did and it worked great for me. I also had Root Explorer installed prior to installing SU.
Still Struggling!
So ... I still can't get this to work. Do I need to install an alternative launcher (like ADW) first and then do this process?
indeana said:
So ... I still can't get this to work. Do I need to install an alternative launcher (like ADW) first and then do this process?
Click to expand...
Click to collapse
No... what part of the process are you getting stuck on?
I do the three steps like we talked about earlier (and exactly in that order--except I exit out of the shell before I issue the adb install superuser.apk command) and I reboot the Nook. Turn the Nook back on and open Root Explorer, but then RE tells me that there are issues with Superuser and to close RE and restart the RE app. So I do. But it repeats the same process. (I've removed everything so I don't remember the exact language. When I open SU there is no way for me to add an app (that I know of anyway) including looking at the settings. So that's where I'm stuck. And if I can't get root access, then apps like SetCPU and Quickboot won't run successfully.
indeana said:
I do the three steps like we talked about earlier (and exactly in that order--except I exit out of the shell before I issue the adb install superuser.apk command) and I reboot the Nook. Turn the Nook back on and open Root Explorer, but then RE tells me that there are issues with Superuser and to close RE and restart the RE app. So I do. But it repeats the same process. (I've removed everything so I don't remember the exact language. When I open SU there is no way for me to add an app (that I know of anyway) including looking at the settings. So that's where I'm stuck. And if I can't get root access, then apps like SetCPU and Quickboot won't run successfully.
Click to expand...
Click to collapse
Grab another version of RE. I'm finding that version matters when trying to sideload apps.
EUREKA!!!
Thanks to everyone for your help! I finally figured it out. Just as I was about to take the last suggestion of finding and downloading another version of RE, I found and downloaded another version of Superuser (version 4). The new SU version extracts from the zip differently but I was finally able to push and modify per the earlier instructions, installed the new SU version, rebooted, started RE, added it to the SU Whitelist and BAM Root Explorer is working just as I expected it to. SetCPU and Quickboot also seems to be working.
Once again, thank you! You were all GREAT!!!
indeana said:
Thanks to everyone for your help! I finally figured it out. Just as I was about to take the last suggestion of finding and downloading another version of RE, I found and downloaded another version of Superuser (version 4). The new SU version extracts from the zip differently but I was finally able to push and modify per the earlier instructions, installed the new SU version, rebooted, started RE, added it to the SU Whitelist and BAM Root Explorer is working just as I expected it to. SetCPU and Quickboot also seems to be working.
Once again, thank you! You were all GREAT!!!
Click to expand...
Click to collapse
Nevermind...I got mine going, too.
Gingerbreak 1.2 goes through the motions, seems to be working, and the phone reboots, but root is not achieved.
Is there any procedure available to root this phone? Even a temporary root?
For the time being I'd like to push one file into /system/framework (framework-res.adk).
Thanks,
Chris
~~~~~~~~~~~~~~~
Phone details:
System version
Version.1.2.148.MB870.Verizon.en.US
Model
Droid X2
Android version
2.2.2
Baseband version
n_03.13.23s
Kernal version
2.6.32.9-00049-g1e05fe4
[email protected] #2
Build number
4.4.1_274_DTN-14.8
ERI version
5
PRL version
52341
Works on all my X2 's
Did you turn on usb debugging, if so try removing gingerbreak, format the sd card, and install gingerbreak again after a fresh boot. Might want to find another source for the gingerbreak apk to. No luck, try another sd card.
USB debugging on, a different formatted SD card used, fresh reboot and downloaded gingerbreak from a different source; same. I have also tried Gingerbreak 1.1 just for kicks.
Check at the very end of your app drawer. I used gingerbreak 1.2 last night and for some reason super user was all the way at the end of the app drawer, not in its alphabetical spot.
just before running gingerbreak
reboot your phone
do not start any other app before starting gingerbreak
this should work
I got my X2 on Friday afternoon.. and rooted it using Gingerbreak Friday evening. I downloaded it from the link provided in the "Getting Started.." thread in this section. So it *should* work, take a deep breath and follow the very good advice given above, take your time and let it do its thing - walk away if you have to in order to avoid panic!
Good luck.
ChrisPappas said:
USB debugging on, a different formatted SD card used, fresh reboot and downloaded gingerbreak from a different source; same. I have also tried Gingerbreak 1.1 just for kicks.
Click to expand...
Click to collapse
Format Sd, and factory reset the phone. Download the apk to your desktop and drag and dropdrop it to the root of your sd and install it from there. A full wipe should rule out any third party apps from causing the problem.
I got the answer for this. The rooting process worked. What was tripping me up is that the partition needed to be remounted as RW.
Chris
Okay, I don't know if I'm rooted or not. I have enabled root access for File Expert and it acts like it's letting me cut and paste into the /system/framework directory, but the original file stays in place. AndroidCommander notates Root=no.
These adb commands are not working:
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb devices
List of devices attached
TA054029VA device
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb remount
remount failed: Operation not permitted
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
$ mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mount: Operation not permitted
$ ^C
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb push framework-res.apk /system/framework/framework-res.apk
failed to copy 'framework-res.apk' to '/system/framework/framework-res.apk': Read-only file system
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb root
adbd cannot run as root in production builds
Su does not change $ to #:
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
$ su
su
Root Checker shows the following detailed results:
Congratulations! You have root access!
Standard su binary location:
/system/xbin/su: No such file or directory
Alternale su binary location:
/sbin/su: Permission denied
Root user if:
uid=0(root)
Root group id:
gid=0(root)
Does anyone have any ideas of what can I do to fix?
Thanks,
Chris
I was able to get the abd shell to perform with su. Someone led me to look at the phone when I was typing su in abd shell. The phone was asking for permission, which was opting out after a few seconds. When I approved the access within the window, it gave me the # prompt.
I also found out that adb push needed to have the volume mounted as rw, which I was able to do from the #.
After that, I was able to push a file into the system/framework directory. I bricked the phone doing it because the file I was pushing is apparently very picky (framework-res.apk). Luckily there's an SBF for the droid 2 now.
I'm not sure what the deal is with this root, as it only half-ass works. I rooted a Thunderbolt a couple of weeks ago and I didn't have any of these problems. For example, AndroidCommander on the PC reports no root access.
My next mission is to collect details on the ins and outs of fooling with the framework-res.apk.
Chris
I just play andorid device a few days, but My hdx7 is a little bricked because i deleted some system app. Now I can log in fire os, have adb, usb connected and internal storge, even i can operate device setting app, but i can't open the other app because i don't have a desktop.
I compare system/app folder with the same folder in the amazon bin, found that the folder lack of scores of app, but the other system folder is the same. So I hope can adb push app folder to the system folder, but the pemission denied. I try to remount or mount, it can't work.
if adb root, then "adbd cannot run as root in production builds.
if adb push apk to the app folder, then “permission denied".
if adb remount, then ”remount failed: Operation not permitted".
and I have try adb shell like that:
# su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# chmod 777 /system
# exit
it didn't work.
my hdx7 have rooted.
My Questions are:
1. If I could push the app folder to the system folder and reset to factory, is my hdx saved?
2. How to get the system folder rw in the situation?
thx for any prompt, although i am a rookie but i will try my best, i wish the adept can help me and will be enormously grateful. Sorry for my poor english.
It sounds to me that you had lost root.
kschang said:
It sounds to me that you had lost root.
Click to expand...
Click to collapse
So i have tried root again like "http://forum.xda-developers.com/showthread.php?t=2544965" said
But it didn't work, please see the attach, But I don't know why.
Sorry for that i'm rookie to andorid and ask so many questions.
randolphling said:
So i have tried root again like "http://forum.xda-developers.com/showthread.php?t=2544965" said
But it didn't work, please see the attach, But I don't know why.
Sorry for that i'm rookie to andorid and ask so many questions.
Click to expand...
Click to collapse
Hmmm... It says you still have root (the prompt changed after "su")
I personally don't use ADB much. I have Root Explorer (grabbed it legally for free from Amazon ages ago) and Wifi Explorer Pro (same method) so I basically WiFi myself the files I need sideloaded then move them around on the device itself. But if you've lost launcher, you have deeper issues.
Have you tried ADB push any launcher? Or even a download store like 1Mobile or Aptoide?
ADB is basically a Linux shell debug into Android, so you need to learn some Unix shell commands. I'm sure you can find ADB guides with the basic commands, like "ls", "cp", and so on.
You need to check the directory and see if the system/app and other system directories are still there. This is one reason I only play with the copy of ROM I have (see Safestrap Recovery).
The problem:
I rooted my Samsung Galaxy Ace and went exploring the root directory with Root Explorer. I renamed the folder "apk" found in /data to "apk_old", thinking that if everything worked, I could just delete it as it contained a handful of stock apks as well as several apps installed from the market. At the time, I though apks were needed just for installation and that by deleting the folder I would save ~30MB of internal memory. Well, I turns out I was horribly wrong. Several stock apps, such as Youtube or Maps and all market apps that were installed in internal memory have stopped working. In the app drawer, their icons have turned into those default apk icons and their names into com.something.blabla. I was getting crashes every 1-2 minutes from those apps. The widgets on my home screen, such as Google search or Homework 4x2 have also stopped working.
What I've tried:
*renaming the folder back to "apk", obviously. That didn't work, it said something like "execution failed"
*making a copy of the folder - failed
*zipping the folder - failed
*thinking there was a problem with Root Explorer, I installed Total Commander and Solid Explorer hoping I could rename the folder back. Total Commander cannot open the /data folder, while Solid Explorer says the /data folder is empty
*"pulling" all of "/data" with ADB - 0 files pulled.
However, as I was trying to clean up my own mess, things changed a bit. At some point the crashes stopped and all of the "corrupt" apps have simply gone away from the app drawer. While I was unable to do anything with the "apk_old" folder in /data, something changed so that right now I can't even access /data anymore.
So yea, I have a bad feeling that somehow everything inside the /data folder has been wiped, though I sure hope I'm wrong. Anyone have anything to advise?
Oh, and I also noticed that Superuser is gone. I tried re-rooting my phone from this link, it worked the first time I rooted, but not now...
http://forum.xda-developers.com/showthread.php?t=1552792
I don't know exactly what you have in /data/apk I guess is the same I have in /data/app all the installed package.apk
Since your system is compromised I would avoid to use programs from it like Root Explorer to change anything, and for the other programs looks like they don't have root access.
I would try with plain adb: http://forum.xda-developers.com/showthread.php?t=2141817
Once you have your phone connected with adb shell you can go root:
Code:
$ su
to list files and directories in /data
Code:
# ls /data
and then to rename the folder
Code:
# mv /data/apk_old /data/apk
then reboot the phone
good luck
I'm assuming those # signs were suppose to be $'s?, Anyways, what I typed into adb:
1. adb shell
2. $ ls data
What I get:
opendir failed, Permission denied
Another atempt:
1. adb shell
2. $ su
What I get:
su, and after a long pause - Permission denied
eh? So, apparently I can't get root access, what now?
the dficua
Ha, made progress. I installed Superuser through adb and it gave me permission to access data and to rename apk_old back to apk. However, the folder has been wiped of all the apps. Luckily, I have a friend who also has a Galaxy Ace, I'll just copy the folder and paste it into /data, hopefully i'll bring back the default apps.
$ is the normal shell
# is root shell
I forgot to tell you to try that on recovery mode to prevent the calling of SuperUser to grant privilegs, su binary itself should be in /system/xbin
When you restore apps remember also to fix permissions, user and group, it should be something like this:
# chmod 0664 /data/apk/*.apk
# chown system:system /data/apk/*.apk
check the right values in your friend's phone.