npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

apk-assets-differ

v0.0.5

Published

比较两个上传的 APK 或者 IPA,将其中 更新的版本中的 `assets` 的内容 和 更旧的版本中的 `assets` 内容比对,列出其中的不同

Downloads

2

Readme

apk-assets-differ

比较两个上传的 APK 或者 IPA,将其中 更新的版本中的 assets 的内容 和 更旧的版本中的 assets 内容比对,列出其中的不同

功能说明

  1. 这是一个命令行服务,命令行接口是 apk-assets-differ {path_to_apk1(new)} {path_to_apk2(old)}
  2. 使用者在界面中,指定两个 apk 文件
  3. 程序收到上传的两个 apk 文件后,使用 apk-parser 来解读这两个 apk 文件的配置数据,假设为 apk1.data, apk2.data
  4. 如果 apk1.data.package !== apk2.data.package, 那么计算中断,反馈给用户说:包名不匹配
  5. 如果 apk1.data.android:versionCode !== apk2.data.android:versionCode 那么计算提示用户两个apk的内部版本号相同,所以将先输入的认为是新版本,后输入的认为是老版本。
  6. 然后加两个apk 都unzip 到两个目录下
  7. 读取旧版本的 apk 的 assets 目录下的 每个文件的文件名列表,listOld 和 每个文件的md5 filenameToMd5Old
  8. 读取新版本的 apk 的 assets 目录下的 每个文件的文件名列表,listNew 和 每个文件的md5 filenameToMd5New
  9. 凡是 listOld 和 listNew 中存在的文件名,并且两个文件的 MD5 相同,那么剔除这些文件
  10. 凡是 listOld 中存在,而在 listNew 中不存在的文件名, 那么剔除这些文件
  11. 最后得到的列表,就是 新版本的 apk 跟 旧版本的apk比较后,新版本的apk中所更新的文件
  12. 打印出这些文件,和每个文件的 md5

安装使用:

  1. npm install apk-assets-differ -g
  2. apk-assets-differ.coffer newApk oldApk [-z zipfiles]
  • newApk: 新的apk文件
  • oldApk: 旧的apk文件
  • -z[--zip VALUE]: 加了这个参数表示需要压缩增量包。 VALUE: 指定生成的zip文件路径及文件名,文件名必须是zip后缀。