Eclipse 使用 hidden API
Eclipse 使用 hidden API
流程
- 會需要 out/ 下的東西, 所以先完整的 build 過一次
 
- jar 檔 out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/
classes-full-debug.jar
 
- $ unzip classes-full-debug.jar -d xxx
 
- 把 META-INF 和所有不需要的 class 刪除
 
- 例如 app 需要以下的 import
 
android.app.ActivitManager
android.content.Intent
android.media.AudioManager
android.media.AudioSystem
android.text.TextUtils
$ jar cvf ~/hidden.jar android
- 加進 Eclipse 的 libs/ 下
 
- clean build
 
script, save your life
$ cat classlist.txt
android.app.ActivitManager
android.content.Intent
android.media.AudioManager
android.media.AudioSystem
android.text.TextUtils
$ unzip classes-full-debug.jar -d xxx; cd xxx; cat ../classlist.txt | sed 's/./\//g' | sed 's/$/.class/' | perl -ne '@ = glob $; print "$ " for @;' | xargs jar cvf ../hidden.jar
 
 
 
          
      
 
  
 
 
 
 
 
 
 
 
 
 
 
沒有留言:
張貼留言