0

Last night, I was using the Jota Text Editor app on my LG G3 Anroid phone running Fulmics. The phone (which I am planning to replace very soon) crashed about two times whilst I was writing a text with the help of this editor. After the last crash, I wanted to open the TXT file I just edited, but it was displayed as empty by the editor. So, the index entry still seems to be there but the text cannot be found anymore. Thus, I would like to scan an interval of about [-1 MiB, +1 MiB] around that index entry in order to find the lost utf-8/LF (for Linux/Adroid) text.

I suppose that this could be done via the terminal, but I have troubles finding the right path in order to access my phone via the terminal itself. Also, I have not found out what file system the internal memory of my Android phone uses. Do you know where I can figure this out?

Edit: I have found a way to access my phone via the terminal. This answer has helped my a lot.

Furthermore, I was able to access the folder with Nautilus. There, I can see two versions of my TXT file. The first one is called text.txt, has a size of 0 Bytes and has been edited at 00:55 hrs (12:55 a.m.). Below, there is an entry called text.txt~ which has a size of 78.0 kB and has been edited at 00:55 hrs (12:55 a.m.). But I cannot open text.txt~ with gedit, and opening text.txt will just show me an empty document, just as it is displayed on my phone.

Nemgathos
  • 207
  • 3
  • 17

1 Answers1

1

the solution to your problem is:

cd szTheCorrectDirectoryName
cp text.txt~ text.txt

which will restore the backup of the text file.

You can do the same in Nautilus as well: rename the existing text.txt to text.new and then rename text.txt~ to text.txt

If that doesn't work, your text file is lost, Sorry!

Fabby
  • 34,259
  • Unfortunately, none of the two solutions has worked. Trying to restore the backup of the text file resulted in a new text file with 0 Bytes which, of course, contained nothing. Renaming also did not work. Opening text.txt, which was text.txt~ before, also delivers an empty document – no matter whether it is opened with gedit or Jota Text Editor. – Nemgathos Jul 01 '18 at 13:54