├── .gitignore ├── AndroidManifest_weixin.xml ├── LICENSE ├── Parser ├── resources │ ├── AndroidManifest.xml │ ├── AndroidManifest_qq.xml │ ├── AndroidManifest_weixin.xml │ ├── Hello.dex │ ├── resources.arsc │ └── resources_wan.arsc └── src │ ├── main │ ├── android │ │ └── util │ │ │ └── TypedValue.java │ └── luyao │ │ └── parser │ │ ├── Main.java │ │ ├── arsc │ │ ├── ResParser.java │ │ └── bean │ │ │ ├── ResArsc.java │ │ │ ├── ResChunkHeader.java │ │ │ ├── ResSpanStyle.java │ │ │ ├── ResStringPoolHeader.java │ │ │ ├── ResTableConfig.java │ │ │ ├── ResTableEntry.java │ │ │ ├── ResTableHeader.java │ │ │ ├── ResTableMap.java │ │ │ ├── ResTableMapEntry.java │ │ │ ├── ResTablePackageHeader.java │ │ │ ├── ResTableRefParent.java │ │ │ ├── ResTableType.java │ │ │ ├── ResTableTypeSpec.java │ │ │ ├── ResType.java │ │ │ └── ResValue.java │ │ ├── classes │ │ ├── ClassParser.java │ │ └── bean │ │ │ ├── Attribute.java │ │ │ ├── Clazz.java │ │ │ ├── Constant.java │ │ │ ├── ConstantClass.java │ │ │ ├── ConstantFieldRef.java │ │ │ ├── ConstantMethodref.java │ │ │ ├── ConstantNameAndType.java │ │ │ ├── ConstantString.java │ │ │ ├── ConstantTag.java │ │ │ ├── ConstantUtf8.java │ │ │ ├── Field.java │ │ │ └── Method.java │ │ ├── dex │ │ ├── DexParser.java │ │ └── bean │ │ │ ├── Dex.java │ │ │ ├── DexFieldId.java │ │ │ ├── DexHeader.java │ │ │ ├── DexMethodId.java │ │ │ ├── DexProtoId.java │ │ │ ├── DexStringId.java │ │ │ ├── DexTypeId.java │ │ │ └── clazz │ │ │ ├── DexClass.java │ │ │ ├── DexClassData.java │ │ │ ├── DexCode.java │ │ │ ├── EncodedField.java │ │ │ └── EncodedMethod.java │ │ ├── utils │ │ ├── BytesReader.java │ │ ├── Reader.java │ │ ├── TransformUtils.java │ │ └── Utils.java │ │ └── xml │ │ ├── XmlParser.java │ │ └── bean │ │ ├── Attribute.java │ │ ├── NameSpace.java │ │ ├── Xml.java │ │ └── chunk │ │ ├── Chunk.java │ │ ├── EndNameSpaceChunk.java │ │ ├── EndTagChunk.java │ │ ├── StartNameSpaceChunk.java │ │ └── StartTagChunk.java │ └── test │ └── luyao │ └── parser │ ├── arsc │ └── ResParserTest.java │ ├── classes │ └── ClassParserTest.java │ ├── dex │ └── DexParserTest.java │ └── xml │ └── XmlParserTest.java ├── README.md ├── android ├── crackme │ ├── crackme.apk │ └── crackme_back │ │ ├── .idea │ │ ├── encodings.xml │ │ ├── markdown-navigator │ │ │ └── profiles_settings.xml │ │ ├── misc.xml │ │ ├── modules.xml │ │ └── workspace.xml │ │ ├── AndroidManifest.xml │ │ ├── apktool.yml │ │ ├── build │ │ └── apk │ │ │ ├── AndroidManifest.xml │ │ │ ├── classes.dex │ │ │ ├── res │ │ │ ├── drawable-hdpi-v4 │ │ │ │ ├── ic_action_search.png │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-ldpi-v4 │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-mdpi-v4 │ │ │ │ ├── ic_action_search.png │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xhdpi-v4 │ │ │ │ ├── ic_action_search.png │ │ │ │ └── ic_launcher.png │ │ │ ├── layout │ │ │ │ └── activity_main.xml │ │ │ └── menu │ │ │ │ └── activity_main.xml │ │ │ └── resources.arsc │ │ ├── dist │ │ └── crackme.apk │ │ ├── gen │ │ └── com │ │ │ └── droider │ │ │ └── crackme0201 │ │ │ ├── BuildConfig.java │ │ │ ├── Manifest.java │ │ │ └── R.java │ │ ├── original │ │ ├── AndroidManifest.xml │ │ └── META-INF │ │ │ ├── CERT.RSA │ │ │ ├── CERT.SF │ │ │ └── MANIFEST.MF │ │ ├── res │ │ ├── drawable-hdpi-v4 │ │ │ ├── ic_action_search.png │ │ │ └── ic_launcher.png │ │ ├── drawable-ldpi-v4 │ │ │ └── ic_launcher.png │ │ ├── drawable-mdpi-v4 │ │ │ ├── ic_action_search.png │ │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi-v4 │ │ │ ├── ic_action_search.png │ │ │ └── ic_launcher.png │ │ ├── layout │ │ │ └── activity_main.xml │ │ ├── menu │ │ │ └── activity_main.xml │ │ ├── values-large-v4 │ │ │ └── dimens.xml │ │ └── values │ │ │ ├── dimens.xml │ │ │ ├── ids.xml │ │ │ ├── public.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ └── smali │ │ ├── .idea │ │ ├── encodings.xml │ │ ├── markdown-navigator │ │ │ └── profiles_settings.xml │ │ ├── misc.xml │ │ ├── modules.xml │ │ └── workspace.xml │ │ ├── android │ │ └── support │ │ │ └── v4 │ │ │ ├── accessibilityservice │ │ │ ├── AccessibilityServiceInfoCompat$AccessibilityServiceInfoIcsImpl.smali │ │ │ ├── AccessibilityServiceInfoCompat$AccessibilityServiceInfoStubImpl.smali │ │ │ ├── AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl.smali │ │ │ ├── AccessibilityServiceInfoCompat.smali │ │ │ └── AccessibilityServiceInfoCompatIcs.smali │ │ │ ├── app │ │ │ ├── ActivityCompat.smali │ │ │ ├── ActivityCompatHoneycomb.smali │ │ │ ├── BackStackRecord$Op.smali │ │ │ ├── BackStackRecord.smali │ │ │ ├── BackStackState$1.smali │ │ │ ├── BackStackState.smali │ │ │ ├── DialogFragment.smali │ │ │ ├── Fragment$InstantiationException.smali │ │ │ ├── Fragment$SavedState$1.smali │ │ │ ├── Fragment$SavedState.smali │ │ │ ├── Fragment.smali │ │ │ ├── FragmentActivity$1.smali │ │ │ ├── FragmentActivity$FragmentTag.smali │ │ │ ├── FragmentActivity$NonConfigurationInstances.smali │ │ │ ├── FragmentActivity.smali │ │ │ ├── FragmentManager$BackStackEntry.smali │ │ │ ├── FragmentManager$OnBackStackChangedListener.smali │ │ │ ├── FragmentManager.smali │ │ │ ├── FragmentManagerImpl$1.smali │ │ │ ├── FragmentManagerImpl$2.smali │ │ │ ├── FragmentManagerImpl$3.smali │ │ │ ├── FragmentManagerImpl$4.smali │ │ │ ├── FragmentManagerImpl$5.smali │ │ │ ├── FragmentManagerImpl.smali │ │ │ ├── FragmentManagerState$1.smali │ │ │ ├── FragmentManagerState.smali │ │ │ ├── FragmentPagerAdapter.smali │ │ │ ├── FragmentState$1.smali │ │ │ ├── FragmentState.smali │ │ │ ├── FragmentStatePagerAdapter.smali │ │ │ ├── FragmentTransaction.smali │ │ │ ├── ListFragment$1.smali │ │ │ ├── ListFragment$2.smali │ │ │ ├── ListFragment.smali │ │ │ ├── LoaderManager$LoaderCallbacks.smali │ │ │ ├── LoaderManager.smali │ │ │ ├── LoaderManagerImpl$LoaderInfo.smali │ │ │ ├── LoaderManagerImpl.smali │ │ │ ├── NavUtils$NavUtilsImpl.smali │ │ │ ├── NavUtils$NavUtilsImplBase.smali │ │ │ ├── NavUtils$NavUtilsImplJB.smali │ │ │ ├── NavUtils.smali │ │ │ ├── NavUtilsJB.smali │ │ │ ├── NoSaveStateFrameLayout.smali │ │ │ ├── NotificationCompat$Builder.smali │ │ │ ├── NotificationCompat$NotificationCompatImpl.smali │ │ │ ├── NotificationCompat$NotificationCompatImplBase.smali │ │ │ ├── NotificationCompat$NotificationCompatImplHoneycomb.smali │ │ │ ├── NotificationCompat.smali │ │ │ ├── NotificationCompatHoneycomb.smali │ │ │ ├── ServiceCompat.smali │ │ │ ├── ShareCompat$IntentBuilder.smali │ │ │ ├── ShareCompat$IntentReader.smali │ │ │ ├── ShareCompat$ShareCompatImpl.smali │ │ │ ├── ShareCompat$ShareCompatImplBase.smali │ │ │ ├── ShareCompat$ShareCompatImplICS.smali │ │ │ ├── ShareCompat$ShareCompatImplJB.smali │ │ │ ├── ShareCompat.smali │ │ │ ├── ShareCompatICS.smali │ │ │ ├── ShareCompatJB.smali │ │ │ ├── SuperNotCalledException.smali │ │ │ ├── TaskStackBuilder$TaskStackBuilderImpl.smali │ │ │ ├── TaskStackBuilder$TaskStackBuilderImplBase.smali │ │ │ ├── TaskStackBuilder$TaskStackBuilderImplHoneycomb.smali │ │ │ ├── TaskStackBuilder$TaskStackBuilderImplJellybean.smali │ │ │ ├── TaskStackBuilder.smali │ │ │ ├── TaskStackBuilderHoneycomb.smali │ │ │ └── TaskStackBuilderJellybean.smali │ │ │ ├── content │ │ │ ├── AsyncTaskLoader$LoadTask.smali │ │ │ ├── AsyncTaskLoader.smali │ │ │ ├── ContextCompat.smali │ │ │ ├── ContextCompatHoneycomb.smali │ │ │ ├── ContextCompatJellybean.smali │ │ │ ├── CursorLoader.smali │ │ │ ├── IntentCompat.smali │ │ │ ├── Loader$ForceLoadContentObserver.smali │ │ │ ├── Loader$OnLoadCompleteListener.smali │ │ │ ├── Loader.smali │ │ │ ├── LocalBroadcastManager$1.smali │ │ │ ├── LocalBroadcastManager$BroadcastRecord.smali │ │ │ ├── LocalBroadcastManager$ReceiverRecord.smali │ │ │ ├── LocalBroadcastManager.smali │ │ │ ├── ModernAsyncTask$1.smali │ │ │ ├── ModernAsyncTask$2.smali │ │ │ ├── ModernAsyncTask$3.smali │ │ │ ├── ModernAsyncTask$4.smali │ │ │ ├── ModernAsyncTask$AsyncTaskResult.smali │ │ │ ├── ModernAsyncTask$InternalHandler.smali │ │ │ ├── ModernAsyncTask$Status.smali │ │ │ ├── ModernAsyncTask$WorkerRunnable.smali │ │ │ ├── ModernAsyncTask.smali │ │ │ └── pm │ │ │ │ └── ActivityInfoCompat.smali │ │ │ ├── database │ │ │ └── DatabaseUtilsCompat.smali │ │ │ ├── net │ │ │ ├── ConnectivityManagerCompat$BaseConnectivityManagerCompatImpl.smali │ │ │ ├── ConnectivityManagerCompat$ConnectivityManagerCompatImpl.smali │ │ │ ├── ConnectivityManagerCompat$GingerbreadConnectivityManagerCompatImpl.smali │ │ │ ├── ConnectivityManagerCompat$HoneycombMR2ConnectivityManagerCompatImpl.smali │ │ │ ├── ConnectivityManagerCompat$JellyBeanConnectivityManagerCompatImpl.smali │ │ │ ├── ConnectivityManagerCompat.smali │ │ │ ├── ConnectivityManagerCompatGingerbread.smali │ │ │ ├── ConnectivityManagerCompatHoneycombMR2.smali │ │ │ ├── ConnectivityManagerCompatJellyBean.smali │ │ │ ├── TrafficStatsCompat$1.smali │ │ │ ├── TrafficStatsCompat$BaseTrafficStatsCompatImpl$1.smali │ │ │ ├── TrafficStatsCompat$BaseTrafficStatsCompatImpl$SocketTags.smali │ │ │ ├── TrafficStatsCompat$BaseTrafficStatsCompatImpl.smali │ │ │ ├── TrafficStatsCompat$IcsTrafficStatsCompatImpl.smali │ │ │ ├── TrafficStatsCompat$TrafficStatsCompatImpl.smali │ │ │ ├── TrafficStatsCompat.smali │ │ │ └── TrafficStatsCompatIcs.smali │ │ │ ├── os │ │ │ ├── ParcelableCompat$CompatCreator.smali │ │ │ ├── ParcelableCompat.smali │ │ │ ├── ParcelableCompatCreatorCallbacks.smali │ │ │ ├── ParcelableCompatCreatorHoneycombMR2.smali │ │ │ └── ParcelableCompatCreatorHoneycombMR2Stub.smali │ │ │ ├── util │ │ │ ├── DebugUtils.smali │ │ │ ├── LogWriter.smali │ │ │ ├── LongSparseArray.smali │ │ │ ├── LruCache.smali │ │ │ ├── SparseArrayCompat.smali │ │ │ └── TimeUtils.smali │ │ │ ├── view │ │ │ ├── AccessibilityDelegateCompat$AccessibilityDelegateIcsImpl$1.smali │ │ │ ├── AccessibilityDelegateCompat$AccessibilityDelegateIcsImpl.smali │ │ │ ├── AccessibilityDelegateCompat$AccessibilityDelegateImpl.smali │ │ │ ├── AccessibilityDelegateCompat$AccessibilityDelegateJellyBeanImpl$1.smali │ │ │ ├── AccessibilityDelegateCompat$AccessibilityDelegateJellyBeanImpl.smali │ │ │ ├── AccessibilityDelegateCompat$AccessibilityDelegateStubImpl.smali │ │ │ ├── AccessibilityDelegateCompat.smali │ │ │ ├── AccessibilityDelegateCompatIcs$1.smali │ │ │ ├── AccessibilityDelegateCompatIcs$AccessibilityDelegateBridge.smali │ │ │ ├── AccessibilityDelegateCompatIcs.smali │ │ │ ├── AccessibilityDelegateCompatJellyBean$1.smali │ │ │ ├── AccessibilityDelegateCompatJellyBean$AccessibilityDelegateBridgeJellyBean.smali │ │ │ ├── AccessibilityDelegateCompatJellyBean.smali │ │ │ ├── KeyEventCompat$BaseKeyEventVersionImpl.smali │ │ │ ├── KeyEventCompat$HoneycombKeyEventVersionImpl.smali │ │ │ ├── KeyEventCompat$KeyEventVersionImpl.smali │ │ │ ├── KeyEventCompat.smali │ │ │ ├── KeyEventCompatHoneycomb.smali │ │ │ ├── MenuCompat$BaseMenuVersionImpl.smali │ │ │ ├── MenuCompat$HoneycombMenuVersionImpl.smali │ │ │ ├── MenuCompat$MenuVersionImpl.smali │ │ │ ├── MenuCompat.smali │ │ │ ├── MenuItemCompat$BaseMenuVersionImpl.smali │ │ │ ├── MenuItemCompat$HoneycombMenuVersionImpl.smali │ │ │ ├── MenuItemCompat$MenuVersionImpl.smali │ │ │ ├── MenuItemCompat.smali │ │ │ ├── MenuItemCompatHoneycomb.smali │ │ │ ├── MotionEventCompat$BaseMotionEventVersionImpl.smali │ │ │ ├── MotionEventCompat$EclairMotionEventVersionImpl.smali │ │ │ ├── MotionEventCompat$MotionEventVersionImpl.smali │ │ │ ├── MotionEventCompat.smali │ │ │ ├── MotionEventCompatEclair.smali │ │ │ ├── PagerAdapter.smali │ │ │ ├── PagerTabStrip$1.smali │ │ │ ├── PagerTabStrip$2.smali │ │ │ ├── PagerTabStrip.smali │ │ │ ├── PagerTitleStrip$1.smali │ │ │ ├── PagerTitleStrip$PageListener.smali │ │ │ ├── PagerTitleStrip$PagerTitleStripImpl.smali │ │ │ ├── PagerTitleStrip$PagerTitleStripImplBase.smali │ │ │ ├── PagerTitleStrip$PagerTitleStripImplIcs.smali │ │ │ ├── PagerTitleStrip.smali │ │ │ ├── PagerTitleStripIcs$SingleLineAllCapsTransform.smali │ │ │ ├── PagerTitleStripIcs.smali │ │ │ ├── VelocityTrackerCompat$BaseVelocityTrackerVersionImpl.smali │ │ │ ├── VelocityTrackerCompat$HoneycombVelocityTrackerVersionImpl.smali │ │ │ ├── VelocityTrackerCompat$VelocityTrackerVersionImpl.smali │ │ │ ├── VelocityTrackerCompat.smali │ │ │ ├── VelocityTrackerCompatHoneycomb.smali │ │ │ ├── ViewCompat$BaseViewCompatImpl.smali │ │ │ ├── ViewCompat$GBViewCompatImpl.smali │ │ │ ├── ViewCompat$HCViewCompatImpl.smali │ │ │ ├── ViewCompat$ICSViewCompatImpl.smali │ │ │ ├── ViewCompat$JBViewCompatImpl.smali │ │ │ ├── ViewCompat$ViewCompatImpl.smali │ │ │ ├── ViewCompat.smali │ │ │ ├── ViewCompatGingerbread.smali │ │ │ ├── ViewCompatHC.smali │ │ │ ├── ViewCompatICS.smali │ │ │ ├── ViewCompatJB.smali │ │ │ ├── ViewConfigurationCompat$BaseViewConfigurationVersionImpl.smali │ │ │ ├── ViewConfigurationCompat$FroyoViewConfigurationVersionImpl.smali │ │ │ ├── ViewConfigurationCompat$ViewConfigurationVersionImpl.smali │ │ │ ├── ViewConfigurationCompat.smali │ │ │ ├── ViewConfigurationCompatFroyo.smali │ │ │ ├── ViewGroupCompat$ViewGroupCompatIcsImpl.smali │ │ │ ├── ViewGroupCompat$ViewGroupCompatImpl.smali │ │ │ ├── ViewGroupCompat$ViewGroupCompatStubImpl.smali │ │ │ ├── ViewGroupCompat.smali │ │ │ ├── ViewGroupCompatIcs.smali │ │ │ ├── ViewPager$1.smali │ │ │ ├── ViewPager$2.smali │ │ │ ├── ViewPager$Decor.smali │ │ │ ├── ViewPager$ItemInfo.smali │ │ │ ├── ViewPager$LayoutParams.smali │ │ │ ├── ViewPager$MyAccessibilityDelegate.smali │ │ │ ├── ViewPager$OnAdapterChangeListener.smali │ │ │ ├── ViewPager$OnPageChangeListener.smali │ │ │ ├── ViewPager$PagerObserver.smali │ │ │ ├── ViewPager$SavedState$1.smali │ │ │ ├── ViewPager$SavedState.smali │ │ │ ├── ViewPager$SimpleOnPageChangeListener.smali │ │ │ ├── ViewPager.smali │ │ │ └── accessibility │ │ │ │ ├── AccessibilityEventCompat$AccessibilityEventIcsImpl.smali │ │ │ │ ├── AccessibilityEventCompat$AccessibilityEventStubImpl.smali │ │ │ │ ├── AccessibilityEventCompat$AccessibilityEventVersionImpl.smali │ │ │ │ ├── AccessibilityEventCompat.smali │ │ │ │ ├── AccessibilityEventCompatIcs.smali │ │ │ │ ├── AccessibilityManagerCompat$AccessibilityManagerIcsImpl$1.smali │ │ │ │ ├── AccessibilityManagerCompat$AccessibilityManagerIcsImpl.smali │ │ │ │ ├── AccessibilityManagerCompat$AccessibilityManagerStubImpl.smali │ │ │ │ ├── AccessibilityManagerCompat$AccessibilityManagerVersionImpl.smali │ │ │ │ ├── AccessibilityManagerCompat$AccessibilityStateChangeListenerCompat.smali │ │ │ │ ├── AccessibilityManagerCompat.smali │ │ │ │ ├── AccessibilityManagerCompatIcs$1.smali │ │ │ │ ├── AccessibilityManagerCompatIcs$AccessibilityStateChangeListenerBridge.smali │ │ │ │ ├── AccessibilityManagerCompatIcs.smali │ │ │ │ ├── AccessibilityNodeInfoCompat$AccessibilityNodeInfoIcsImpl.smali │ │ │ │ ├── AccessibilityNodeInfoCompat$AccessibilityNodeInfoImpl.smali │ │ │ │ ├── AccessibilityNodeInfoCompat$AccessibilityNodeInfoJellybeanImpl.smali │ │ │ │ ├── AccessibilityNodeInfoCompat$AccessibilityNodeInfoStubImpl.smali │ │ │ │ ├── AccessibilityNodeInfoCompat.smali │ │ │ │ ├── AccessibilityNodeInfoCompatIcs.smali │ │ │ │ ├── AccessibilityNodeInfoCompatJellyBean.smali │ │ │ │ ├── AccessibilityNodeProviderCompat$AccessibilityNodeProviderImpl.smali │ │ │ │ ├── AccessibilityNodeProviderCompat$AccessibilityNodeProviderJellyBeanImpl$1.smali │ │ │ │ ├── AccessibilityNodeProviderCompat$AccessibilityNodeProviderJellyBeanImpl.smali │ │ │ │ ├── AccessibilityNodeProviderCompat$AccessibilityNodeProviderStubImpl.smali │ │ │ │ ├── AccessibilityNodeProviderCompat.smali │ │ │ │ ├── AccessibilityNodeProviderCompatJellyBean$1.smali │ │ │ │ ├── AccessibilityNodeProviderCompatJellyBean$AccessibilityNodeInfoBridge.smali │ │ │ │ ├── AccessibilityNodeProviderCompatJellyBean.smali │ │ │ │ ├── AccessibilityRecordCompat$AccessibilityRecordIcsImpl.smali │ │ │ │ ├── AccessibilityRecordCompat$AccessibilityRecordIcsMr1Impl.smali │ │ │ │ ├── AccessibilityRecordCompat$AccessibilityRecordImpl.smali │ │ │ │ ├── AccessibilityRecordCompat$AccessibilityRecordJellyBeanImpl.smali │ │ │ │ ├── AccessibilityRecordCompat$AccessibilityRecordStubImpl.smali │ │ │ │ ├── AccessibilityRecordCompat.smali │ │ │ │ ├── AccessibilityRecordCompatIcs.smali │ │ │ │ ├── AccessibilityRecordCompatIcsMr1.smali │ │ │ │ └── AccessibilityRecordCompatJellyBean.smali │ │ │ └── widget │ │ │ ├── CursorAdapter$1.smali │ │ │ ├── CursorAdapter$ChangeObserver.smali │ │ │ ├── CursorAdapter$MyDataSetObserver.smali │ │ │ ├── CursorAdapter.smali │ │ │ ├── CursorFilter$CursorFilterClient.smali │ │ │ ├── CursorFilter.smali │ │ │ ├── EdgeEffectCompat$BaseEdgeEffectImpl.smali │ │ │ ├── EdgeEffectCompat$EdgeEffectIcsImpl.smali │ │ │ ├── EdgeEffectCompat$EdgeEffectImpl.smali │ │ │ ├── EdgeEffectCompat.smali │ │ │ ├── EdgeEffectCompatIcs.smali │ │ │ ├── ResourceCursorAdapter.smali │ │ │ ├── ScrollerCompat$ScrollerCompatImplIcs.smali │ │ │ ├── ScrollerCompat.smali │ │ │ ├── ScrollerCompatIcs.smali │ │ │ ├── SearchViewCompat$OnQueryTextListenerCompat.smali │ │ │ ├── SearchViewCompat$SearchViewCompatHoneycombImpl$1.smali │ │ │ ├── SearchViewCompat$SearchViewCompatHoneycombImpl.smali │ │ │ ├── SearchViewCompat$SearchViewCompatImpl.smali │ │ │ ├── SearchViewCompat$SearchViewCompatStubImpl.smali │ │ │ ├── SearchViewCompat.smali │ │ │ ├── SearchViewCompatHoneycomb$1.smali │ │ │ ├── SearchViewCompatHoneycomb$OnQueryTextListenerCompatBridge.smali │ │ │ ├── SearchViewCompatHoneycomb.smali │ │ │ ├── SimpleCursorAdapter$CursorToStringConverter.smali │ │ │ ├── SimpleCursorAdapter$ViewBinder.smali │ │ │ └── SimpleCursorAdapter.smali │ │ └── com │ │ ├── android │ │ └── killer │ │ │ └── Log.smali │ │ └── droider │ │ └── crackme0201 │ │ ├── BuildConfig.smali │ │ ├── MainActivity.smali │ │ ├── R$attr.smali │ │ ├── R$dimen.smali │ │ ├── R$drawable.smali │ │ ├── R$id.smali │ │ ├── R$layout.smali │ │ ├── R$menu.smali │ │ ├── R$string.smali │ │ ├── R$style.smali │ │ └── R.smali └── xml │ └── parse_xml.md ├── class ├── ClassParser │ ├── .gradle │ │ ├── 4.10 │ │ │ ├── fileChanges │ │ │ │ └── last-build.bin │ │ │ ├── fileHashes │ │ │ │ ├── fileHashes.bin │ │ │ │ └── fileHashes.lock │ │ │ ├── gc.properties │ │ │ └── taskHistory │ │ │ │ ├── taskHistory.bin │ │ │ │ └── taskHistory.lock │ │ ├── 4.4 │ │ │ ├── fileChanges │ │ │ │ └── last-build.bin │ │ │ └── fileHashes │ │ │ │ ├── fileHashes.bin │ │ │ │ └── fileHashes.lock │ │ ├── buildOutputCleanup │ │ │ ├── buildOutputCleanup.lock │ │ │ ├── cache.properties │ │ │ └── outputFiles.bin │ │ └── vcs-1 │ │ │ └── gc.properties │ ├── .idea │ │ ├── encodings.xml │ │ ├── misc.xml │ │ ├── modules.xml │ │ ├── vcs.xml │ │ └── workspace.xml │ ├── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── out │ │ └── production │ │ │ └── main │ │ │ └── luyao │ │ │ └── classparser │ │ │ └── Hello.smali │ ├── settings.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── luyao │ │ │ └── classparser │ │ │ ├── Hello.java │ │ │ ├── Hello.smali │ │ │ ├── Main.java │ │ │ ├── classes │ │ │ ├── ClassParser.java │ │ │ └── bean │ │ │ │ ├── Attribute.java │ │ │ │ ├── Clazz.java │ │ │ │ ├── Constant.java │ │ │ │ ├── ConstantClass.java │ │ │ │ ├── ConstantFieldRef.java │ │ │ │ ├── ConstantMethodref.java │ │ │ │ ├── ConstantNameAndType.java │ │ │ │ ├── ConstantString.java │ │ │ │ ├── ConstantTag.java │ │ │ │ ├── ConstantUtf8.java │ │ │ │ ├── Field.java │ │ │ │ └── Method.java │ │ │ └── utils │ │ │ ├── Reader.java │ │ │ ├── TransformUtils.java │ │ │ └── Utils.java │ │ └── main.iml ├── Hello.java └── class_parser.md ├── img ├── 010_hello_class.png ├── class_after_pool.png ├── class_attribute.png ├── class_constant_class.png ├── class_constant_pool.png ├── class_field.png ├── class_magic.png ├── class_method.png ├── class_method_main.png ├── class_pool0.png ├── class_pool18.png ├── class_pool26.png ├── class_version.png ├── int-to-float.png ├── javap1.png ├── javap2.png ├── smali_math.png └── xml │ ├── kanxue_resourceid_chunk.png │ ├── kanxue_start_namespace.png │ ├── kanxue_start_tag.png │ ├── kanxue_string_chunk.png │ ├── xml_all.png │ ├── xml_attribute.png │ ├── xml_binary.png │ ├── xml_header.png │ ├── xml_resourceid_chunk.png │ ├── xml_start_namespace.png │ ├── xml_start_tag.png │ ├── xml_string_chunk.png │ └── xml_versioname.png └── smali ├── helloworld ├── Hello.dex ├── Hello.java └── Hello.smali ├── smali_base.md ├── smali_base ├── BaseSmali.dex ├── BaseSmali.java └── BaseSmali.smali ├── smali_class.md ├── smali_class ├── BMW.java ├── BMWCar.dex ├── Car.java ├── IFly.java ├── innerClass │ ├── InnerClass.dex │ ├── Outer.java │ └── out │ │ ├── Outer$1.smali │ │ ├── Outer$2.smali │ │ ├── Outer$Inner.smali │ │ ├── Outer$StaticInner.smali │ │ └── Outer.smali └── out │ ├── BMW.smali │ ├── Car.smali │ └── IFly.smali └── smali_hello_world.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | 25 | Parser/.idea/* 26 | Parser/out 27 | 28 | *.iml 29 | -------------------------------------------------------------------------------- /AndroidManifest_weixin.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/AndroidManifest_weixin.xml -------------------------------------------------------------------------------- /Parser/resources/AndroidManifest.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/Parser/resources/AndroidManifest.xml -------------------------------------------------------------------------------- /Parser/resources/AndroidManifest_qq.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/Parser/resources/AndroidManifest_qq.xml -------------------------------------------------------------------------------- /Parser/resources/AndroidManifest_weixin.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/Parser/resources/AndroidManifest_weixin.xml -------------------------------------------------------------------------------- /Parser/resources/Hello.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/Parser/resources/Hello.dex -------------------------------------------------------------------------------- /Parser/resources/resources.arsc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/Parser/resources/resources.arsc -------------------------------------------------------------------------------- /Parser/resources/resources_wan.arsc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/Parser/resources/resources_wan.arsc -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/Main.java: -------------------------------------------------------------------------------- 1 | package luyao.parser; 2 | 3 | /** 4 | * Created by luyao 5 | * on 2018/12/14 9:58 6 | */ 7 | public class Main { 8 | 9 | public static void main(String[] args) { 10 | 11 | 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/arsc/bean/ResArsc.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.arsc.bean; 2 | 3 | /** 4 | * Created by luyao 5 | * on 2018/12/21 9:23 6 | */ 7 | public class ResArsc { 8 | 9 | private ResTableHeader resTableHeader; 10 | 11 | public ResTableHeader getResTableHeader() { 12 | return resTableHeader; 13 | } 14 | 15 | public void setResTableHeader(ResTableHeader resChunkHeader) { 16 | this.resTableHeader = resChunkHeader; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/arsc/bean/ResChunkHeader.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.arsc.bean; 2 | 3 | import luyao.parser.utils.BytesReader; 4 | 5 | import java.io.IOException; 6 | 7 | /** 8 | * Created by luyao 9 | * on 2018/12/20 13:47 10 | */ 11 | public class ResChunkHeader { 12 | 13 | /* 14 | struct ResChunk_header 15 | { 16 | // Type identifier for this chunk. The meaning of this value depends 17 | // on the containing chunk. 18 | uint16_t type; 19 | 20 | // Size of the chunk header (in bytes). Adding this value to 21 | // the address of the chunk allows you to find its associated data 22 | // (if any). 23 | uint16_t headerSize; 24 | 25 | // Total size of this chunk (in bytes). This is the chunkSize plus 26 | // the size of any data associated with the chunk. Adding this value 27 | // to the chunk allows you to completely skip its contents (including 28 | // any child chunks). If this value is the same as chunkSize, there is 29 | // no data associated with the chunk. 30 | uint32_t size; 31 | }; 32 | 33 | */ 34 | 35 | public int resType; // 当前 chunk 类型 36 | public int headerSize; // 当前 chunk header 大小 37 | public int size; // 当前 chunk 大小 38 | 39 | public ResChunkHeader(BytesReader reader) throws IOException { 40 | resType = reader.readShort(); 41 | headerSize = reader.readUnsignedShort(); 42 | size = reader.readInt(); 43 | } 44 | 45 | @Override 46 | public String toString() { 47 | return "ResChunkHeader{" + 48 | "resType=" + resType + 49 | ", headerSize=" + headerSize + 50 | ", size=" + size + 51 | '}'; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/arsc/bean/ResSpanStyle.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.arsc.bean; 2 | 3 | /** 4 | * Created by luyao 5 | * on 2018/12/20 14:47 6 | */ 7 | public class ResSpanStyle { 8 | 9 | public int index; 10 | public int firstChar; 11 | public int lastChar; 12 | 13 | public ResSpanStyle(int index, int firstChar, int lastChar) { 14 | this.index = index; 15 | this.firstChar = firstChar; 16 | this.lastChar = lastChar; 17 | } 18 | 19 | 20 | @Override 21 | public String toString() { 22 | return "ResSpanStyle{" + 23 | "index=" + index + 24 | ", firstChar=" + firstChar + 25 | ", lastChar=" + lastChar + 26 | '}'; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/arsc/bean/ResTableConfig.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.arsc.bean; 2 | 3 | import luyao.parser.utils.BytesReader; 4 | 5 | import java.io.IOException; 6 | 7 | /** 8 | * Created by luyao 9 | * on 2018/12/24 15:37 10 | */ 11 | public class ResTableConfig { 12 | public int size; 13 | public char[] data; 14 | 15 | public void parse(BytesReader reader) throws IOException { 16 | this.size = reader.readInt(); 17 | this.data = new char[size]; 18 | reader.skip(size-4); 19 | // data[0]= (char) size; 20 | // for (int i = 1; i < size; i++) { 21 | // data[i] = (char) reader.readByte(); 22 | // } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/arsc/bean/ResTableHeader.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.arsc.bean; 2 | 3 | import luyao.parser.utils.BytesReader; 4 | 5 | import java.io.IOException; 6 | 7 | /** 8 | * Created by luyao 9 | * on 2018/12/20 14:04 10 | */ 11 | public class ResTableHeader { 12 | 13 | /* 14 | struct ResTable_header 15 | { 16 | struct ResChunk_header header; 17 | 18 | // The number of ResTable_package structures. 19 | uint32_t packageCount; 20 | }; 21 | */ 22 | 23 | public ResChunkHeader resChunkHeader; 24 | public int packageCount; // 被编译的资源包的个数 25 | 26 | public void parse(BytesReader reader) { 27 | try { 28 | resChunkHeader = new ResChunkHeader(reader); 29 | packageCount = reader.readInt(); 30 | } catch (IOException e) { 31 | e.printStackTrace(); 32 | } 33 | } 34 | 35 | @Override 36 | public String toString() { 37 | return "ResTableHeader{" + 38 | "resChunkHeader=" + resChunkHeader.toString() + 39 | ", packageCount=" + packageCount + 40 | '}'; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/arsc/bean/ResTableMap.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.arsc.bean; 2 | 3 | import luyao.parser.utils.BytesReader; 4 | 5 | import java.io.IOException; 6 | 7 | /** 8 | * Created by luyao 9 | * on 2018/12/24 16:04 10 | */ 11 | public class ResTableMap { 12 | 13 | // struct ResTable_map 14 | // { 15 | // ResTable_ref name; // 资源名称 16 | // Res_value value; // 资源值 17 | // } 18 | 19 | public int resTableRefName; 20 | public ResValue resValue; 21 | 22 | 23 | public void parse(BytesReader reader) throws IOException { 24 | this.resTableRefName = reader.readInt(); 25 | 26 | resValue = new ResValue(); 27 | resValue.parse(reader); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/arsc/bean/ResTableMapEntry.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.arsc.bean; 2 | 3 | import luyao.parser.utils.BytesReader; 4 | 5 | import java.io.IOException; 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | /** 10 | * Created by luyao 11 | * on 2018/12/24 16:00 12 | */ 13 | public class ResTableMapEntry extends ResTableEntry { 14 | 15 | public ResTableRefParent resTableRefParent; 16 | public int count; 17 | public List resTableMapList; 18 | 19 | public ResTableMapEntry(int size, int flags, int string_pool_index) { 20 | super(size, flags, string_pool_index); 21 | } 22 | 23 | public void parse(BytesReader reader) throws IOException { 24 | this.resTableRefParent = new ResTableRefParent(reader.readInt()); 25 | this.count = reader.readInt(); 26 | resTableMapList = new ArrayList<>(count); 27 | for (int i = 0; i < count; i++) { 28 | ResTableMap resTableMap = new ResTableMap(); 29 | resTableMap.parse(reader); 30 | resTableMapList.add(resTableMap); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/arsc/bean/ResTableRefParent.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.arsc.bean; 2 | 3 | /** 4 | * Created by luyao 5 | * on 2018/12/24 16:01 6 | */ 7 | public class ResTableRefParent { 8 | public int indent; 9 | 10 | public ResTableRefParent(int indent) { 11 | this.indent = indent; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/arsc/bean/ResType.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.arsc.bean; 2 | 3 | /** 4 | * Created by luyao 5 | * on 2018/12/21 14:18 6 | */ 7 | public class ResType { 8 | 9 | public static final int RES_TABLE_TYPE_SPEC_TYPE = 0x0202; 10 | public static final int RES_TABLE_TYPE_TYPE = 0x0201; 11 | } 12 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/arsc/bean/ResValue.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.arsc.bean; 2 | 3 | import luyao.parser.utils.BytesReader; 4 | import luyao.parser.utils.Reader; 5 | 6 | import java.io.IOException; 7 | 8 | /** 9 | * Created by luyao 10 | * on 2018/12/24 16:53 11 | */ 12 | public class ResValue { 13 | 14 | public int size; 15 | public int res0; 16 | public int dataType; 17 | public int data; 18 | 19 | public void parse(BytesReader reader) throws IOException { 20 | this.size = reader.readUnsignedShort(); 21 | this.res0=reader.readUnsignedByte(); 22 | this.dataType = reader.readByte(); 23 | this.data = reader.readInt(); 24 | } 25 | 26 | @Override 27 | public String toString() { 28 | return "ResValue{" + 29 | "size=" + size + 30 | ", res0=" + res0 + 31 | ", dataType=" + dataType + 32 | ", data=" + data + 33 | '}'; 34 | } 35 | } -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/classes/bean/Attribute.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.classes.bean; 2 | 3 | 4 | import luyao.parser.utils.Reader; 5 | 6 | import java.io.IOException; 7 | 8 | public class Attribute { 9 | 10 | public int attribute_name; 11 | public int attribute_length; 12 | 13 | public void read(Reader reader) { 14 | try { 15 | this.attribute_name = reader.readUnsignedShort(); 16 | this.attribute_length = reader.readInt(); 17 | reader.skip(attribute_length); 18 | } catch (IOException e) { 19 | e.printStackTrace(); 20 | } 21 | } 22 | 23 | @Override 24 | public String toString() { 25 | return "Attribute{" + 26 | "attribute_name=" + attribute_name + 27 | ", attribute_length=" + attribute_length + 28 | '}'; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/classes/bean/Clazz.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.classes.bean; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by luyao 7 | * on 2018/8/27 14:49 8 | */ 9 | public class Clazz { 10 | 11 | private String magic; 12 | private int minor_version; 13 | private int major_version; 14 | private int constant_pool_count; 15 | private List constant_pool_list; 16 | } 17 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/classes/bean/Constant.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.classes.bean; 2 | 3 | 4 | import luyao.parser.utils.Reader; 5 | 6 | /** 7 | * Created by luyao 8 | * on 2018/8/27 14:52 9 | */ 10 | abstract class Constant { 11 | 12 | protected int tag; 13 | 14 | public Constant() { 15 | } 16 | 17 | public Constant(int tag) { 18 | this.tag = tag; 19 | } 20 | 21 | public abstract void read(Reader reader); 22 | } 23 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/classes/bean/ConstantClass.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.classes.bean; 2 | 3 | 4 | 5 | import luyao.parser.utils.Reader; 6 | 7 | import java.io.IOException; 8 | 9 | /** 10 | * Created by luyao 11 | * on 2018/8/27 15:49 12 | */ 13 | public class ConstantClass extends Constant { 14 | public int name_index; 15 | 16 | public ConstantClass() { 17 | super(ConstantTag.CLASS); 18 | } 19 | 20 | public ConstantClass(int name_index) { 21 | super(ConstantTag.CLASS); 22 | this.name_index = name_index; 23 | } 24 | 25 | @Override 26 | public void read(Reader reader) { 27 | try { 28 | this.name_index=reader.readUnsignedShort(); 29 | } catch (IOException e) { 30 | e.printStackTrace(); 31 | } 32 | } 33 | 34 | @Override 35 | public String toString() { 36 | return "ConstantClass{" + 37 | "tag=" + tag + 38 | ", name_index=" + name_index + 39 | '}'; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/classes/bean/ConstantFieldRef.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.classes.bean; 2 | 3 | 4 | 5 | import luyao.parser.utils.Reader; 6 | 7 | import java.io.IOException; 8 | 9 | /** 10 | * Created by luyao 11 | * on 2018/8/27 15:32 12 | */ 13 | public class ConstantFieldRef extends Constant { 14 | 15 | public int class_index; 16 | public int name_and_type_index; 17 | 18 | public ConstantFieldRef() { 19 | super(ConstantTag.FIELD_REF); 20 | } 21 | 22 | public ConstantFieldRef(int class_index, int name_and_type_index) { 23 | super(ConstantTag.FIELD_REF); 24 | this.class_index = class_index; 25 | this.name_and_type_index = name_and_type_index; 26 | } 27 | 28 | @Override 29 | public void read(Reader reader) { 30 | try { 31 | this.class_index = reader.readUnsignedShort(); 32 | this.name_and_type_index = reader.readUnsignedShort(); 33 | } catch (IOException e) { 34 | e.printStackTrace(); 35 | } 36 | } 37 | 38 | @Override 39 | public String toString() { 40 | return "ConstantFieldRef{" + "tag=" + tag + 41 | ", class_index=" + class_index + 42 | ", name_and_type_index=" + name_and_type_index + 43 | '}'; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/classes/bean/ConstantMethodref.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.classes.bean; 2 | 3 | 4 | 5 | import luyao.parser.utils.Reader; 6 | 7 | import java.io.IOException; 8 | 9 | /** 10 | * Created by luyao 11 | * on 2018/8/27 14:54 12 | */ 13 | public class ConstantMethodref extends Constant { 14 | 15 | public int class_index; 16 | public int name_and_type_index; 17 | 18 | public ConstantMethodref() { 19 | super(ConstantTag.METHOD_REF); 20 | } 21 | 22 | public ConstantMethodref(int class_index, int name_and_type_index) { 23 | super(ConstantTag.METHOD_REF); 24 | this.class_index = class_index; 25 | this.name_and_type_index = name_and_type_index; 26 | } 27 | 28 | @Override 29 | public void read(Reader reader) { 30 | try { 31 | this.class_index = reader.readUnsignedShort(); 32 | this.name_and_type_index = reader.readUnsignedShort(); 33 | } catch (IOException e) { 34 | e.printStackTrace(); 35 | } 36 | } 37 | 38 | @Override 39 | public String toString() { 40 | return "ConstantMethodref{" + "tag=" + tag + 41 | ", class_index=" + class_index + 42 | ", name_and_type_index=" + name_and_type_index + 43 | '}'; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/classes/bean/ConstantNameAndType.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.classes.bean; 2 | 3 | 4 | 5 | import luyao.parser.utils.Reader; 6 | 7 | import java.io.IOException; 8 | 9 | /** 10 | * Created by luyao 11 | * on 2018/8/27 16:11 12 | */ 13 | public class ConstantNameAndType extends Constant { 14 | 15 | public int name_index; 16 | public int descriptor_index; 17 | 18 | public ConstantNameAndType() { 19 | super(ConstantTag.NAME_AND_TYPE); 20 | } 21 | 22 | @Override 23 | public void read(Reader reader) { 24 | try { 25 | this.name_index = reader.readUnsignedShort(); 26 | this.descriptor_index = reader.readUnsignedShort(); 27 | } catch (IOException e) { 28 | e.printStackTrace(); 29 | } 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return "ConstantNameAndType{" + 35 | "tag=" + tag + 36 | ", name_index=" + name_index + 37 | ", descriptor_index=" + descriptor_index + 38 | '}'; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/classes/bean/ConstantString.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.classes.bean; 2 | 3 | 4 | 5 | import luyao.parser.utils.Reader; 6 | 7 | import java.io.IOException; 8 | 9 | /** 10 | * Created by luyao 11 | * on 2018/8/27 15:43 12 | */ 13 | public class ConstantString extends Constant { 14 | 15 | public int string_index; 16 | 17 | public ConstantString() { 18 | super(ConstantTag.METHOD_REF); 19 | } 20 | 21 | public ConstantString(int string_index) { 22 | super(ConstantTag.METHOD_REF); 23 | this.string_index = string_index; 24 | } 25 | 26 | @Override 27 | public void read(Reader reader) { 28 | try { 29 | this.string_index=reader.readUnsignedShort(); 30 | } catch (IOException e) { 31 | e.printStackTrace(); 32 | } 33 | } 34 | 35 | @Override 36 | public String toString() { 37 | return "ConstantString{" + 38 | "tag=" + tag + 39 | ", string_index=" + string_index + 40 | '}'; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/classes/bean/ConstantTag.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.classes.bean; 2 | 3 | /** 4 | * Created by luyao 5 | * on 2018/8/27 15:02 6 | */ 7 | public class ConstantTag { 8 | 9 | public static final int UTF8 = 1; 10 | public static final int CLASS = 7; 11 | public static final int STRING = 8; 12 | public static final int FIELD_REF = 9; 13 | public static final int METHOD_REF = 10; 14 | public static final int NAME_AND_TYPE = 12; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/classes/bean/ConstantUtf8.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.classes.bean; 2 | 3 | 4 | 5 | import luyao.parser.utils.Reader; 6 | 7 | import java.io.IOException; 8 | 9 | /** 10 | * Created by luyao 11 | * on 2018/8/27 15:52 12 | */ 13 | public class ConstantUtf8 extends Constant { 14 | 15 | public int length; 16 | public String content; 17 | 18 | public ConstantUtf8() { 19 | super(ConstantTag.UTF8); 20 | } 21 | 22 | @Override 23 | public void read(Reader reader) { 24 | try { 25 | this.length = reader.readUnsignedShort(); 26 | this.content = new String(reader.readOrigin(length)); 27 | } catch (IOException e) { 28 | e.printStackTrace(); 29 | } 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return "ConstantUtf8{" + 35 | "tag=" + tag + 36 | ", length=" + length + 37 | ", content='" + content + '\'' + 38 | '}'; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/classes/bean/Field.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.classes.bean; 2 | 3 | 4 | import luyao.parser.utils.Reader; 5 | 6 | import java.io.IOException; 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | public class Field { 11 | 12 | public int access_flag; 13 | public int name_index; 14 | public int descriptor_index; 15 | public int attributes_count; 16 | public List attributeList; 17 | 18 | public void read(Reader reader) { 19 | try { 20 | this.access_flag = reader.readUnsignedShort(); 21 | this.name_index = reader.readUnsignedShort(); 22 | this.descriptor_index = reader.readUnsignedShort(); 23 | this.attributes_count = reader.readUnsignedShort(); 24 | 25 | List attributeList = new ArrayList<>(); 26 | for (int i = 0; i < attributes_count; i++) { 27 | Attribute attribute=new Attribute(); 28 | attribute.read(reader); 29 | attributeList.add(attribute); 30 | } 31 | this.attributeList = attributeList; 32 | } catch (IOException e) { 33 | e.printStackTrace(); 34 | } 35 | } 36 | 37 | @Override 38 | public String toString() { 39 | return "Field{" + 40 | "access_flag=" + access_flag + 41 | ", name_index=" + name_index + 42 | ", descriptor_index=" + descriptor_index + 43 | ", attributes_count=" + attributes_count + 44 | '}'; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/classes/bean/Method.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.classes.bean; 2 | 3 | 4 | import luyao.parser.utils.Reader; 5 | 6 | import java.io.IOException; 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | public class Method { 11 | 12 | public int access_flag; 13 | public int name_index; 14 | public int descriptor_index; 15 | public int attributes_count; 16 | public List attributeList; 17 | 18 | public void read(Reader reader) { 19 | try { 20 | this.access_flag = reader.readUnsignedShort(); 21 | this.name_index = reader.readUnsignedShort(); 22 | this.descriptor_index = reader.readUnsignedShort(); 23 | this.attributes_count = reader.readUnsignedShort(); 24 | 25 | List attributeList = new ArrayList<>(); 26 | for (int i = 0; i < attributes_count; i++) { 27 | Attribute attribute=new Attribute(); 28 | attribute.read(reader); 29 | attributeList.add(attribute); 30 | } 31 | this.attributeList = attributeList; 32 | } catch (IOException e) { 33 | e.printStackTrace(); 34 | } 35 | } 36 | 37 | @Override 38 | public String toString() { 39 | return "Method{" + 40 | "access_flag=" + access_flag + 41 | ", name_index=" + name_index + 42 | ", descriptor_index=" + descriptor_index + 43 | ", attributes_count=" + attributes_count + 44 | ", attributeList=" + attributeList + 45 | '}'; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/dex/bean/Dex.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.dex.bean; 2 | 3 | /** 4 | * Created by luyao 5 | * on 2018/12/18 15:17 6 | */ 7 | public class Dex { 8 | 9 | private DexHeader dexHeader; 10 | 11 | public DexHeader getDexHeader() { 12 | return dexHeader; 13 | } 14 | 15 | public void setDexHeader(DexHeader dexHeader) { 16 | this.dexHeader = dexHeader; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/dex/bean/DexFieldId.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.dex.bean; 2 | 3 | /** 4 | * Created by luyao 5 | * on 2018/12/18 15:49 6 | */ 7 | public class DexFieldId { 8 | 9 | // struct DexFieldId { 10 | // u2 classIdx; /* index into typeIds list for defining class */ 11 | // u2 typeIdx; /* index into typeIds for field type */ 12 | // u4 nameIdx; /* index into stringIds for field name */ 13 | // }; 14 | 15 | public int class_idx; // 指向 type_ids 16 | public int type_idx; // 指向 type_ids 17 | public int name_idx; // 指向 string_ids 18 | 19 | public DexFieldId(int class_idx, int type_idx, int name_idx) { 20 | this.class_idx = class_idx; 21 | this.type_idx = type_idx; 22 | this.name_idx = name_idx; 23 | } 24 | 25 | @Override 26 | public String toString() { 27 | return "DexFieldId{" + 28 | "class_idx=" + class_idx + 29 | ", type_idx=" + type_idx + 30 | ", name_idx=" + name_idx + 31 | '}'; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/dex/bean/DexMethodId.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.dex.bean; 2 | 3 | /** 4 | * Created by luyao 5 | * on 2018/12/18 15:53 6 | */ 7 | public class DexMethodId { 8 | 9 | // struct DexMethodId { 10 | // u2 classIdx; /* index into typeIds list for defining class */ 11 | // u2 protoIdx; /* index into protoIds for method prototype */ 12 | // u4 nameIdx; /* index into stringIds for method name */ 13 | // }; 14 | 15 | public int class_idx; // 指向 type_ids 16 | public int proto_idx; // 指向 proto_ids 17 | public int name_idx; // 指向 string_ids 18 | 19 | public DexMethodId(int class_idx, int proto_idx, int name_idx) { 20 | this.class_idx = class_idx; 21 | this.proto_idx = proto_idx; 22 | this.name_idx = name_idx; 23 | } 24 | 25 | @Override 26 | public String toString() { 27 | return "DexMethodId{" + 28 | "class_idx=" + class_idx + 29 | ", proto_idx=" + proto_idx + 30 | ", name_idx=" + name_idx + 31 | '}'; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/dex/bean/DexProtoId.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.dex.bean; 2 | 3 | /** 4 | * Created by luyao 5 | * on 2018/12/18 15:40 6 | */ 7 | public class DexProtoId { 8 | 9 | // struct DexProtoId { 10 | // u4 shortyIdx; /* index into stringIds for shorty descriptor */ 11 | // u4 returnTypeIdx; /* index into typeIds list for return type */ 12 | // u4 parametersOff; /* file offset to type_list for parameter types */ 13 | // }; 14 | 15 | public int shorty_idx; // 指向 string_ids 16 | public int return_type_idx; // 指向 types_ids 17 | public int parameters_off; 18 | 19 | 20 | public DexProtoId(int shorty_idx, int return_type_idx, int parameters_off) { 21 | this.shorty_idx = shorty_idx; 22 | this.return_type_idx = return_type_idx; 23 | this.parameters_off = parameters_off; 24 | } 25 | 26 | @Override 27 | public String toString() { 28 | return "DexProtoId{" + 29 | "shorty_idx=" + shorty_idx + 30 | ", return_type_idx=" + return_type_idx + 31 | ", parameters_off=" + parameters_off + 32 | '}'; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/dex/bean/DexStringId.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.dex.bean; 2 | 3 | /** 4 | * Created by luyao 5 | * on 2018/12/19 10:01 6 | */ 7 | public class DexStringId { 8 | 9 | /* 10 | struct DexStringId { 11 | u4 stringDataOff; 12 | }; 13 | */ 14 | 15 | public int string_data_off; // 字符串的偏移量 16 | public String string_data; // 字符串的内容 17 | 18 | public DexStringId(int string_data_off, String string_data) { 19 | this.string_data_off = string_data_off; 20 | this.string_data = string_data; 21 | } 22 | 23 | @Override 24 | public String toString() { 25 | return "DexStringId{" + 26 | "string_data_off=" + string_data_off + 27 | ", string_data=" + string_data + 28 | '}'; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/dex/bean/DexTypeId.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.dex.bean; 2 | 3 | /** 4 | * Created by luyao 5 | * on 2018/12/19 10:09 6 | */ 7 | public class DexTypeId { 8 | 9 | /* 10 | struct DexTypeId { 11 | u4 descriptorIdx; 12 | }; 13 | */ 14 | 15 | public int descriptor_idx; // 指向 string_ids 中的内容 16 | public String string_data; 17 | 18 | public DexTypeId(int descriptor_idx, String string_data) { 19 | this.descriptor_idx = descriptor_idx; 20 | this.string_data = string_data; 21 | } 22 | 23 | @Override 24 | public String toString() { 25 | return "DexTypeId{" + 26 | "descriptor_idx=" + descriptor_idx + 27 | ", string_data='" + string_data + '\'' + 28 | '}'; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/dex/bean/clazz/DexClassData.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.dex.bean.clazz; 2 | 3 | /** 4 | * Created by luyao 5 | * on 2018/12/19 13:27 6 | */ 7 | public class DexClassData { 8 | 9 | public int staticFieldsSize; 10 | public int instanceFieldsSize; 11 | public int directMethodsSize; 12 | public int virtualMethodsSize; 13 | 14 | public DexClassData(int staticFieldsSize, int instanceFieldsSize, int directMethodsSize, int virtualMethodsSize) { 15 | this.staticFieldsSize = staticFieldsSize; 16 | this.instanceFieldsSize = instanceFieldsSize; 17 | this.directMethodsSize = directMethodsSize; 18 | this.virtualMethodsSize = virtualMethodsSize; 19 | } 20 | 21 | @Override 22 | public String toString() { 23 | return "DexClassData{" + 24 | "staticFieldsSize=" + staticFieldsSize + 25 | ", instanceFieldsSize=" + instanceFieldsSize + 26 | ", directMethodsSize=" + directMethodsSize + 27 | ", virtualMethodsSize=" + virtualMethodsSize + 28 | '}'; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/dex/bean/clazz/DexCode.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.dex.bean.clazz; 2 | 3 | import java.util.Arrays; 4 | 5 | /** 6 | * Created by luyao 7 | * on 2018/12/19 15:02 8 | */ 9 | public class DexCode { 10 | 11 | public int registers_size; 12 | public int ins_size; 13 | public int outs_size; 14 | public int tries_size; 15 | public int debug_info_off; 16 | public int insns_size; 17 | public String[] insns; 18 | 19 | public DexCode(int registers_size, int ins_size, int outs_size, int tries_size, int debug_info_off, int insns_size, int[] insns) { 20 | this.registers_size = registers_size; 21 | this.ins_size = ins_size; 22 | this.outs_size = outs_size; 23 | this.tries_size = tries_size; 24 | this.debug_info_off = debug_info_off; 25 | this.insns_size = insns_size; 26 | this.insns = transform(insns); 27 | } 28 | 29 | private String[] transform(int[] insns) { 30 | String[] result = new String[insns.length]; 31 | for (int i = 0; i < insns.length; i++) { 32 | result[i] = "0x"+Integer.toHexString(insns[i]); 33 | } 34 | return result; 35 | } 36 | 37 | 38 | @Override 39 | public String toString() { 40 | return "DexCode{" + 41 | "registers_size=" + registers_size + 42 | ", ins_size=" + ins_size + 43 | ", outs_size=" + outs_size + 44 | ", tries_size=" + tries_size + 45 | ", debug_info_off=" + debug_info_off + 46 | ", insns_size=" + insns_size + 47 | ", insns=" + Arrays.toString(insns) + 48 | '}'; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/dex/bean/clazz/EncodedField.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.dex.bean.clazz; 2 | 3 | /** 4 | * Created by luyao 5 | * on 2018/12/19 14:48 6 | */ 7 | public class EncodedField { 8 | 9 | public int field_idx; 10 | public int access_flags; 11 | 12 | public EncodedField(int field_idx, int access_flags) { 13 | this.field_idx = field_idx; 14 | this.access_flags = access_flags; 15 | } 16 | 17 | public int getField_idx() { 18 | return field_idx; 19 | } 20 | 21 | public void setField_idx(int field_idx) { 22 | this.field_idx = field_idx; 23 | } 24 | 25 | public int getAccess_flags() { 26 | return access_flags; 27 | } 28 | 29 | public void setAccess_flags(int access_flags) { 30 | this.access_flags = access_flags; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/dex/bean/clazz/EncodedMethod.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.dex.bean.clazz; 2 | 3 | /** 4 | * Created by luyao 5 | * on 2018/12/19 15:00 6 | */ 7 | public class EncodedMethod { 8 | 9 | public int method_idx; 10 | public int access_flags; 11 | public int code_off; 12 | public DexCode dexCode; 13 | 14 | public EncodedMethod(int method_idx, int access_flags, int code_off) { 15 | this.method_idx = method_idx; 16 | this.access_flags = access_flags; 17 | this.code_off = code_off; 18 | } 19 | 20 | public DexCode getDexCode() { 21 | return dexCode; 22 | } 23 | 24 | public void setDexCode(DexCode dexCode) { 25 | this.dexCode = dexCode; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/xml/bean/NameSpace.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.xml.bean; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * Created by luyao 7 | * on 2018/12/14 16:09 8 | */ 9 | public class NameSpace { 10 | 11 | private List attributes; 12 | 13 | public List getAttributes() { 14 | return attributes; 15 | } 16 | 17 | public void setAttributes(List attributes) { 18 | this.attributes = attributes; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/xml/bean/Xml.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.xml.bean; 2 | 3 | import luyao.parser.xml.bean.chunk.Chunk; 4 | 5 | import java.util.HashMap; 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | /** 10 | * Created by luyao 11 | * on 2018/5/2 13:48 12 | */ 13 | public class Xml { 14 | 15 | 16 | public static final int START_NAMESPACE_CHUNK_TYPE = 0x00100100; 17 | public static final int END_NAMESPACE_CHUNK_TYPE = 0x00100101; 18 | public static final int START_TAG_CHUNK_TYPE = 0x00100102; 19 | public static final int END_TAG_CHUNK_TYPE = 0x00100103; 20 | public static final int TEXT_CHUNK_TYPE = 0x00100104; 21 | 22 | public List stringChunkList; 23 | public List tagNameList; 24 | public List chunkList; 25 | public static Map nameSpaceMap = new HashMap<>(); 26 | public static StringBuilder BLANK = new StringBuilder(" "); 27 | public static String blank = " "; 28 | 29 | public Xml(List stringChunkList, List tagNameList, List chunkList) { 30 | this.stringChunkList = stringChunkList; 31 | this.tagNameList = tagNameList; 32 | this.chunkList = chunkList; 33 | } 34 | 35 | @Override 36 | public String toString() { 37 | StringBuilder builder = new StringBuilder(); 38 | builder.append("\n"); 39 | for (Chunk chunk : chunkList) { 40 | builder.append(chunk.toXmlString()); 41 | } 42 | return builder.toString(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/xml/bean/chunk/Chunk.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.xml.bean.chunk; 2 | 3 | /** 4 | * Created by luyao 5 | * on 2018/12/14 16:17 6 | */ 7 | public abstract class Chunk { 8 | 9 | int chunkType; 10 | int chunkSize; 11 | int lineNumber; 12 | 13 | Chunk(int chunkType){ 14 | this.chunkType=chunkType; 15 | } 16 | 17 | public abstract String toXmlString(); 18 | } 19 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/xml/bean/chunk/EndNameSpaceChunk.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.xml.bean.chunk; 2 | 3 | import luyao.parser.xml.bean.Xml; 4 | 5 | /** 6 | * Created by luyao 7 | * on 2018/12/14 16:23 8 | */ 9 | public class EndNameSpaceChunk extends Chunk { 10 | 11 | private int prefix; 12 | private int uri; 13 | 14 | public EndNameSpaceChunk(int chunkSize, int lineNumber, int prefix, int uri) { 15 | super(Xml.END_NAMESPACE_CHUNK_TYPE); 16 | this.chunkSize = chunkSize; 17 | this.lineNumber = lineNumber; 18 | this.prefix = prefix; 19 | this.uri = uri; 20 | } 21 | 22 | public int getPrefix() { 23 | return prefix; 24 | } 25 | 26 | public void setPrefix(int prefix) { 27 | this.prefix = prefix; 28 | } 29 | 30 | public int getUri() { 31 | return uri; 32 | } 33 | 34 | public void setUri(int uri) { 35 | this.uri = uri; 36 | } 37 | 38 | @Override 39 | public String toXmlString() { 40 | return ""; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/xml/bean/chunk/EndTagChunk.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.xml.bean.chunk; 2 | 3 | import luyao.parser.xml.XmlParser; 4 | import luyao.parser.xml.bean.Xml; 5 | 6 | import static luyao.parser.xml.bean.Xml.BLANK; 7 | import static luyao.parser.xml.bean.Xml.blank; 8 | 9 | /** 10 | * Created by luyao 11 | * on 2018/12/14 16:27 12 | */ 13 | public class EndTagChunk extends Chunk { 14 | private int nameSpaceUri; 15 | private String name; 16 | 17 | public EndTagChunk(int nameSpaceUri, String name) { 18 | super(Xml.END_TAG_CHUNK_TYPE); 19 | this.nameSpaceUri = nameSpaceUri; 20 | this.name = name; 21 | } 22 | 23 | 24 | public int getNameSpaceUri() { 25 | return nameSpaceUri; 26 | } 27 | 28 | public void setNameSpaceUri(int nameSpaceUri) { 29 | this.nameSpaceUri = nameSpaceUri; 30 | } 31 | 32 | public String getName() { 33 | return name; 34 | } 35 | 36 | public void setName(String name) { 37 | this.name = name; 38 | } 39 | 40 | @Override 41 | public String toXmlString() { 42 | if (name.equals("manifest")) 43 | BLANK.setLength(0); 44 | else 45 | BLANK.setLength(BLANK.length() - blank.length()); 46 | 47 | return XmlParser.format("\n%s", BLANK, name); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Parser/src/main/luyao/parser/xml/bean/chunk/StartNameSpaceChunk.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.xml.bean.chunk; 2 | 3 | import luyao.parser.xml.bean.Xml; 4 | 5 | /** 6 | * Created by luyao 7 | * on 2018/12/14 16:19 8 | */ 9 | public class StartNameSpaceChunk extends Chunk { 10 | 11 | private int prefix; 12 | private int uri; 13 | 14 | public StartNameSpaceChunk(int chunkSize, int lineNumber, int prefix, int uri) { 15 | super(Xml.START_NAMESPACE_CHUNK_TYPE); 16 | this.chunkSize = chunkSize; 17 | this.lineNumber = lineNumber; 18 | this.prefix = prefix; 19 | this.uri = uri; 20 | } 21 | 22 | public int getPrefix() { 23 | return prefix; 24 | } 25 | 26 | public void setPrefix(int prefix) { 27 | this.prefix = prefix; 28 | } 29 | 30 | public int getUri() { 31 | return uri; 32 | } 33 | 34 | public void setUri(int uri) { 35 | this.uri = uri; 36 | } 37 | 38 | @Override 39 | public String toXmlString() { 40 | return ""; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Parser/src/test/luyao/parser/arsc/ResParserTest.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.arsc; 2 | 3 | 4 | import org.junit.Test; 5 | 6 | import java.io.File; 7 | 8 | /** 9 | * Created by luyao 10 | * on 2018/12/20 13:45 11 | */ 12 | public class ResParserTest { 13 | 14 | @Test 15 | public void parse() { 16 | File file = new File("resources/resources_wan.arsc"); 17 | ResParser resParser = new ResParser(file); 18 | resParser.parse(); 19 | } 20 | 21 | } -------------------------------------------------------------------------------- /Parser/src/test/luyao/parser/classes/ClassParserTest.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.classes; 2 | 3 | 4 | import org.junit.Test; 5 | 6 | import java.io.File; 7 | import java.io.FileInputStream; 8 | import java.io.FileNotFoundException; 9 | 10 | /** 11 | * Created by luyao 12 | * on 2018/12/14 10:30 13 | */ 14 | public class ClassParserTest { 15 | 16 | @Test 17 | public void parse() { 18 | File file=new File("resources/Hello.class"); 19 | try { 20 | ClassParser classParser=new ClassParser(new FileInputStream(file)); 21 | classParser.parse(); 22 | } catch (FileNotFoundException e) { 23 | e.printStackTrace(); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Parser/src/test/luyao/parser/dex/DexParserTest.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.dex; 2 | 3 | import luyao.parser.utils.Utils; 4 | import org.junit.Test; 5 | 6 | import java.io.File; 7 | import java.io.FileInputStream; 8 | import java.io.FileNotFoundException; 9 | 10 | public class DexParserTest { 11 | 12 | @Test 13 | public void parse() { 14 | File file = new File("resources/Hello.dex"); 15 | try { 16 | DexParser dexParser = new DexParser(new FileInputStream(file), Utils.readAll(file)); 17 | dexParser.parse(); 18 | } catch (FileNotFoundException e) { 19 | e.printStackTrace(); 20 | } 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /Parser/src/test/luyao/parser/xml/XmlParserTest.java: -------------------------------------------------------------------------------- 1 | package luyao.parser.xml; 2 | 3 | import org.junit.Test; 4 | 5 | import java.io.File; 6 | import java.io.FileInputStream; 7 | import java.io.FileNotFoundException; 8 | 9 | /** 10 | * Created by luyao 11 | * on 2018/12/14 10:29 12 | */ 13 | public class XmlParserTest { 14 | 15 | @Test 16 | public void parse() { 17 | File file = new File("resources/AndroidManifest.xml"); 18 | try { 19 | XmlParser xmlParser = new XmlParser(new FileInputStream(file)); 20 | xmlParser.parse(); 21 | } catch (FileNotFoundException e) { 22 | e.printStackTrace(); 23 | } 24 | } 25 | 26 | @Test 27 | public void parseWeixin() { 28 | File file = new File("resources/AndroidManifest_qq.xml"); 29 | try { 30 | XmlParser xmlParser = new XmlParser(new FileInputStream(file)); 31 | xmlParser.parse(); 32 | } catch (FileNotFoundException e) { 33 | e.printStackTrace(); 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # android-reverse 2 | 3 | 安卓逆向笔记 4 | 5 | 1. [Class 文件格式详解](class/class_parser.md) 6 | 2. [Smali 语法解析——Hello World](smali/smali_hello_world.md) 7 | 3. [Smali 语法解析 —— 数学运算,条件判断,循环](smali/smali_base.md) 8 | 4. [Smali 语法解析 —— 类](smali/smali_class.md) 9 | 5. [AndroidManifest.xml 二进制解析](android/xml/parse_xml.md) 10 | -------------------------------------------------------------------------------- /android/crackme/crackme.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme.apk -------------------------------------------------------------------------------- /android/crackme/crackme_back/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /android/crackme/crackme_back/.idea/markdown-navigator/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /android/crackme/crackme_back/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/crackme/crackme_back/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /android/crackme/crackme_back/apktool.yml: -------------------------------------------------------------------------------- 1 | !!brut.androlib.meta.MetaInfo 2 | apkFileName: crackme.apk 3 | compressionType: false 4 | doNotCompress: 5 | - arsc 6 | isFrameworkApk: false 7 | packageInfo: 8 | forcedPackageId: '127' 9 | renameManifestPackage: null 10 | sdkInfo: 11 | minSdkVersion: '8' 12 | targetSdkVersion: '15' 13 | sharedLibrary: false 14 | unknownFiles: {} 15 | usesFramework: 16 | ids: 17 | - 1 18 | tag: null 19 | version: 2.2.3 20 | versionInfo: 21 | versionCode: '1' 22 | versionName: '1.0' 23 | -------------------------------------------------------------------------------- /android/crackme/crackme_back/build/apk/AndroidManifest.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/build/apk/AndroidManifest.xml -------------------------------------------------------------------------------- /android/crackme/crackme_back/build/apk/classes.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/build/apk/classes.dex -------------------------------------------------------------------------------- /android/crackme/crackme_back/build/apk/res/drawable-hdpi-v4/ic_action_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/build/apk/res/drawable-hdpi-v4/ic_action_search.png -------------------------------------------------------------------------------- /android/crackme/crackme_back/build/apk/res/drawable-hdpi-v4/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/build/apk/res/drawable-hdpi-v4/ic_launcher.png -------------------------------------------------------------------------------- /android/crackme/crackme_back/build/apk/res/drawable-ldpi-v4/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/build/apk/res/drawable-ldpi-v4/ic_launcher.png -------------------------------------------------------------------------------- /android/crackme/crackme_back/build/apk/res/drawable-mdpi-v4/ic_action_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/build/apk/res/drawable-mdpi-v4/ic_action_search.png -------------------------------------------------------------------------------- /android/crackme/crackme_back/build/apk/res/drawable-mdpi-v4/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/build/apk/res/drawable-mdpi-v4/ic_launcher.png -------------------------------------------------------------------------------- /android/crackme/crackme_back/build/apk/res/drawable-xhdpi-v4/ic_action_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/build/apk/res/drawable-xhdpi-v4/ic_action_search.png -------------------------------------------------------------------------------- /android/crackme/crackme_back/build/apk/res/drawable-xhdpi-v4/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/build/apk/res/drawable-xhdpi-v4/ic_launcher.png -------------------------------------------------------------------------------- /android/crackme/crackme_back/build/apk/res/layout/activity_main.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/build/apk/res/layout/activity_main.xml -------------------------------------------------------------------------------- /android/crackme/crackme_back/build/apk/res/menu/activity_main.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/build/apk/res/menu/activity_main.xml -------------------------------------------------------------------------------- /android/crackme/crackme_back/build/apk/resources.arsc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/build/apk/resources.arsc -------------------------------------------------------------------------------- /android/crackme/crackme_back/dist/crackme.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/dist/crackme.apk -------------------------------------------------------------------------------- /android/crackme/crackme_back/gen/com/droider/crackme0201/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.droider.crackme0201; 4 | 5 | /* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */ 6 | public final class BuildConfig { 7 | public final static boolean DEBUG = Boolean.parseBoolean(null); 8 | } -------------------------------------------------------------------------------- /android/crackme/crackme_back/gen/com/droider/crackme0201/Manifest.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.droider.crackme0201; 4 | 5 | /* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */ 6 | public final class Manifest { 7 | } -------------------------------------------------------------------------------- /android/crackme/crackme_back/gen/com/droider/crackme0201/R.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.droider.crackme0201; 4 | 5 | /* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */ 6 | public final class R { 7 | } -------------------------------------------------------------------------------- /android/crackme/crackme_back/original/AndroidManifest.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/original/AndroidManifest.xml -------------------------------------------------------------------------------- /android/crackme/crackme_back/original/META-INF/CERT.RSA: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/original/META-INF/CERT.RSA -------------------------------------------------------------------------------- /android/crackme/crackme_back/original/META-INF/CERT.SF: -------------------------------------------------------------------------------- 1 | Signature-Version: 1.0 2 | SHA1-Digest-Manifest: Lxz0Q5jyAp6sJLAd8jz8a2eLjv0= 3 | Created-By: 1.0 (Android SignApk) 4 | 5 | Name: res/drawable-xhdpi-v4/ic_launcher.png 6 | SHA1-Digest: plXTdv4lelklK3cTXPleip9OcWc= 7 | 8 | Name: AndroidManifest.xml 9 | SHA1-Digest: lO8nAtKTjaCH0ntev7gDWwfz84s= 10 | 11 | Name: res/drawable-hdpi-v4/ic_action_search.png 12 | SHA1-Digest: xete6xuDAKJmL0UpawJvF+ZQTe8= 13 | 14 | Name: res/drawable-mdpi-v4/ic_action_search.png 15 | SHA1-Digest: 40Nu/gqu+9R8gz4doK3A7d67ypI= 16 | 17 | Name: res/menu/activity_main.xml 18 | SHA1-Digest: hFuakCbDFZemX0H8rZRXv2S2u5E= 19 | 20 | Name: res/drawable-xhdpi-v4/ic_action_search.png 21 | SHA1-Digest: ZxytrmZ5wcH/PkyOi+ZV2RT8ifA= 22 | 23 | Name: res/drawable-hdpi-v4/ic_launcher.png 24 | SHA1-Digest: uFmu1cP2unLm75ymnYdb1QLQw/Q= 25 | 26 | Name: res/layout/activity_main.xml 27 | SHA1-Digest: bONmf2cHda4g+6FEos47Zrr2jFM= 28 | 29 | Name: resources.arsc 30 | SHA1-Digest: 9giQd27MuPK+oAQZ55jXUYOy5po= 31 | 32 | Name: res/drawable-mdpi-v4/ic_launcher.png 33 | SHA1-Digest: mbbH1U7+PBIVA9e4N1rKj5VBhfc= 34 | 35 | Name: classes.dex 36 | SHA1-Digest: 6F37Dmf4qIbdT5K3p9oR6pnT7N4= 37 | 38 | Name: res/drawable-ldpi-v4/ic_launcher.png 39 | SHA1-Digest: GBH+IPG0wzZLK+BcaEWYR6nOPFs= 40 | 41 | -------------------------------------------------------------------------------- /android/crackme/crackme_back/original/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Created-By: 1.0 (Android SignApk) 3 | 4 | Name: res/drawable-xhdpi-v4/ic_launcher.png 5 | SHA1-Digest: TJE1tg63y88xLdIALKGpuLmgh0s= 6 | 7 | Name: AndroidManifest.xml 8 | SHA1-Digest: hsUb36uk+o+HtSLBG908GL8VHq0= 9 | 10 | Name: res/drawable-hdpi-v4/ic_action_search.png 11 | SHA1-Digest: rOWnNxWCWKwkicf+FpYGMg1fX2Y= 12 | 13 | Name: res/drawable-mdpi-v4/ic_action_search.png 14 | SHA1-Digest: XjltJdEB3tvakTn9CN7KwdaNT68= 15 | 16 | Name: res/menu/activity_main.xml 17 | SHA1-Digest: DykJC/KXVTzwSk1vvVbModwN574= 18 | 19 | Name: res/drawable-xhdpi-v4/ic_action_search.png 20 | SHA1-Digest: WzSVDDIHZpn0cFeuxgKRJete4TU= 21 | 22 | Name: res/drawable-hdpi-v4/ic_launcher.png 23 | SHA1-Digest: ioH2V9g4FYKkqpDHk7jPryMKtcE= 24 | 25 | Name: res/layout/activity_main.xml 26 | SHA1-Digest: ze7FMPozOYWKTnQBSBhhzdhNHrI= 27 | 28 | Name: resources.arsc 29 | SHA1-Digest: p/vuniJQCtBx1kC9X5QlWL1tfGc= 30 | 31 | Name: res/drawable-mdpi-v4/ic_launcher.png 32 | SHA1-Digest: aM73uFWfPOOvq5Kk9Ffd3cWm0OQ= 33 | 34 | Name: classes.dex 35 | SHA1-Digest: C2NXy1e2PihSsZhYtqQq0q8GBao= 36 | 37 | Name: res/drawable-ldpi-v4/ic_launcher.png 38 | SHA1-Digest: r6Mdl54h2qEvVnqgfsgxU4CysiI= 39 | 40 | -------------------------------------------------------------------------------- /android/crackme/crackme_back/res/drawable-hdpi-v4/ic_action_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/res/drawable-hdpi-v4/ic_action_search.png -------------------------------------------------------------------------------- /android/crackme/crackme_back/res/drawable-hdpi-v4/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/res/drawable-hdpi-v4/ic_launcher.png -------------------------------------------------------------------------------- /android/crackme/crackme_back/res/drawable-ldpi-v4/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/res/drawable-ldpi-v4/ic_launcher.png -------------------------------------------------------------------------------- /android/crackme/crackme_back/res/drawable-mdpi-v4/ic_action_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/res/drawable-mdpi-v4/ic_action_search.png -------------------------------------------------------------------------------- /android/crackme/crackme_back/res/drawable-mdpi-v4/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/res/drawable-mdpi-v4/ic_launcher.png -------------------------------------------------------------------------------- /android/crackme/crackme_back/res/drawable-xhdpi-v4/ic_action_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/res/drawable-xhdpi-v4/ic_action_search.png -------------------------------------------------------------------------------- /android/crackme/crackme_back/res/drawable-xhdpi-v4/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lulululbj/android-reverse/146dcffc5df89221e7dc004eaadce547414d4de8/android/crackme/crackme_back/res/drawable-xhdpi-v4/ic_launcher.png -------------------------------------------------------------------------------- /android/crackme/crackme_back/res/menu/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /android/crackme/crackme_back/res/values-large-v4/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8.0dip 4 | 16.0dip 5 | 16.0dip 6 | 7 | -------------------------------------------------------------------------------- /android/crackme/crackme_back/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8.0dip 4 | 8.0dip 5 | 16.0dip 6 | 7 | -------------------------------------------------------------------------------- /android/crackme/crackme_back/res/values/ids.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | false 5 | false 6 | false 7 | false 8 | false 9 | 10 | -------------------------------------------------------------------------------- /android/crackme/crackme_back/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Crackme0201 4 | Settings 5 | Crackme0201 6 | Android程序破解演示实例 7 | 用户名: 8 | 注册码: 9 | 注 册 10 | 请输入用户名 11 | 请输入16位的注册码 12 | 程序未注册 13 | 程序已注册 14 | 无效用户名或注册码 15 | 恭喜您!注册成功 16 | 作弊 17 | 18 | -------------------------------------------------------------------------------- /android/crackme/crackme_back/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 |