APK反編譯去廣告大揭秘,apk反編譯大揭秘

來源:互聯網
上載者:User

APK反編譯去廣告大揭秘,apk反編譯大揭秘
APK反編譯去廣告
具體步驟:

1.下載 apktool 

:https://code.google.com/p/android-apktool/downloads/list

2.通過apktool 反編譯apk。命令列中輸入以下命令:apktool.bat  d  -f   aaa.apk(apk路徑) 反編譯APK檔案

3.開始修改XML布局檔案

首先,我們進入反編譯後的檔案夾,以我的為例

進入 C:\apk\com.youmi.android.sample\res\layout  目錄下

用記事本開啟activity_ad.xml(註:不同的程式廣告所在的檔案不一樣,可以查看一下別的檔案裡,一般都是在res\layout 目錄下的xml檔案裡。)

可以看到下面一段代碼

 <LinearLayout

        android:id="@+id/adLayout"

        android:layout_width="fill_parent"

        android:layout_height="wrap_content"

        android:layout_alignParentBottom="true"

        android:gravity="center_horizontal"

        android:orientation="horizontal"

        >

這段代碼是用來展示廣告的我們可以改成

 <LinearLayout

        android:id="@+id/adLayout"

        android:layout_width="fill_parent"

        android:layout_height="wrap_content"

        android:layout_alignParentBottom="true"

        android:gravity="center_horizontal"

        android:orientation="horizontal"

android:visibility="gone"

        >

這樣廣告就被隱藏起來了。

4.通過apktool 把修改後的代碼編譯會APK,輸入apktool.bat   b  aaa (你編譯出來檔案夾)

5.最後記得給新的APK簽名。

sign apk file: jarsigner -keystore test.keystore -storepass password -verbose TestApp-unsigned.apk name_alias

 

附錄

      Jarsigner命令詳解   

[-keystore <url>]           密鑰庫位置   

[-storepass <口令>]         用於密鑰庫完整性的口令   

[-storetype <類型>]         密鑰庫類型   

[-keypass <口令>]           專用密鑰的口令(如果不同)   

[-sigfile <檔案>]           .SF/.DSA 檔案的名稱   

[-signedjar <檔案>]         已簽名的 JAR 檔案的名稱   

[-digestalg <演算法>]    摘要演算法的名稱   

[-sigalg <演算法>]       簽名演算法的名稱   

[-verify]                   驗證已簽名的 JAR 檔案   

[-verbose]                  簽名/驗證時輸出詳細資料   

[-certs]                    輸出詳細資料和驗證時顯示認證   

[-tsa <url>]                時間戳記機構的位置   

[-tsacert <別名>]           時間戳記機構的公用密鑰認證   

[-altsigner <類>]           替代的簽名機制的類名   

[-altsignerpath <路徑列表>] 替代的簽名機制的位置   

[-internalsf]               在簽名塊內包含 .SF 檔案   

[-sectionsonly]             不計算整個清單的散列   

[-protected]                密鑰庫已保護驗證路徑   

[-providerName <名稱>]      提供者名稱   

[-providerClass <類>        Data Encryption Service提供者的名稱 

[-providerArg <參數>]] ... 主類檔案和建構函式參數

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.