Batch Processing of resource files after ios cracking is used by android

Source: Internet
Author: User

These two days, I cracked the app on ios and copied all its resources to android for use.

However, many resources on ios contain special characters not allowed by android, such as resources ending with * @2x.png. Here the Special Character @ is included. Filter out.

On android, only a-z, 0-9, and _. are allowed. At the same time, it cannot start with a number such as 0-9, or be a reserved word, for example, default.png. Uppercase letters are not acceptable.


In MacOS, rename.shreplaces @2x.pngwith .png. The content of the script file is as follows (after creating the script file, copy the file to the Resource Directory, and add the execution permission chmod + x rename. sh. Then run .) :

1 #! /Bin/sh

2# Rename * @2x.png as *. png

3 find.-name "* @2x.png"-type f | while read file

4 do

5 mv $ file $ {file % @ 2x. * 2.16.png

6 done


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.