What do we need to be able to do adb remount?
Make sure you are in the right directory as your tools folder. Adb remount. Usb debugging needs to be enabled.
Sent from my Motorola Photon 4g
coldblooded79 said:
Make sure you are in the right directory as your tools folder. Adb remount. Usb debugging needs to be enabled.
Sent from my Motorola Photon 4g
Click to expand...
Click to collapse
Code:
[email protected]:/$ sudo su
[email protected]:/# cd /home/max/sdk/tools
[email protected]:/home/max/sdk/tools# ./adb shell
$ su
# exit
$ exit
[email protected]:/home/max/sdk/tools# ./adb remount
remount failed: Operation not permitted
[email protected]:/home/max/sdk/tools#
I was trying to do something similar (adb root). maybe the scripting portion of the adb commands are meant to be embedded in other scripts using adb daemon?
in the kernel needs to have it set to ro.secure to enable abd access with root by default.
speaking of how does moto do its kernels? samsung uses zimages, htc and some samsungs use boot.img
After rooting via the Droid 3 method, you can issue an "adb remount" with no problems...
Beach_Head said:
After rooting via the Droid 3 method, you can issue an "adb remount" with no problems...
Click to expand...
Click to collapse
+1
Did sections 1 & 2 of this and can now use remount command.
Related
All credit goes to the orig guy who made the d2 exploit
If you feel the need to donate money then he deserves it [email protected]
I made an easier to follow tutorial over here with pics. Sorry but I am tired of going back and forth so just go there if you are having problems. If you can follow simple adb commands just follow the directions below
Download and Install Samsung Drivers
64bit:
http://www.wikifilez.com/root files/epic4g/usb_drivers_GalaxyS_x64.zip
32bit:
http://www.wikifilez.com/root files/epic4g/SAMSUNG_USB_Driver_for_Mobile_Phones_x86.exe
1 Click Root Method
http://forum.androidcentral.com/fascinate-roms-hacks/33899-how-root.html
Manual Method
cd C:\android-sdk\tools
adb push C:\fascinate\su /sdcard/su
adb push C:\fascinate\rage.bin /data/local/tmp/rage.bin
adb push C:\fascinate\busybox /sdcard/busybox
adb shell
cd /data/local/tmp
chmod 0755 rage.bin
./rage.bin
wait....
when it brings you back to your original shell in windows then follow these commands
adb shell (you should see # this time instead of $ this is exactly what we want)
mount -t rfs -o remount,rw /dev/block/stl9 /system
cd /system/xbin
cat /sdcard/su > su
cat /sdcard/busybox > busybox
chmod 4755 su
chmod 4755 busybox
exit
adb install C:\fascinate\Superuser.apk
This is permanent.
I just updated the files here with the latest su / superuser.apk / busybox
Also check out my tutorial to fix the memory/lag issues for this phone
http://forum.xda-developers.com/showthread.php?p=8086738#post8086738
Dirrk said:
All credit goes to the orig guy who made the d2 exploit
I feel naked without my droid lol this phone is so light
adb push su /sdcard/su
adb push rage.bin /data/local/tmp/rage.bin
adb push busybox /sdcard/busybox
adb shell
cd /data/local/tmp
chmod 0755 rage.bin
./rage.bin
wait....
when it brings you back to your original shell or windows cmd promt
adb shell
mount -t rfs -o remount,rw /dev/block/stl9 /system
cd /system/xbin
cat /sdcard/su > .
cat /scard/busybox > .
chmod 4755 su
chmod 4755 busybox
exit
adb install Superuser.apk
Please let me know if I posted something wrong.
Click to expand...
Click to collapse
does it stick after reboot?
Its supposed to be a temporary root so i doubt it will.
This works on any android phone up to 2.2. I have confirmed this works on my epic, so th same sould work here.
Sent from my SPH-D700 using XDA App
see below.
confirmed root.
Had to use Superuser.apk 2.3.6.1 and the su binary in the package, but the rest worked.. except for that cat command? Why would you cat binary files instead of copying them? (not complaining, just curious). I just adb pushed them to /system/xbin, and adb shell chmod'd them.
You also have a typo near the end "scard" instead of "sdcard".
You can also use mv or cp. I just happen to use cat because I used it the other day rooting my friends stock 2.2 droid. Which required me to use cat.
And yes this is permanent
Cool, i tried using rm -rf to get rid of a directory I created accidentally, and was getting some syntax errors, so I wasn't sure how compatibile the command line on android was to linux.
Glad it's pretty close. Being very familiar with linux makes this pretty easy to understand. Day 1 with an android device was pretty darn fun. I think I'm glad I went this direction.
I just followed this and used the same files I had from my Droid 2 (just updated the Superuser.apk from this sites thread for it) and works perfectly. Rebooted phone did "adb shell" and "su" and still have root, so it is permanent
side note: steps say "/system/xbin" and assume you meant "/system/bin" like Droid 2 was. That's where I put them and it worked.
cliffr39 said:
I just followed this and used the same files I had from my Droid 2 (just updated the Superuser.apk from this sites thread for it) and works perfectly. Rebooted phone did "adb shell" and "su" and still have root, so it is permanent
side note: steps say "/system/xbin" and assume you meant "/system/bin" like Droid 2 was. That's where I put them and it worked.
Click to expand...
Click to collapse
It works either way, both are executable system folders. Glad you it worked for you, hopefully we can get some roms cooking soon and play catch up to the other galaxy s phones
doesnt work for me, i get an error device not found
ive type adb devices - device not found. usb debugging on, usb conneced on port 5037
xirnibor said:
doesnt work for me, i get an error device not found
ive type adb devices - device not found. usb debugging on, usb conneced on port 5037
Click to expand...
Click to collapse
Your USB mode might be set wrong. Flip it to whatever it's not at, and try again.
i forgot this laptop didnt have the updated usb drivers from android sdk, downloading then will try again. i have tried so far with the sdcard mounted and unmounted, while in usb debugging mode. will post after updates
How long do you actually have to wait after the execting the rage.bin file?
itznfb said:
How long do you actually have to wait after the execting the rage.bin file?
Click to expand...
Click to collapse
I dunno, ~20-30 seconds? Assuming sound is enabled you should hear the same USB device connected/disconnected sounds.
If you want to be 100% sure just wait like 90 seconds. I'm pretty sure it killed my shell though, so if it does that, you're good to go.
ok, adb recognizes the device *see below, however when i type adb push su /sdcard/su i get cannot stat 'su': no such file or directory. ?
C:\downloads\android\android\tools>adb devices
List of devices attached
I500a2d0087a device
namebrandon said:
I dunno, ~20-30 seconds? Assuming sound is enabled you should hear the same USB device connected/disconnected sounds.
If you want to be 100% sure just wait like 90 seconds. I'm pretty sure it killed my shell though, so if it does that, you're good to go.
Click to expand...
Click to collapse
ok... running the rage.bin locked up my device twice but on the third try it worked. another fascinate rooted
xirnibor said:
ok, adb recognizes the device *see below, however when i type adb push su /sdcard/su i get cannot stat 'su': no such file or directory. ?
C:\downloads\android\android\tools>adb devices
List of devices attached
I500a2d0087a device
Click to expand...
Click to collapse
su is a file (for our purposes right here, anyway). Unless you explicity specify its path, it needs to be in the same directory you're running the adb command from.
If you installed the Android SDK per guidelines, adb should be in your PATH environment variable, and you should be able to execute it from any directory. If you didn't do that, then for the sake of simplicity, copy all the files referenced in the original steps to your working directory. From your post above, it appears that is c:\downloads\android\android\tools\
I got stuck at cat /sdcard/su > . Is that supposed to be > .? It won't let me enter that...There's not something else that's supposed to be there?
EDIT: I get the same error faspalma
I'm stuck at that point too. cat /sdcard/su > . returns "cannot create .: is a directory"
I just did a major mistake by copying sh from Windows to /system/bin/sh. Not haivng the execute bit has stopped me from using adb shell.
Could someone provide a clockworkmod recovery file that restores sh & it's permissions? I would greatly appreciate it. Thanks!
Why not just run the fix permissions script from the advanced menu in clockworkmod?
Sent from my SCH-I500 using XDA App
well, would be easier from a linux box:
chmod 755 sh
adb push sh /system/bin/sh
adb reboot
i_am_enderst said:
well, would be easier from a linux box:
chmod 755 sh
adb push sh /system/bin/sh
adb reboot
Click to expand...
Click to collapse
Thanks. I fixed it through recovery mode shell via adb.
I'm getting the following garbage when I do ls within adb shell. Is there any way to fix this?
Code:
# ls
ls
←[1;34mcache←[0m ←[1;32minit.rc←[0m ←[1;34msbin←[0m
←[1;34mconfig←[0m ←[1;32minit.smdkc110.rc←[0m ←[1;34msdcard←[0m
←[1;34mdata←[0m ←[1;32minit.smdkc110.sh←[0m ←[1;34msqlite_stmt_journals←[0m
←[1;34mdbdata←[0m ←[1;34mlib←[0m ←[1;34msys←[0m
←[1;32mdefault.prop←[0m ←[1;32mlpm.rc←[0m ←[1;34msystem←[0m
←[1;34mdev←[0m ←[1;34mmnt←[0m ←[1;32msystem.prop←[0m
←[1;34mefs←[0m ←[1;34mpreinstall←[0m ←[1;34mtmp←[0m
←[1;36metc←[0m ←[1;34mproc←[0m ←[1;34muserdata←[0m
←[1;32mfota.rc←[0m ←[1;32mrecovery.rc←[0m
←[1;36minit←[0m ←[1;34mres←[0m
Those are bash color escape codes but I don't know why adb is outputting them since I'm new to Android.
It's a windows command prompt thing..
Easiest solution, do this from your adb shell (you'll need to do it each time)
export LS_COLORS=none
alternatively you can installed cygwin and spend a little time setting it up so that the ANSI colors are displayed when using adb shell.
I assume the colors show up fine under linux, which is why this got included in some kernels/rom packages without anyone addressing it.
Thanks for the info. It shows up correctly through a cygwin terminal. I'll just use that for now on.
i gotta question. is adb shell and terminal emulator the same thing? and am i right getting into adb shell with the CMD from windows when having my phone via usb connected in debugging mode? and can someone tell me where i can get a list of commands?
thx
X10mini miniCM7 2.0 using XDA Premium App
freebordjunky said:
i gotta question. is adb shell and terminal emulator the same thing? and am i right getting into adb shell with the CMD from windows when having my phone via usb connected in debugging mode? and can someone tell me where i can get a list of commands?
thx
X10mini miniCM7 2.0 using XDA Premium App
Click to expand...
Click to collapse
adb shell and Terminal Emulator are not the same thing. One is an shell environment (adb shell) and the other is a tool to access that environment (Terminal Emulator).
adb shell is native to the phone and allows for Linux shell access. Terminal emulator will allow you to run adb shell ON the phone directly to access that shell environment.
Secondly, yes you are correct, in that you can use the Command Prompt (CMD) to access adb shell. Also, your phone must be in debugging mode as you stated.
To get a list of commands -- you type: adb, while in the androidsdk\tools folder and it'll display the default set of commands available to you.
Though, the most common commands you'll run are as follows:
adb shell -- Gives you shell access, best used with root access
adb remount -- Mounts the phone for r/w (read-write) access; this
needs to be done if you plan to run the next two commands, but only once.
adb push -- Push's/Move's a file to the specified dir, usually system/app
adb pull -- Copies a file from a specified dir, usually system/app
adb shell reboot -- Reboots your phone from the command line
Hope that helps.
thank you very much
X10mini miniCM7 2.0 using XDA Premium App
Sure, no problem.
pseudoremora said:
Sure, no problem.
Click to expand...
Click to collapse
Hi there, Im new to TE and ADB as well.
1) From what it looks like why would you ever use ADB if you didnt need to exchange files with the computer?
TE seems a lot easier to use without having to install the sdk, different exes etc.
2) I've also stumbled upon the ADBD insecure by chainfire, from what I've gathered, this app gives you root access to stock kernels that otherwise wouldn't have given you that. and saves you from typing long command lines.
But what lines is it saving you from typing? Just "su"?
Adb pull or push DOES NOT work with Terminal Emulator as they are not found as commands. What to do to use them with unrooted phone?
pseudoremora said:
adb shell and Terminal Emulator are not the same thing. One is an shell environment (adb shell) and the other is a tool to access that environment (Terminal Emulator).
adb shell is native to the phone and allows for Linux shell access. Terminal emulator will allow you to run adb shell ON the phone directly to access that shell environment.
Secondly, yes you are correct, in that you can use the Command Prompt (CMD) to access adb shell. Also, your phone must be in debugging mode as you stated.
To get a list of commands -- you type: adb, while in the androidsdk\tools folder and it'll display the default set of commands available to you.
Though, the most common commands you'll run are as follows:
adb shell -- Gives you shell access, best used with root access
adb remount -- Mounts the phone for r/w (read-write) access; this
needs to be done if you plan to run the next two commands, but only once.
adb push -- Push's/Move's a file to the specified dir, usually system/app
adb pull -- Copies a file from a specified dir, usually system/app
adb shell reboot -- Reboots your phone from the command line
Hope that helps.
Click to expand...
Click to collapse
I tried the following from powershell, on windows:
Code:
.\adb.exe shell cmd overlay enable com.android.internal.systemui.navbar.gestural
and it worked.
I tried the same from the terminal emulator, and it said
cmd: service not found: overlay
Click to expand...
Click to collapse
Why is it that it works one way, and not the other way? Aren't they interacting with the same shell enviromnent? Is there a permission difference?
I'm trying to find an universal way to read userdata partition(dump partition) without rooting the device.
Assumption :
the device can be boot in fastboot mode
Possible ways :
1. Using fastboot
I've looked into fastboot.c, it taking usb as a usb_handle pointer. I'm trying to move from that point. Fastboot is mostly to write or erase, but I assumed if writing and erasing are possible, reading should be possible as well.
2. Using nvflash, tftp...
It won't be the solution, since it's chip dependent but using chip vendor's download tool to dump partitions.
Go for it!
How does using adb dumping from /dev/mmcblk0p1 sounds?
can I unmount mmcblk0p1, and mount back to readable position?
what device? more info please.
dd if=dev/mmcblk0p? of=data.img bs= 8096 is usually the easiest. (<--just an example)
also this may be helpful:
http://forum.xda-developers.com/showthread.php?t=1247908
chrisrotolo said:
what device? more info please.
dd if=dev/mmcblk0p? of=data.img bs= 8096 is usually the easiest. (<--just an example)
also this may be helpful:
http://forum.xda-developers.com/showthread.php?t=1247908
Click to expand...
Click to collapse
Thanks for the link. using dd command is the exact way I used to dump mmc block as root. Or can it be run under not-rooted phones?
Rooting depends on the kernel version of devices, so when I have to dump various phones, it's very cumbersome to root different kinds of devices and dump.
So I'm finding a way to walk around the problem by using fastboot or if possible adb.
I think fastboot is my best bet so far.
How about adb?
adb shell
df -h
kkiqq1208 said:
How about adb?
adb shell
df -h
Click to expand...
Click to collapse
df -h will only show usage of storage medias. Is there anyway I can read off the actual data?
As already mentioned, dd, but via ADB. I believe that it functions at a low enough level that you should be able to dump mmcblk0 without having to be rooted. If dd can't be directly accessed via adb, you could extract a busybox install from a rooted phone and set it up in your adb directory and then run it from there with busybox (in theory).
Волк said:
As already mentioned, dd, but via ADB. I believe that it functions at a low enough level that you should be able to dump mmcblk0 without having to be rooted. If dd can't be directly accessed via adb, you could extract a busybox install from a rooted phone and set it up in your adb directory and then run it from there with busybox (in theory).
Click to expand...
Click to collapse
Question.
Feels like i'm on the different page from you. If i run dd for /dev/mmcblk0 it does give me an error message saying "Access Denied" of couse mmcblk0 is owned by root. And busybox too(I haven;t tried this), it's just a set of linux commnads, I'm not sure how it can access a file(in this case, a device) which does not have its ownership.
Please correct me if I'm wrong.
Hi All,
There is a way to dump any partition to SD card partition on unrooted device vi ADB.
Paste this couple of lines into the terminal :
adb kill-server
adb wait-for-device
adb shell "echo ro.kernel.qemu=1 > /data/local.prop"
adb reboot
adb wait-for-device
adb shell "mount -wo remount rootfs /"
adb shell "rm /data/local.prop"
adb shell dd if=/dev/block/mmcblk0p1 of=/sdcard/mmcp1.dump
The phone may reboot many time after that, so make sure the file /data/local.prop is deleted after this operation. or execute this :
adb reboot
adb wait-for-device
adb shell "rm /data/local.prop"
adb reboot
hope that helps
__________________
HTC One X (SFR)
Wissam said:
Hi All,
There is a way to dump any partition to SD card partition on unrooted device vi ADB.
Paste this couple of lines into the terminal :
adb kill-server
adb wait-for-device
adb shell "echo ro.kernel.qemu=1 > /data/local.prop"
adb reboot
adb wait-for-device
adb shell "mount -wo remount rootfs /"
adb shell "rm /data/local.prop"
adb shell dd if=/dev/block/mmcblk0p1 of=/sdcard/mmcp1.dump
The phone may reboot many time after that, so make sure the file /data/local.prop is deleted after this operation. or execute this :
adb reboot
adb wait-for-device
adb shell "rm /data/local.prop"
adb reboot
hope that helps
__________________
HTC One X (SFR)
Click to expand...
Click to collapse
Has anyone verified if this works for reading partitions on a non-rooted phone?
This doesn't work on an unrooted, locked device.
Code:
C:\Windows\System32>adb shell "echo ro.kernel.qemu=1 > /data/local.prop"
/system/bin/sh: can't create /data/local.prop: Permission denied
This did not work for my phone.
I got "permission denied" right after
adb shell "echo ro.kernel.qemu=1 > /data/local.prop"
Most of the above will only work on a rooted device with superuser.
The loop holes for shadow copies are mostly fixed since 6.0.
Partitions that can be accessed without root can be dumped with DD through ADB if ADB itself is supported and not internally limited to prevent just this.
Try
Code:
adb reboot recovery
adb root
adb shell
In my device, I can able to read those /data /dev without bootloader unlocking or root.
HemanthJabalpuri said:
Try
Code:
adb reboot recovery
adb root
adb shell
In my device, I can able to read those /data /dev without bootloader unlocking or root.
Click to expand...
Click to collapse
So, ... You are lucky. If I try these commands, I am getting "error: closed". And believe it or not, I have my bootloader UNlocked. It's a doomed chinese tablet, Allwinner 100 SOC.
observingman said:
So, ... You are lucky. If I try these commands, I am getting "error: closed". And believe it or not, I have my bootloader UNlocked. It's a doomed chinese tablet, Allwinner 100 SOC.
Click to expand...
Click to collapse
I found that it is common for many Realme devices to able to use `adb root` in recovery mode.
I have a Realme C12 which has Mediatek Helio G35 MT6765G SoC. So we can also able to `readback` partitions by using SP Flash Tool with the help of MTK-bypass.
hi
i need to push a file with adb
but adb push give me permision deny
how can fix this?
my device is rooted but adb show me device not rooted!
Is USB Debugging on?
yes it's on
amir_n71 said:
yes it's on
Click to expand...
Click to collapse
In some rom adb permission isn't root by default. I think it's a line in default.prop that enable root in adb. Something like
ro.adb.secure = 0
if you don't want to edit that file just push file to sdcard or temporary folder then use adb shell (with root) to copy that file to proper location.
but 2 days ago adb work like acharm in this rom!
amir_n71 said:
but 2 days ago adb work like acharm in this rom!
Click to expand...
Click to collapse
That's strange. Maybe in your rom adb push works only when file doesn't exist.
no. i push framework-res.apk 5 days ago & it work! framework-res.apk is exist already
but i test this file again & permision deny!
How about su before the command? Or adb remount, to get write access?
Sent from my LG-P760 using xda app-developers app
I have the same problem too and remounting the adb doesn't solve it.
I'm still searching for a fix. I can only pull but not push.
If y'all are on a stock rom, then you can't push anything directly into the system (unless your bootloader is unlocked & you modify the boot.img). I use the following mount command
mount -o remount /system
First push the file to the sdcard
adb push blablabla /sdcard
then adb shell it to the correct location.
It's a lot of bs but it's the only way I got it to work with stock.
Here's an example of a batch script I made
Code:
adb push LGSystemUI.apk /sdcard/
adb shell su -c "mount -o remount /system"
adb shell su -c "cp /sdcard/LGSystemUI.apk /system/app/"
adb shell su -c "chmod 644 /system/app/LGSystemUI.apk"
adb shell su -c "killall com.android.systemui"
Sent from my LGMS769 using XDA Premium 4 mobile app