FORUMS
Remove All Ads from XDA

[Guide]Access to /system, wireless dual mount, wireless root shell

5,226 posts
Thanks Meter: 9,888
 
By AdamOutler, Inactive Recognized Developer on 10th April 2011, 09:18 PM
Post Reply Email Thread
18th May 2011, 03:46 AM |#21  
roar109's Avatar
Senior Member
Flag Monterrey
Thanks Meter: 6
 
More
The ssh over wifi with sshdroid was easy, can now access to all files from my terminal in mac.

Thanks for the tip
 
 
18th May 2011, 08:26 AM |#22  
Junior Member
Thanks Meter: 8
 
More
I prefere dropbear like

http://wiki.cyanogenmod.com/index.ph...evice_with_SSH
18th May 2011, 02:41 PM |#23  
^^ This is dropbear. It's dropbear with a GUI to turn it on and off.
18th May 2011, 03:50 PM |#24  
Senior Member
Thanks Meter: 86
 
More
Nice tutorial and useful too. I used to do something very similar with my Iphone (I know I know, no comments please lol). This was all achieved through Total Commander.

What I also used to do, and not sure if you can with Android is have my screen on the pc/laptop so if you do something on the device, then it would show the actions on the pc/laptop and visa versa. It did actually come handy when displaying a Powerpoint at Uni, it just created a bridge to my phone using RealVNC and something called Veency. Veency is not available in the Market so dont know if I can achieve something similar, it displayed the ppt on the large monitor over wi-fi so everyone could see.
18th May 2011, 04:32 PM |#25  
Quote:
Originally Posted by AndHD2

Nice tutorial and useful too. I used to do something very similar with my Iphone (I know I know, no comments please lol). This was all achieved through Total Commander.

What I also used to do, and not sure if you can with Android is have my screen on the pc/laptop so if you do something on the device, then it would show the actions on the pc/laptop and visa versa. It did actually come handy when displaying a Powerpoint at Uni, it just created a bridge to my phone using RealVNC and something called Veency. Veency is not available in the Market so dont know if I can achieve something similar, it displayed the ppt on the large monitor over wi-fi so everyone could see.

I too am an ex-jailbroken-iPhone user. I used the same apps. On this phone, you can do the same, but it's easier as you can use your gallery and just push a folder of pictures to your phone to set up a presentation.

The app you are looking for is called "Droid VNC server" It sets up a standard VNC connection so that you can control your phone from the computer.

I used Droid VNC server once to allow a French developer to control my own dev phone which was here in USA. http://forum.xda-developers.com/show....php?t=1010923 I put my phone in the DMZ of my router, then started Droid VNC server and "adbWireless" which allowed him to push an application through the internet onto my phone via adbWireless, then connect via Droid VNC server to test it out. Once the setup was out of the way, it functioned like an Android VM on his computer while my dev phone was performing actions all on it's own. I wouldn't do this on a daily driver as that would allow full access to -everything- on the phone.
23rd May 2011, 12:52 PM |#26  
Junior Member
Thanks Meter: 0
 
More
Thank for the tip (droid VNC).

About QuickSSHD / AndroidSSHD / SSHdroid, all my attempt failed.
The ssh service is started, it works from the phone, but NOT from the network.
Even on a LAN.

It is like "something" block the packet to the SSHD service.
It is not iptables: I tested iptables -L, and all three routes are set to "ACCEPT"...

Tried with Kyrillos ROM v3, v4, v5 on a Samsung GT-I5800.
Any clue ?
23rd May 2011, 07:50 PM |#27  
ssh has built in protection. If you're using the same IP address as a previous phone, then there may be some old RSA key which was transferred causing the connection not to go through because of lack of verification. Try changing the static IP address on the phone to make it reauthenticate. Also, make sure you have no firewall software on your phone or computer. port 22 must be working.
27th May 2011, 05:27 PM |#28  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by AdamOutler

ssh has built in protection. If you're using the same IP address as a previous phone, then there may be some old RSA key which was transferred causing the connection not to go through because of lack of verification. Try changing the static IP address on the phone to make it reauthenticate. Also, make sure you have no firewall software on your phone or computer. port 22 must be working.

I don't think I have a firewall in my phone.
1/ iptables -L list all 3 chains as ACCEPT.
2/ If I install Droid VNC server, it can be reached from my PC.

The connection is not even established, so it is not a matter of server key.

I tried reflashing stock JPM firmware, and the phone behaves the same way.

