Repository navigation
Expand file tree
/
Copy pathatom.xml
More file actions
82 lines (64 loc) · 5.56 KB
/
Copy pathatom.xml
File metadata and controls
82 lines (64 loc) · 5.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[Captain's Blog]]></title>
<link href="/atom.xml" rel="self"/>
<link href="http://yoursite.com/"/>
<updated>2014-10-22T06:56:35.908Z</updated>
<id>http://yoursite.com/</id>
<author>
<name><![CDATA[Captain]]></name>
<email><![CDATA[jndx_taibai@163.com]]></email>
</author>
<generator uri="http://zespia.tw/hexo/">Hexo</generator>
<entry>
<title><![CDATA[Android自动化打包脚本]]></title>
<link href="http://yoursite.com/2014/10/22/Android-AutoPacking-Shell/"/>
<id>http://yoursite.com/2014/10/22/Android-AutoPacking-Shell/</id>
<published>2014-10-22T06:09:53.000Z</published>
<updated>2014-10-22T06:10:26.000Z</updated>
<content type="html"><![CDATA[<p>核心脚本</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ apktool d <span class="operator">-f</span> application.apk [解开apk包]</div></pre></td></tr></table></figure>
<p>根据需求修改内部资源</p>
<p>…</p>
<p>重新打包成新的apk包</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ apktool b application.apk application_new.apk</div></pre></td></tr></table></figure>
<p>重新签名</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ jarsigner -verbose -keystore name.keystore -STOREPASS passwd application_new.apk name -KEYPASS passwd -digestalg SHA1 -sigalg MD5withRSA</div></pre></td></tr></table></figure>
<p>优化对齐apk</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ zipalign -v <span class="number">4</span> application_new.apk application_new_zipaligned.apk</div></pre></td></tr></table></figure>
<p>注意:</p>
<pre><code>通过jar程序执行<span class="keyword">shell</span>可能会遇到<span class="keyword">command</span> not found的问题 ,虽然将一些必要的工具路径加入了环境变量,通过控制台执行<span class="keyword">shell</span>可以正常运行,原因是通过外部代码调用执行脚本时候,找不到环境变量,可以在<span class="keyword">shell</span>脚本里面再执行一次export PATH的操作,将需要的工具加入PATH
<span class="keyword">ex</span>:
</code></pre><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ <span class="keyword">export</span> PATH=<span class="string">"/Users/captain/program/apktools:<span class="variable">$PATH</span>"</span></div></pre></td></tr></table></figure>
]]></content>
<summary type="html">
<![CDATA[<p>核心脚本</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div]]>
</summary>
</entry>
<entry>
<title><![CDATA[Hello World]]></title>
<link href="http://yoursite.com/2014/10/21/hello-world/"/>
<id>http://yoursite.com/2014/10/21/hello-world/</id>
<published>2014-10-21T06:05:22.000Z</published>
<updated>2014-10-21T06:05:22.000Z</updated>
<content type="html"><![CDATA[<p>Welcome to <a href="http://hexo.io/" target="_blank" rel="external">Hexo</a>! This is your very first post. Check <a href="http://hexo.io/docs/" target="_blank" rel="external">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="http://hexo.io/docs/troubleshooting.html" target="_blank" rel="external">trobuleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="external">GitHub</a>.</p>
<h2 id="Quick_Start">Quick Start</h2>
<h3 id="Create_a_new_post">Create a new post</h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo new <span class="string">"My New Post"</span></div></pre></td></tr></table></figure>
<p>More info: <a href="http://hexo.io/docs/writing.html" target="_blank" rel="external">Writing</a></p>
<h3 id="Run_server">Run server</h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo server</div></pre></td></tr></table></figure>
<p>More info: <a href="http://hexo.io/docs/server.html" target="_blank" rel="external">Server</a></p>
<h3 id="Generate_static_files">Generate static files</h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo generate</div></pre></td></tr></table></figure>
<p>More info: <a href="http://hexo.io/docs/generating.html" target="_blank" rel="external">Generating</a></p>
<h3 id="Deploy_to_remote_sites">Deploy to remote sites</h3>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo deploy</div></pre></td></tr></table></figure>
<p>More info: <a href="http://hexo.io/docs/deployment.html" target="_blank" rel="external">Deployment</a></p>
]]></content>
<summary type="html">
<![CDATA[<p>Welcome to <a href="http://hexo.io/" target="_blank" rel="external">Hexo</a>! This is your very first post. Check <a href="http://hexo.io]]>
</summary>
</entry>
</feed>