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

Search This thread

AdamOutler

Retired Senior Recognized Developer
Feb 18, 2011
5,224
9,826
Miami, Fl̨̞̲̟̦̀̈̃͛҃҅͟orida
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://root@192.168.1.xxx
gnome-terminal -x ssh -X root@192.168.1.xxx
b. under Mac:
sftp://root@192.168.1.xxx
terminal -x ssh root@192.168.1.xxx
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.
Screenshot.png



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.
 
Last edited:

TRusselo

Inactive Recognized Developer
Jan 20, 2011
4,736
2,931
Edmonton
i use swiFTP on my phone with windows. super easy to config but no root writing even if mounted R/W. But i dont often drop files into root area. when i do ill use swiftp to get on phone then root explorer to copy to root area. it uses a simple ftp connection no special windows software needed,

setup login/ password in SwiFTP app.
on PC:
right click my computer > add network location > ftp://PhoneIP:port > enter login name > first connection will ask for password.
 
  • Like
Reactions: IVXX

TRusselo

Inactive Recognized Developer
Jan 20, 2011
4,736
2,931
Edmonton
ok got bored tried things your way.
i really liked WinSCP, even more when i got it setup nicely.
it definatly wasnt made BY windows users but was made FOR.
with a few tweaks, in the setup and options it is really easy to use.

WinSCP even INTEGRATES into windows to handle all Sftp and SCP addresses automatically!

on my android phone i am using " QuickHSSd" has 2 nice desktop widget toggles.


  1. use Root Explorer to mount system (or other method)
  2. turn on QuickSSHd
  3. and WinSCP does the rest!
created a little guide for noobies to use this really good program and understand through familiarity.
hide/disable un-needed things, show familiar parts, and optimize for our phones with flash memory! (eg. one file at a time)
ENJOY!
WinSCP%201%20%281%29.JPG


WinSCP%201%20%282%29.JPG


WinSCP%201%20%283%29.jpg
 
Last edited:

Dani897

Senior Member
Aug 16, 2010
3,615
670
im running mint 10 kde and my phone is on jvh gingerbread (continuum 5.4 actually) and the quicksshd app (the free one detected continuums add blocking and told me to buy it if i didnt want to see ads.)

well i dont know if it is an app update or kde is weird but your link/shortcut takes me to /data/data/... it doesnt matter. but for some reason i could only back it up to /data on my phone i had no root access, it didnt make much sense.

well i changed the shortcut url to "sftp://root@192.168.1.xxx:22/ "
for newbs
22 is the port the app listens on. you may have to adjust that if you use a different app or changed the port for what ever reason. where xxx is the last part of the phones ip adress. the ssh app will report this if you dont know it.

now all is good. i thought id add this incase someone else has issues reaching root on there phones
 
Last edited:

Rakeesh_j

Senior Member
Jan 13, 2010
526
88
Easier and better than SFTP is Samba for android:

https://market.android.com/details?id=com.funkyfresh.samba

Better because you have random access to your files (e.g. you can say edit a word document without having to copy it off of your phone first,) easier because accessing it is built into windows and mac with no downloading, installing, or configuring necessary. I set my netbios name on my phone to jjdphone, so in windows I just hit start and type:

\\jjdphone

On a mac it would be finder > network > jjdphone

Linux you'd use smbmount if you have samba installed.

Having SSH available is great for terminal access, so install that too, because then there's no need to have your phone's drivers or the android SDK installed in order to gain shell access to your phone. Plus you have no need for any wires.
 
Last edited:

AdamOutler

Retired Senior Recognized Developer
Feb 18, 2011
5,224
9,826
Miami, Fl̨̞̲̟̦̀̈̃͛҃҅͟orida
Wireless ADB leaves a security hole on your phone. Anyone can connect to it. It's not password protected, and it's not encrypted. SSH is a tunneling protocol. It's lightweight form factor allows it to be always on and not cause problems with hogging processor. When you use ADB wireless, anyone can push applications and run commands on your phone without authentication.

Between SSH and ADB, it's better for everyone to stick with SSH unless they're debugging an application. ADB was designed to be used over a secure wire. SSH was designed to be used always.
 
Last edited:

Prodigy

Senior Member
Apr 13, 2011
1,109
364
Melbourne
Wireless ADB leaves a security hole on your phone. Anyone can connect to it. It's not password protected, and it's not encrypted. SSH is a tunneling protocol. It's lightweight form factor allows it to be always on and not cause problems with hogging processor. When you use ADB wireless, anyone can push applications and run commands on your phone without authentication.

Between SSH and ADB, it's better for everyone to stick with SSH unless they're debugging an application. ADB was designed to be used over a secure wire. SSH was designed to be used always.

Good job anyway, too complex for me to understand 0_0
 

medinstpro

Member
Jul 23, 2010
39
26
easy and it works just fine.
Q: is it possible to rewrite system files in order to change the android theme?

just asking cuz i've already replaced some system framework files; rebooted and there are no visual changes.

later edit: ah....it works...just needed other files..
 
Last edited:

KarlosTheJackal

Senior Member
Oct 23, 2010
469
42
Redditch
Working great here on a HTC Vision.

I do have a question though, I'm trying to create a Desktop short cut on Windows & I cant for the life of work it out! I have it all working though WinSCP but I would love to be able to have a direct shortcut to the MicroSD within Windows Explorer.

Is this possible & how would I achieve it?
 

Dani897

Senior Member
Aug 16, 2010
3,615
670
Working great here on a HTC Vision.

I do have a question though, I'm trying to create a Desktop short cut on Windows & I cant for the life of work it out! I have it all working though WinSCP but I would love to be able to have a direct shortcut to the MicroSD within Windows Explorer.

Is this possible & how would I achieve it?

im not sure if you can with ssh because im still learning linux, but if you only want access to the sdcard you can use an ftp or samba app and mount is as a network drive. i believe desktop shortcuts can be made to network drives.
 

AdamOutler

Retired Senior Recognized Developer
Feb 18, 2011
5,224
9,826
Miami, Fl̨̞̲̟̦̀̈̃͛҃҅͟orida
^^ of course you can. You can do more with a default Linux installation then a default Windows installation. Windows is a kiddy toy comparatively.

Working great here on a HTC Vision.

I do have a question though, I'm trying to create a Desktop short cut on Windows & I cant for the life of work it out! I have it all working though WinSCP but I would love to be able to have a direct shortcut to the MicroSD within Windows Explorer.

Is this possible & how would I achieve it?
make a shortcut using winscp.exe

http://winscp.net/eng/docs/commandline
 

Top Liked Posts

  • There are no posts matching your filters.
  • 33
    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://root@192.168.1.xxx
    gnome-terminal -x ssh -X root@192.168.1.xxx
    b. under Mac:
    sftp://root@192.168.1.xxx
    terminal -x ssh root@192.168.1.xxx
    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.
    Screenshot.png



    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.
    16
    ok got bored tried things your way.
    i really liked WinSCP, even more when i got it setup nicely.
    it definatly wasnt made BY windows users but was made FOR.
    with a few tweaks, in the setup and options it is really easy to use.

    WinSCP even INTEGRATES into windows to handle all Sftp and SCP addresses automatically!

    on my android phone i am using " QuickHSSd" has 2 nice desktop widget toggles.


    1. use Root Explorer to mount system (or other method)
    2. turn on QuickSSHd
    3. and WinSCP does the rest!
    created a little guide for noobies to use this really good program and understand through familiarity.
    hide/disable un-needed things, show familiar parts, and optimize for our phones with flash memory! (eg. one file at a time)
    ENJOY!
    WinSCP%201%20%281%29.JPG


    WinSCP%201%20%282%29.JPG


    WinSCP%201%20%283%29.jpg
    4
    Wireless ADB leaves a security hole on your phone. Anyone can connect to it. It's not password protected, and it's not encrypted. SSH is a tunneling protocol. It's lightweight form factor allows it to be always on and not cause problems with hogging processor. When you use ADB wireless, anyone can push applications and run commands on your phone without authentication.

    Between SSH and ADB, it's better for everyone to stick with SSH unless they're debugging an application. ADB was designed to be used over a secure wire. SSH was designed to be used always.
    3
    TRusselo: I usually keep my ssh server running all the time. According to my calculations it would take a few million years to hack my phone and a SSH daemon does not use much resources when idle.
    1
    i use swiFTP on my phone with windows. super easy to config but no root writing even if mounted R/W. But i dont often drop files into root area. when i do ill use swiftp to get on phone then root explorer to copy to root area. it uses a simple ftp connection no special windows software needed,

    setup login/ password in SwiFTP app.
    on PC:
    right click my computer > add network location > ftp://PhoneIP:port > enter login name > first connection will ask for password.