I can ping the phone (192.168.1.30). My phone can ping my main PC (192.168.1.6). The phone can telnet to 127.0.0.1:22 but my PC can't telnet to 192.168.1.30:22.
Also tried to set the port to 2222, it doesn't change anything.
28th May 2011, 03:38 AM |#29  
Ssh is not telnet. You want to use putty or ssh to make the connection. Is SFTP working?
28th May 2011, 09:44 AM |#30  
Junior Member
Thanks Meter: 0
 
More
Thank your for your answer.
Yeah I know that ssh is not telnet. I use ssh all day long at my works and home.

I specified 'telnet 192.168.1.30 22" to test to connect to port 22.
If it was open, it would have shown "dropbear/ssh ssh server......." etc...

SFTP is not working either, because is is an application that run on top of ssh. And since SSH does not connect, SFTP cannot run either.
6th June 2011, 12:50 AM |#31  
Senior Member
Thanks Meter: 58
 
More
Quote:
Originally Posted by AdamOutler

Introduction:
Here is how you can obtain unrestricted file access to your phone.

Most of the time you don't need to access the restricted areas of your phone. Sometimes it's required. I like to use SSH/sftp as it is very compatible with everything.

Here are some of the benefeits of using this technique:

  • Dual mount ( you can copy to and from the phone while using the sdcard)
  • wireless mount (copy to your sdcard without cable)
  • wireless root shell (root terminal access)

This guide will allow you to do the following things:
  • modifying data partition
  • grabbing APKs from your phone
  • unlimited access to all data
  • full, unrestricted access on your /system partition

Warning:
By using the techniques available in this thread, you will have unlimited access to your phone. This will give you the ability to destroy your phone. Realize that you must be careful of performing any modification as there are thousands of files on your phone and trying to find the problem can be a nightmare. It's a good idea to keep a written log and a backup of any files you modify so that you can go back and restore them.

You will need:
  • Root access
This guide expects your phone to be rooted at the start. The easiest way to make the root account available on your phone is to use Super1Click.

How-To:

1. mount system rw
a. mount system RW with market app sgs tools
b. mount system RW with market app "mount system r/w"

2. enable a SSH/SFTP server
a. enable sshd server with market app "QuickSSHd" -paid $1, and very much worth it.
b. enable sshd server with market app "SSHDroid" - free, limited features
Make sure you select a SECURE password so that it cannot be brute force hacked over the cell network.

3. Make a shortcut on your desktop to your phone's ssh and sftp addresses
a. under linux:
sftp://[email protected]
gnome-terminal -x ssh -X [email protected]
b. under Mac:
sftp://[email protected]
terminal -x ssh [email protected]
c. under Windows:
use WinSCP -for help with setting up winSCP, see post #4
or putty (thanks boardsportsrule)

Shortcuts make things easier to access. Creating shortcuts will allow you one-click wireless dual mount, or one-click root shell. This basically makes your phone like a USB drive attached to your computer at all times.



4. copy to or from "/system/app" or "/data/app" freely
NOTE: Any SFTP Client can be used like "root explorer", the paid market app
a. use a filemanager like Astro to network sftp into loopback address (sftp://127.0.0.1) and copy the file
b. use your computer to SFTP into your phone and copy the file

5. reboot the phone after applying battery mods or new system apks.
This should get you going in the direction you want.

Why use SSH instead of ADB?
SSH is a tunneling protocol, meaning SSH itself is not a protocol, but rather a transport mechanisim. It's an encrypted and password protected tunnel from one computer to another. ADB is unencrypted and designed for a USB connection. Using ADB Wireless allows anyone on your network to push applications and run commands on your phone without authentication. This is a huge security hole. While ADB wireless can do the same things, it's not equipped to do the job properly. As a rule, use ADB for debugging applications or for wired connections. SSH, because of it's small footprint and no processor usage when idle is perfect for an always-on, password protected, encrypted, secure connection.

Hit me up with any suggestions or comments. I will happily add your information in here.


Disclaimer: All materials presented are for informational purposes. This video is not an authorization, advertisement, nor a suggestion to flash your phone with custom firmware. In no event shall I be held liable for any direct, indirect, incidental, spcial, exemplary, or concequential damages, including but not limited to loss of data, business interruption or damage to equipment. This information is released AS-IS with no written or express warranty or liability.

Thanks for this! It's a must in terms of security and functionality and saves lots of time when dealing with rom modifications.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes