Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[APP] midnight-commander 4.7.0.3 for Android (updated to 4.7.5.4, with APK Installer)

OP viulian

31st August 2011, 10:32 PM   |  #1  
OP Recognized Developer
Thanks Meter: 377
 
394 posts
Join Date:Joined: Apr 2011
Donate to Me
Introduction

Here's the classic Midnight Commander for Android!



Features

a) Function keys work (F3 - view, F5 - copy, F8 - delete, F10 - exit, etc...)
b) Very stable, doesn't crash.
c) Much easier installation than the previous one version (which needed an additional apt-get clone, named ipkg, etc). More about this below.
d) comes bundled with xterm (terminfo) and syntax highlighting for major languages.
e) I kept the wrapper script 4.6.2 but updated it so that function keys work.

Reasons

There is an one year old version floating around (version 4.6.2) and even if does start, it crashed every time I pressed the arrow keys in the search panels:

Code:
/system/xbin/mc.real: libc/misc/ctype/ctype.c: 290: tolower: Assertion `((((unsigned int)((c) - 0)) <= ((127 * 2 + 1) - 0)) || ((c) == (-1)))' failed.
Not only this, but I had to restart Putty, since the whole screen became garbled.

Installation

You need a rooted phone with busybox.

Installation is easy:
click Install and allow root access.
If everything is ok, you will see an output like in the screenshot below:



To use mc, you could connect with a terminal emulator (but it looks ugly). A good alternative is if you use DroidSSHd as SSH server on the phone and Putty as client from your PC (or connect-bot as client on the phone).

For now, there is no uninstaller for the native MC that is extracted on the phone. Thus, feel free to uninstall the app as you don't need it anymore once MC native is copied to the phone.

Download

Please donate by buying it from the Google Play :



Use it at your own risk! (License is GPLv2)

NativnuxInstaller_1.1.apk
Last edited by viulian; 7th November 2012 at 09:41 PM.
The Following 24 Users Say Thank You to viulian For This Useful Post: [ View ]
31st August 2011, 11:15 PM   |  #2  
Senior Member
Thanks Meter: 233
 
1,895 posts
Join Date:Joined: Jan 2007
More
cp cannot create 'mc-4.0.7................
read only file system.
How to solve this ?
I tried to remount /system as rw but didnīt help.
How to get write access to / ?

I tried to extract the archive on a linux machine and copy the folders to device via QtADB but when I tried to run mc from terminal emulator I get error run xterm.
So I think there was some permission errors.
Last edited by dancer_69; 31st August 2011 at 11:17 PM.
31st August 2011, 11:22 PM   |  #3  
OP Recognized Developer
Thanks Meter: 377
 
394 posts
Join Date:Joined: Apr 2011
Donate to Me
1. Become super user:

su

2. Check output of current mounts:

cat /proc/mounts

You will see something like:

Code:
...
/dev/block/mtdblock0 /system yaffs2 rw,relatime 0 0
Remember the number after mtdblock! Important. In case above is 0, but it might be 3 also etc...

3. Execute command:

mount -o rw,remount -t yaffs2 /dev/block/mtdblock[PUT_HERE_THE_NUMBER] /
31st August 2011, 11:31 PM   |  #4  
Senior Member
Thanks Meter: 233
 
1,895 posts
Join Date:Joined: Jan 2007
More
Quote:
Originally Posted by viulian

1. Become super user:

su

2. Check output of current mounts:

cat /proc/mounts

You will see something like:

Code:
...
/dev/block/mtdblock0 /system yaffs2 rw,relatime 0 0
Remember the number after mtdblock! Important. In case above is 0, but it might be 3 also etc...

3. Execute command:

mount -o rw,remount -t yaffs2 /dev/block/mtdblock[PUT_HERE_THE_NUMBER] /

Seems that /system is in /dev/block/mmcblk0p12 . I tried your command with mmcblk0p12 but again I get the same error. So, something I'm doing wrong. Here is the output of cat /proc/mounts:

Code:
# cat /proc/mounts
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
/dev/block/mmcblk0p12 /system ext3 rw,relatime,errors=continue,data=writeback 0 0
/dev/block/mmcblk0p13 /data ext3 rw,nosuid,nodev,relatime,errors=continue,data=ordered 0 0
/dev/block/mmcblk0p6 /cache ext3 rw,nosuid,nodev,relatime,errors=continue,data=ordered 0 0
/dev/block/mmcblk0p1 /cust_backup vfat ro,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
/dev/block/mmcblk0p14 /HWUserData vfat rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
/dev/block/vold/179:17 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0602,dmask=0602,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:17 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0602,dmask=0602,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
/dev/block/dm-0 /mnt/asec/com.junglesoft.calc-1 vfat ro,dirsync,nosuid,nodev,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/dm-1 /mnt/asec/com.aldiko.android-1 vfat ro,dirsync,nosuid,nodev,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/dm-2 /mnt/asec/com.jiubang.android.euphorialite-1 vfat ro,dirsync,nosuid,nodev,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/dm-3 /mnt/asec/com.gamestar.idiottest-1 vfat ro,dirsync,nosuid,nodev,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/dm-4 /mnt/asec/com.svox.classic.langpack.ell_grc_fem-1 vfat ro,dirsync,nosuid,nodev,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
Can this helps you to give me, a specific to my system, command?
Thanks in advance
31st August 2011, 11:38 PM   |  #5  
OP Recognized Developer
Thanks Meter: 377
 
394 posts
Join Date:Joined: Apr 2011
Donate to Me
As you can see, your device has ext3 type partition, unlike mine which has yaffs2.

Your custom command is:

mount -o rw,remount -t ext3 /dev/block/mmcblk0p12 /

In future, please search your device specific forum for device specific questions - I found the answer myself here: http://forum.xda-developers.com/arch.../t-928727.html
31st August 2011, 11:41 PM   |  #6  
Senior Member
Thanks Meter: 233
 
1,895 posts
Join Date:Joined: Jan 2007
More
No, this doesn't work eather, I've already tried.
I figure it out myself though, needed to remount rw my / partition which is rootfs.
After that the extarction worked without any error.
But still I get:
Error opening terminal: xterm
when I try to execute mc.
Last edited by dancer_69; 31st August 2011 at 11:44 PM.
31st August 2011, 11:44 PM   |  #7  
OP Recognized Developer
Thanks Meter: 377
 
394 posts
Join Date:Joined: Apr 2011
Donate to Me
Make sure you have the following file copied over from the .tar.gz archive:

/etc/terminfo/x/xterm

I suggest to copy all files (/etc/mc and /system/share .. ) because they contain a lot of .ini files / syntax etc, without which mc will look black and white

Better if you untar in / directly ...
31st August 2011, 11:50 PM   |  #8  
Senior Member
Thanks Meter: 233
 
1,895 posts
Join Date:Joined: Jan 2007
More
I did this already, and xterm is in correct place.
31st August 2011, 11:57 PM   |  #9  
OP Recognized Developer
Thanks Meter: 377
 
394 posts
Join Date:Joined: Apr 2011
Donate to Me
Please post screenshot of the following commands executed in same terminal:

Code:
cls
ls -l /etc/terminfo/x/xterm
cat /system/xbin/mc
ls -l /system/xbin/mc.real
1st September 2011, 12:01 AM   |  #10  
Senior Member
Thanks Meter: 233
 
1,895 posts
Join Date:Joined: Jan 2007
More
I execute them via adb:
Code:
# ls -l /etc/terminfo/x/xterm
-rw-r--r--    1 system   system        3213 Jul  5  2010 /etc/terminfo/x/xterm
# cat /system/xbin/mc
#!/system/bin/sh
export TMPDIR=/data/local/tmp
if [ ! -e $TMPDIR ]; then
  mkdir $TMPDIR
fi
# So that F1, ... works
export TERM=xterm
/system/xbin/mc.real $*
# ls -l /system/xbin/mc.real
-rwxr-xr-x    1 system   system     3508114 Aug 31 19:51 /system/xbin/mc.real

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes