[Android] deleting a file with garbled characters in the file name

Source: Internet
Author: User

The original intention is to back up a hosts file, then modify the content of hosts (for everyone's understanding), copy it with RE, and paste it to show thisGarbled filesYes. Use Re to delete the file. The system prompts that the file is successfully deleted, but this file will appear again when you enter/etc again. I deleted the file.N timesThis file allThe shadowsAnd fainted.

Because the hosts file is in the ROM of the mobile phone, you can only see the content on the TF card when you connect the mobile phone to the computer, so you can only find a solution on the mobile phone.

Finally, the solution isTerminal (Shell)Put itOK (delete)It is estimated that the ADB shell can be used to connect to the computer with USB. I have never tried it.

The software to be installed on the mobile phone is as follows:

Better terminal emulator (Super Terminal)

Root Explorer (re)

The advantage of a Super Terminal is basically the same as that of a Linux terminal.Use the tab key to automatically complete the path (important)In the Super Terminal, the tab key isControl Key + number key 9, I set the control key as the volume amplification key, so pressVolume amplification key + 9.

Automatic completion path: for example, the path is/usr/bin/autostart. Sh.

Enter/usr/bin/AUT and press tab to complete/usr/bin/autostart. Sh.

In this wayGarbled characters that cannot be entered are automatically added..

 

Steps:

1,Open the terminal and run the LS command to view the file name to be deleted.

Ls-a file path

-A indicates displaying hidden files

Eg: ls-A/etc/

 

2,Use the RM command to delete the file. If the path contains spaces, enclose the path with double quotation marks.

Rm-F file path

-F directly delete without asking

Eg: Rm-F "/etc/hosts-garbled part"

If read-only system is prompted, use re to mount it as read/write.

 

The above is complete.

 

After verification, I did not make it clear that the shell used by the Super Terminal is built on Android by default, and there is no complementing function, you need to set the Super Terminal to use Bash as the default shell to enable the default complementing function and delete garbled files.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.