[컴][안드로이드] eclipse 에서 internal 또는 hidden class 사용하는 project 를 build 하기

From : Using internal (com.android.internal) and hidden (@hide) APIs [Part 1, Introduction], devmaze

HowTo

// new sdk version
  1. extract from framework.jar of my handset using adb
  2. convert classes.dex to .jar file with dex2jar
  3. duplicate the android.jar to make new one.
  4. copy all the classes from converted .jar to android.jar of sdk
  5. rename it to org-android.jar
  6. duplicate the android-17 folder as android-17-internals
  7. switch android-17-internals/anroid.jar to org-anroid.jar
  8. modify android-17-internals/build.prop
// confirm
  1. see the android_project >> property >> android
// modify adt
  1. bakup elcipse/plugins/com.android.ide.eclipse.adt_22.0.1.v201305230001--685705.jar
  2. modifty com/android/ide/eclipse/adt/internal/project/AndroidClasspathContainerInitializer.class
  3. in the .class file change com/android/internal/** --> com/android/internax/**
  4. make .jar with this .class file
  5. replace existing one with this new .jar
// confirm
  1. see the android_project >> property >> java build path

android.jar

download modified .jar files(android 7 ~android 10)
  1. https://github.com/inazaruk/android-sdk/tree/master/platforms

댓글 없음:

댓글 쓰기