ADB Remount - Droid X Android Development

Has anyone gotten ADB remount to work? I get the following error:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Damian>adb remount
remount failed: Operation not permitted
C:\Users\Damian>adb devices
List of devices attached
015A474B04032021 device
C:\Users\Damian>adb shell
$ su
su
#

Related

Is there a .bashrc equivalent for android?

See title. Mostly I just want to have some aliases set every time I open terminal emulator or adb shell. Does anyone know if this is possible?
Just dig /init.rc then you may find the way.
biAji said:
Just dig /init.rc then you may find the way.
Click to expand...
Click to collapse
I don't think that works, init.rc looks like it's executed on boot... I'm looking for a file that executes every time a shell is started.
Hi there,
I'm wondering the same thing.
I've tried to create a bashrc
(/.bashrc ; /system/etc/bash.bashrc ; /root/.bashrc ) But none is working.
I'm about to try a different way,
I've cp /system/bin/sh to /system/bin/sh1
then I'll try to replace /system/bin/sh by a shell script that will launch my aliases then sh1
Something like:
Code:
#!/system/bin/sh1
alias lsa='ls -Alh '
[...]
/system/bin/sh1
But i'm not pretty sure It could work properly. Firstly because I remember a gain-super-user manipulation that requires to copy and modify rights on sh. (but it could be ok if the script and the copy of sh have the same rights).
Secondly, because I'm not really OK with this; When I'll remove /system/bin/sh in order to replace it, I'll have no shell for a time (if it crashes, I'll not be able to use sh anymore, even with adb).
So if anybody have an other solution it could be damn cool
Thank you all
EDIT: I've just tried this. It's ok, I've not lost my shell, but the modifications (one alias, and a path export), are not applied.
There is no such file. In fact, the default shell is sh, not bash.
However, there is a solution. Read my post in this thread: http://forum.xda-developers.com/showthread.php?t=518959
lbcoder said:
There is no such file. In fact, the default shell is sh, not bash.
However, there is a solution. Read my post in this thread: http://forum.xda-developers.com/showthread.php?t=518959
Click to expand...
Click to collapse
That is interesting. I'll have to try it. I assume it won't work with ADB? Or am I wrong (please say yes)?
I would have thought that it would work with adb, but when I try this:
adb shell /path/to/bash --rcfile /path/to/bashrc
it seems that its a 1-way shell...
well you can always run bash after connecting....
adb shell
/path/to/bash --rcfile /path/to/bashrc
Alternatively, with a little bit of craftiness, you may be able to replace the sh binary with a script that runs bash.
Sweet, can't wait until I get home.
The best way, and what a lot of the ROM devs are doing now is putting a check/call to /system/init.rc and /data/init.rc so we can add our own customizations. This would include boot time chmod/chowns or aliases if need be. Hell we could put a call to /etc/.profile if we wanted and put all our aliases in there. But we can't do any of that till ROM devs put that call in boot.img->boot.ramdisk->init.rc
Android's default shell /system/bin/sh is a link to mksh in the same directory. It reads /system/etc/mkshrc & ~/.mkshrc
I think it also reads ~/.profile & /etc/profile but I'm not sure & I don't know what order.
See https://www.mirbsd.org/mksh.htm for the documentation.
Also worth noting is that most, if not all, shells read /etc/profile & ~/.profile so anything in there should be very general.
Yes there is
lbcoder said:
There is no such file. In fact, the default shell is sh, not bash.
However, there is a solution. Read my post in this thread: http://forum.xda-developers.com/showthread.php?t=518959
Click to expand...
Click to collapse
Edit /system/etc/mkshrc. You can add your aliases there after the defaults. Type 'alias' from the terminal to see the default aliases that are defined in this file. I believe this file is the master, and when a shell is envoked, the mksh command pipes a hidden copy of this file into the users home directory as .mkshrc for the terminal session.
Also, this is the file to edit to append to your $PATH.
alanthehat said:
Android's default shell /system/bin/sh is a link to mksh in the same directory. It reads /system/etc/mkshrc & ~/.mkshrc
I think it also reads ~/.profile & /etc/profile but I'm not sure & I don't know what order.
See https://www.mirbsd.org/mksh.htm for the documentation.
Also worth noting is that most, if not all, shells read /etc/profile & ~/.profile so anything in there should be very general.
Click to expand...
Click to collapse
/system/etc/mkshrc & ~/.mkshrc
You had the answer right here but you didn't know it
smasraum said:
That is interesting. I'll have to try it. I assume it won't work with ADB?
Click to expand...
Click to collapse
curiously enough my bash aliases work when in the adb shell. I'm running bash on my mac. I guess the alias get expanded by bash before there are sent to adb shell.
Code:
mac $ alias ll
alias ll='\ls -albhFG'
mac $
Code:
mac $ adb shell
[email protected]_a11chl:/ $ ll
drwxr-xr-x root root 2016-10-03 13:10 acct
lrwxrwxrwx root root 2016-10-03 13:24 busybox -> /data/data/com.jrummy.app.managerfree/files/busybox
drwxrwx--- system cache 2016-10-03 14:37 cache
drwxrwx--x system carrier 2016-09-02 15:24 carrier
dr-x------ root root 2016-10-03 13:10 config
Please note this does not work:
Code:
mac $ adb shell ll
/system/bin/sh: ll: not found
On my side, here is what I did :
Code:
adb root
Code:
adb remount
Code:
adb shell
Code:
vim /etc/mkshrc
I added the following line :
Code:
alias ls='ls --color=auto'
Results attached, now I may play with the PS1 to get colors in the prompt....
In nougat, there is a bashrc in
"/system/etc/bash/bashrc"
idk about other versions check and tell me
Code:
uname -a: Linux debian 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u5 (2018-09-30) x86_64 GNU/Linux
[email protected]:/# adb root #restart adb with root permissions
[email protected]:/# adb remount #remount partitions on device read-write
remount succeeded
[email protected]:/# adb shell #run remote, interactive shell
device:/ # test0 #execute command test0
/system/bin/sh: test0: not found
127|device:/ # alias test0='date'
device:/ # test0
Wed Oct 10 15:06:16 +00 2018 #SUCCESS
[email protected]:/# adb root
adbd is already running as root
[email protected]:/# adb remount
remount succeeded
[email protected]:/# adb shell
klteusc:/ # test1
/system/bin/sh: test1: not found
127|klteusc:/ # echo "alias test1='date'">>/system/etc/mkshrc
klteusc:/ # test1
/system/bin/sh: test1: not found
127|klteusc:/ # exit
[email protected]:/# adb shell
klteusc:/ # test1
Wed Oct 10 15:10:41 +00 2018
klteusc:/ # exit
[email protected]:/# adb root
adbd is already running as root
[email protected]:/# adb remount
remount succeeded
[email protected]:/# adb shell
klteusc:/ # test2
/system/bin/sh: test2: not found
127|klteusc:/ # echo "alias test2='date'">>/system/etc/bash/bashrc
klteusc:/ # test2
/system/bin/sh: test2: not found
127|klteusc:/ # exit
[email protected]:/# adb shell
klteusc:/ # test2
/system/bin/sh: test2: not found
dirtygardner said:
Code:
uname -a: Linux debian 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u5 (2018-09-30) x86_64 GNU/Linux
[email protected]:/# adb root #restart adb with root permissions
[email protected]:/# adb remount #remount partitions on device read-write
remount succeeded
[email protected]:/# adb shell #run remote, interactive shell
device:/ # test0 #execute command test0
/system/bin/sh: test0: not found
127|device:/ # alias test0='date'
device:/ # test0
Wed Oct 10 15:06:16 +00 2018 #SUCCESS
[email protected]:/# adb root
adbd is already running as root
[email protected]:/# adb remount
remount succeeded
[email protected]:/# adb shell
klteusc:/ # test1
/system/bin/sh: test1: not found
127|klteusc:/ # echo "alias test1='date'">>/system/etc/mkshrc
klteusc:/ # test1
/system/bin/sh: test1: not found
127|klteusc:/ # exit
[email protected]:/# adb shell
klteusc:/ # test1
Wed Oct 10 15:10:41 +00 2018
klteusc:/ # exit
[email protected]:/# adb root
adbd is already running as root
[email protected]:/# adb remount
remount succeeded
[email protected]:/# adb shell
klteusc:/ # test2
/system/bin/sh: test2: not found
127|klteusc:/ # echo "alias test2='date'">>/system/etc/bash/bashrc
klteusc:/ # test2
/system/bin/sh: test2: not found
127|klteusc:/ # exit
[email protected]:/# adb shell
klteusc:/ # test2
/system/bin/sh: test2: not found
Click to expand...
Click to collapse
You need to manually edit the mksh file and add your command in for it to persistently work.
Just running the command below will work but will be wiped on reboot.
Code:
alias test1='date'
If you need it to stay persistent over reboots manually edit /system/etc/mkshrc
Code:
## Adding the test0 alias via file editing:
taimen:/ # test0
Wed Aug 5 13:09:46 GMT 2020
## Adding test1 alias via command line:
taimen:/ # alias test1='date'
taimen:/ # test1
Wed Aug 5 13:10:06 GMT 2020
## Reboot Device
taimen:/ # reboot
## Check for persistant changes:
taimen:/ # test0
Wed Aug 5 13:04:24 GMT 2020
taimen:/ # test1
/system/bin/sh: test1: not found
Example file that I used:
Code:
# Copyright (c) 2010, 2012, 2013, 2014
# Thorsten Glaser <[email protected]>
# This file is provided under the same terms as mksh.
#-
# Minimal /system/etc/mkshrc for Android
#
# Support: https://launchpad.net/mksh
: ${HOSTNAME:=$(getprop ro.product.device)}
: ${HOSTNAME:=android}
: ${TMPDIR:=/data/local/tmp}
export HOSTNAME TMPDIR
alias test0="date"
if (( USER_ID )); then PS1='$'; else PS1='#'; fi
PS4='[$EPOCHREALTIME] '; PS1='${|
local e=$?
(( e )) && REPLY+="$e|"
return $e
}$HOSTNAME:${PWD:-?} '"$PS1 "
This will stay persistent on reboot.

Adb error...

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Tfj4>adb shell
adb server is out of date. killing...
CreateProcess failure, error 2
* failed to start daemon *
error:
C:\Users\Tfj4>
Click to expand...
Click to collapse
Any thoughts???Does that with every command
Have you recently upgraded your Android Development Tools (ADT)???
Not sure what causes it but I seen a fix in this thread
http://forum.xda-developers.com/showthread.php?p=4822780
I have the same problem, updating the SDK didn't help. I've been digging through the internet long and wide and haven't found a solution.

[HOWTO] Root Nexus One 2.2.1 FRG83D without OEM unlock

This guide is for people who want root but want to keep their stock rom, not breaking the warranty, unlocking bootloader etc.
A proud ubuntu user, I am writing this in a new thread purely because the manual rageagainstthecage method and SuperOneClick method did not not work for me, see link to my conclusion below if you care
http://forum.xda-developers.com/showpost.php?p=11305312&postcount=2526
What did work however was via adb shell using psneuter and its fairly simple if you follow the following commands.
This guide assumes you know how to get access to the shell via adb, if you dont then search elsewhere for a useful guide
OK lets get to business!
1. Download the attached nexus_one_softroot.tar from the bottom of this post and extract contents to the same folder as adb
2. Open up your terminal, cd to the same folder as adb and the extracted files
3. Enter the following commands:
Code:
sudo ./adb push psneuter /data/local/tmp/psneuter
sudo ./adb push busybox /data/local/tmp/busybox
sudo ./adb push su /data/local/tmp/su
sudo ./adb shell chmod 755 /data/local/tmp/psneuter
sudo ./adb shell chmod 755 /data/local/tmp/busybox
sudo ./adb shell chmod 755 /data/local/tmp/su
sudo ./adb shell
After this you should see only a $ which tells us that we at the android command line with user privileges only, lets continue
Code:
$ cd /data/local/tmp
$ ls
busybox
su
psneuter
$ ./psneuter
property service neutered.
killing adbd. (should restart in a second or two)
You will now be kicked out of android shell, lets go back in
Code:
sudo ./adb shell
After this you should see only a # which tells us that we root baby! If you want to double check issue this command
Code:
# id
uid=0(root) gid=0(root)
Lets continue on. From this point we will install busybox and su which will make root permanent
Code:
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# cd /data/local/tmp
# ./busybox cp busybox /system/bin
# chmod 4755 /system/bin/busybox
# busybox cp su /system/bin
# chmod 4755 /system/bin/su
# exit
For some reason I sometimes have to enter exit twice to leave the android shell. Again, re-access the android shell
Code:
sudo ./adb shell
Now in the android shell we can finish up
Code:
# su
# mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
# exit
# exit
Lastly we must install Superuser, and I did this from the android market so I knew its the latest version, its simple to get, less command input etc.
Now you have root! I hope this was simple enough to follow, I have not really written a guide before but from lots of searching I just could not find a solution for my Nexus One 2.2.1 FRG83D, especially any guide that uses psneuter.
Anyway, glad to contribute
EDIT - also, being new to starting threads, this may not quite be in the right section of the forum, sorry if thats the case mods
Added link to the thread from Wiki.
upgraded to gingerbread 2.3.3. after copying and setting permissions, got this:
PHP:
$ cd /data/local/tmp
$ ls -l
-rwxr-xr-x shell shell 26248 2010-07-22 10:20 su
-rwxr-xr-x shell shell 1062992 2010-10-16 22:29 busybox
-rwxr-xr-x shell shell 585731 2011-01-08 18:02 psneuter
su
busybox
psneuter
$ ./psneuter
Failed to set prot mask (Inappropriate ioctl for device)
second time threw me out of shell. again adb shell gives this:
PHP:
$ id
uid=2000(shell) gid=2000(shell) groups=1003(graphics),1004(input),1007(log),1009(mount),1011(adb),1015(sdcard_rw),3001(net_bt_admin),3002(net_bt),3003(inet)
mfkr said:
upgraded to gingerbread 2.3.3. after copying and setting permissions, got this:
Code:
$ ./psneuter
Failed to set prot mask (Inappropriate ioctl for device)
Click to expand...
Click to collapse
I believe this is due to a change in the kernel as it is upgraded into gingerbread, the input/output controls have changed, leaving psneuter out of date with the current kernel.
However if an exploit is found with the kernel used in 2.3.3, you can use it in place of psneuter with the above method.

