[SOLVED] - Manually enable adb debugging from recovery

Search This thread

workdowg

Senior Member
Apr 17, 2011
1,556
691
Seneca Falls
First off, this may seem a noob question, but I am definitely not. :)

I have an Iconia A200 that now has a broken lcd screen. No display, no touch. I am able to get into the tablet from TWRP via adb, but not from Android (Jelly Bean). It seems I never enabled usb debugging when I installed the custom rooted rom.... I can access the file system and modify anything... Which files need to be modified to enable debugging in Android? Here is what I tried:

Added to default.prop and /system/build.prop
Code:
persist.service.adb.enable=1                                                    
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb

Edit: Must have had typos... It now works.
 
Last edited:

digital_carpenter

New member
Aug 2, 2014
2
4
You should've stopped at " 'adb' is not..."

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Windows\system32>adb shell
'adb' is not recognized as an internal or external command,
operable program or batch file.
. . .
Getting this on S$..any1 here to help me!

You need to first install ADB, the installer can be found via Google.
Once installed (Press 'Y' > 'ENTER' for each option during install, this should install it to the default location, i.e. "C:").
Run "cmd" and enter the command "dir" . . . you should see "adb" as the first or second <DIR> listed; if you do not, find where 'adb' is installed and navigate to its folder via the commands 'cd' and 'dir'. Once in the 'adb' dir...
Begin typing "adb shell" and you'll see something other than..
"'adb' is not recognized as an internal or external command,
operable program or batch file."
 

Anz-dev

Senior Member
Feb 23, 2015
76
7
I'm getting this, please help?

C:\Users\******\Downloads>adb devices
adb server is out of date. killing...
* daemon started successfully *
List of devices attached
10cb4f24 recovery


C:\Users\****\Downloads>adb shell
~ # ←[6nsu
su
/sbin/sh: su: not found
~ # ←[6n
 
  • Like
Reactions: biswanath202

Andreus94

Senior Member
Jan 11, 2014
273
57
First off, this may seem a noob question, but I am definitely not. :)

I have an Iconia A200 that now has a broken lcd screen. No display, no touch. I am able to get into the tablet from TWRP via adb, but not from Android (Jelly Bean). It seems I never enabled usb debugging when I installed the custom rooted rom.... I can access the file system and modify anything... Which files need to be modified to enable debugging in Android? Here is what I tried:

Added to default.prop and /system/build.prop
Code:
persist.service.adb.enable=1                                                    
persist.service.debuggable=1
persist.sys.usb.config=mtp,adb

Edit: Must have had typos... It now works.

You are my salvation!! I love you:fingers-crossed:
 

ErnestChia

Member
Nov 13, 2015
9
5
I'm going to stay general and assume that a skyrochet is a phone, you have a linux or windows pc with ADB installed (and the drivers to connect to your phone) and have TWRP or CWM Recovery installed already...
1) Start the phone in recovery mode - mine is power down and vol
2) Connect you cable to the pc and start a console terminal or cmd prompt
3) Run the following
Code:
adb shell
su
mount -o remount,rw /system
cd /
echo "persist.service.adb.enable=1" >> default.prop 
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system/build.prop 
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
Once you reboot into Android you should be able to connect via adb.


Hi workdowg and others,

I'm trying to do the above on my Samsung GT-N7105. The screen has gone completely black, though the touch/digitizer still works. My goal is to be able to use my phone with Android Screencast. And the first step is to enable adb debugging on Android.

I've flashed CWM recovery and tried to run the above commands, but I got an error here:

Code:
# mount -o remount,rw /system
mount: can't find /system in /proc/mounts

I tried going ahead with the rest of the commands anyway, but when I rebooted, I still didn't have adb access on Android.

I'm running stock Android 4.1.2, and my bootloader doesn't have Knox.

Btw I am noob, so please try to give unambiguous replies. I understand it's troublesome to type a long reply, and I don't mind if your reply is short, but please try to make it as unambiguous as possible.

Thanks so much.
 

workdowg

Senior Member
Apr 17, 2011
1,556
691
Seneca Falls
Hi workdowg and others,

I'm trying to do the above on my Samsung GT-N7105. The screen has gone completely black, though the touch/digitizer still works. My goal is to be able to use my phone with Android Screencast. And the first step is to enable adb debugging on Android.

I've flashed CWM recovery and tried to run the above commands, but I got an error here:

Code:
# mount -o remount,rw /system
mount: can't find /system in /proc/mounts

I tried going ahead with the rest of the commands anyway, but when I rebooted, I still didn't have adb access on Android.

I'm running stock Android 4.1.2, and my bootloader doesn't have Knox.

Btw I am noob, so please try to give unambiguous replies. I understand it's troublesome to type a long reply, and I don't mind if your reply is short, but please try to make it as unambiguous as possible.

Thanks so much.
I'll try to help.. It's been a long time and my old device is long gone...

When you are in adb shell what do you get with just the mount command?

something like this...
Code:
$ mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
/dev/block/by-name/config on /config type ext4 (rw,seclabel,nosuid,nodev,noatime,data=ordered)
/dev/block/by-name/factory on /factory type ext4 (rw,seclabel,nosuid,nodev,noatime,data=ordered)
/dev/block/by-name/logs on /logs type ext4 (rw,seclabel,nosuid,nodev,relatime,data=ordered)
/dev/block/mmcblk0p11 on /cache type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p14 on /data type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p14 on /sdcard type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk1p1 on /external_sd type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
 
  • Like
Reactions: ErnestChia

workdowg

Senior Member
Apr 17, 2011
1,556
691
Seneca Falls
I'll try to help.. It's been a long time and my old device is long gone...

When you are in adb shell what do you get with just the mount command?

something like this...
Code:
$ mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
/dev/block/by-name/config on /config type ext4 (rw,seclabel,nosuid,nodev,noatime,data=ordered)
/dev/block/by-name/factory on /factory type ext4 (rw,seclabel,nosuid,nodev,noatime,data=ordered)
/dev/block/by-name/logs on /logs type ext4 (rw,seclabel,nosuid,nodev,relatime,data=ordered)
/dev/block/mmcblk0p11 on /cache type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p14 on /data type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p14 on /sdcard type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk1p1 on /external_sd type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

Try this:
Code:
su
mount -o rw,remount /dev/block/by-name/system /system
 
  • Like
Reactions: ErnestChia

ErnestChia

Member
Nov 13, 2015
9
5
Hi workdowg! I appreciate your replies.

Immediately after I boot into CWM recovery and connect via adb, I'm already root. There is no need for me to su.

Also, there's already a directory called /system. If I "cd" to this directory and run "ls -la", I get the following:

Code:
# cd /system

/system # ls -la
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
drwxr-xr-x    3 root     root             0 Jan  1  1970 .
drwxr-xr-x   22 root     root             0 Jan  1 17:07 ..
drwxr-xr-x    2 root     root             0 Jan  1  1970 bin


So immediately after I boot, /system is a directory which already exists, but doesn't contain a "build.prop"


When you are in adb shell what do you get with just the mount command?

The output of the mount command is:

Code:
# mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,mode=050,gid=1028)
tmpfs on /mnt/secure type tmpfs (rw,seclabel,relatime,mode=700)
tmpfs on /mnt/fuse type tmpfs (rw,seclabel,relatime,mode=775,gid=1000)
/dev/block/mmcblk0p12 on /cache type ext4 (rw,seclabel,relatime,user_xattr,barrier=1,journal_async_commit,data=ordered)



Try this:
Code:
su
mount -o rw,remount /dev/block/by-name/system /system

Four mount commands which I tried but didn't work:

Code:
# mount -o rw,remount /dev/block/by-name/system /system
mount: mounting /dev/block/by-name/system on /system failed: Invalid argument

# mount -o rw,remount /dev/block/by-name/system /system2
mount: mounting /dev/block/by-name/system on /system2 failed: No such file or directory

/dev/block # mount -o rw,remount /dev/block/mmcblk0p13 /system2
mount: mounting /dev/block/mmcblk0p13 on /system2 failed: No such file or directory

/dev/block # mount -o rw,remount /dev/block/mmcblk0p13 /system
mount: mounting /dev/block/mmcblk0p13 on /system failed: Invalid argument


Btw I'm guessing that mmcblk0p13 is my system partition, but I'm not 100% sure.

*********************

Edit:

Oh no, I wasn't thinking straight earlier...

Sorry, I've just realized how noob I was. Anyway, after running the following commands...

Code:
cd /
mkdir /system2
mount -o rw /dev/block/mmcblk0p13 /system2
echo "persist.service.adb.enable=1" >> default.prop 
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system2/build.prop 
echo "persist.service.debuggable=1" >> /system2/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system2/build.prop

...and then rebooting, I now have adb access to Android! (Finally!) And I've managed to run Android Screencast together with my phone, so my phone is fully functional once more.

Thank you so much workdowg!
 
Last edited:

super rey

New member
Dec 5, 2015
1
0
usb debugg force

Hi workdowg! I appreciate your replies.

Immediately after I boot into CWM recovery and connect via adb, I'm already root. There is no need for me to su.

Also, there's already a directory called /system. If I "cd" to this directory and run "ls -la", I get the following:

Code:
# cd /system

/system # ls -la
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
drwxr-xr-x    3 root     root             0 Jan  1  1970 .
drwxr-xr-x   22 root     root             0 Jan  1 17:07 ..
drwxr-xr-x    2 root     root             0 Jan  1  1970 bin


So immediately after I boot, /system is a directory which already exists, but doesn't contain a "build.prop"




The output of the mount command is:

Code:
# mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,mode=050,gid=1028)
tmpfs on /mnt/secure type tmpfs (rw,seclabel,relatime,mode=700)
tmpfs on /mnt/fuse type tmpfs (rw,seclabel,relatime,mode=775,gid=1000)
/dev/block/mmcblk0p12 on /cache type ext4 (rw,seclabel,relatime,user_xattr,barrier=1,journal_async_commit,data=ordered)





Four mount commands which I tried but didn't work:

Code:
# mount -o rw,remount /dev/block/by-name/system /system
mount: mounting /dev/block/by-name/system on /system failed: Invalid argument

# mount -o rw,remount /dev/block/by-name/system /system2
mount: mounting /dev/block/by-name/system on /system2 failed: No such file or directory

/dev/block # mount -o rw,remount /dev/block/mmcblk0p13 /system2
mount: mounting /dev/block/mmcblk0p13 on /system2 failed: No such file or directory

/dev/block # mount -o rw,remount /dev/block/mmcblk0p13 /system
mount: mounting /dev/block/mmcblk0p13 on /system failed: Invalid argument


Btw I'm guessing that mmcblk0p13 is my system partition, but I'm not 100% sure.

*********************

Edit:

Oh no, I wasn't thinking straight earlier...

Sorry, I've just realized how noob I was. Anyway, after running the following commands...

Code:
cd /
mkdir /system2
mount -o rw /dev/block/mmcblk0p13 /system2
echo "persist.service.adb.enable=1" >> default.prop 
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system2/build.prop 
echo "persist.service.debuggable=1" >> /system2/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system2/build.prop

...and then rebooting, I now have adb access to Android! (Finally!) And I've managed to run Android Screencast together with my phone, so my phone is fully functional once more.

Thank you so much workdowg!

C:\>adb shell
error: device not found
C:\>echo "persist.service.adb.enable=1" >> default.prop C:\>echo "persist.service.debuggable=1" >> default.prop C:\>echo "persist.sys.usb.config=mtp,adb" >> default.prop C:\>echo "persist.service.adb.enable=1" >> /system/build.prop
The system cannot find the path specified.
C:\>echo "persist.service.debuggable=1" >> /system/build.prop
The system cannot find the path specified.
C:\>echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop

whats wrong wt this??? please help!
 
Last edited:

W60

Senior Member
Jun 20, 2014
120
79
C:\>adb shell
error: device not found


whats wrong wt this??? please help!

Your device is not detected by the computer. Check the connection and make sure you have the right drivers installed.

If your computer has USB3 ports, this might be a problem. In this situation it seems some people could connect to the phone only through a USB hub.

If all else fails, try with another computer.

...

Also, as a general advice, try to understand what a command means, instead of blindly typing it.
The "echo" commands shouldn't be written at the Windows command prompt, they are meant for the Android command prompt, after you have successfully connected to the phone.
 
  • Like
Reactions: ErnestChia

DroidX2

Senior Member
Aug 12, 2011
114
28
Thank you, I had no clue how, but my phone's (MUCH Snail, aka MUCH W1, aka MUCH 78P01) manufacturer (China's Snail Mobile) had removed from Android's Developer Options menu the option to Enable/Disable USB Debugging.

I was looking all over the web for days, this was the only way I could effectively turn on USB debugging in my phone. Thanks!
There's only one difference, instead of performing the above steps from an ADB console window (for obvious reasons) I did it with Build.prop Editor, but first I needed to change permissions to 666 on the default.prop file (otherwise it wouldn't save my changes).

Curiously, every time I do a full reboot the default.prop file somehow is overwritten with the manufacturer's original settings - that doesn't happen when I soft reboot my device though. Any clues as to what could be reversing my changes at boot?
____________________________________________________________________________________________________________________________________________________________
To anyone else having issues getting Debug on the Snail W1, another way to do it would be to install Qihu 360 (Chinese Mobile Assistant app) and open it. Once open, press Back. There will be a menu that pops up. It will be in Chinese, but look for the option that has "USB" in the description. Tick this option and USB Debugging is enabled on the device. You can now uninstall the Qihu 360 app.

Source: http://manguiro.blogspot.com/2015/03/review-snail-much-w1-ireadygo-78dian.html
 

bBigBrO

Senior Member
May 22, 2013
135
61
404 Not Found
OnePlus 6
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Windows\system32>adb shell
'adb' is not recognized as an internal or external command,
operable program or batch file.

C:\Windows\system32>su
'su' is not recognized as an internal or external command,
operable program or batch file.

C:\Windows\system32>mount -o remount,rw /system
'mount' is not recognized as an internal or external command,
operable program or batch file.

C:\Windows\system32>cd /

C:\>echo "persist.service.adb.enable=1" >> default.prop

C:\>echo "persist.service.debuggable=1" >> default.prop

C:\>echo "persist.sys.usb.config=mtp,adb" >> default.prop

C:\>echo "persist.service.adb.enable=1" >> /system/build.prop
The system cannot find the path specified.

C:\>echo "persist.service.debuggable=1" >> /system/build.prop
The system cannot find the path specified.

C:\>echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
The system cannot find the path specified.

C:\>
Getting this on S$..any1 here to help me!
Errr... you do not even seem to have ADB installed... try this: http://xdaforums.com/showthread.php?p=48915118
 

ivanchin99

Senior Member
Aug 13, 2010
333
35
I'm going to stay general and assume that a skyrochet is a phone, you have a linux or windows pc with ADB installed (and the drivers to connect to your phone) and have TWRP or CWM Recovery installed already...
1) Start the phone in recovery mode - mine is power down and vol
2) Connect you cable to the pc and start a console terminal or cmd prompt
3) Run the following
Code:
adb shell
su
mount -o remount,rw /system
cd /
echo "persist.service.adb.enable=1" >> default.prop 
echo "persist.service.debuggable=1" >> default.prop
echo "persist.sys.usb.config=mtp,adb" >> default.prop
echo "persist.service.adb.enable=1" >> /system/build.prop 
echo "persist.service.debuggable=1" >> /system/build.prop
echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
Once you reboot into Android you should be able to connect via adb.
If you google vnc over adb you can get a usable but very slow vnc connection then install Andriod VNC server for a little better performance.
That's the best I can do from memory ...
Godsend!! Thank you
 

Cusciolino

Senior Member
Feb 15, 2010
135
8
Hi,
this is my porblem. My phone have stopped on boot "Google" word, I' can't load in donwload mode (Gnexus), I can't load in recovery.
How can bypass ADB authorization?

Tnk you at all
 

ericksonebak

New member
Feb 6, 2018
1
0
hello there, how do you connect your android devices if the adb debugging is not enable? when i open cmd and type adb devices, it says no devices/emulators found even though i connect my phone via usb cable and in recovery mode. please help me with this problem. my phone is lenovo a369i.
 

davejames500

Member
Aug 20, 2016
18
0
I have loaded TWRP on my phone and I can successfully enter the ADB shell by running "adb shell" to it when in recovery mode. However when I run "su" I get the following

"/sbin/sh: su: not found"

I suppose I need to root my phone?
 

fahadysf

Member
Nov 4, 2011
11
1
Riyadh
I have loaded TWRP on my phone and I can successfully enter the ADB shell by running "adb shell" to it when in recovery mode. However when I run "su" I get the following

"/sbin/sh: su: not found"

I suppose I need to root my phone?

No you don't. You can follow the guide apart from without typing su.

On the other hand the process isn't working on Oreo 8.1 (MUIU 10) Roms. I've also looked at https://gist.github.com/varhub/7b9555cdd1e5ad785ffde2300fcfd0bd which is basically the same instructions. I am thinking there is a missing property for Oreo 8.1 which needs to be set.
 
  • Like
Reactions: SFR737

Dimi83

New member
Oct 8, 2018
4
0
I installed Oreo 8.1 on nokia 5 (TA 1024) and it doesn't start at all, didn't activate Enable USB debugging, can't really do anything, tried to install it's firmware but gives errors verification required, could it be that it's cause of usb debugging? that it doesn't work? and how can I fix it so it will work?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    First off, this may seem a noob question, but I am definitely not. :)

    I have an Iconia A200 that now has a broken lcd screen. No display, no touch. I am able to get into the tablet from TWRP via adb, but not from Android (Jelly Bean). It seems I never enabled usb debugging when I installed the custom rooted rom.... I can access the file system and modify anything... Which files need to be modified to enable debugging in Android? Here is what I tried:

    Added to default.prop and /system/build.prop
    Code:
    persist.service.adb.enable=1                                                    
    persist.service.debuggable=1
    persist.sys.usb.config=mtp,adb

    Edit: Must have had typos... It now works.
    19
    How would i do this with my skyrocket? same problem, broken screen, adb disabled. Some instructions would be sweet, cause im not really clear with what you did here.

    How would i do this with my skyrocket? same problem, broken screen, adb disabled. Some instructions would be sweet, cause im not really clear with what you did here.
    I'm going to stay general and assume that a skyrochet is a phone, you have a linux or windows pc with ADB installed (and the drivers to connect to your phone) and have TWRP or CWM Recovery installed already...
    1) Start the phone in recovery mode - mine is power down and vol
    2) Connect you cable to the pc and start a console terminal or cmd prompt
    3) Run the following
    Code:
    adb shell
    su
    mount -o remount,rw /system
    cd /
    echo "persist.service.adb.enable=1" >> default.prop 
    echo "persist.service.debuggable=1" >> default.prop
    echo "persist.sys.usb.config=mtp,adb" >> default.prop
    echo "persist.service.adb.enable=1" >> /system/build.prop 
    echo "persist.service.debuggable=1" >> /system/build.prop
    echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop
    Once you reboot into Android you should be able to connect via adb.
    If you google vnc over adb you can get a usable but very slow vnc connection then install Andriod VNC server for a little better performance.
    That's the best I can do from memory ...
    3
    First off, this may seem a noob question, but I am definitely not. :)

    I have an Iconia A200 that now has a broken lcd screen. No display, no touch. I am able to get into the tablet from TWRP via adb, but not from Android (Jelly Bean). It seems I never enabled usb debugging when I installed the custom rooted rom.... I can access the file system and modify anything... Which files need to be modified to enable debugging in Android? Here is what I tried:

    Added to default.prop and /system/build.prop
    Code:
    persist.service.adb.enable=1                                                    
    persist.service.debuggable=1
    persist.sys.usb.config=mtp,adb

    Edit: Must have had typos... It now works.

    Ok Sounds good for you. Can you changed the title of your thread by [SOLVED]
    Thanks in advance ;)
    3
    Hi workdowg! I appreciate your replies.

    Immediately after I boot into CWM recovery and connect via adb, I'm already root. There is no need for me to su.

    Also, there's already a directory called /system. If I "cd" to this directory and run "ls -la", I get the following:

    Code:
    # cd /system
    
    /system # ls -la
    __bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
    __bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
    __bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
    drwxr-xr-x    3 root     root             0 Jan  1  1970 .
    drwxr-xr-x   22 root     root             0 Jan  1 17:07 ..
    drwxr-xr-x    2 root     root             0 Jan  1  1970 bin


    So immediately after I boot, /system is a directory which already exists, but doesn't contain a "build.prop"


    When you are in adb shell what do you get with just the mount command?

    The output of the mount command is:

    Code:
    # mount
    rootfs on / type rootfs (rw)
    tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
    devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
    proc on /proc type proc (rw,relatime)
    sysfs on /sys type sysfs (rw,seclabel,relatime)
    selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
    tmpfs on /storage type tmpfs (rw,seclabel,relatime,mode=050,gid=1028)
    tmpfs on /mnt/secure type tmpfs (rw,seclabel,relatime,mode=700)
    tmpfs on /mnt/fuse type tmpfs (rw,seclabel,relatime,mode=775,gid=1000)
    /dev/block/mmcblk0p12 on /cache type ext4 (rw,seclabel,relatime,user_xattr,barrier=1,journal_async_commit,data=ordered)



    Try this:
    Code:
    su
    mount -o rw,remount /dev/block/by-name/system /system

    Four mount commands which I tried but didn't work:

    Code:
    # mount -o rw,remount /dev/block/by-name/system /system
    mount: mounting /dev/block/by-name/system on /system failed: Invalid argument
    
    # mount -o rw,remount /dev/block/by-name/system /system2
    mount: mounting /dev/block/by-name/system on /system2 failed: No such file or directory
    
    /dev/block # mount -o rw,remount /dev/block/mmcblk0p13 /system2
    mount: mounting /dev/block/mmcblk0p13 on /system2 failed: No such file or directory
    
    /dev/block # mount -o rw,remount /dev/block/mmcblk0p13 /system
    mount: mounting /dev/block/mmcblk0p13 on /system failed: Invalid argument


    Btw I'm guessing that mmcblk0p13 is my system partition, but I'm not 100% sure.

    *********************

    Edit:

    Oh no, I wasn't thinking straight earlier...

    Sorry, I've just realized how noob I was. Anyway, after running the following commands...

    Code:
    cd /
    mkdir /system2
    mount -o rw /dev/block/mmcblk0p13 /system2
    echo "persist.service.adb.enable=1" >> default.prop 
    echo "persist.service.debuggable=1" >> default.prop
    echo "persist.sys.usb.config=mtp,adb" >> default.prop
    echo "persist.service.adb.enable=1" >> /system2/build.prop 
    echo "persist.service.debuggable=1" >> /system2/build.prop
    echo "persist.sys.usb.config=mtp,adb" >> /system2/build.prop

    ...and then rebooting, I now have adb access to Android! (Finally!) And I've managed to run Android Screencast together with my phone, so my phone is fully functional once more.

    Thank you so much workdowg!
    3
    You should've stopped at " 'adb' is not..."

    Microsoft Windows [Version 6.3.9600]
    (c) 2013 Microsoft Corporation. All rights reserved.

    C:\Windows\system32>adb shell
    'adb' is not recognized as an internal or external command,
    operable program or batch file.
    . . .
    Getting this on S$..any1 here to help me!

    You need to first install ADB, the installer can be found via Google.
    Once installed (Press 'Y' > 'ENTER' for each option during install, this should install it to the default location, i.e. "C:").
    Run "cmd" and enter the command "dir" . . . you should see "adb" as the first or second <DIR> listed; if you do not, find where 'adb' is installed and navigate to its folder via the commands 'cd' and 'dir'. Once in the 'adb' dir...
    Begin typing "adb shell" and you'll see something other than..
    "'adb' is not recognized as an internal or external command,
    operable program or batch file."