[Q] Rootshell issue updated

wiki.cyanogenmod.com/wiki/Full_Update_Guide_-_Rogers_Dream_911_Patched
HBOOT-1.33.0010 (DREA21000)
CPLD-4
RADIO-3.22-26.17
Jun 2 2009, 21:33:16
Code:
./exploid
[1] _+Stopped <signal> ./exploid
Did I do anything wrong in this step?
Code:
You will see a message come up. The exploit has now been setup. Unplug & re-plug in the USB cable to the computer.
Now type in the following commands:
adb shell
rootshell
NOTE: This will prompt for a password, the password is "bacon".
I can't key in the password bacon
I try running cmd as an admin
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\system32>cd C:\Program Files (x86)\Android\android-sdk\platform-tools
\
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
error: device not found
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
error: device not found
C:\Program Files (x86)\Android\android-sdk\platform-tools>adb shell
$ rootshell
rootshell
rootshell: permission denied
$ rootshell bacon
rootshell bacon
rootshell: permission denied
$ rootshell
rootshell
rootshell: permission denied
$ rootshell: bacon
rootshell: bacon
rootshell:: permission denied
$
I also try the ls command after chmod 777 exploid and the output:
Code:
the output is ls exploid screen_lock_status pattern lock_status
Please see pics for my detailed setup
Well first off I assume the proper drivers are installed? It looks as if your computer isn't detecting your phone
Sent from my HTC Vision using xda premium
Well first off I assume the proper drivers are installed? It looks as if your computer isn't detecting your phone
Click to expand...
Click to collapse
I don't know; I am using the google usb driver and fastboot
Please see attachments for more details
Should I reinstall android sdk?
Well an easy way to check is by typing adb devices and a bunch of numbers should come up saying that you're attached. If not then you may need to reinstall the proper drivers (don't need to reinstal sdk)
Sent from my HTC Vision using xda premium
I reinstall sdk and run the cmd adb device and all I got is a bunch of adb device command
Please see attachment for more details
So did I set it up correctly?
Type adb devices
Sent from my HTC Vision using xda premium
I think the driver is properly installed.
Please see attachment for details
Still not working
horny-sama said:
I think the driver is properly installed.
Please see attachment for details
Still not working
Click to expand...
Click to collapse
yes it looks like the drivers are fine and your computer is seeing your phone no problem.
this is the same proses i used to root my rogers dream and i dint have any issues.
by looking at the pictures you attached did you put exploid and amonra in the same folder as adb is in?
by looking at the pictures you attached did you put exploid and amonra in the same folder as adb is in?
Click to expand...
Click to collapse
I did. Please see attachment for details
Should I format my sd card and start over again?

Returning to stock

How the f can i possibly return to stock?
So many tutorials but i can't seem to figure it out:')
I want to get S-off but RumRunner tells me my phone is not rooted and to SU or FU. Superuser is gone on my phone somehow...
If I want to install another ROM it keeps aborting...
Running Cyanogenmod 11-20140405-Snapshot-M5-m7
HBOOT -1.55.0000 Tampered Unlocked S-on
Please help me
erriezeekanmgn said:
How the f can i possibly return to stock?
So many tutorials but i can't seem to figure it out:')
I want to get S-off but RumRunner tells me my phone is not rooted and to SU or FU. Superuser is gone on my phone somehow...
If I want to install another ROM it keeps aborting...
Running Cyanogenmod 11-20140405-Snapshot-M5-m7
HBOOT -1.55.0000 Tampered Unlocked S-on
Please help me
Click to expand...
Click to collapse
Try firewater, temp root method, which is the 3rd method down, follow the instructions on the site.
http://firewater-soff.com/
Seanie280672 said:
Try firewater, temp root method, which is the 3rd method down, follow the instructions on the site.
http://firewater-soff.com/
Click to expand...
Click to collapse
I get: "cannot stat 'firewater': No such file or directory"
Both files are in my downloads map. So i added cd downloads.
After that it still did'nt work.
This is what i got. Sorry. Real noob over here
Microsoft Windows [versie 6.1.7601] Copyright (c) 2009 Microsoft Corporation. Alle rechten voorbehouden. C:\Users\Beneden>adb reboot * daemon not running. starting it now on port 5037 * * daemon started successfully * C:\Users\Beneden>adb wait-for-device push firewater /data/local/tmp cannot stat 'firewater': No such file or directory C:\Users\Beneden>push firewater.bin push wordt niet herkend als een interne of externe opdracht, programma of batchbestand. C:\Users\Beneden>cd downloads C:\Users\Beneden\Downloads>push firewater.bin push wordt niet herkend als een interne of externe opdracht, programma of batchbestand. C:\Users\Beneden\Downloads>adb wait-for-device push firewater /data/local/tmp 1419 KB/s (4522136 bytes in 3.110s) C:\Users\Beneden\Downloads>adb push temproot /data/local/tmp 2309 KB/s (68576 bytes in 0.029s) C:\Users\Beneden\Downloads>adb shell [email protected]:/ $ chmod 755 /data/local/tmp/temproot chmod 755 /data/local/tmp/temproot [email protected]:/ $ chmod 755 /data/local/tmp/firewater chmod 755 /data/local/tmp/firewater [email protected]:/ $ /data/local/tmp/temproot /data/local/tmp/temproot run_root_shell, thanks fi01 - https://github.com/android-rooting-tools/android_r un_root_shell [*] Attempting to acquire root. This will take 5-10 minutes, be patient error in setsockopt(). Failed to get prepare_kernel_cred address. Failed to get commit_creds address. Failed to get ptmx_fops address. Failed to setup variables. 1|[email protected]:/ $ /data/local/tmp/firewater /data/local/tmp/firewater error, run firewater as root. su or FU!!!!!! 1|[email protected]:/ $
erriezeekanmgn said:
I get: "cannot stat 'firewater': No such file or directory"
Both files are in my downloads map. So i added cd downloads.
After that it still did'nt work.
This is what i got. Sorry. Real noob over here
Microsoft Windows [versie 6.1.7601] Copyright (c) 2009 Microsoft Corporation. Alle rechten voorbehouden. C:\Users\Beneden>adb reboot * daemon not running. starting it now on port 5037 * * daemon started successfully * C:\Users\Beneden>adb wait-for-device push firewater /data/local/tmp cannot stat 'firewater': No such file or directory C:\Users\Beneden>push firewater.bin push wordt niet herkend als een interne of externe opdracht, programma of batchbestand. C:\Users\Beneden>cd downloads C:\Users\Beneden\Downloads>push firewater.bin push wordt niet herkend als een interne of externe opdracht, programma of batchbestand. C:\Users\Beneden\Downloads>adb wait-for-device push firewater /data/local/tmp 1419 KB/s (4522136 bytes in 3.110s) C:\Users\Beneden\Downloads>adb push temproot /data/local/tmp 2309 KB/s (68576 bytes in 0.029s) C:\Users\Beneden\Downloads>adb shell [email protected]:/ $ chmod 755 /data/local/tmp/temproot chmod 755 /data/local/tmp/temproot [email protected]:/ $ chmod 755 /data/local/tmp/firewater chmod 755 /data/local/tmp/firewater [email protected]:/ $ /data/local/tmp/temproot /data/local/tmp/temproot run_root_shell, thanks fi01 - https://github.com/android-rooting-tools/android_r un_root_shell [*] Attempting to acquire root. This will take 5-10 minutes, be patient error in setsockopt(). Failed to get prepare_kernel_cred address. Failed to get commit_creds address. Failed to get ptmx_fops address. Failed to setup variables. 1|[email protected]:/ $ /data/local/tmp/firewater /data/local/tmp/firewater error, run firewater as root. su or FU!!!!!! 1|[email protected]:/ $
Click to expand...
Click to collapse
The firewater file and temp root file must be in the same folder as adb and fastboot.
Seanie280672 said:
The firewater file and temp root file must be in the same folder as adb and fastboot.
Click to expand...
Click to collapse
Still no succes :')!!!
)
('-s' means install on SD card instead of inter
nal storage)
('--algo', '--key', and '--iv' mean the file is
encrypted already)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
)
adb bugreport - return all information from the device
that should be included in a bug report.
adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all]
[-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>
.
If no -f option is supplied then the data is wr
itten
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks
themselves
in the archive; the default is noapk.)
(-obb|-noobb enable/disable backup of any insta
lled apk expansion
(aka .obb) files associated with each applic
ation; the default
is noobb.)
(-shared|-noshared enable/disable backup of the
device's
shared storage / SD card contents; the defau
lt is noshared.)
(-all means to back up all installed applicatio
ns)
(-system|-nosystem toggles whether -all automat
ically includes
system applications; the default is to inclu
de system apps)
(<packages...> is the list of applications to b
e backed up. If
the -all or -shared flags are passed, then t
he package
list is optional. Applications explicitly g
iven on the
command line will be included even if -nosys
tem would
ordinarily cause them to be omitted.)
adb restore <file> - restore device contents from the <file> backup
archive
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb get-devpath - prints: <device-path>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on th
e specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be u
pdated.
- If it is "system" or "data", only the corresponding partition
is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list
of the following values
1 or all, adb, sockets, packets, rwx, usb, sync
, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes prior
ity over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these de
bug tags are printed.
C:\Users\Beneden>adb push temproot
Android Debug Bridge version 1.0.31
-a - directs adb to listen on all interfaces for a c
onnection
-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <specific device> - directs command to the device or emulator with
the given
serial number or qualifier. Overrides ANDROID_S
ERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
-H - Name of adb server host (default: localhost)
-P - Port of adb server (default: 5037)
devices [-l] - list all connected devices
('-l' will also list device qualifiers)
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number
is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number
is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devic
es.
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward --list - list all forward socket connections.
the format is a list of lines with the followin
g format:
<serial> " " <local> " " <remote> "\n"
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb forward --no-rebind <local> <remote>
- same as 'adb forward <local> <remote>' but fail
s
if <local> is already forwarded
adb forward --remove <local> - remove a specific forward socket connection
adb forward --remove-all - remove all forward socket connections
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] [--algo <algorithm name> --key <hex-encoded key> --
iv <hex-encoded iv>] <file>
- push this package file to the device and instal
l it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data
)
('-s' means install on SD card instead of inter
nal storage)
('--algo', '--key', and '--iv' mean the file is
encrypted already)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
)
adb bugreport - return all information from the device
that should be included in a bug report.
adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all]
[-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>
.
If no -f option is supplied then the data is wr
itten
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks
themselves
in the archive; the default is noapk.)
(-obb|-noobb enable/disable backup of any insta
lled apk expansion
(aka .obb) files associated with each applic
ation; the default
is noobb.)
(-shared|-noshared enable/disable backup of the
device's
shared storage / SD card contents; the defau
lt is noshared.)
(-all means to back up all installed applicatio
ns)
(-system|-nosystem toggles whether -all automat
ically includes
system applications; the default is to inclu
de system apps)
(<packages...> is the list of applications to b
e backed up. If
the -all or -shared flags are passed, then t
he package
list is optional. Applications explicitly g
iven on the
command line will be included even if -nosys
tem would
ordinarily cause them to be omitted.)
adb restore <file> - restore device contents from the <file> backup
archive
adb help - show this help message
adb version - show version num
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb get-devpath - prints: <device-path>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on th
e specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be u
pdated.
- If it is "system" or "data", only the corresponding partition
is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list
of the following values
1 or all, adb, sockets, packets, rwx, usb, sync
, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes prior
ity over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these de
bug tags are printed.
C:\Users\Beneden>chmod 755
chmod wordt niet herkend als een interne
of externe opdracht, programma of batchbestand.
C:\Users\Beneden>adb shell
[email protected]:/ $ chmod 755
chmod 755
Usage: chmod [OPTION] <MODE> <FILE>
-R, --recursive change files and directories recursively
-h, --no-dereference do not follow symlink
--help display this help and exit
10|[email protected]:/ $ chmod 755
chmod 755
Usage: chmod [OPTION] <MODE> <FILE>
-R, --recursive change files and directories recursively
-h, --no-dereference do not follow symlink
--help display this help and exit
10|[email protected]:/ $ /data/local/tmp/temproot
/data/local/tmp/temproot
run_root_shell, thanks fi01 - https://github.com/android-rooting-tools/android_r
un_root_shell
[*] Attempting to acquire root. This will take 5-10 minutes, be patient
error in setsockopt().
Failed to get prepare_kernel_cred address.
Failed to get commit_creds address.
Failed to get ptmx_fops address.
Failed to setup variables.
1|[email protected]:/ $ GODVERDOMME
GODVERDOMME
/system/bin/sh: GODVERDOMME: not found
127|[email protected]:/ $
Your typing the commands wrong, just copy and paste them from the firewater site, the big long list it's giving you is the help menu stating you typed an incorrect command
Okay. I did but i will do it again.
So for the record. I have to type exactly these things in these order:
1. adb reboot
2. adb wait-for-device push firewater /data/local/tmp
3. adb push temproot /data/local/tmp
4. adb shell
5. chmod 755 /data/local/tmp/temproot
6. chmod 755 /data/local/tmp/firewater
7. /data/local/tmp/temproot
8. /data/local/tmp/firewater
Thanks
Yes, but wait for each command to complete before issuing the next
Seanie280672 said:
Yes, but wait for each command to complete before issuing the next
Click to expand...
Click to collapse
Hi again,
I watched a tutorial on how to use Firewater so i know what to expect. But it's not working.
Step 1 works fine. But 2 does not.
I get
Microsoft Windows [versie 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle rechten voorbehouden.
C:\Users\Beneden>adb reboot
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
C:\Users\Beneden>adb wait-for-device push firewater /data/local/tmp
cannot stat 'firewater': No such file or directory
C:\Users\Beneden>
Click to expand...
Click to collapse
Seems like i have to put the firewater (and temproot?) file in an other directory? Which directory?
erriezeekanmgn said:
Hi again,
I watched a tutorial on how to use Firewater so i know what to expect. But it's not working.
Step 1 works fine. But 2 does not.
I get
Seems like i have to put the firewater (and temproot?) file in an other directory? Which directory?
Click to expand...
Click to collapse
the same one where your adb and fastboot files are on your computer
Seanie280672 said:
the same one where your adb and fastboot files are on your computer
Click to expand...
Click to collapse
That's what i have, right?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
erriezeekanmgn said:
That's what i have, right?
Click to expand...
Click to collapse
yup, open a command window from within that folder (control + shift + right mouse click, select open command window here)
then type "adb devices" without the quotes, make sure your phone is plugged into the computer, and post the result ?
Seanie280672 said:
yup, open a command window from within that folder (control + shift + right mouse click, select open command window here)
then type "adb devices" without the quotes, make sure your phone is plugged into the computer, and post the result ?
Click to expand...
Click to collapse
C:\adb>adb devices
List of devices attached
SH35********** device
erriezeekanmgn said:
C:\adb>adb devices
List of devices attached
SH35********** device
Click to expand...
Click to collapse
Okthats fine, just wanted to make sure your adb was working properly, remove your serial number now like ive done in the quote.
now in that same cmd window run the firewater commands.
Seanie280672 said:
Okthats fine, just wanted to make sure your adb was working properly, remove your serial number now like ive done in the quote.
now in that same cmd window run the firewater commands.
Click to expand...
Click to collapse
I got a bit further but still some problems.
C:\adb>adb devices
List of devices attached
SH35*********** device
C:\adb>adb reboot
C:\adb>adb wait-for-device push firewater /data/local/tmp
3646 KB/s (4522136 bytes in 1.211s)
C:\adb>adb push temproot /data/local/tmp
36 KB/s (68576 bytes in 1.820s)
C:\adb>adb shell
[email protected]:/ $ chmod 755 /data/local/tmp/temproot
chmod 755 /data/local/tmp/temproot
[email protected]:/ $ chmod 755 /data/local/tmp/firewater
chmod 755 /data/local/tmp/firewater
[email protected]:/ $ /data/local/tmp/temproot
/data/local/tmp/temproot
run_root_shell, thanks fi01 - https://github.com/android-rooting-tools/android_r
un_root_shell
[*] Attempting to acquire root. This will take 5-10 minutes, be patient
error in setsockopt().
Failed to get prepare_kernel_cred address.
Failed to get commit_creds address.
Failed to get ptmx_fops address.
Failed to setup variables.
1|[email protected]:/ $
Click to expand...
Click to collapse
I played a little and now i have this. Should i type "Yes"?
C:\adb>adb devices
List of devices attached
SH35HW904697 device
C:\adb>adb reboot
C:\adb>adb wait-for-device push firewater /data/local/tmp
3646 KB/s (4522136 bytes in 1.211s)
C:\adb>adb push temproot /data/local/tmp
36 KB/s (68576 bytes in 1.820s)
C:\adb>adb shell
[email protected]:/ $ chmod 755 /data/local/tmp/temproot
chmod 755 /data/local/tmp/temproot
[email protected]:/ $ chmod 755 /data/local/tmp/firewater
chmod 755 /data/local/tmp/firewater
[email protected]:/ $ /data/local/tmp/temproot
/data/local/tmp/temproot
run_root_shell, thanks fi01 - https://github.com/android-rooting-tools/android_r
un_root_shell
[*] Attempting to acquire root. This will take 5-10 minutes, be patient
error in setsockopt().
Failed to get prepare_kernel_cred address.
Failed to get commit_creds address.
Failed to get ptmx_fops address.
Failed to setup variables.
1|[email protected]:/ $ su
su
[email protected]:/ # chmod 755 /data/local/tmp/temproot
chmod 755 /data/local/tmp/temproot
[email protected]:/ # chmod 755 /data/local/tmp/firewater
chmod 755 /data/local/tmp/firewater
[email protected]:/ # /data/local/tmp/temproot
/data/local/tmp/temproot
run_root_shell, thanks fi01 - https://github.com/android-rooting-tools/android_r
un_root_shell
[*] Attempting to acquire root. This will take 5-10 minutes, be patient
error in setsockopt().
Failed to get prepare_kernel_cred address.
Failed to get commit_creds address.
Failed to get ptmx_fops address.
Failed to setup variables.
1|[email protected]:/ # /data/local/tmp/firewater
/data/local/tmp/firewater
==================== firewater S-OFF 8.0.6.26 ===========================
firewater S-OFF comes with NO WARRANTY (express or implied)
and NO GUARANTEE OF FITNESS for any particular task.
We have made every effort we can to make this a safe process for users
however the authors disclaim any liability for damage to your phone
or other materials or devices used during this process.
The entire risk of running firewater S-OFF lies with you, the user.
By using this software you acknowledge and accept that the authors
are not liable for any loss, material or otherwise howsoever caused.
firewater S-OFF may not be rehosted, repackaged, one-clicked, etc.
support is available @ #firewater on the freenode and andirc networks
support is much faster there vs. posting helpme threads on xda etc
Do not operate a motor vehicle after interacting with firewater
Do not inhale firewater or allow firewater to come in contact with eyes
firewater is best served at extremely cold temperatures
firewater has been known to cause temporary lapses in judgement
DO NOT TAUNT FIREWATER, YOU'VE BEEN WARNED
=========================================================================
Do you understand the implications of these warnings?
(Yes/No)
Click to expand...
Click to collapse
erriezeekanmgn said:
I got a bit further but still some problems.
I played a little and now i have this. Should i type "Yes"?
Click to expand...
Click to collapse
Yes type Yes, its common for the temp root to fail, it just means your already rooted.
Seanie280672 said:
Yes type Yes, its common for the temp root to fail, it just means your already rooted.
Click to expand...
Click to collapse
Okay thanks. Phone says it's S-OFF right now. Also with booting it gives some notice.
Now i can follow this thread, correct?
erriezeekanmgn said:
Okay thanks. Phone says it's S-OFF right now. Also with booting it gives some notice.
Now i can follow this thread, correct?
Click to expand...
Click to collapse
yes the red text is normal after s-off, it makes everything so much easier, and yes follow that theard.
---------- Post added at 07:03 PM ---------- Previous post was at 06:59 PM ----------
All you need is your RUU now doesn't matter which one, as long as its your RUU and run it.
Seanie280672 said:
yes the red text is normal after s-off, it makes everything so much easier, and yes follow that theard.
---------- Post added at 07:03 PM ---------- Previous post was at 06:59 PM ----------
All you need is your RUU now doesn't matter which one, as long as its your RUU and run it.
Click to expand...
Click to collapse
Could you maybe help me with the RUU?
erriezeekanmgn said:
Could you maybe help me with the RUU?
Click to expand...
Click to collapse
post your fastboot getvar all please, remove imei and serial number before posting.

Categories

Resources